Mark the TCP header structure as unaligned.
Point to IP addresses with "void *"s.

This keeps GCC from assuming the IP addresses are aligned and generating
32-bit load/store pairs on SPARC; those require alignment and cause
tcpdump to crash.
Add changes for 4.5.1 and post-4.5.1 changes.
Don't use a u_int16_t * to extract data from packets.

That convinces some compilers that the data is 16-bit aligned, but
there's no such guarantee of alignment.
Fix a bug the previous change made a bit more obvious.
Move safememcpy() to util.c so it doesn't get inlined.

It appears that some C compilers will inline safememcpy() *and* will, as
a result, optimize to assume alignment it if it's passed a
putatively-aligned pointer. As the pointers in question are not
guaranteed to be aligned, that can cause crashes on, for example, SPARC.

Also, rename the function to unaligned_memcpy(), to clarify what's
"safe" about it, and change some direct memcpy() calls to use it as
well.
Fix compilation warnings:
- set but unused variables
- type punned casts
Fix compilation warnings: set but unused variables.
Revert print-tcp memcpy() changes, and use unaligned_memcpy() instead.

That should prevent optimizing the memcpy into code that assumes
alignment.

Add unaligned_memcmp(), and use it, as well.
memcmp() doesn't modify either of its arguments.
Fix some more unaligned accesses.
Use EXTRACT_nBITS even when just testing against zero.

*All* references to possibly-unaligned multi-byte fields have to be done
in an unaligned-safe fashion.
Use unaligned_memcmp() to compare with IPv{4,6} addresses in a packet.

They are, after all, not guaranteed to be aligned.
Check for compiling for IPv6; don't check whether we can create an IPv6 socket.

Don't check whether we can create a TCP-over-IPv6 socket; that appears
to fail in some cases where tcpdump can be built with IPv6 support.
Instead, just check whether AF_INET6 and struct in6_addr are defined.
More possibly-unaligned memcpy()s and assignments - use unaligned_memcpy().
No need to declare unaligned_mem{cpy,cmp} in netdissect.h *and* interface.h.
Only do the unaligned_mem{cpy,cmp} hack if necessary.

If the processor does unaligned accesses, it's not necessary.
No need for casting back and forth.

That might also convince the compiler that it can "helpfully" optimize
the copy into something that assumes 4-byte alignment, which we don't
want it to do on platforms where the optimized code will trap if the IP
header *isn't* aligned on a 4-byte boundary, given that there's no
guarantee that it *is* aligned on a 4-byte boundary.
Another case where UNALIGNED_MEMCPY() is probably necessary.

It was necessary in other cases where we copied IP addresses from the IP
header, so it's probably necessary here as well.
More UNALIGNED_MEM{CPY,CMP} on IP addresses.