summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2020-08-02 13:46:55 +0200
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2020-08-02 22:11:51 +0200
commitbdf7eacfa10c7d8d05ed25e55b619ba32ecc40cc (patch)
treeee3730830faaf3c1f53206ea3e4df0838bbdafba
parent941452b13284aacf521b48f87d8243b28fa541cf (diff)
downloadtcpdump-bdf7eacfa10c7d8d05ed25e55b619ba32ecc40cc.tar.gz
IPFC: Update the link-layer dissector to a void function
Moreover: Remove trailing "_if" from the protocol name.
-rw-r--r--netdissect.h2
-rw-r--r--print-ipfc.c6
-rw-r--r--print.c6
3 files changed, 7 insertions, 7 deletions
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