Rev 4923 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4923 | Rev 5116 | ||
---|---|---|---|
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 16... | Line 16... | ||
16 | 16 | ||
Line 17... | Line 17... | ||
17 | $Revision: 4850 $ |
17 | $Revision: 5015 $ |
18 | 18 | ||
19 | 19 | ||
Line 241... | Line 241... | ||
241 | 241 | ||
242 | ;----------------------------------------------------------------- |
242 | ;----------------------------------------------------------------- |
243 | ; |
243 | ; |
244 | ; PPPoE_output |
244 | ; PPPoE_output |
245 | ; |
245 | ; |
246 | ; IN: |
246 | ; IN: ax = protocol |
247 | ; ebx = device ptr |
247 | ; ebx = device ptr |
248 | ; ecx = packet size |
248 | ; ecx = packet size |
249 | ; |
- | |
250 | ; di = protocol |
- | |
251 | ; |
249 | ; |
252 | ; OUT: edi = 0 on error, pointer to buffer otherwise |
250 | ; OUT: eax = buffer start / 0 on error |
253 | ; eax = buffer start |
251 | ; ebx = device ptr |
254 | ; ebx = to device structure |
- | |
255 | ; ecx = unchanged (packet size of embedded data) |
252 | ; ecx = packet size |
- | 253 | ; edx = size of complete buffer |
|
256 | ; edx = size of complete buffer |
254 | ; edi = start of PPP payload |
257 | ; |
255 | ; |
258 | ;----------------------------------------------------------------- |
256 | ;----------------------------------------------------------------- |
259 | align 4 |
257 | align 4 |
Line 260... | Line 258... | ||
260 | PPPoE_output: |
258 | PPPoE_output: |
Line 261... | Line 259... | ||
261 | 259 | ||
262 | 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 263... | Line 261... | ||
263 | 261 | ||
264 | pushw di |
- | |
265 | pushw [PPPoE_SID] |
262 | pushw ax |
266 | 263 | pushw [PPPoE_SID] |
|
267 | lea eax, [ebx + ETH_DEVICE.mac] |
264 | |
268 | lea edx, [PPPoE_MAC] |
265 | mov ax, ETHER_PROTO_PPP_SESSION |
Line 269... | Line 266... | ||
269 | add ecx, PPPoE_frame.Payload + 2 |
266 | add ecx, PPPoE_frame.Payload + 2 |
270 | mov di, ETHER_PROTO_PPP_SESSION |
267 | lea edx, [PPPoE_MAC] |
Line 288... | Line 285... | ||
288 | ret |
285 | ret |
Line 289... | Line 286... | ||
289 | 286 | ||
290 | 287 | ||
291 | .eth_error: |
288 | .eth_error: |
292 | add esp, 4 |
- | |
293 | xor edi, edi |
289 | add esp, 4 |
Line 294... | Line 290... | ||
294 | 290 | xor eax, eax |