diff options
author | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2020-08-06 16:23:30 +0200 |
---|---|---|
committer | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2020-08-06 16:27:24 +0200 |
commit | b846e244235904990a66bb7fcee7b028cf83ab2c (patch) | |
tree | 84c7bd45afc0b68b01febe29acd8abadd25a4eff | |
parent | 5e9a51fdd559721eab88ec68a06b191997c57883 (diff) | |
download | tcpdump-b846e244235904990a66bb7fcee7b028cf83ab2c.tar.gz |
AppleTalk: Update the link-layer dissector to a void function
Moreover:
Remove trailing "_if" from the protocol name.
-rw-r--r-- | netdissect.h | 2 | ||||
-rw-r--r-- | print-atalk.c | 9 | ||||
-rw-r--r-- | print.c | 6 |
3 files changed, 9 insertions, 8 deletions
diff --git a/netdissect.h b/netdissect.h index 0eb57371..e39191a6 100644 --- a/netdissect.h +++ b/netdissect.h @@ -503,7 +503,7 @@ extern void juniper_ppp_if_print IF_PRINTER_ARGS; extern void juniper_pppoe_atm_if_print IF_PRINTER_ARGS; extern void juniper_pppoe_if_print IF_PRINTER_ARGS; extern void juniper_services_if_print IF_PRINTER_ARGS; -extern u_int ltalk_if_print IF_PRINTER_ARGS; +extern void ltalk_if_print IF_PRINTER_ARGS; extern void mfr_if_print IF_PRINTER_ARGS; extern void netanalyzer_if_print IF_PRINTER_ARGS; extern void netanalyzer_transparent_if_print IF_PRINTER_ARGS; diff --git a/print-atalk.c b/print-atalk.c index ae342069..398e9a41 100644 --- a/print-atalk.c +++ b/print-atalk.c @@ -72,19 +72,20 @@ static const char *ddpskt_string(netdissect_options *, u_int); /* * Print LLAP packets received on a physical LocalTalk interface. */ -u_int +void ltalk_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p) { u_int hdrlen; - ndo->ndo_protocol = "ltalk_if"; + ndo->ndo_protocol = "ltalk"; hdrlen = llap_print(ndo, p, h->len); if (hdrlen == 0) { /* Cut short by the snapshot length. */ - return (h->caplen); + ndo->ndo_ll_hdr_len += h->caplen; + return; } - return (hdrlen); + ndo->ndo_ll_hdr_len += hdrlen; } /* @@ -56,9 +56,6 @@ static const struct uint_printer uint_printers[] = { #if defined(DLT_PFLOG) && defined(HAVE_NET_IF_PFLOG_H) { pflog_if_print, DLT_PFLOG }, #endif -#ifdef DLT_LTALK - { ltalk_if_print, DLT_LTALK }, -#endif { NULL, 0 }, }; @@ -181,6 +178,9 @@ static const struct void_printer void_printers[] = { #ifdef DLT_JUNIPER_SERVICES { juniper_services_if_print, DLT_JUNIPER_SERVICES }, #endif +#ifdef DLT_LTALK + { ltalk_if_print, DLT_LTALK }, +#endif #ifdef DLT_MFR { mfr_if_print, DLT_MFR }, #endif |