]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-juniper.c
The patches attached to this email are required to get a fully working tcpdump
[tcpdump] / print-juniper.c
index b8a70d4eb9ac36db19f5ea6b4582064c460f0e4f..08a929f1e2690c7e50cf10e82b71c07ec001955c 100644 (file)
@@ -1,3 +1,5 @@
+/*     NetBSD: print-juniper.c,v 1.2 2007/07/24 11:53:45 drochner Exp        */
+
 /* 
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that: (1) source code
@@ -15,7 +17,9 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-juniper.c,v 1.31 2006-03-10 23:43:29 hannes Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-juniper.c,v 1.34 2007-08-29 02:31:44 mcr Exp $ (LBL)";
+#else
+__RCSID("NetBSD: print-juniper.c,v 1.3 2007/07/25 06:31:32 dogcow Exp ");
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -467,13 +471,14 @@ juniper_ggsn_print(const struct pcap_pkthdr *h, register const u_char *p)
             return l2info.header_len;
 
         p+=l2info.header_len;
-        gh = (struct juniper_ggsn_header *)p;
+        gh = (struct juniper_ggsn_header *)&l2info.cookie;
 
-        if (eflag)
+        if (eflag) {
             printf("proto %s (%u), vlan %u: ",
                    tok2str(juniper_protocol_values,"Unknown",gh->proto),
                    gh->proto,
                    EXTRACT_16BITS(&gh->vlan_id[0]));
+        }
 
         switch (gh->proto) {
         case JUNIPER_PROTO_IPV4:
@@ -545,8 +550,8 @@ juniper_es_print(const struct pcap_pkthdr *h, register const u_char *p)
                        tok2str(juniper_ipsec_type_values,"Unknown",ih->type),
                        ih->type,
                        EXTRACT_32BITS(&ih->spi),
-                       ipaddr_string(EXTRACT_32BITS(&ih->src_ip)),
-                       ipaddr_string(EXTRACT_32BITS(&ih->dst_ip)),
+                       ipaddr_string(&ih->src_ip),
+                       ipaddr_string(&ih->dst_ip),
                        l2info.length);
             } else {
                 printf("ES SA, index %u, ttl %u type %s (%u), length %u\n", 
@@ -1404,6 +1409,10 @@ juniper_parse_header (const u_char *p, const struct pcap_pkthdr *h, struct junip
         }
         break;
 #endif
+#ifdef DLT_JUNIPER_GGSN
+    case DLT_JUNIPER_GGSN:
+        break;
+#endif
 #ifdef DLT_JUNIPER_ATM1
     case DLT_JUNIPER_ATM1:
         break;