From: Francois-Xavier Le Bail Date: Sun, 2 Aug 2020 11:46:55 +0000 (+0200) Subject: IPFC: Update the link-layer dissector to a void function X-Git-Tag: tcpdump-4.99-bp~293 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/bdf7eacfa10c7d8d05ed25e55b619ba32ecc40cc IPFC: Update the link-layer dissector to a void function Moreover: Remove trailing "_if" from the protocol name. --- diff --git a/netdissect.h b/netdissect.h index b98c85c8..34051267 100644 --- a/netdissect.h +++ b/netdissect.h @@ -485,7 +485,7 @@ extern void ieee802_11_radio_avs_if_print IF_PRINTER_ARGS; extern void ieee802_11_radio_if_print IF_PRINTER_ARGS; extern void ieee802_15_4_if_print IF_PRINTER_ARGS; extern void ieee802_15_4_tap_if_print IF_PRINTER_ARGS; -extern u_int ipfc_if_print IF_PRINTER_ARGS; +extern void ipfc_if_print IF_PRINTER_ARGS; extern void ipoib_if_print IF_PRINTER_ARGS; extern void ipnet_if_print IF_PRINTER_ARGS; extern void juniper_atm1_if_print IF_PRINTER_ARGS; diff --git a/print-ipfc.c b/print-ipfc.c index 7add1b7b..5222e512 100644 --- a/print-ipfc.c +++ b/print-ipfc.c @@ -139,9 +139,9 @@ trunc: * 'h->len' is the length of the packet off the wire, and 'h->caplen' * is the number of bytes actually captured. */ -u_int +void ipfc_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p) { - ndo->ndo_protocol = "ipfc_if"; - return (ipfc_print(ndo, p, h->len, h->caplen)); + ndo->ndo_protocol = "ipfc"; + ndo->ndo_ll_hdr_len += ipfc_print(ndo, p, h->len, h->caplen); } diff --git a/print.c b/print.c index 8922b7ce..14a7f5f0 100644 --- a/print.c +++ b/print.c @@ -53,9 +53,6 @@ struct void_printer { }; static const struct uint_printer uint_printers[] = { -#ifdef DLT_IP_OVER_FC - { ipfc_if_print, DLT_IP_OVER_FC }, -#endif #ifdef DLT_LANE8023 { lane_if_print, DLT_LANE8023 }, #endif @@ -146,6 +143,9 @@ static const struct void_printer void_printers[] = { #ifdef DLT_IEEE802_15_4_TAP { ieee802_15_4_tap_if_print, DLT_IEEE802_15_4_TAP }, #endif +#ifdef DLT_IP_OVER_FC + { ipfc_if_print, DLT_IP_OVER_FC }, +#endif #ifdef DLT_IPNET { ipnet_if_print, DLT_IPNET }, #endif