Subversion Repositories Kolibri OS

Rev

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

Rev 1249 Rev 1257
Line 15... Line 15...
15
;;             Version 2, June 1991                                ;;
15
;;             Version 2, June 1991                                ;;
16
;;                                                                 ;;
16
;;                                                                 ;;
17
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
17
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 18... Line 18...
18
 
18
 
Line 19... Line 19...
19
 
19
 
Line 20... Line 20...
20
$Revision: 1249 $
20
$Revision: 1257 $
Line 113... Line 113...
113
;
113
;
114
;  IN:  /
114
;  IN:  /
115
;  OUT: /
115
;  OUT: /
116
;
116
;
117
;-----------------------------------------------------------------
117
;-----------------------------------------------------------------
118
 
-
 
119
align 4
118
align 4
120
ICMP_init:
119
ICMP_init:
Line 121... Line 120...
121
 
120
 
122
	xor	eax, eax
121
	xor	eax, eax
Line 127... Line 126...
127
	ret
126
	ret
Line 128... Line 127...
128
												    
127
												    
129
													     
128
													     
130
 
129
 
131
 
130
 
132
;--------------------------------
131
;-----------------------------------------------------------------
133
;
132
;
Line 141... Line 140...
141
;       pointer to device struct in ebx
140
;       pointer to device struct in ebx
142
;       ICMP Packet size in ecx
141
;       ICMP Packet size in ecx
143
;       pointer to ICMP Packet data in edx
142
;       pointer to ICMP Packet data in edx
144
;  OUT: /
143
;  OUT: /
145
;
144
;
146
;--------------------------------
145
;-----------------------------------------------------------------
147
 
-
 
148
align 4
146
align 4
149
ICMP_handler:	;TODO: works only on pure ethernet right now !
147
ICMP_handler:	;TODO: works only on pure ethernet right now !
Line 150... Line 148...
150
 
148
 
151
	DEBUGF	1,"ICMP_Handler - start\n"
149
	DEBUGF	1,"ICMP_Handler - start\n"
Line 256... Line 254...
256
	add	esp, 4 ; pop (balance stack)
254
	add	esp, 4 ; pop (balance stack)
Line 257... Line 255...
257
 
255
 
Line 258... Line 256...
258
	ret
256
	ret
259
 
257
 
260
 
258
 
261
;--------------------------------
259
;-----------------------------------------------------------------
262
;
260
;
263
; ICMP_Handler_fragments:
261
; ICMP_Handler_fragments:
Line 270... Line 268...
270
;       pointer to device struct in ebx
268
;       pointer to device struct in ebx
271
;       ICMP Packet size in ecx
269
;       ICMP Packet size in ecx
272
;       pointer to ICMP Packet data in edx
270
;       pointer to ICMP Packet data in edx
273
;  OUT: /
271
;  OUT: /
274
;
272
;
275
;--------------------------------
273
;-----------------------------------------------------------------
276
 
-
 
277
align 4
274
align 4
278
ICMP_handler_fragments:   ; works only on pure ethernet right now !
275
ICMP_handler_fragments:   ; works only on pure ethernet right now !
Line 279... Line 276...
279
 
276
 
Line 309... Line 306...
309
 
306
 
310
	call	kernel_free
307
	call	kernel_free
311
	add	esp, 4 ; pop (balance stack)
308
	add	esp, 4 ; pop (balance stack)
Line -... Line 309...
-
 
309
	ret
312
	ret
310
 
313
 
311
 
314
;-----------------------------------------------------------------
312
;-----------------------------------------------------------------
315
;
313
;
316
; Note: ICMP only works on top of IP protocol :)
314
; Note: ICMP only works on top of IP protocol :)
Line 325... Line 323...
325
; high 16 bits of edx = fragment id (for IP header)
323
; high 16 bits of edx = fragment id (for IP header)
326
; esi = data offset
324
; esi = data offset
327
; edi = identifier shl 16 + sequence number
325
; edi = identifier shl 16 + sequence number
328
;
326
;
329
;-----------------------------------------------------------------
327
;-----------------------------------------------------------------
330
 
-
 
331
align 4
328
align 4
332
ICMP_create_packet:
329
ICMP_create_packet:
Line 333... Line 330...
333
 
330
 
Line 383... Line 380...
383
	ret
380
	ret
Line 384... Line 381...
384
 
381
 
385
 
382
 
386
 
383
 
387
 
384
 
388
;---------------------------------------------------------------------------
385
;-----------------------------------------------------------------
389
;
386
;
Line 395... Line 392...
395
;      device number in bh
392
;      device number in bh
396
;      ecx, edx, .. depends on subfunction
393
;      ecx, edx, .. depends on subfunction
397
;
394
;
398
; OUT:
395
; OUT:
399
;
396
;
400
;---------------------------------------------------------------------------
397
;-----------------------------------------------------------------
401
 
-
 
402
align 4
398
align 4
403
ICMP_API:
399
ICMP_API:
Line 404... Line 400...
404
 
400
 
405
	movzx	eax, bh
401
	movzx	eax, bh