diff options
-rw-r--r-- | af.c | 16 | ||||
-rw-r--r-- | af.h | 16 | ||||
-rw-r--r-- | print-enc.c | 8 | ||||
-rw-r--r-- | print-null.c | 14 | ||||
-rw-r--r-- | print-pflog.c | 8 | ||||
-rw-r--r-- | print-rip.c | 8 |
6 files changed, 35 insertions, 35 deletions
@@ -46,13 +46,13 @@ const struct tok af_values[] = { }; const struct tok bsd_af_values[] = { - { BSD_AFNUM_INET, "IPv4" }, - { BSD_AFNUM_NS, "NS" }, - { BSD_AFNUM_ISO, "ISO" }, - { BSD_AFNUM_APPLETALK, "Appletalk" }, - { BSD_AFNUM_IPX, "IPX" }, - { BSD_AFNUM_INET6_BSD, "IPv6" }, - { BSD_AFNUM_INET6_FREEBSD, "IPv6" }, - { BSD_AFNUM_INET6_DARWIN, "IPv6" }, + { BSD_AF_INET, "IPv4" }, + { BSD_AF_NS, "NS" }, + { BSD_AF_ISO, "ISO" }, + { BSD_AF_APPLETALK, "Appletalk" }, + { BSD_AF_IPX, "IPX" }, + { BSD_AF_INET6_BSD, "IPv6" }, + { BSD_AF_INET6_FREEBSD, "IPv6" }, + { BSD_AF_INET6_DARWIN, "IPv6" }, { 0, NULL} }; @@ -45,11 +45,11 @@ extern const struct tok bsd_af_values[]; * 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 */ +#define BSD_AF_INET 2 +#define BSD_AF_NS 6 /* XEROX NS protocols */ +#define BSD_AF_ISO 7 +#define BSD_AF_APPLETALK 16 +#define BSD_AF_IPX 23 +#define BSD_AF_INET6_BSD 24 /* NetBSD, OpenBSD, BSD/OS, Npcap */ +#define BSD_AF_INET6_FREEBSD 28 /* FreeBSD */ +#define BSD_AF_INET6_DARWIN 30 /* macOS, iOS, other Darwin-based OSes */ diff --git a/print-enc.c b/print-enc.c index 928b02c8..8b148fab 100644 --- a/print-enc.c +++ b/print-enc.c @@ -146,12 +146,12 @@ enc_if_print(netdissect_options *ndo, p += ENC_HDRLEN; switch (af) { - case BSD_AFNUM_INET: + case BSD_AF_INET: ip_print(ndo, p, length); break; - case BSD_AFNUM_INET6_BSD: - case BSD_AFNUM_INET6_FREEBSD: - case BSD_AFNUM_INET6_DARWIN: + case BSD_AF_INET6_BSD: + case BSD_AF_INET6_FREEBSD: + case BSD_AF_INET6_DARWIN: ip6_print(ndo, p, length); break; } diff --git a/print-null.c b/print-null.c index a1b03f86..bf03b422 100644 --- a/print-null.c +++ b/print-null.c @@ -106,25 +106,25 @@ null_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char switch (family) { - case BSD_AFNUM_INET: + case BSD_AF_INET: ip_print(ndo, p, length); break; - case BSD_AFNUM_INET6_BSD: - case BSD_AFNUM_INET6_FREEBSD: - case BSD_AFNUM_INET6_DARWIN: + case BSD_AF_INET6_BSD: + case BSD_AF_INET6_FREEBSD: + case BSD_AF_INET6_DARWIN: ip6_print(ndo, p, length); break; - case BSD_AFNUM_ISO: + case BSD_AF_ISO: isoclns_print(ndo, p, length); break; - case BSD_AFNUM_APPLETALK: + case BSD_AF_APPLETALK: atalk_print(ndo, p, length); break; - case BSD_AFNUM_IPX: + case BSD_AF_IPX: ipx_print(ndo, p, length); break; diff --git a/print-pflog.c b/print-pflog.c index 1cffbf6b..f7772af6 100644 --- a/print-pflog.c +++ b/print-pflog.c @@ -176,7 +176,7 @@ pflog_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, * * Hopefully, there isn't. */ - case BSD_AFNUM_INET: + case BSD_AF_INET: ip_print(ndo, p, length); break; @@ -184,9 +184,9 @@ pflog_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, * Try all AF_INET6 values for all systems with pflog, * including Darwin. */ - case BSD_AFNUM_INET6_BSD: - case BSD_AFNUM_INET6_FREEBSD: - case BSD_AFNUM_INET6_DARWIN: + case BSD_AF_INET6_BSD: + case BSD_AF_INET6_FREEBSD: + case BSD_AF_INET6_DARWIN: ip6_print(ndo, p, length); break; diff --git a/print-rip.c b/print-rip.c index 35672551..9e81bb53 100644 --- a/print-rip.c +++ b/print-rip.c @@ -198,7 +198,7 @@ rip_entry_print_v1(netdissect_options *ndo, const u_char *p, ND_ICHECKMSG_U("remaining data length", remaining, <, RIP_ROUTELEN); ND_TCHECK_SIZE(ni); family = GET_BE_U_2(ni->rip_family); - if (family != BSD_AFNUM_INET && family != 0) { + if (family != BSD_AF_INET && family != 0) { ND_PRINT("\n\t AFI %s, ", tok2str(bsd_af_values, "Unknown (%u)", family)); print_unknown_data(ndo, p + sizeof(*eh), "\n\t ", RIP_ROUTELEN - sizeof(*eh)); return (RIP_ROUTELEN); @@ -215,7 +215,7 @@ rip_entry_print_v1(netdissect_options *ndo, const u_char *p, GET_IPADDR_STRING(ni->rip_dest), GET_BE_U_4(ni->rip_metric)); return (RIP_ROUTELEN); - } /* BSD_AFNUM_INET */ + } /* BSD_AF_INET */ ND_PRINT("\n\t %s, metric: %u", GET_IPADDR_STRING(ni->rip_dest), GET_BE_U_4(ni->rip_metric)); @@ -268,10 +268,10 @@ rip_entry_print_v2(netdissect_options *ndo, const u_char *p, print_unknown_data(ndo, p, "\n\t ", remaining); return (sizeof(*eh) + remaining); /* we don't know how long this is, so we go to the packet end */ } - } else if (family != BSD_AFNUM_INET && family != 0) { + } else if (family != BSD_AF_INET && family != 0) { ND_PRINT("\n\t AFI %s", tok2str(bsd_af_values, "Unknown (%u)", family)); print_unknown_data(ndo, p + sizeof(*eh), "\n\t ", RIP_ROUTELEN - sizeof(*eh)); - } else { /* BSD_AFNUM_INET or AFI 0 */ + } else { /* BSD_AF_INET or AFI 0 */ ni = (const struct rip_netinfo_v2 *)p; ND_ICHECKMSG_ZU("remaining data length", remaining, <, sizeof(*ni)); |