Subversion Repositories Kolibri OS

Rev

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

Rev 1171 Rev 1185
Line 101... Line 101...
101
uglobal
101
uglobal
102
	ICMP_PACKETS_TX 	rd  MAX_IP
102
	ICMP_PACKETS_TX 	rd  MAX_IP
103
	ICMP_PACKETS_RX 	rd  MAX_IP
103
	ICMP_PACKETS_RX 	rd  MAX_IP
104
endg
104
endg
Line -... Line 105...
-
 
105
 
-
 
106
 
105
 
107
 
106
;-----------------------------------------------------------------
108
;-----------------------------------------------------------------
107
;
109
;
108
; ICMP_init
110
; ICMP_init
109
;
111
;
Line 125... Line 127...
125
	ret
127
	ret
Line 126... Line -...
126
 
-
 
127
 
-
 
128
 
-
 
129
 
-
 
130
 
-
 
131
							 
-
 
132
												    
128
												    
133
													     
129
													     
134
 
130
 
135
 
131
 
136
;--------------------------------
132
;--------------------------------
Line 151... Line 147...
151
 
147
 
152
align 4
148
align 4
Line 153... Line 149...
153
ICMP_Handler:	;TODO: works only on pure ethernet right now !
149
ICMP_Handler:	;TODO: works only on pure ethernet right now !
154
 
150
 
155
	DEBUGF	1,"ICMP_Handler - start\n"
151
	DEBUGF	1,"ICMP_Handler - start\n"
Line 156... Line 152...
156
	cmp	byte [edx + ICMP_Packet.Type], ICMP_ECHO		    ; Is this an echo request? discard if not
152
	cmp	byte [edx + ICMP_Packet.Type], ICMP_ECHO		    ; Is this an echo request?
157
	jne	.check_sockets
153
	jne	.check_sockets
Line 158... Line 154...
158
 
154
 
159
	mov	byte [edx + ICMP_Packet.Type], ICMP_ECHOREPLY		    ; Change Packet type to reply
155
	mov	byte [edx + ICMP_Packet.Type], ICMP_ECHOREPLY		    ; Change Packet type to reply
160
	mov	word [edx + ICMP_Packet.Checksum], 0			    ; Set checksum to 0, needed to calculate new checksum
156
	mov	word [edx + ICMP_Packet.Checksum], 0			    ; Set checksum to 0, needed to calculate new checksum
161
 
157
 
-
 
158
	call	ETH_struc2dev
Line 162... Line 159...
162
	call	ETH_struc2dev
159
	cmp	edi,-1
163
	cmp	edi,-1
160
	je	.dump
164
	je	.dump
161
	inc	[ICMP_PACKETS_RX+4*edi]