icmp.h
01: 
02: 
03: 
04: 
05: 
06: 
07: 
08: 
09: 
10: <waltje@uWalt.NL.Mugnet.ORG>
11: 
12: 
13: 
14: 
15: 
16: 
17: #ifndef _LINUX_ICMP_H
18: #define _LINUX_ICMP_H
19: 
20: #include <linux/types.h>
21: 
22: #define ICMP_ECHOREPLY          0       
23: #define ICMP_DEST_UNREACH       3       
24: #define ICMP_SOURCE_QUENCH      4       
25: #define ICMP_REDIRECT           5       
26: #define ICMP_ECHO               8       
27: #define ICMP_TIME_EXCEEDED      11      
28: #define ICMP_PARAMETERPROB      12      
29: #define ICMP_TIMESTAMP          13      
30: #define ICMP_TIMESTAMPREPLY     14      
31: #define ICMP_INFO_REQUEST       15      
32: #define ICMP_INFO_REPLY         16      
33: #define ICMP_ADDRESS            17      
34: #define ICMP_ADDRESSREPLY       18      
35: #define NR_ICMP_TYPES           18
36: 
37: 
38: 
39: #define ICMP_NET_UNREACH        0       
40: #define ICMP_HOST_UNREACH       1       
41: #define ICMP_PROT_UNREACH       2       
42: #define ICMP_PORT_UNREACH       3       
43: #define ICMP_FRAG_NEEDED        4       
44: #define ICMP_SR_FAILED          5       
45: #define ICMP_NET_UNKNOWN        6
46: #define ICMP_HOST_UNKNOWN       7
47: #define ICMP_HOST_ISOLATED      8
48: #define ICMP_NET_ANO            9
49: #define ICMP_HOST_ANO           10
50: #define ICMP_NET_UNR_TOS        11
51: #define ICMP_HOST_UNR_TOS       12
52: #define ICMP_PKT_FILTERED       13      
53: #define ICMP_PREC_VIOLATION     14      
54: #define ICMP_PREC_CUTOFF        15      
55: #define NR_ICMP_UNREACH         15      
56: 
57: 
58: #define ICMP_REDIR_NET          0       
59: #define ICMP_REDIR_HOST         1       
60: #define ICMP_REDIR_NETTOS       2       
61: #define ICMP_REDIR_HOSTTOS      3       
62: 
63: 
64: #define ICMP_EXC_TTL            0       
65: #define ICMP_EXC_FRAGTIME       1       
66: 
67: 
68: struct icmphdr {
69:   __u8          type;
70:   __u8          code;
71:   __sum16       checksum;
72:   union {
73:         struct {
74:                 __be16  id;
75:                 __be16  sequence;
76:         } echo;
77:         __be32  gateway;
78:         struct {
79:                 __be16  __unused;
80:                 __be16  mtu;
81:         } frag;
82:   } un;
83: };
84: 
85: 
86: 
87: 
88: 
89: 
90: #define ICMP_FILTER                     1
91: 
92: struct icmp_filter {
93:         __u32           data;
94: };
95: 
96: 
97: #endif  
98: 
      
      
      
      
   
      
      
         
            
            © Andrew Scott 2006 -
            2025, 
            All Rights Reserved