]> The Tcpdump Group git mirrors - tcpdump/commitdiff
add support for the atm-cell-relay control word
authorhannes <hannes>
Tue, 17 May 2005 09:37:30 +0000 (09:37 +0000)
committerhannes <hannes>
Tue, 17 May 2005 09:37:30 +0000 (09:37 +0000)
print-juniper.c

index 16f60a38963db39b5865f83dc41445aac2b04f3f..14baa6231e58c706416b6f6371d68605a7772f77 100644 (file)
@@ -15,7 +15,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-juniper.c,v 1.15 2005-05-12 08:40:18 hannes Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-juniper.c,v 1.16 2005-05-17 09:37:30 hannes Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -552,9 +552,15 @@ juniper_parse_header (const u_char *p, const struct pcap_pkthdr *h, struct junip
         l2info->caplen -= 2;
         break;
     case DLT_JUNIPER_ATM2:
+        /* ATM cell relay control word present ? */
+        if (l2info->cookie[7] & ATM2_PKT_TYPE_MASK && *p & 0x08) {
+            l2info->header_len += 4;
+            if (eflag)
+                printf("control-word 0x%08x ",EXTRACT_32BITS(p));
+        }
+        break;
     case DLT_JUNIPER_ATM1:
     default:
-
         break;
     }