]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-atm.c
Makefile.in: 'distclean' target: add files and directories to remove
[tcpdump] / print-atm.c
index b132a6de5fd459a01eb81b50b42507dd40f25499..4fd1ca71a952e391bd05641716f481b34bc746a9 100644 (file)
  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
-#ifndef lint
-static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-atm.c,v 1.49 2007-10-22 19:37:51 guy Exp $ (LBL)";
-#endif
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -30,7 +26,6 @@ static const char rcsid[] _U_ =
 #include <tcpdump-stdinc.h>
 
 #include <stdio.h>
-#include <pcap.h>
 #include <string.h>
 
 #include "interface.h"
@@ -43,6 +38,8 @@ static const char rcsid[] _U_ =
 
 #include "ether.h"
 
+static const char tstr[] = "[|atm]";
+
 #define OAM_CRC10_MASK 0x3ff
 #define OAM_PAYLOAD_LEN 48
 #define OAM_FUNCTION_SPECIFIC_LEN 45 /* this excludes crc10 and cell-type/function-type */
@@ -139,7 +136,7 @@ atm_llc_print(const u_char *p, int length, int caplen)
 {
        u_short extracted_ethertype;
 
-       if (!llc_print(p, length, caplen, NULL, NULL,
+       if (!llc_print(gndo, p, length, caplen, NULL, NULL,
            &extracted_ethertype)) {
                /* ether_type not known, print raw packet */
                if (extracted_ethertype) {
@@ -172,7 +169,7 @@ atm_if_print(const struct pcap_pkthdr *h, const u_char *p)
        u_int hdrlen = 0;
 
        if (caplen < 8) {
-               printf("[|atm]");
+               printf("%s", tstr);
                return (caplen);
        }
 
@@ -254,17 +251,17 @@ sig_print(const u_char *p, int caplen)
        bpf_u_int32 call_ref;
 
        if (caplen < PROTO_POS) {
-               printf("[|atm]");
+               printf("%s", tstr);
                return;
        }
        if (p[PROTO_POS] == Q2931) {
                /*
-                * protocol:Q.2931 for User to Network Interface 
+                * protocol:Q.2931 for User to Network Interface
                 * (UNI 3.1) signalling
                 */
                printf("Q.2931");
                if (caplen < MSG_TYPE_POS) {
-                       printf(" [|atm]");
+                       printf(" %s", tstr);
                        return;
                }
                printf(":%s ",
@@ -332,7 +329,7 @@ atm_print(u_int vpi, u_int vci, u_int traftype, const u_char *p, u_int length,
                break;
 
        case ATM_LANE:
-               lane_print(p, length, caplen);
+               lane_print(gndo, p, length, caplen);
                break;
        }
 }
@@ -351,7 +348,7 @@ struct oam_fm_ais_rdi_t {
     u_int8_t unused[28];
 };
 
-int 
+int
 oam_print (const u_char *p, u_int length, u_int hec) {
 
     u_int32_t cell_header;
@@ -442,7 +439,7 @@ oam_print (const u_char *p, u_int length, u_int hec) {
     cksum = EXTRACT_16BITS(p + OAM_CELLTYPE_FUNCTYPE_LEN + OAM_FUNCTION_SPECIFIC_LEN)
         & OAM_CRC10_MASK;
     cksum_shouldbe = verify_crc10_cksum(0, p, OAM_PAYLOAD_LEN);
-    
+
     printf("\n\tcksum 0x%03x (%scorrect)",
            cksum,
            cksum_shouldbe == 0 ? "" : "in");