Subversion Repositories Kolibri OS

Rev

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

Rev 3555 Rev 3589
Line 54... Line 54...
54
align 4
54
align 4
55
ETH_input:
55
ETH_input:
56
        mov     eax, [esp]
56
        mov     eax, [esp]
57
        mov     ecx, [esp+4]
57
        mov     ecx, [esp+4]
Line 58... Line 58...
58
 
58
 
59
        DEBUGF  1,"ETH_input: size=%u\n", ecx
59
        DEBUGF  DEBUG_NETWORK_VERBOSE,"ETH_input: size=%u\n", ecx
60
        cmp     ecx, ETH_FRAME_MINIMUM
60
        cmp     ecx, ETH_FRAME_MINIMUM
61
        jb      .dump
61
        jb      .dump
Line 62... Line 62...
62
        sub     ecx, sizeof.ETH_header
62
        sub     ecx, sizeof.ETH_header
Line 77... Line 77...
77
        je      PPPoE_discovery_input
77
        je      PPPoE_discovery_input
Line 78... Line 78...
78
 
78
 
79
        cmp     ax, ETHER_PPP_SESSION
79
        cmp     ax, ETHER_PPP_SESSION
Line 80... Line 80...
80
        je      PPPoE_session_input
80
        je      PPPoE_session_input
Line 81... Line 81...
81
 
81
 
82
        DEBUGF  2,"ETH_input: Unknown packet type=%x\n", ax
82
        DEBUGF  DEBUG_NETWORK_ERROR, "ETH_input: Unknown packet type=%x\n", ax
83
 
83
 
84
  .dump:
84
  .dump:
85
        DEBUGF  2,"ETH_input: dumping\n"
85
        DEBUGF  DEBUG_NETWORK_VERBOSE,"ETH_input: dumping\n"
Line 86... Line 86...
86
        call    kernel_free
86
        call    kernel_free
Line 105... Line 105...
105
;
105
;
106
;-----------------------------------------------------------------
106
;-----------------------------------------------------------------
107
align 4
107
align 4
108
ETH_output:
108
ETH_output:
Line 109... Line 109...
109
 
109
 
Line 110... Line 110...
110
        DEBUGF  1,"ETH_output: size=%u device=%x\n", ecx, ebx
110
        DEBUGF  DEBUG_NETWORK_VERBOSE, "ETH_output: size=%u device=%x\n", ecx, ebx
111
 
111
 
Line 112... Line 112...
112
        cmp     ecx, [ebx + NET_DEVICE.mtu]
112
        cmp     ecx, [ebx + NET_DEVICE.mtu]
Line 135... Line 135...
135
        lea     edx, [ecx + sizeof.ETH_header]  ; Set edx to complete buffer size
135
        lea     edx, [ecx + sizeof.ETH_header]  ; Set edx to complete buffer size
Line 136... Line 136...
136
 
136
 
137
        cmp     edx, ETH_FRAME_MINIMUM
137
        cmp     edx, ETH_FRAME_MINIMUM
138
        jbe     .adjust_size
138
        jbe     .adjust_size
139
  .done:
139
  .done:
140
        DEBUGF  1,"ETH_output: ptr=%x size=%u\n", eax, edx
140
        DEBUGF  DEBUG_NETWORK_VERBOSE, "ETH_output: ptr=%x size=%u\n", eax, edx
Line 141... Line 141...
141
        ret
141
        ret
142
 
142
 
143
  .adjust_size:
143
  .adjust_size:
144
        mov     edx, ETH_FRAME_MINIMUM
144
        mov     edx, ETH_FRAME_MINIMUM
Line 145... Line 145...
145
        test    edx, edx        ; clear zero flag
145
        test    edx, edx        ; clear zero flag
146
        jmp     .done
146
        jmp     .done
147
 
147
 
148
  .out_of_ram:
148
  .out_of_ram:
149
        DEBUGF  2,"ETH_output: Out of ram!\n"
149
        DEBUGF  DEBUG_NETWORK_ERROR, "ETH_output: Out of ram!\n"
Line 150... Line 150...
150
        add     esp, 4+4+2+4
150
        add     esp, 4+4+2+4
151
        sub     edi, edi
151
        sub     edi, edi
152
        ret
152
        ret
153
 
153