2 * (C)opyright 1995 by Darren Reed.
4 * This code may be freely distributed as long as it retains this notice
5 * and is not changed in any way. The author accepts no responsibility
6 * for the use of this software. I hate legaleese, don't you ?
8 * @(#)ip_compat.h 1.1 9/14/95
12 * These #ifdef's are here mainly for linux, but who knows, they may
13 * not be in other places or maybe one day linux will grow up and some
14 * of these will turn up there too.
17 # define ICMP_UNREACH ICMP_DEST_UNREACH
19 #ifndef ICMP_SOURCEQUENCH
20 # define ICMP_SOURCEQUENCH ICMP_SOURCE_QUENCH
23 # define ICMP_TIMXCEED ICMP_TIME_EXCEEDED
25 #ifndef ICMP_PARAMPROB
26 # define ICMP_PARAMPROB ICMP_PARAMETERPROB
32 # define IPOPT_MINOFF 4
35 # define IPOPT_COPIED(x) ((x)&0x80)
44 # define IP_MF ((u_short)0x2000)
47 # define ETHERTYPE_IP ((u_short)0x0800)
79 #ifndef IPOPT_SECURITY
80 # define IPOPT_SECURITY 130
83 # define IPOPT_LSRR 131
86 # define IPOPT_SATID 136
89 # define IPOPT_SSRR 137
91 #ifndef IPOPT_SECUR_UNCLASS
92 # define IPOPT_SECUR_UNCLASS ((u_short)0x0000)
94 #ifndef IPOPT_SECUR_CONFID
95 # define IPOPT_SECUR_CONFID ((u_short)0xf135)
97 #ifndef IPOPT_SECUR_EFTO
98 # define IPOPT_SECUR_EFTO ((u_short)0x789a)
100 #ifndef IPOPT_SECUR_MMMM
101 # define IPOPT_SECUR_MMMM ((u_short)0xbc4d)
103 #ifndef IPOPT_SECUR_RESTR
104 # define IPOPT_SECUR_RESTR ((u_short)0xaf13)
106 #ifndef IPOPT_SECUR_SECRET
107 # define IPOPT_SECUR_SECRET ((u_short)0xd788)
109 #ifndef IPOPT_SECUR_TOPSECRET
110 # define IPOPT_SECUR_TOPSECRET ((u_short)0x6bc5)
114 # define icmp icmphdr
115 # define icmp_type type
116 # define icmp_code code
119 * From /usr/include/netinet/ip_var.h
123 caddr_t ih_next, ih_prev; /* for protocol sequence q's */
124 u_char ih_x1; /* (unused) */
125 u_char ih_pr; /* protocol */
126 short ih_len; /* protocol length */
127 struct in_addr ih_src; /* source internet address */
128 struct in_addr ih_dst; /* destination internet address */
136 # if defined(__i386__) || defined(__MIPSEL__) || defined(__alpha__) ||\
158 # if defined(__i386__) || defined(__MIPSEL__) || defined(__alpha__) ||\
173 struct in_addr ip_src;
174 struct in_addr ip_dst;
183 # define bcopy(a,b,c) memmove(b,a,c)
184 # define bcmp(a,b,c) memcmp(a,b,c)
186 # define ifnet device
190 typedef struct udphdr udphdr_t;
191 typedef struct tcphdr tcphdr_t;
192 typedef struct ip ip_t;
193 typedef struct ether_header ether_header_t;
198 # define bcopy(a,b,c) memmove(b,a,c)
199 # define bcmp(a,b,c) memcmp(a,b,c)
200 # define bzero(a,b) memset(a,0,b)