4 * (C)opyright 1995 by Darren Reed.
6 * This code may be freely distributed as long as it retains this notice
7 * and is not changed in any way. The author accepts no responsibility
8 * for the use of this software. I hate legaleese, don't you ?
10 * @(#)ip_compat.h 1.1 9/14/95
14 * These #ifdef's are here mainly for linux, but who knows, they may
15 * not be in other places or maybe one day linux will grow up and some
16 * of these will turn up there too.
19 # define ICMP_UNREACH ICMP_DEST_UNREACH
21 #ifndef ICMP_SOURCEQUENCH
22 # define ICMP_SOURCEQUENCH ICMP_SOURCE_QUENCH
25 # define ICMP_TIMXCEED ICMP_TIME_EXCEEDED
27 #ifndef ICMP_PARAMPROB
28 # define ICMP_PARAMPROB ICMP_PARAMETERPROB
34 # define IPOPT_MINOFF 4
37 # define IPOPT_COPIED(x) ((x)&0x80)
46 # define IP_MF ((u_short)0x2000)
49 # define ETHERTYPE_IP ((u_short)0x0800)
81 #ifndef IPOPT_SECURITY
82 # define IPOPT_SECURITY 130
85 # define IPOPT_LSRR 131
88 # define IPOPT_SATID 136
91 # define IPOPT_SSRR 137
93 #ifndef IPOPT_SECUR_UNCLASS
94 # define IPOPT_SECUR_UNCLASS ((u_short)0x0000)
96 #ifndef IPOPT_SECUR_CONFID
97 # define IPOPT_SECUR_CONFID ((u_short)0xf135)
99 #ifndef IPOPT_SECUR_EFTO
100 # define IPOPT_SECUR_EFTO ((u_short)0x789a)
102 #ifndef IPOPT_SECUR_MMMM
103 # define IPOPT_SECUR_MMMM ((u_short)0xbc4d)
105 #ifndef IPOPT_SECUR_RESTR
106 # define IPOPT_SECUR_RESTR ((u_short)0xaf13)
108 #ifndef IPOPT_SECUR_SECRET
109 # define IPOPT_SECUR_SECRET ((u_short)0xd788)
111 #ifndef IPOPT_SECUR_TOPSECRET
112 # define IPOPT_SECUR_TOPSECRET ((u_short)0x6bc5)
116 # define icmp icmphdr
117 # define icmp_type type
118 # define icmp_code code
121 * From /usr/include/netinet/ip_var.h
125 caddr_t ih_next
, ih_prev
; /* for protocol sequence q's */
126 u_char ih_x1
; /* (unused) */
127 u_char ih_pr
; /* protocol */
128 short ih_len
; /* protocol length */
129 struct in_addr ih_src
; /* source internet address */
130 struct in_addr ih_dst
; /* destination internet address */
138 # if defined(__i386__) || defined(__MIPSEL__) || defined(__alpha__) ||\
160 # if defined(__i386__) || defined(__MIPSEL__) || defined(__alpha__) ||\
175 struct in_addr ip_src
;
176 struct in_addr ip_dst
;
185 # define bcopy(a,b,c) memmove(b,a,c)
186 # define bcmp(a,b,c) memcmp(a,b,c)
188 # define ifnet device
192 typedef struct udphdr udphdr_t
;
193 typedef struct tcphdr tcphdr_t
;
194 typedef struct ip ip_t
;
195 typedef struct ether_header ether_header_t
;
200 # define bcopy(a,b,c) memmove(b,a,c)
201 # define bcmp(a,b,c) memcmp(a,b,c)
202 # define bzero(a,b) memset(a,0,b)