Merge remote-tracking branch 'goog/tcpdump'

* goog/tcpdump: (3066 commits)
  Remove old version. Getting ready for new tcpdump 4.5
  Support -Q for setting the capture direction.
  Clean up the TLV processing loop.
  With -A and -AA, don't send CRs to the standard output.
  Use the new libpcap <pcap/nflog.h> for NFLOG definitions and declarations.
  Do our own isascii(), isprint(), isgraph(), and toascii().
  Fix a compiler warning.
  Don't use the __attribute__((packed)) on most platforms.
  The interval in an AODV HELLO extension is not aligned on a 4-byte boundary.
  As with memcpy, so with memcmp.
  More UNALIGNED_MEM{CPY,CMP} on IP addresses.
  Another case where UNALIGNED_MEMCPY() is probably necessary.
  No need for casting back and forth.
  Only do the unaligned_mem{cpy,cmp} hack if necessary.
  No need to declare unaligned_mem{cpy,cmp} in netdissect.h *and* interface.h.
  More possibly-unaligned memcpy()s and assignments - use unaligned_memcpy().
  Check for compiling for IPv6; don't check whether we can create an IPv6 socket.
  Use unaligned_memcmp() to compare with IPv{4,6} addresses in a packet.
  Use EXTRACT_nBITS even when just testing against zero.
  Fix some more unaligned accesses.
  ...

