]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Rename some link-layer dissector entry functions
authorFrancois-Xavier Le Bail <[email protected]>
Thu, 16 Nov 2017 06:15:35 +0000 (07:15 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Thu, 16 Nov 2017 06:22:41 +0000 (07:22 +0100)
Most of them are already named *_if_print.
Update the others to have the same prefix.

This change allow easier identification.

netdissect.h
print-juniper.c
print-usb.c
print.c

index 90bc8050cffc907c7cc20f7ef0cd02436f147f06..bbeb66ecf08005f50dff1472afcf6a4bc585fcb9 100644 (file)
@@ -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
index ff1de9c03d15bf9edf72b93ba2c356e4754b3262..b83830327ce914ec094eec1c584842a0487ad789 100644 (file)
@@ -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;
 
index 04eb4efb4fe3047f5bb64c0d7739124e32d5f75e..04862881b5cd22ad0ae3c317b3415b9623290e9f 100644 (file)
@@ -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 20d8ab51e2e49a4cf474f75efbaff17375747b78..703d7ef2b619aa6ff0461017503bf808ae83174f 100644 (file)
--- 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 },