Rev 3555 | Rev 3626 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3555 | Rev 3589 | ||
---|---|---|---|
Line 57... | Line 57... | ||
57 | ; |
57 | ; |
58 | ;----------------------------------------------------------------- |
58 | ;----------------------------------------------------------------- |
59 | align 4 |
59 | align 4 |
60 | PPPoE_discovery_input: |
60 | PPPoE_discovery_input: |
Line 61... | Line 61... | ||
61 | 61 | ||
Line 62... | Line 62... | ||
62 | DEBUGF 2,"PPPoE_discovery_input\n" |
62 | DEBUGF DEBUG_NETWORK_VERBOSE, "PPPoE_discovery_input\n" |
Line 63... | Line 63... | ||
63 | 63 | ||
Line 82... | Line 82... | ||
82 | mov esi, [esp] |
82 | mov esi, [esp] |
Line 83... | Line 83... | ||
83 | 83 | ||
Line 84... | Line 84... | ||
84 | jmp SOCKET_input |
84 | jmp SOCKET_input |
85 | 85 | ||
86 | .dump: |
86 | .dump: |
87 | DEBUGF 1,'PPPoE_discovery_input: dumping\n' |
87 | DEBUGF DEBUG_NETWORK_VERBOSE, 'PPPoE_discovery_input: dumping\n' |
88 | call kernel_free |
88 | call kernel_free |
Line 101... | Line 101... | ||
101 | ;-------------------------------------- |
101 | ;-------------------------------------- |
Line 102... | Line 102... | ||
102 | 102 | ||
103 | align 4 |
103 | align 4 |
Line 104... | Line 104... | ||
104 | PPPoE_discovery_output: |
104 | PPPoE_discovery_output: |
Line 105... | Line 105... | ||
105 | 105 | ||
106 | DEBUGF 2,"PPPoE_discovery_output: socket=%x buffer=%x size=%d\n", eax, esi, ecx |
106 | DEBUGF DEBUG_NETWORK_VERBOSE, "PPPoE_discovery_output: socket=%x buffer=%x size=%d\n", eax, esi, ecx |
107 | 107 | ||
108 | ; RFC2516: An entire PADI packet (including the PPPoE header) MUST NOT |
108 | ; RFC2516: An entire PADI packet (including the PPPoE header) MUST NOT |
Line 121... | Line 121... | ||
121 | jz .bad |
121 | jz .bad |
Line 122... | Line 122... | ||
122 | 122 | ||
123 | cmp [ebx + NET_DEVICE.type], NET_TYPE_ETH |
123 | cmp [ebx + NET_DEVICE.type], NET_TYPE_ETH |
Line 124... | Line 124... | ||
124 | jne .bad |
124 | jne .bad |
Line 125... | Line 125... | ||
125 | 125 | ||
126 | DEBUGF 2,"PPPoE_discovery_output: device=%x\n", ebx |
126 | DEBUGF DEBUG_NETWORK_VERBOSE, "PPPoE_discovery_output: device=%x\n", ebx |
127 | 127 | ||
128 | ; Create packet. |
128 | ; Create packet. |
Line 191... | Line 191... | ||
191 | 191 | ||
192 | movzx ecx, [edx + PPPoE_frame.Length] |
192 | movzx ecx, [edx + PPPoE_frame.Length] |
Line 193... | Line 193... | ||
193 | xchg cl, ch |
193 | xchg cl, ch |
194 | 194 | ||
195 | mov ax, [edx + PPPoE_frame.SessionID] |
195 | mov ax, [edx + PPPoE_frame.SessionID] |
196 | DEBUGF 2,"PPPoE_input: session ID=%x, length=%u\n", ax, cx |
196 | DEBUGF DEBUG_NETWORK_VERBOSE, "PPPoE_input: session ID=%x, length=%u\n", ax, cx |
Line 197... | Line 197... | ||
197 | cmp ax, [PPPoE_SID] |
197 | cmp ax, [PPPoE_SID] |
198 | jne .dump |
198 | jne .dump |
Line 205... | Line 205... | ||
205 | 205 | ||
206 | ; cmp ax, PPP_IPv6 |
206 | ; cmp ax, PPP_IPv6 |
Line 207... | Line 207... | ||
207 | ; je IPv6_input |
207 | ; je IPv6_input |
208 | 208 | ||
Line 209... | Line 209... | ||
209 | jmp PPPoE_discovery_input ; Send LCP,CHAP,CBCP,... packets to the PPP dialer |
209 | jmp PPPoE_discovery_input ; Send LCP,CHAP,CBCP,... packets to the PPP dialer |
210 | DEBUGF 2,"PPPoE_input: Unknown protocol=%x\n", ax |
210 | DEBUGF DEBUG_NETWORK_VERBOSE, "PPPoE_input: Unknown protocol=%x\n", ax |
211 | 211 | ||
212 | .dump: |
212 | .dump: |
213 | DEBUGF 2,"PPPoE_input: dumping\n" |
213 | DEBUGF DEBUG_NETWORK_VERBOSE, "PPPoE_input: dumping\n" |
Line 236... | Line 236... | ||
236 | ; |
236 | ; |
237 | ;----------------------------------------------------------------- |
237 | ;----------------------------------------------------------------- |
238 | align 4 |
238 | align 4 |
239 | PPPoE_output: |
239 | PPPoE_output: |
Line 240... | Line 240... | ||
240 | 240 | ||
Line 241... | Line 241... | ||
241 | DEBUGF 1,"PPPoE_output: size=%u device=%x\n", ecx, ebx |
241 | DEBUGF DEBUG_NETWORK_VERBOSE, "PPPoE_output: size=%u device=%x\n", ecx, ebx |
242 | 242 | ||
Line 243... | Line 243... | ||
243 | pushw di |
243 | pushw di |
Line 261... | Line 261... | ||
261 | pop word [edi + PPPoE_frame.Payload] |
261 | pop word [edi + PPPoE_frame.Payload] |
Line 262... | Line 262... | ||
262 | 262 | ||
263 | sub ecx, 2 |
263 | sub ecx, 2 |
Line 264... | Line 264... | ||
264 | add edi, PPPoE_frame.Payload + 2 |
264 | add edi, PPPoE_frame.Payload + 2 |
265 | 265 | ||
Line 266... | Line 266... | ||
266 | DEBUGF 1,"PPPoE_output: success!\n" |
266 | DEBUGF DEBUG_NETWORK_VERBOSE, "PPPoE_output: success!\n" |
267 | ret |
267 | ret |
Line 274... | Line 274... | ||
274 | ret |
274 | ret |
Line 275... | Line 275... | ||
275 | 275 | ||
Line 276... | Line 276... | ||
276 | 276 | ||
Line 277... | Line 277... | ||
277 | PPPoE_start_connection: |
277 | PPPoE_start_connection: |
278 | 278 | ||
Line 279... | Line 279... | ||
279 | DEBUGF 2,"PPPoE_start_connection: %x\n", cx |
279 | DEBUGF DEBUG_NETWORK_VERBOSE, "PPPoE_start_connection: %x\n", cx |
Line 294... | Line 294... | ||
294 | 294 | ||
295 | 295 | ||
Line 296... | Line 296... | ||
296 | align 4 |
296 | align 4 |
Line 297... | Line 297... | ||
297 | PPPoE_stop_connection: |
297 | PPPoE_stop_connection: |
298 | 298 | ||
299 | DEBUGF 2,"PPPoE_stop_connection\n" |
299 | DEBUGF DEBUG_NETWORK_VERBOSE, "PPPoE_stop_connection\n" |
300 | 300 |