Change-Id: I9e98707d30c989b9e32dcd5af798bd0746ab4434
diff --git a/tests/ikev2four.out b/tests/ikev2four.out
new file mode 100644
index 0000000..db2e8ef
--- /dev/null
+++ b/tests/ikev2four.out
@@ -0,0 +1,107 @@
+IP (tos 0x0, ttl 64, id 19908, offset 0, flags [none], proto UDP (17), length 404)
+    192.168.1.2.500 > 192.168.1.1.500: isakmp 2.0 msgid 00000000: parent_sa ikev2_init[I]:
+    (sa: len=116
+        (p: #1 protoid=isakmp transform=12 len=116
+            (t: #1 type=encr id=aes (type=keylen value=0080))
+            (t: #2 type=encr id=aes (type=keylen value=0100))
+            (t: #3 type=encr id=aes (type=keylen value=00c0))
+            (t: #4 type=encr id=3des )
+            (t: #5 type=prf id=hmac-sha )
+            (t: #6 type=prf id=hmac-md5 )
+            (t: #7 type=prf id=aes128_xcbc )
+            (t: #8 type=integ id=hmac-sha )
+            (t: #9 type=integ id=hmac-md5 )
+            (t: #10 type=integ id=aes-xcbc )
+            (t: #11 type=dh id=modp1024 )
+            (t: #12 type=dh id=modp2048 )))
+    (v2ke: len=128 group=modp1024)
+    (nonce: len=32 data=(6128ebd023a864e94a7f...ba041b5de59955900d818ac54e18b236739d9e8b))
+    (n: prot_id=#0 type=16388(nat_detection_source_ip))
+    (n: prot_id=#0 type=16389(nat_detection_destination_ip))
+IP (tos 0x0, ttl 64, id 19909, offset 0, flags [none], proto UDP (17), length 88)
+    192.168.1.1.500 > 192.168.1.2.500: isakmp 2.0 msgid 00000000: parent_sa ikev2_init[R]:
+    (n: prot_id=#0 type=16390(cookie) data=(00000001c2221e50c16e123f2b0c71aefcf0cb3b798782c6))
+IP (tos 0x0, ttl 64, id 19910, offset 0, flags [none], proto UDP (17), length 436)
+    192.168.1.2.500 > 192.168.1.1.500: isakmp 2.0 msgid 00000000: parent_sa ikev2_init[I]:
+    (n: prot_id=#0 type=16390(cookie) data=(00000001c2221e50c16e...ba041b5de59955900d818ac54e18b236739d9e8b))
+    (sa: len=116
+        (p: #1 protoid=isakmp transform=12 len=116
+            (t: #1 type=encr id=aes (type=keylen value=0080))
+            (t: #2 type=encr id=aes (type=keylen value=0100))
+            (t: #3 type=encr id=aes (type=keylen value=00c0))
+            (t: #4 type=encr id=3des )
+            (t: #5 type=prf id=hmac-sha )
+            (t: #6 type=prf id=hmac-md5 )
+            (t: #7 type=prf id=aes128_xcbc )
+            (t: #8 type=integ id=hmac-sha )
+            (t: #9 type=integ id=hmac-md5 )
+            (t: #10 type=integ id=aes-xcbc )
+            (t: #11 type=dh id=modp1024 )
+            (t: #12 type=dh id=modp2048 )))
+    (v2ke: len=128 group=modp1024)
+    (nonce: len=32 data=(6128ebd023a864e94a7f...ba041b5de59955900d818ac54e18b236739d9e8b))
+    (n: prot_id=#0 type=16388(nat_detection_source_ip))
+    (n: prot_id=#0 type=16389(nat_detection_destination_ip))
+IP (tos 0x0, ttl 64, id 19911, offset 0, flags [none], proto UDP (17), length 332)
+    192.168.1.1.500 > 192.168.1.2.500: isakmp 2.0 msgid 00000000: parent_sa ikev2_init[R]:
+    (sa: len=44
+        (p: #1 protoid=isakmp transform=4 len=44
+            (t: #1 type=encr id=aes (type=keylen value=0080))
+            (t: #2 type=prf id=hmac-sha )
+            (t: #3 type=integ id=hmac-sha )
+            (t: #4 type=dh id=modp1024 )))
+    (v2ke: len=128 group=modp1024)
+    (nonce: len=32 data=(b31c379f272ce2984bd1...905954a783be2c37e2ccc4fdd270a532dbe6f428))
+    (n: prot_id=#0 type=16388(nat_detection_source_ip))
+    (n: prot_id=#0 type=16389(nat_detection_destination_ip))
+IP (tos 0x0, ttl 64, id 19912, offset 0, flags [none], proto UDP (17), length 264)
+    192.168.1.2.500 > 192.168.1.1.500: isakmp 2.0 msgid 00000001: child_sa  ikev2_auth[I]:
+    (v2e: len=204)
+IP (tos 0x0, ttl 64, id 19913, offset 0, flags [none], proto UDP (17), length 184)
+    192.168.1.1.500 > 192.168.1.2.500: isakmp 2.0 msgid 00000001: child_sa  ikev2_auth[R]:
+    (v2e: len=124)
+IP (tos 0x0, ttl 64, id 19914, offset 0, flags [none], proto UDP (17), length 280)
+    192.168.1.2.500 > 192.168.1.1.500: isakmp 2.0 msgid 00000002: child_sa  child_sa[I]:
+    (v2e: len=220)
+IP (tos 0x0, ttl 64, id 19915, offset 0, flags [none], proto UDP (17), length 248)
+    192.168.1.2.500 > 192.168.1.1.500: isakmp 2.0 msgid 00000003: child_sa  child_sa[I]:
+    (v2e: len=188)
+IP (tos 0x0, ttl 64, id 19916, offset 0, flags [none], proto UDP (17), length 104)
+    192.168.1.1.500 > 192.168.1.2.500: isakmp 2.0 msgid 00000002: child_sa  child_sa[R]:
+    (v2e: len=44)
+IP (tos 0x0, ttl 64, id 19917, offset 0, flags [none], proto UDP (17), length 104)
+    192.168.1.1.500 > 192.168.1.2.500: isakmp 2.0 msgid 00000003: child_sa  child_sa[R]:
+    (v2e: len=44)
+IP (tos 0x0, ttl 64, id 19918, offset 0, flags [none], proto UDP (17), length 312)
+    192.168.1.2.500 > 192.168.1.1.500: isakmp 2.0 msgid 00000004: child_sa  child_sa[I]:
+    (v2e: len=252)
+IP (tos 0x0, ttl 64, id 19919, offset 0, flags [none], proto UDP (17), length 280)
+    192.168.1.2.500 > 192.168.1.1.500: isakmp 2.0 msgid 00000005: child_sa  child_sa[I]:
+    (v2e: len=220)
+IP (tos 0x0, ttl 64, id 19920, offset 0, flags [none], proto UDP (17), length 232)
+    192.168.1.1.500 > 192.168.1.2.500: isakmp 2.0 msgid 00000004: child_sa  child_sa[R]:
+    (v2e: len=172)
+IP (tos 0x0, ttl 64, id 19921, offset 0, flags [none], proto UDP (17), length 232)
+    192.168.1.1.500 > 192.168.1.2.500: isakmp 2.0 msgid 00000005: child_sa  child_sa[R]:
+    (v2e: len=172)
+IP (tos 0x0, ttl 64, id 19922, offset 0, flags [none], proto UDP (17), length 312)
+    192.168.1.2.500 > 192.168.1.1.500: isakmp 2.0 msgid 00000006: child_sa  child_sa[I]:
+    (v2e: len=252)
+IP (tos 0x0, ttl 64, id 19923, offset 0, flags [none], proto UDP (17), length 280)
+    192.168.1.2.500 > 192.168.1.1.500: isakmp 2.0 msgid 00000007: child_sa  child_sa[I]:
+    (v2e: len=220)
+IP (tos 0x0, ttl 64, id 19924, offset 0, flags [none], proto UDP (17), length 232)
+    192.168.1.1.500 > 192.168.1.2.500: isakmp 2.0 msgid 00000006: child_sa  child_sa[R]:
+    (v2e: len=172)
+IP (tos 0x0, ttl 64, id 19925, offset 0, flags [none], proto UDP (17), length 232)
+    192.168.1.1.500 > 192.168.1.2.500: isakmp 2.0 msgid 00000007: child_sa  child_sa[R]:
+    (v2e: len=172)
+IP (tos 0x0, ttl 64, id 19926, offset 0, flags [none], proto UDP (17), length 392)
+    192.168.1.2.500 > 192.168.1.1.500: isakmp 2.0 msgid 00000008: child_sa  child_sa[I]:
+    (v2e: len=332)
+IP (tos 0x0, ttl 64, id 19927, offset 0, flags [none], proto UDP (17), length 344)
+    192.168.1.1.500 > 192.168.1.2.500: isakmp 2.0 msgid 00000008: child_sa  child_sa[R]:
+    (v2e: len=284)
+IP (tos 0x0, ttl 64, id 19928, offset 0, flags [none], proto UDP (17), length 120)
+    192.168.1.2.500 > 192.168.1.1.500: isakmp 2.0 msgid 00000000: parent_sa inf2[I]:
+    (v2e: len=60)