Subversion Repositories Kolibri OS

Rev

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

Rev 3556 Rev 3600
Line 62... Line 62...
62
        sub     ecx, sizeof.ETH_header
62
        sub     ecx, sizeof.ETH_header
Line 63... Line 63...
63
 
63
 
64
        lea     edx, [eax + sizeof.ETH_header]
64
        lea     edx, [eax + sizeof.ETH_header]
Line 65... Line 65...
65
        mov     ax, [eax + ETH_header.Type]
65
        mov     ax, [eax + ETH_header.Type]
66
 
66
 
Line 67... Line 67...
67
        cmp     ax, ETHER_IPv4
67
        cmp     ax, ETHER_PROTO_IPv4
68
        je      IPv4_input
68
        je      IPv4_input
Line 69... Line 69...
69
 
69
 
70
        cmp     ax, ETHER_ARP
70
        cmp     ax, ETHER_PROTO_IPv4
Line 71... Line 71...
71
        je      ARP_input
71
        je      ARP_input
72
 
72
 
Line 73... Line 73...
73
        cmp     ax, ETHER_IPv6
73
        cmp     ax, ETHER_PROTO_IPv4
74
        je      IPv6_input
74
        je      IPv6_input
Line 75... Line 75...
75
 
75
 
Line 76... Line 76...
76
        cmp     ax, ETHER_PPP_DISCOVERY
76
        cmp     ax, ETHER_PROTO_PPP_DISCOVERY
Line 172... Line 172...
172
;
172
;
173
;-----------------------------------------------------------------
173
;-----------------------------------------------------------------
174
align 4
174
align 4
175
ETH_api:
175
ETH_api:
Line 176... Line 176...
176
 
176
 
177
        cmp     bh, MAX_NET_DEVICES
177
        cmp     bh, NET_DEVICES_MAX
178
        ja      .error
178
        ja      .error
179
        movzx   eax, bh
179
        movzx   eax, bh
180
        mov     eax, dword [NET_DRV_LIST + 4*eax]
180
        mov     eax, dword [NET_DRV_LIST + 4*eax]
181
        cmp     [eax + NET_DEVICE.type], NET_TYPE_ETH
181
        cmp     [eax + NET_DEVICE.device_type], NET_DEVICE_ETH
Line 182... Line 182...
182
        jne     .error
182
        jne     .error
183
 
183
 
184
        and     ebx, 0xff
184
        and     ebx, 0xff
Line 226... Line 226...
226
        mov     eax, dword [eax + ETH_DEVICE.mac + 2]
226
        mov     eax, dword [eax + ETH_DEVICE.mac + 2]
227
        mov     [esp+20+4], ebx                         ; TODO: fix this ugly code
227
        mov     [esp+20+4], ebx                         ; TODO: fix this ugly code
228
        ret
228
        ret
Line 229... Line 229...
229
 
229
 
230
  .state:
230
  .state:
231
        mov     eax, [eax + NET_DEVICE.state]
231
        mov     eax, [eax + NET_DEVICE.link_state]