Rev 2980 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2980 | Rev 2995 | ||
---|---|---|---|
Line 12... | Line 12... | ||
12 | ;; GNU GENERAL PUBLIC LICENSE ;; |
12 | ;; GNU GENERAL PUBLIC LICENSE ;; |
13 | ;; Version 2, June 1991 ;; |
13 | ;; Version 2, June 1991 ;; |
14 | ;; ;; |
14 | ;; ;; |
15 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
15 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 16... | Line 16... | ||
16 | 16 | ||
Line 17... | Line 17... | ||
17 | $Revision: 2980 $ |
17 | $Revision: 2995 $ |
Line 18... | Line 18... | ||
18 | 18 | ||
Line 129... | Line 129... | ||
129 | jnz .checksum_mismatch |
129 | jnz .checksum_mismatch |
Line 130... | Line 130... | ||
130 | 130 | ||
131 | .no_checksum: |
131 | .no_checksum: |
Line 132... | Line 132... | ||
132 | DEBUGF 1,"UDP_input: checksum ok\n" |
132 | DEBUGF 1,"UDP_input: checksum ok\n" |
Line 133... | Line -... | ||
133 | - | ||
134 | ; Convert port numbers to intel format |
- | |
135 | 133 | ||
Line 136... | Line 134... | ||
136 | rol [esi + UDP_header.DestinationPort], 8 |
134 | ; Convert length to little endian |
137 | rol [esi + UDP_header.SourcePort], 8 |
135 | |
138 | rol [esi + UDP_header.Length], 8 |
136 | rol [esi + UDP_header.Length], 8 |
Line 196... | Line 194... | ||
196 | pusha |
194 | pusha |
197 | lea ecx, [eax + SOCKET.mutex] |
195 | lea ecx, [eax + SOCKET.mutex] |
198 | call mutex_lock |
196 | call mutex_lock |
199 | popa |
197 | popa |
Line 200... | Line 198... | ||
200 | 198 | ||
201 | DEBUGF 1,"UDP_input: new remote port=%u\n", cx |
199 | DEBUGF 1,"UDP_input: new remote port=%x\n", cx ; FIXME: find a way to print big endian values with debugf |
202 | mov [eax + UDP_SOCKET.RemotePort], cx |
200 | mov [eax + UDP_SOCKET.RemotePort], cx |
Line 203... | Line 201... | ||
203 | inc [eax + UDP_SOCKET.firstpacket] |
201 | inc [eax + UDP_SOCKET.firstpacket] |
Line 232... | Line 230... | ||
232 | UDP_output: |
230 | UDP_output: |
Line 233... | Line 231... | ||
233 | 231 | ||
Line 234... | Line 232... | ||
234 | DEBUGF 1,"UDP_output: socket=%x bytes=%u data_ptr=%x\n", eax, ecx, esi |
232 | DEBUGF 1,"UDP_output: socket=%x bytes=%u data_ptr=%x\n", eax, ecx, esi |
235 | 233 | ||
236 | mov dx, [eax + UDP_SOCKET.RemotePort] |
- | |
237 | DEBUGF 1,"UDP_output: remote port=%u, ", dx |
234 | mov dx, [eax + UDP_SOCKET.RemotePort] |
238 | rol dx, 8 |
235 | DEBUGF 1,"UDP_output: remote port=%x, ", dx ; FIXME: find a way to print big endian values with debugf |
239 | rol edx, 16 |
236 | rol edx, 16 |
240 | mov dx, [eax + UDP_SOCKET.LocalPort] |
- | |
Line 241... | Line 237... | ||
241 | DEBUGF 1,"local port=%u\n", dx |
237 | mov dx, [eax + UDP_SOCKET.LocalPort] |
242 | rol dx, 8 |
238 | DEBUGF 1,"local port=%x\n", dx |
243 | 239 | ||
244 | sub esp, 8 ; Data ptr and data size will be placed here |
240 | sub esp, 8 ; Data ptr and data size will be placed here |