From: Francois-Xavier Le Bail Date: Thu, 16 Nov 2017 06:15:35 +0000 (+0100) Subject: Rename some link-layer dissector entry functions X-Git-Tag: tcpdump-4.99-bp~1774 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/51d034f45b672c2f1bfc8c185cd5bd0c6798531d Rename some link-layer dissector entry functions Most of them are already named *_if_print. Update the others to have the same prefix. This change allow easier identification. --- diff --git a/netdissect.h b/netdissect.h index 90bc8050..bbeb66ec 100644 --- a/netdissect.h +++ b/netdissect.h @@ -408,21 +408,21 @@ extern u_int ieee802_11_radio_if_print IF_PRINTER_ARGS; extern u_int ieee802_15_4_if_print IF_PRINTER_ARGS; extern u_int ipfc_if_print IF_PRINTER_ARGS; extern u_int ipnet_if_print IF_PRINTER_ARGS; -extern u_int juniper_atm1_print IF_PRINTER_ARGS; -extern u_int juniper_atm2_print IF_PRINTER_ARGS; -extern u_int juniper_chdlc_print IF_PRINTER_ARGS; -extern u_int juniper_es_print IF_PRINTER_ARGS; -extern u_int juniper_ether_print IF_PRINTER_ARGS; -extern u_int juniper_frelay_print IF_PRINTER_ARGS; -extern u_int juniper_ggsn_print IF_PRINTER_ARGS; -extern u_int juniper_mfr_print IF_PRINTER_ARGS; -extern u_int juniper_mlfr_print IF_PRINTER_ARGS; -extern u_int juniper_mlppp_print IF_PRINTER_ARGS; -extern u_int juniper_monitor_print IF_PRINTER_ARGS; -extern u_int juniper_ppp_print IF_PRINTER_ARGS; -extern u_int juniper_pppoe_atm_print IF_PRINTER_ARGS; -extern u_int juniper_pppoe_print IF_PRINTER_ARGS; -extern u_int juniper_services_print IF_PRINTER_ARGS; +extern u_int juniper_atm1_if_print IF_PRINTER_ARGS; +extern u_int juniper_atm2_if_print IF_PRINTER_ARGS; +extern u_int juniper_chdlc_if_print IF_PRINTER_ARGS; +extern u_int juniper_es_if_print IF_PRINTER_ARGS; +extern u_int juniper_ether_if_print IF_PRINTER_ARGS; +extern u_int juniper_frelay_if_print IF_PRINTER_ARGS; +extern u_int juniper_ggsn_if_print IF_PRINTER_ARGS; +extern u_int juniper_mfr_if_print IF_PRINTER_ARGS; +extern u_int juniper_mlfr_if_print IF_PRINTER_ARGS; +extern u_int juniper_mlppp_if_print IF_PRINTER_ARGS; +extern u_int juniper_monitor_if_print IF_PRINTER_ARGS; +extern u_int juniper_ppp_if_print IF_PRINTER_ARGS; +extern u_int juniper_pppoe_atm_if_print IF_PRINTER_ARGS; +extern u_int juniper_pppoe_if_print IF_PRINTER_ARGS; +extern u_int juniper_services_if_print IF_PRINTER_ARGS; extern u_int lane_if_print IF_PRINTER_ARGS; extern u_int ltalk_if_print IF_PRINTER_ARGS; extern u_int mfr_if_print IF_PRINTER_ARGS; @@ -445,8 +445,8 @@ extern u_int sll_if_print IF_PRINTER_ARGS; extern u_int sunatm_if_print IF_PRINTER_ARGS; extern u_int symantec_if_print IF_PRINTER_ARGS; extern u_int token_if_print IF_PRINTER_ARGS; -extern u_int usb_linux_48_byte_print IF_PRINTER_ARGS; -extern u_int usb_linux_64_byte_print IF_PRINTER_ARGS; +extern u_int usb_linux_48_byte_if_print IF_PRINTER_ARGS; +extern u_int usb_linux_64_byte_if_print IF_PRINTER_ARGS; /* * Structure passed to some printers to allow them to print diff --git a/print-juniper.c b/print-juniper.c index ff1de9c0..b8383032 100644 --- a/print-juniper.c +++ b/print-juniper.c @@ -451,8 +451,8 @@ static int juniper_parse_header(netdissect_options *, const u_char *, const stru #ifdef DLT_JUNIPER_GGSN u_int -juniper_ggsn_print(netdissect_options *ndo, - const struct pcap_pkthdr *h, register const u_char *p) +juniper_ggsn_if_print(netdissect_options *ndo, + const struct pcap_pkthdr *h, register const u_char *p) { struct juniper_l2info_t l2info; struct juniper_ggsn_header { @@ -502,8 +502,8 @@ trunc: #ifdef DLT_JUNIPER_ES u_int -juniper_es_print(netdissect_options *ndo, - const struct pcap_pkthdr *h, register const u_char *p) +juniper_es_if_print(netdissect_options *ndo, + const struct pcap_pkthdr *h, register const u_char *p) { struct juniper_l2info_t l2info; struct juniper_ipsec_header { @@ -579,8 +579,8 @@ trunc: #ifdef DLT_JUNIPER_MONITOR u_int -juniper_monitor_print(netdissect_options *ndo, - const struct pcap_pkthdr *h, register const u_char *p) +juniper_monitor_if_print(netdissect_options *ndo, + const struct pcap_pkthdr *h, register const u_char *p) { struct juniper_l2info_t l2info; struct juniper_monitor_header { @@ -618,8 +618,8 @@ trunc: #ifdef DLT_JUNIPER_SERVICES u_int -juniper_services_print(netdissect_options *ndo, - const struct pcap_pkthdr *h, register const u_char *p) +juniper_services_if_print(netdissect_options *ndo, + const struct pcap_pkthdr *h, register const u_char *p) { struct juniper_l2info_t l2info; struct juniper_services_header { @@ -658,8 +658,8 @@ trunc: #ifdef DLT_JUNIPER_PPPOE u_int -juniper_pppoe_print(netdissect_options *ndo, - const struct pcap_pkthdr *h, register const u_char *p) +juniper_pppoe_if_print(netdissect_options *ndo, + const struct pcap_pkthdr *h, register const u_char *p) { struct juniper_l2info_t l2info; @@ -676,8 +676,8 @@ juniper_pppoe_print(netdissect_options *ndo, #ifdef DLT_JUNIPER_ETHER u_int -juniper_ether_print(netdissect_options *ndo, - const struct pcap_pkthdr *h, register const u_char *p) +juniper_ether_if_print(netdissect_options *ndo, + const struct pcap_pkthdr *h, register const u_char *p) { struct juniper_l2info_t l2info; @@ -694,8 +694,8 @@ juniper_ether_print(netdissect_options *ndo, #ifdef DLT_JUNIPER_PPP u_int -juniper_ppp_print(netdissect_options *ndo, - const struct pcap_pkthdr *h, register const u_char *p) +juniper_ppp_if_print(netdissect_options *ndo, + const struct pcap_pkthdr *h, register const u_char *p) { struct juniper_l2info_t l2info; @@ -712,8 +712,8 @@ juniper_ppp_print(netdissect_options *ndo, #ifdef DLT_JUNIPER_FRELAY u_int -juniper_frelay_print(netdissect_options *ndo, - const struct pcap_pkthdr *h, register const u_char *p) +juniper_frelay_if_print(netdissect_options *ndo, + const struct pcap_pkthdr *h, register const u_char *p) { struct juniper_l2info_t l2info; @@ -730,8 +730,8 @@ juniper_frelay_print(netdissect_options *ndo, #ifdef DLT_JUNIPER_CHDLC u_int -juniper_chdlc_print(netdissect_options *ndo, - const struct pcap_pkthdr *h, register const u_char *p) +juniper_chdlc_if_print(netdissect_options *ndo, + const struct pcap_pkthdr *h, register const u_char *p) { struct juniper_l2info_t l2info; @@ -748,8 +748,8 @@ juniper_chdlc_print(netdissect_options *ndo, #ifdef DLT_JUNIPER_PPPOE_ATM u_int -juniper_pppoe_atm_print(netdissect_options *ndo, - const struct pcap_pkthdr *h, register const u_char *p) +juniper_pppoe_atm_if_print(netdissect_options *ndo, + const struct pcap_pkthdr *h, register const u_char *p) { struct juniper_l2info_t l2info; uint16_t extracted_ethertype; @@ -782,8 +782,8 @@ trunc: #ifdef DLT_JUNIPER_MLPPP u_int -juniper_mlppp_print(netdissect_options *ndo, - const struct pcap_pkthdr *h, register const u_char *p) +juniper_mlppp_if_print(netdissect_options *ndo, + const struct pcap_pkthdr *h, register const u_char *p) { struct juniper_l2info_t l2info; @@ -842,8 +842,8 @@ juniper_mlppp_print(netdissect_options *ndo, #ifdef DLT_JUNIPER_MFR u_int -juniper_mfr_print(netdissect_options *ndo, - const struct pcap_pkthdr *h, register const u_char *p) +juniper_mfr_if_print(netdissect_options *ndo, + const struct pcap_pkthdr *h, register const u_char *p) { struct juniper_l2info_t l2info; @@ -904,8 +904,8 @@ juniper_mfr_print(netdissect_options *ndo, #ifdef DLT_JUNIPER_MLFR u_int -juniper_mlfr_print(netdissect_options *ndo, - const struct pcap_pkthdr *h, register const u_char *p) +juniper_mlfr_if_print(netdissect_options *ndo, + const struct pcap_pkthdr *h, register const u_char *p) { struct juniper_l2info_t l2info; @@ -947,8 +947,8 @@ juniper_mlfr_print(netdissect_options *ndo, #ifdef DLT_JUNIPER_ATM1 u_int -juniper_atm1_print(netdissect_options *ndo, - const struct pcap_pkthdr *h, register const u_char *p) +juniper_atm1_if_print(netdissect_options *ndo, + const struct pcap_pkthdr *h, register const u_char *p) { int llc_hdrlen; @@ -1001,8 +1001,8 @@ trunc: #ifdef DLT_JUNIPER_ATM2 u_int -juniper_atm2_print(netdissect_options *ndo, - const struct pcap_pkthdr *h, register const u_char *p) +juniper_atm2_if_print(netdissect_options *ndo, + const struct pcap_pkthdr *h, register const u_char *p) { int llc_hdrlen; diff --git a/print-usb.c b/print-usb.c index 04eb4efb..04862881 100644 --- a/print-usb.c +++ b/print-usb.c @@ -135,8 +135,8 @@ usb_header_print(netdissect_options *ndo, const pcap_usb_header *uh) * is the number of bytes actually captured. */ u_int -usb_linux_48_byte_print(netdissect_options *ndo, const struct pcap_pkthdr *h, - register const u_char *p) +usb_linux_48_byte_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, + register const u_char *p) { if (h->caplen < sizeof(pcap_usb_header)) { ND_PRINT((ndo, "%s", tstr)); @@ -158,8 +158,8 @@ usb_linux_48_byte_print(netdissect_options *ndo, const struct pcap_pkthdr *h, * is the number of bytes actually captured. */ u_int -usb_linux_64_byte_print(netdissect_options *ndo, const struct pcap_pkthdr *h, - register const u_char *p) +usb_linux_64_byte_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, + register const u_char *p) { if (h->caplen < sizeof(pcap_usb_header_mmapped)) { ND_PRINT((ndo, "%s", tstr)); diff --git a/print.c b/print.c index 20d8ab51..703d7ef2 100644 --- a/print.c +++ b/print.c @@ -101,10 +101,10 @@ static const struct printer printers[] = { #endif #ifdef HAVE_PCAP_USB_H #ifdef DLT_USB_LINUX - { usb_linux_48_byte_print, DLT_USB_LINUX}, + { usb_linux_48_byte_if_print, DLT_USB_LINUX}, #endif /* DLT_USB_LINUX */ #ifdef DLT_USB_LINUX_MMAPPED - { usb_linux_64_byte_print, DLT_USB_LINUX_MMAPPED}, + { usb_linux_64_byte_if_print, DLT_USB_LINUX_MMAPPED}, #endif /* DLT_USB_LINUX_MMAPPED */ #endif /* HAVE_PCAP_USB_H */ #ifdef DLT_SYMANTEC_FIREWALL @@ -151,49 +151,49 @@ static const struct printer printers[] = { { ltalk_if_print, DLT_LTALK }, #endif #ifdef DLT_JUNIPER_ATM1 - { juniper_atm1_print, DLT_JUNIPER_ATM1 }, + { juniper_atm1_if_print, DLT_JUNIPER_ATM1 }, #endif #ifdef DLT_JUNIPER_ATM2 - { juniper_atm2_print, DLT_JUNIPER_ATM2 }, + { juniper_atm2_if_print, DLT_JUNIPER_ATM2 }, #endif #ifdef DLT_JUNIPER_MFR - { juniper_mfr_print, DLT_JUNIPER_MFR }, + { juniper_mfr_if_print, DLT_JUNIPER_MFR }, #endif #ifdef DLT_JUNIPER_MLFR - { juniper_mlfr_print, DLT_JUNIPER_MLFR }, + { juniper_mlfr_if_print, DLT_JUNIPER_MLFR }, #endif #ifdef DLT_JUNIPER_MLPPP - { juniper_mlppp_print, DLT_JUNIPER_MLPPP }, + { juniper_mlppp_if_print, DLT_JUNIPER_MLPPP }, #endif #ifdef DLT_JUNIPER_PPPOE - { juniper_pppoe_print, DLT_JUNIPER_PPPOE }, + { juniper_pppoe_if_print, DLT_JUNIPER_PPPOE }, #endif #ifdef DLT_JUNIPER_PPPOE_ATM - { juniper_pppoe_atm_print, DLT_JUNIPER_PPPOE_ATM }, + { juniper_pppoe_atm_if_print, DLT_JUNIPER_PPPOE_ATM }, #endif #ifdef DLT_JUNIPER_GGSN - { juniper_ggsn_print, DLT_JUNIPER_GGSN }, + { juniper_ggsn_if_print, DLT_JUNIPER_GGSN }, #endif #ifdef DLT_JUNIPER_ES - { juniper_es_print, DLT_JUNIPER_ES }, + { juniper_es_if_print, DLT_JUNIPER_ES }, #endif #ifdef DLT_JUNIPER_MONITOR - { juniper_monitor_print, DLT_JUNIPER_MONITOR }, + { juniper_monitor_if_print, DLT_JUNIPER_MONITOR }, #endif #ifdef DLT_JUNIPER_SERVICES - { juniper_services_print, DLT_JUNIPER_SERVICES }, + { juniper_services_if_print, DLT_JUNIPER_SERVICES }, #endif #ifdef DLT_JUNIPER_ETHER - { juniper_ether_print, DLT_JUNIPER_ETHER }, + { juniper_ether_if_print, DLT_JUNIPER_ETHER }, #endif #ifdef DLT_JUNIPER_PPP - { juniper_ppp_print, DLT_JUNIPER_PPP }, + { juniper_ppp_if_print, DLT_JUNIPER_PPP }, #endif #ifdef DLT_JUNIPER_FRELAY - { juniper_frelay_print, DLT_JUNIPER_FRELAY }, + { juniper_frelay_if_print, DLT_JUNIPER_FRELAY }, #endif #ifdef DLT_JUNIPER_CHDLC - { juniper_chdlc_print, DLT_JUNIPER_CHDLC }, + { juniper_chdlc_if_print, DLT_JUNIPER_CHDLC }, #endif #ifdef DLT_PKTAP { pktap_if_print, DLT_PKTAP },