Subversion Repositories Kolibri OS

Rev

Rev 3589 | Rev 3725 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3589 Rev 3626
Line 111... Line 111...
111
        ja      .bad
111
        ja      .bad
Line 112... Line 112...
112
 
112
 
113
; Check that device exists and is ethernet device
113
; Check that device exists and is ethernet device
Line 114... Line 114...
114
        mov     ebx, [eax + SOCKET.device]
114
        mov     ebx, [eax + SOCKET.device]
115
 
115
 
Line 116... Line 116...
116
        cmp     ebx, MAX_NET_DEVICES
116
        cmp     ebx, NET_DEVICES_MAX
117
        ja      .bad
117
        ja      .bad
118
 
118
 
Line 119... Line 119...
119
        mov     ebx, [NET_DRV_LIST + 4*ebx]
119
        mov     ebx, [NET_DRV_LIST + 4*ebx]
120
        test    ebx, ebx
120
        test    ebx, ebx
Line 121... Line 121...
121
        jz      .bad
121
        jz      .bad
Line 122... Line 122...
122
 
122
 
Line 146... Line 146...
146
; Overwrite source MAC and protocol type
146
; Overwrite source MAC and protocol type
147
        lea     edi, [eax + ETH_header.SrcMAC]
147
        lea     edi, [eax + ETH_header.SrcMAC]
148
        lea     esi, [ebx + ETH_DEVICE.mac]
148
        lea     esi, [ebx + ETH_DEVICE.mac]
149
        movsd
149
        movsd
150
        movsw
150
        movsw
151
        cmp     word[edi], ETHER_PPP_SESSION    ; Allow only PPP_discovery, or LCP
151
        cmp     word[edi], ETHER_PROTO_PPP_SESSION      ; Allow only PPP_discovery, or LCP
152
        je      @f
152
        je      @f
153
        mov     ax, ETHER_PPP_DISCOVERY
153
        mov     ax, ETHER_PROTO_PPP_DISCOVERY
154
        stosw
154
        stosw
155
       @@:
155
       @@:
Line 156... Line 156...
156
 
156
 
157
; And send the packet
157
; And send the packet
Line 198... Line 198...
198
        jne     .dump
198
        jne     .dump
Line 199... Line 199...
199
 
199
 
200
        mov     ax, word [edx + PPPoE_frame.Payload]
200
        mov     ax, word [edx + PPPoE_frame.Payload]
Line 201... Line 201...
201
        add     edx, PPPoE_frame.Payload + 2
201
        add     edx, PPPoE_frame.Payload + 2
202
 
202
 
Line 203... Line 203...
203
        cmp     ax, PPP_IPv4
203
        cmp     ax, PPP_PROTO_IPv4
204
        je      IPv4_input
204
        je      IPv4_input
Line 205... Line 205...
205
 
205
 
206
;        cmp     ax, PPP_IPv6
206
;        cmp     ax, PPP_PROTO_IPv6
Line 244... Line 244...
244
        pushw   [PPPoE_SID]
244
        pushw   [PPPoE_SID]
Line 245... Line 245...
245
 
245
 
246
        lea     eax, [ebx + ETH_DEVICE.mac]
246
        lea     eax, [ebx + ETH_DEVICE.mac]
247
        lea     edx, [PPPoE_MAC]
247
        lea     edx, [PPPoE_MAC]
248
        add     ecx, PPPoE_frame.Payload + 2
248
        add     ecx, PPPoE_frame.Payload + 2
249
        mov     di, ETHER_PPP_SESSION
249
        mov     di, ETHER_PROTO_PPP_SESSION
250
        call    ETH_output
250
        call    ETH_output
Line 251... Line 251...
251
        jz      .eth_error
251
        jz      .eth_error
252
 
252