Rev 3908 | Rev 5565 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3908 | Rev 5201 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;; ;; |
2 | ;; ;; |
3 | ;; Copyright (C) KolibriOS team 2012-2013. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2012-2014. All rights reserved. ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; ;; |
5 | ;; ;; |
6 | ;; PPPoE.INC ;; |
6 | ;; PPPoE.INC ;; |
7 | ;; ;; |
7 | ;; ;; |
8 | ;; Part of the tcp/ip network stack for KolibriOS ;; |
8 | ;; Part of the tcp/ip network stack for KolibriOS ;; |
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 -... | Line 16... | ||
- | 16 | ||
- | 17 | $Revision: 5015 $ |
|
- | 18 | ||
16 | 19 | ||
17 | struct PPPoE_frame |
20 | struct PPPoE_frame |
18 | VersionAndType db ? |
21 | VersionAndType db ? |
19 | Code db ? |
22 | Code db ? |
20 | SessionID dw ? |
23 | SessionID dw ? |
Line 238... | Line 241... | ||
238 | 241 | ||
239 | ;----------------------------------------------------------------- |
242 | ;----------------------------------------------------------------- |
240 | ; |
243 | ; |
241 | ; PPPoE_output |
244 | ; PPPoE_output |
242 | ; |
245 | ; |
243 | ; IN: |
246 | ; IN: ax = protocol |
244 | ; ebx = device ptr |
247 | ; ebx = device ptr |
245 | ; ecx = packet size |
248 | ; ecx = packet size |
246 | ; |
- | |
247 | ; di = protocol |
- | |
248 | ; |
249 | ; |
249 | ; OUT: edi = 0 on error, pointer to buffer otherwise |
250 | ; OUT: eax = buffer start / 0 on error |
250 | ; eax = buffer start |
251 | ; ebx = device ptr |
251 | ; ebx = to device structure |
- | |
252 | ; ecx = unchanged (packet size of embedded data) |
252 | ; ecx = packet size |
- | 253 | ; edx = size of complete buffer |
|
253 | ; edx = size of complete buffer |
254 | ; edi = start of PPP payload |
254 | ; |
255 | ; |
255 | ;----------------------------------------------------------------- |
256 | ;----------------------------------------------------------------- |
256 | align 4 |
257 | align 4 |
Line 257... | Line 258... | ||
257 | PPPoE_output: |
258 | PPPoE_output: |
Line 258... | Line 259... | ||
258 | 259 | ||
259 | DEBUGF DEBUG_NETWORK_VERBOSE, "PPPoE_output: size=%u device=%x\n", ecx, ebx |
260 | DEBUGF DEBUG_NETWORK_VERBOSE, "PPPoE_output: size=%u device=%x\n", ecx, ebx |
Line 260... | Line 261... | ||
260 | 261 | ||
261 | pushw di |
- | |
262 | pushw [PPPoE_SID] |
262 | pushw ax |
263 | 263 | pushw [PPPoE_SID] |
|
264 | lea eax, [ebx + ETH_DEVICE.mac] |
264 | |
265 | lea edx, [PPPoE_MAC] |
265 | mov ax, ETHER_PROTO_PPP_SESSION |
Line 266... | Line 266... | ||
266 | add ecx, PPPoE_frame.Payload + 2 |
266 | add ecx, PPPoE_frame.Payload + 2 |
267 | mov di, ETHER_PROTO_PPP_SESSION |
267 | lea edx, [PPPoE_MAC] |
Line 285... | Line 285... | ||
285 | ret |
285 | ret |
Line 286... | Line 286... | ||
286 | 286 | ||
287 | 287 | ||
288 | .eth_error: |
288 | .eth_error: |
289 | add esp, 4 |
- | |
290 | xor edi, edi |
289 | add esp, 4 |
Line 291... | Line 290... | ||
291 | 290 | xor eax, eax |