diff options
author | Guy Harris <guy@alum.mit.edu> | 2010-08-31 10:03:47 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2010-08-31 10:03:47 -0700 |
commit | 53412397f6ce23f1c189e27adc81ec44ec94d2ef (patch) | |
tree | 64c20bff5a4c0a9bae63fc0dfd6df398ddc8f9d7 /ip.h | |
parent | 4be7a37b2c0d897a2fd575e2eb18b62a49328b39 (diff) | |
download | tcpdump-53412397f6ce23f1c189e27adc81ec44ec94d2ef.tar.gz |
Mark various IPv4 and IPv6 headers as unaligned.
This prevents GCC on SPARC from generating code that assumes those
structures are aligned naturally, which they are not guaranteed to be.
Move some #defines from interface.h to tcpdump-stdinc.h to make them
available to code that doesn't include interface.h.
Move the declaration of nextproto6_cksum() to ip6.h, so that only files
that use it get it declared, and thus so that you don't need to define
"struct ip6_hdr" in everything that includes interface.h. Don't include
ip6.h in tcpdump-stdinc.h.
Diffstat (limited to 'ip.h')
-rw-r--r-- | ip.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -62,7 +62,7 @@ struct ip { u_int8_t ip_p; /* protocol */ u_int16_t ip_sum; /* checksum */ struct in_addr ip_src,ip_dst; /* source and dest address */ -}; +} UNALIGNED; #define IP_MAXPACKET 65535 /* maximum packet size */ @@ -134,7 +134,7 @@ struct ip_timestamp { u_int32_t ipt_time; } ipt_ta[1]; } ipt_timestamp; -}; +} UNALIGNED; /* flag bits for ipt_flg */ #define IPOPT_TS_TSONLY 0 /* timestamps only */ |