X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/26d58ef8a60622cbc63cc3735eb71a6f4e5ed331..cc2d4cbd8ca150504127f375d8b51b194958d95b:/af.h diff --git a/af.h b/af.h index 876fe932..b9fec8e6 100644 --- 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 * @@ -14,10 +12,11 @@ * 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 */