]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-juniper.c
remove more stray prototypes
[tcpdump] / print-juniper.c
index 556df93ad1dae52741c71d25e6ce26fb75c7d346..7774c1ad49a65ee2b4a74434e449f874a177a68e 100644 (file)
@@ -26,7 +26,6 @@ __RCSID("NetBSD: print-juniper.c,v 1.3 2007/07/25 06:31:32 dogcow Exp ");
 
 #include <tcpdump-stdinc.h>
 
-#include <pcap.h>
 #include <stdio.h>
 
 #include "interface.h"
@@ -530,6 +529,7 @@ juniper_es_print(const struct pcap_pkthdr *h, register const u_char *p)
         case JUNIPER_IPSEC_O_ESP_ENCRYPTION_TYPE:
             rewrite_len = 16;
             es_type_bundle = 0;
+            break;
         default:
             printf("ES Invalid type %u, length %u",
                    ih->type,
@@ -696,7 +696,7 @@ juniper_frelay_print(const struct pcap_pkthdr *h, register const u_char *p)
 
         p+=l2info.header_len;
         /* this DLT contains nothing but raw frame-relay frames */
-        fr_print(p, l2info.length);
+        fr_print(gndo, p, l2info.length);
         return l2info.header_len;
 }
 #endif
@@ -713,7 +713,7 @@ juniper_chdlc_print(const struct pcap_pkthdr *h, register const u_char *p)
 
         p+=l2info.header_len;
         /* this DLT contains nothing but raw c-hdlc frames */
-        chdlc_print(p, l2info.length);
+        chdlc_print(gndo, p, l2info.length);
         return l2info.header_len;
 }
 #endif
@@ -781,10 +781,10 @@ juniper_mlppp_print(const struct pcap_pkthdr *h, register const u_char *p)
             return l2info.header_len;
 #endif
         case JUNIPER_LSQ_L3_PROTO_MPLS:
-            mpls_print(p,l2info.length);
+            mpls_print(gndo, p, l2info.length);
             return l2info.header_len;
         case JUNIPER_LSQ_L3_PROTO_ISO:
-            isoclns_print(p,l2info.length,l2info.caplen);
+            isoclns_print(gndo, p, l2info.length, l2info.caplen);
             return l2info.header_len;
         default:
             break;
@@ -820,7 +820,7 @@ juniper_mfr_print(const struct pcap_pkthdr *h, register const u_char *p)
 
         /* child-link ? */
         if (l2info.cookie_len == 0) {
-            mfr_print(p,l2info.length);
+            mfr_print(gndo, p, l2info.length);
             return l2info.header_len;
         }
 
@@ -836,10 +836,10 @@ juniper_mfr_print(const struct pcap_pkthdr *h, register const u_char *p)
                 return l2info.header_len;
 #endif
             case JUNIPER_LSQ_L3_PROTO_MPLS:
-                mpls_print(p,l2info.length);
+                mpls_print(gndo, p, l2info.length);
                 return l2info.header_len;
             case JUNIPER_LSQ_L3_PROTO_ISO:
-                isoclns_print(p,l2info.length,l2info.caplen);
+                isoclns_print(gndo, p, l2info.length, l2info.caplen);
                 return l2info.header_len;
             default:
                 break;
