80 |
|
* pragmatically since otherwise unsigned comparisons can result |
81 |
|
* against negative integers quite easily, and fail in subtle ways. |
82 |
|
*/ |
83 |
+ |
#ifdef PRAGMA_PACK_SUPPORTED |
84 |
+ |
#pragma pack(1) |
85 |
+ |
#endif |
86 |
+ |
|
87 |
|
struct ip { |
88 |
|
#ifdef WORDS_BIGENDIAN |
89 |
|
u_int ip_v:4, /* version */ |
103 |
|
u_int8_t ip_p; /* protocol */ |
104 |
|
u_int16_t ip_sum; /* checksum */ |
105 |
|
struct in_addr ip_src,ip_dst; /* source and dest address */ |
106 |
< |
}; |
106 |
> |
} PACKED__; |
107 |
> |
|
108 |
> |
#ifdef PRAGMA_PACK_SUPPORTED |
109 |
> |
#pragma pack(0) |
110 |
> |
#endif |
111 |
|
|
112 |
|
#define IP_MAXPACKET 65535 /* maximum packet size */ |
113 |
|
|
151 |
|
/* |
152 |
|
* Time stamp option structure. |
153 |
|
*/ |
154 |
+ |
#ifdef PRAGMA_PACK_SUPPORTED |
155 |
+ |
#pragma pack(1) |
156 |
+ |
#endif |
157 |
+ |
|
158 |
|
struct ip_timestamp { |
159 |
|
u_int8_t ipt_code; /* IPOPT_TS */ |
160 |
|
u_int8_t ipt_len; /* size of structure (variable) */ |
173 |
|
n_long ipt_time; |
174 |
|
} ipt_ta[1]; |
175 |
|
} ipt_timestamp; |
176 |
< |
}; |
176 |
> |
} PACKED__; |
177 |
> |
|
178 |
> |
#ifdef PRAGMA_PACK_SUPPORTED |
179 |
> |
#pragma pack(0) |
180 |
> |
#endif |
181 |
|
|
182 |
|
/* flag bits for ipt_flg */ |
183 |
|
#define IPOPT_TS_TSONLY 0 /* timestamps only */ |
224 |
|
/* |
225 |
|
* Overlay for ip header used by other protocols (tcp, udp). |
226 |
|
*/ |
227 |
+ |
#ifdef PRAGMA_PACK_SUPPORTED |
228 |
+ |
#pragma pack(1) |
229 |
+ |
#endif |
230 |
+ |
|
231 |
|
struct ipovly { |
232 |
|
caddr32_t ih_next, ih_prev; /* for protocol sequence q's */ |
233 |
|
u_int8_t ih_x1; /* (unused) */ |
235 |
|
int16_t ih_len; /* protocol length */ |
236 |
|
struct in_addr ih_src; /* source internet address */ |
237 |
|
struct in_addr ih_dst; /* destination internet address */ |
238 |
< |
}; |
238 |
> |
} PACKED__; |
239 |
> |
|
240 |
> |
#ifdef PRAGMA_PACK_SUPPORTED |
241 |
> |
#pragma pack(0) |
242 |
> |
#endif |
243 |
|
|
244 |
|
/* |
245 |
|
* Ip reassembly queue structure. Each fragment |