Rev 2553 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2553 | Rev 2614 | ||
---|---|---|---|
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: 2553 $ |
20 | $Revision: 2614 $ |
Line 21... | Line 21... | ||
21 | 21 | ||
22 | ; ICMP types & codes |
22 | ; ICMP types & codes |
23 | 23 | ||
24 | ICMP_ECHOREPLY equ 0 ; echo reply message |
24 | ICMP_ECHOREPLY = 0 ; echo reply message |
25 | 25 | ||
26 | ICMP_UNREACH equ 3 |
26 | ICMP_UNREACH = 3 |
27 | ICMP_UNREACH_NET equ 0 ; bad net |
27 | ICMP_UNREACH_NET = 0 ; bad net |
28 | ICMP_UNREACH_HOST equ 1 ; bad host |
28 | ICMP_UNREACH_HOST = 1 ; bad host |
29 | ICMP_UNREACH_PROTOCOL equ 2 ; bad protocol |
29 | ICMP_UNREACH_PROTOCOL = 2 ; bad protocol |
30 | ICMP_UNREACH_PORT equ 3 ; bad port |
30 | ICMP_UNREACH_PORT = 3 ; bad port |
31 | ICMP_UNREACH_NEEDFRAG equ 4 ; IP_DF caused drop |
31 | ICMP_UNREACH_NEEDFRAG = 4 ; IP_DF caused drop |
32 | ICMP_UNREACH_SRCFAIL equ 5 ; src route failed |
32 | ICMP_UNREACH_SRCFAIL = 5 ; src route failed |
33 | ICMP_UNREACH_NET_UNKNOWN equ 6 ; unknown net |
33 | ICMP_UNREACH_NET_UNKNOWN = 6 ; unknown net |
34 | ICMP_UNREACH_HOST_UNKNOWN equ 7 ; unknown host |
34 | ICMP_UNREACH_HOST_UNKNOWN = 7 ; unknown host |
35 | ICMP_UNREACH_ISOLATED equ 8 ; src host isolated |
35 | ICMP_UNREACH_ISOLATED = 8 ; src host isolated |
36 | ICMP_UNREACH_NET_PROHIB equ 9 ; prohibited access |
36 | ICMP_UNREACH_NET_PROHIB = 9 ; prohibited access |
37 | ICMP_UNREACH_HOST_PROHIB equ 10 ; ditto |
37 | ICMP_UNREACH_HOST_PROHIB = 10 ; ditto |
38 | ICMP_UNREACH_TOSNET equ 11 ; bad tos for net |
38 | ICMP_UNREACH_TOSNET = 11 ; bad tos for net |
39 | ICMP_UNREACH_TOSHOST equ 12 ; bad tos for host |
39 | ICMP_UNREACH_TOSHOST = 12 ; bad tos for host |
40 | ICMP_UNREACH_FILTER_PROHIB equ 13 ; admin prohib |
40 | ICMP_UNREACH_FILTER_PROHIB = 13 ; admin prohib |
41 | ICMP_UNREACH_HOST_PRECEDENCE equ 14 ; host prec vio. |
41 | ICMP_UNREACH_HOST_PRECEDENCE = 14 ; host prec vio. |
42 | ICMP_UNREACH_PRECEDENCE_CUTOFF equ 15 ; prec cutoff |
42 | ICMP_UNREACH_PRECEDENCE_CUTOFF = 15 ; prec cutoff |
43 | 43 | ||
44 | ICMP_SOURCEQUENCH equ 4 ; Packet lost, slow down |
44 | ICMP_SOURCEQUENCH = 4 ; Packet lost, slow down |
45 | 45 | ||
46 | ICMP_REDIRECT equ 5 ; shorter route, codes: |
46 | ICMP_REDIRECT = 5 ; shorter route, codes: |
47 | ICMP_REDIRECT_NET equ 0 ; for network |
47 | ICMP_REDIRECT_NET = 0 ; for network |
48 | ICMP_REDIRECT_HOST equ 1 ; for host |
48 | ICMP_REDIRECT_HOST = 1 ; for host |
49 | ICMP_REDIRECT_TOSNET equ 2 ; for tos and net |
49 | ICMP_REDIRECT_TOSNET = 2 ; for tos and net |
50 | ICMP_REDIRECT_TOSHOST equ 3 ; for tos and host |
50 | ICMP_REDIRECT_TOSHOST = 3 ; for tos and host |
51 | 51 | ||
52 | ICMP_ALTHOSTADDR equ 6 ; alternate host address |
52 | ICMP_ALTHOSTADDR = 6 ; alternate host address |
53 | ICMP_ECHO equ 8 ; echo service |
53 | ICMP_ECHO = 8 ; echo service |
54 | ICMP_ROUTERADVERT equ 9 ; router advertisement |
54 | ICMP_ROUTERADVERT = 9 ; router advertisement |
55 | ICMP_ROUTERADVERT_NORMAL equ 0 ; normal advertisement |
55 | ICMP_ROUTERADVERT_NORMAL = 0 ; normal advertisement |
56 | ICMP_ROUTERADVERT_NOROUTE_COMMON equ 16 ; selective routing |
56 | ICMP_ROUTERADVERT_NOROUTE_COMMON= 16 ; selective routing |
57 | 57 | ||
58 | ICMP_ROUTERSOLICIT equ 10 ; router solicitation |
58 | ICMP_ROUTERSOLICIT = 10 ; router solicitation |
59 | ICMP_TIMXCEED equ 11 ; time exceeded, code: |
59 | ICMP_TIMXCEED = 11 ; time exceeded, code: |
60 | ICMP_TIMXCEED_INTRANS equ 0 ; ttl==0 in transit |
60 | ICMP_TIMXCEED_INTRANS = 0 ; ttl==0 in transit |
61 | ICMP_TIMXCEED_REASS equ 1 ; ttl==0 in reass |
61 | ICMP_TIMXCEED_REASS = 1 ; ttl==0 in reass |
62 | 62 | ||
63 | ICMP_PARAMPROB equ 12 ; ip header bad |
63 | ICMP_PARAMPROB = 12 ; ip header bad |
64 | ICMP_PARAMPROB_ERRATPTR equ 0 ; error at param ptr |
64 | ICMP_PARAMPROB_ERRATPTR = 0 ; error at param ptr |
65 | ICMP_PARAMPROB_OPTABSENT equ 1 ; req. opt. absent |
65 | ICMP_PARAMPROB_OPTABSENT = 1 ; req. opt. absent |
66 | ICMP_PARAMPROB_LENGTH equ 2 ; bad length |
66 | ICMP_PARAMPROB_LENGTH = 2 ; bad length |
67 | 67 | ||
68 | ICMP_TSTAMP equ 13 ; timestamp request |
68 | ICMP_TSTAMP = 13 ; timestamp request |
69 | ICMP_TSTAMPREPLY equ 14 ; timestamp reply |
69 | ICMP_TSTAMPREPLY = 14 ; timestamp reply |
70 | ICMP_IREQ equ 15 ; information request |
70 | ICMP_IREQ = 15 ; information request |
71 | ICMP_IREQREPLY equ 16 ; information reply |
71 | ICMP_IREQREPLY = 16 ; information reply |
72 | ICMP_MASKREQ equ 17 ; address mask request |
72 | ICMP_MASKREQ = 17 ; address mask request |
73 | ICMP_MASKREPLY equ 18 ; address mask reply |
73 | ICMP_MASKREPLY = 18 ; address mask reply |
74 | ICMP_TRACEROUTE equ 30 ; traceroute |
74 | ICMP_TRACEROUTE = 30 ; traceroute |
75 | ICMP_DATACONVERR equ 31 ; data conversion error |
75 | ICMP_DATACONVERR = 31 ; data conversion error |
76 | ICMP_MOBILE_REDIRECT equ 32 ; mobile host redirect |
76 | ICMP_MOBILE_REDIRECT = 32 ; mobile host redirect |
77 | ICMP_IPV6_WHEREAREYOU equ 33 ; IPv6 where-are-you |
77 | ICMP_IPV6_WHEREAREYOU = 33 ; IPv6 where-are-you |
78 | ICMP_IPV6_IAMHERE equ 34 ; IPv6 i-am-here |
78 | ICMP_IPV6_IAMHERE = 34 ; IPv6 i-am-here |
79 | ICMP_MOBILE_REGREQUEST equ 35 ; mobile registration req |
79 | ICMP_MOBILE_REGREQUEST = 35 ; mobile registration req |
80 | ICMP_MOBILE_REGREPLY equ 36 ; mobile registreation reply |
80 | ICMP_MOBILE_REGREPLY = 36 ; mobile registreation reply |
81 | ICMP_SKIP equ 39 ; SKIP |
81 | ICMP_SKIP = 39 ; SKIP |
Line 82... | Line 82... | ||
82 | 82 | ||
Line 408... | Line 408... | ||
408 | ; |
408 | ; |
409 | ; OUT: |
409 | ; OUT: |
410 | ; |
410 | ; |
411 | ;----------------------------------------------------------------- |
411 | ;----------------------------------------------------------------- |
412 | align 4 |
412 | align 4 |
413 | ICMP_API: |
413 | ICMP_api: |
Line 414... | Line 414... | ||
414 | 414 | ||
415 | movzx eax, bh |
415 | movzx eax, bh |
Line 416... | Line 416... | ||
416 | shl eax, 2 |
416 | shl eax, 2 |
Line 423... | Line 423... | ||
423 | .error: |
423 | .error: |
424 | mov eax, -1 |
424 | mov eax, -1 |
425 | ret |
425 | ret |
Line 426... | Line 426... | ||
426 | 426 | ||
427 | .packets_tx: |
427 | .packets_tx: |
428 | add eax, ICMP_PACKETS_TX |
- | |
429 | mov eax, [eax] |
428 | mov eax, [ICMP_PACKETS_TX + eax] |
Line 430... | Line 429... | ||
430 | ret |
429 | ret |
431 | 430 | ||
432 | .packets_rx: |
- | |
433 | add eax, ICMP_PACKETS_RX |
431 | .packets_rx: |