@@ -851,13 +851,13 @@ juniper_mfr_print(const struct pcap_pkthdr *h, register const u_char *p)
         if (eflag && EXTRACT_32BITS(l2info.cookie) != 1) printf("Bundle-ID %u, ",l2info.bundle);
         switch (l2info.proto) {
         case (LLCSAP_ISONS<<8 | LLCSAP_ISONS):
-            isoclns_print(p+1, l2info.length-1, l2info.caplen-1);
+            isoclns_print(gndo, p + 1, l2info.length - 1, l2info.caplen - 1);
             break;
         case (LLC_UI<<8 | NLPID_Q933):
         case (LLC_UI<<8 | NLPID_IP):
         case (LLC_UI<<8 | NLPID_IP6):
             /* pass IP{4,6} to the OSI layer for proper link-layer printing */
-            isoclns_print(p-1, l2info.length+1, l2info.caplen+1);
+            isoclns_print(gndo, p - 1, l2info.length + 1, l2info.caplen + 1);
             break;
         default:
             printf("unknown protocol 0x%04x, length %u",l2info.proto, l2info.length);
@@ -884,13 +884,13 @@ juniper_mlfr_print(const struct pcap_pkthdr *h, register const u_char *p)
         switch (l2info.proto) {
         case (LLC_UI):
         case (LLC_UI<<8):
-            isoclns_print(p, l2info.length, l2info.caplen);
+            isoclns_print(gndo, p, l2info.length, l2info.caplen);
             break;
         case (LLC_UI<<8 | NLPID_Q933):
         case (LLC_UI<<8 | NLPID_IP):
         case (LLC_UI<<8 | NLPID_IP6):
             /* pass IP{4,6} to the OSI layer for proper link-layer printing */
-            isoclns_print(p-1, l2info.length+1, l2info.caplen+1);
+            isoclns_print(gndo, p - 1, l2info.length + 1, l2info.caplen + 1);
             break;
         default:
             printf("unknown protocol 0x%04x, length %u",l2info.proto, l2info.length);
@@ -923,20 +923,20 @@ juniper_atm1_print(const struct pcap_pkthdr *h, register const u_char *p)
         p+=l2info.header_len;
 
         if (l2info.cookie[0] == 0x80) { /* OAM cell ? */
-            oam_print(p,l2info.length,ATM_OAM_NOHEC);
+            oam_print(gndo, p, l2info.length, ATM_OAM_NOHEC);
             return l2info.header_len;
         }
 
         if (EXTRACT_24BITS(p) == 0xfefe03 || /* NLPID encaps ? */
             EXTRACT_24BITS(p) == 0xaaaa03) { /* SNAP encaps ? */
 
-            if (llc_print(p, l2info.length, l2info.caplen, NULL, NULL,
+            if (llc_print(gndo, p, l2info.length, l2info.caplen, NULL, NULL,
                           &extracted_ethertype) != 0)
                 return l2info.header_len;
         }
 
         if (p[0] == 0x03) { /* Cisco style NLPID encaps ? */
-            isoclns_print(p + 1, l2info.length - 1, l2info.caplen - 1);
+            isoclns_print(gndo, p + 1, l2info.length - 1, l2info.caplen - 1);
             /* FIXME check if frame was recognized */
             return l2info.header_len;
         }
@@ -971,14 +971,14 @@ juniper_atm2_print(const struct pcap_pkthdr *h, register const u_char *p)
         p+=l2info.header_len;
 
         if (l2info.cookie[7] & ATM2_PKT_TYPE_MASK) { /* OAM cell ? */
-            oam_print(p,l2info.length,ATM_OAM_NOHEC);
+            oam_print(gndo, p, l2info.length, ATM_OAM_NOHEC);
             return l2info.header_len;
         }
 
         if (EXTRACT_24BITS(p) == 0xfefe03 || /* NLPID encaps ? */
             EXTRACT_24BITS(p) == 0xaaaa03) { /* SNAP encaps ? */
 
-            if (llc_print(p, l2info.length, l2info.caplen, NULL, NULL,
+            if (llc_print(gndo, p, l2info.length, l2info.caplen, NULL, NULL,
                           &extracted_ethertype) != 0)
                 return l2info.header_len;
         }
@@ -990,7 +990,7 @@ juniper_atm2_print(const struct pcap_pkthdr *h, register const u_char *p)
         }
 
         if (p[0] == 0x03) { /* Cisco style NLPID encaps ? */
-            isoclns_print(p + 1, l2info.length - 1, l2info.caplen - 1);
+            isoclns_print(gndo, p + 1, l2info.length - 1, l2info.caplen - 1);
             /* FIXME check if frame was recognized */
             return l2info.header_len;
         }