]> The Tcpdump Group git mirrors - tcpdump/blobdiff - af.h
ICMPv6: Add the IPv6-Only flag
[tcpdump] / af.h
diff --git a/af.h b/af.h
index 876fe932bf9cb09fd99b41f2f8ec65bdd58c1499..b9fec8e635ad299e382a334edfa563af494d8009 100644 (file)
--- a/af.h
+++ b/af.h
@@ -1,5 +1,3 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/af.h,v 1.2 2006-02-27 07:25:27 hannes Exp $ (LBL) */
-
 /*
  * Copyright (c) 1998-2006 The TCPDUMP project
  *
  * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  * FOR A PARTICULAR PURPOSE.
  *
- * Original code by Hannes Gredler (hannes@juniper.net)
+ * Original code by Hannes Gredler (hannes@gredler.at)
  */
 
-extern struct tok af_values[];
+extern const struct tok af_values[];
+extern const struct tok bsd_af_values[];
 
 /* RFC1700 address family numbers */
 #define AFNUM_INET     1
@@ -38,3 +37,19 @@ extern struct tok af_values[];
 #define AFNUM_VPLS      25
 /* draft-kompella-ppvpn-l2vpn */
 #define AFNUM_L2VPN     196 /* still to be approved by IANA */
+
+/*
+ * BSD AF_ values.
+ *
+ * Unfortunately, the BSDs don't all use the same value for AF_INET6,
+ * so, because we want to be able to read captures from all of the BSDs,
+ * we check for all of them.
+ */
+#define BSD_AFNUM_INET         2
+#define BSD_AFNUM_NS           6               /* XEROX NS protocols */
+#define BSD_AFNUM_ISO          7
+#define BSD_AFNUM_APPLETALK    16
+#define BSD_AFNUM_IPX          23
+#define BSD_AFNUM_INET6_BSD    24      /* NetBSD, OpenBSD, BSD/OS, Npcap */
+#define BSD_AFNUM_INET6_FREEBSD        28      /* FreeBSD */
+#define BSD_AFNUM_INET6_DARWIN 30      /* macOS, iOS, other Darwin-based OSes */