Subversion Repositories Kolibri OS

Rev

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

Rev 1185 Rev 1196
Line 1... Line 1...
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;                                                                 ;;
2
;;                                                                 ;;
3
;; Copyright (C) KolibriOS team 2004-2008. All rights reserved.    ;;
3
;; Copyright (C) KolibriOS team 2004-2009. 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
;;  ICMP.INC                                                       ;;
6
;;  ICMP.INC                                                       ;;
7
;;                                                                 ;;
7
;;                                                                 ;;
8
;;  Part of the tcp/ip network stack for KolibriOS                 ;;
8
;;  Part of the tcp/ip network stack for KolibriOS                 ;;
Line 144... Line 144...
144
;  OUT: /
144
;  OUT: /
145
;
145
;
146
;--------------------------------
146
;--------------------------------
Line 147... Line 147...
147
 
147
 
148
align 4
148
align 4
Line 149... Line 149...
149
ICMP_Handler:	;TODO: works only on pure ethernet right now !
149
ICMP_handler:	;TODO: works only on pure ethernet right now !
150
 
150
 
151
	DEBUGF	1,"ICMP_Handler - start\n"
151
	DEBUGF	1,"ICMP_Handler - start\n"
Line 316... Line 316...
316
;  OUT: /
316
;  OUT: /
317
;
317
;
318
;--------------------------------
318
;--------------------------------
Line 319... Line 319...
319
 
319
 
320
align 4
320
align 4
Line 321... Line 321...
321
ICMP_Handler_fragments:   ; works only on pure ethernet right now !
321
ICMP_handler_fragments:   ; works only on pure ethernet right now !
Line 322... Line 322...
322
 
322
 
323
	DEBUGF	1,"ICMP_Handler_fragments - start\n"
323
	DEBUGF	1,"ICMP_Handler_fragments - start\n"
Line 343... Line 343...
343
	add	esi, ICMP_Packet.Data
343
	add	esi, ICMP_Packet.Data
344
	pop	dx
344
	pop	dx
345
	shl	edx, 16
345
	shl	edx, 16
346
	mov	dx , ICMP_ECHOREPLY shl 8 + 0				    ; Type + Code
346
	mov	dx , ICMP_ECHOREPLY shl 8 + 0				    ; Type + Code
Line 347... Line 347...
347
 
347
 
Line 348... Line 348...
348
	call	ICMP_create_Packet
348
	call	ICMP_create_packet
349
 
349
 
Line 350... Line 350...
350
       .dump:
350
       .dump:
Line 370... Line 370...
370
; edi = identifier shl 16 + sequence number
370
; edi = identifier shl 16 + sequence number
371
;
371
;
372
;-----------------------------------------------------------------
372
;-----------------------------------------------------------------
Line 373... Line 373...
373
 
373
 
374
align 4
374
align 4
Line 375... Line 375...
375
ICMP_create_Packet:
375
ICMP_create_packet:
Line 376... Line 376...
376
 
376
 
Line 377... Line 377...
377
	DEBUGF 1,"Create ICMP Packet\n"
377
	DEBUGF 1,"Create ICMP Packet\n"
378
 
378
 
379
	push	esi edi edx
379
	push	esi edi edx
Line 380... Line 380...
380
 
380
 
Line 381... Line 381...
381
	add	ecx, ICMP_Packet.Data
381
	add	ecx, ICMP_Packet.Data
382
	mov	di , IP_PROTO_ICMP
382
	mov	di , IP_PROTO_ICMP
Line 383... Line 383...
383
	shr	edx, 16
383
	shr	edx, 16