summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2020-08-02 12:03:19 +0200
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2020-08-02 12:03:39 +0200
commit770b67da7640cb64fa54fb615084d3c369270368 (patch)
tree7cb74475e5dabc6628661debf3f3c58e5e77f80c
parente2e1906cff6ab7d5de40f587b89039713dac6d82 (diff)
downloadtcpdump-770b67da7640cb64fa54fb615084d3c369270368.tar.gz
FDDI: 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-fddi.c6
-rw-r--r--print.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/netdissect.h b/netdissect.h
index 8cee597c..97ace620 100644
--- a/netdissect.h
+++ b/netdissect.h
@@ -478,7 +478,7 @@ extern void dsa_if_print IF_PRINTER_ARGS;
extern void edsa_if_print IF_PRINTER_ARGS;
extern void enc_if_print IF_PRINTER_ARGS;
extern void ether_if_print IF_PRINTER_ARGS;
-extern u_int fddi_if_print IF_PRINTER_ARGS;
+extern void fddi_if_print IF_PRINTER_ARGS;
extern u_int fr_if_print IF_PRINTER_ARGS;
extern void ieee802_11_if_print IF_PRINTER_ARGS;
extern void ieee802_11_radio_avs_if_print IF_PRINTER_ARGS;
diff --git a/print-fddi.c b/print-fddi.c
index db5222f6..fb8d3ed5 100644
--- a/print-fddi.c
+++ b/print-fddi.c
@@ -342,9 +342,9 @@ fddi_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen)
* 'h->len' is the length of the packet off the wire, and 'h->caplen'
* is the number of bytes actually captured.
*/
-u_int
+void
fddi_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p)
{
- ndo->ndo_protocol = "fddi_if";
- return (fddi_print(ndo, p, h->len, h->caplen));
+ ndo->ndo_protocol = "fddi";
+ ndo->ndo_ll_hdr_len += fddi_print(ndo, p, h->len, h->caplen);
}
diff --git a/print.c b/print.c
index 56438353..e5f39649 100644
--- a/print.c
+++ b/print.c
@@ -69,7 +69,6 @@ static const struct uint_printer uint_printers[] = {
{ pflog_if_print, DLT_PFLOG },
#endif
{ token_if_print, DLT_IEEE802 },
- { fddi_if_print, DLT_FDDI },
#ifdef DLT_LINUX_SLL
{ sll_if_print, DLT_LINUX_SLL },
#endif
@@ -135,6 +134,7 @@ static const struct void_printer void_printers[] = {
{ enc_if_print, DLT_ENC },
#endif
{ ether_if_print, DLT_EN10MB },
+ { fddi_if_print, DLT_FDDI },
#ifdef DLT_IEEE802_11
{ ieee802_11_if_print, DLT_IEEE802_11},
#endif