CHDLC: Update the link-layer dissector to a void function

Moreover:
Remove trailing "_if" from the protocol name.
This commit is contained in:
Francois-Xavier Le Bail 2020-08-06 16:08:23 +02:00
parent 496c43c10b
commit 5e9a51fdd5
4 changed files with 11 additions and 11 deletions

View File

@ -472,7 +472,7 @@ extern void atm_if_print IF_PRINTER_ARGS;
extern void bt_if_print IF_PRINTER_ARGS;
extern void brcm_tag_if_print IF_PRINTER_ARGS;
extern void brcm_tag_prepend_if_print IF_PRINTER_ARGS;
extern u_int chdlc_if_print IF_PRINTER_ARGS;
extern void chdlc_if_print IF_PRINTER_ARGS;
extern void cip_if_print IF_PRINTER_ARGS;
extern void dsa_if_print IF_PRINTER_ARGS;
extern void edsa_if_print IF_PRINTER_ARGS;

View File

@ -44,11 +44,11 @@ static const struct tok chdlc_cast_values[] = {
/* Standard CHDLC printer */
u_int
void
chdlc_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p)
{
ndo->ndo_protocol = "chdlc_if";
return chdlc_print(ndo, p, h->len);
ndo->ndo_protocol = "chdlc";
ndo->ndo_ll_hdr_len += chdlc_print(ndo, p, h->len);
}
u_int

View File

@ -1743,7 +1743,7 @@ ppp_hdlc_if_print(netdissect_options *ndo,
case CHDLC_UNICAST:
case CHDLC_BCAST:
ndo->ndo_ll_hdr_len += chdlc_if_print(ndo, h, p);
chdlc_if_print(ndo, h, p);
return;
default:

12
print.c
View File

@ -53,12 +53,6 @@ struct void_printer {
};
static const struct uint_printer uint_printers[] = {
#ifdef DLT_C_HDLC
{ chdlc_if_print, DLT_C_HDLC },
#endif
#ifdef DLT_HDLC
{ chdlc_if_print, DLT_HDLC },
#endif
#if defined(DLT_PFLOG) && defined(HAVE_NET_IF_PFLOG_H)
{ pflog_if_print, DLT_PFLOG },
#endif
@ -86,6 +80,12 @@ static const struct void_printer void_printers[] = {
#ifdef DLT_BLUETOOTH_HCI_H4_WITH_PHDR
{ bt_if_print, DLT_BLUETOOTH_HCI_H4_WITH_PHDR},
#endif
#ifdef DLT_C_HDLC
{ chdlc_if_print, DLT_C_HDLC },
#endif
#ifdef DLT_HDLC
{ chdlc_if_print, DLT_HDLC },
#endif
#ifdef DLT_ATM_CLIP
{ cip_if_print, DLT_ATM_CLIP },
#endif