mirror of
https://github.com/the-tcpdump-group/tcpdump.git
synced 2025-01-23 08:08:29 +08:00
CHDLC: Update the link-layer dissector to a void function
Moreover: Remove trailing "_if" from the protocol name.
This commit is contained in:
parent
496c43c10b
commit
5e9a51fdd5
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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
12
print.c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user