#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-juniper.c,v 1.8.2.10 2005-06-03 22:03:48 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-juniper.c,v 1.8.2.13 2005-06-20 07:45:05 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
#include "llc.h"
#include "nlpid.h"
#include "ethertype.h"
+#include "atm.h"
#define JUNIPER_BPF_OUT 0 /* Outgoing packet */
#define JUNIPER_BPF_IN 1 /* Incoming packet */
case JUNIPER_LSQ_L3_PROTO_IPV4:
ip_print(gndo, p, l2info.length);
return l2info.header_len;
+#ifdef INET6
case JUNIPER_LSQ_L3_PROTO_IPV6:
ip6_print(p,l2info.length);
return l2info.header_len;
+#endif
case JUNIPER_LSQ_L3_PROTO_MPLS:
mpls_print(p,l2info.length);
return l2info.header_len;
p+=l2info.header_len;
if (l2info.cookie[0] == 0x80) { /* OAM cell ? */
- oam_print(p,l2info.length);
+ oam_print(p,l2info.length,ATM_OAM_NOHEC);
return l2info.header_len;
}
juniper_atm2_print(const struct pcap_pkthdr *h, register const u_char *p)
{
u_int16_t extracted_ethertype;
+ u_int32_t control_word;
struct juniper_l2info_t l2info;
p+=l2info.header_len;
if (l2info.cookie[7] & ATM2_PKT_TYPE_MASK) { /* OAM cell ? */
- oam_print(p,l2info.length);
+ control_word = EXTRACT_32BITS(p);
+ if(control_word == 0 || control_word == 0x08000000) {
+ l2info.header_len += 4;
+ l2info.length -= 4;
+ p += 4;
+ }
+ oam_print(p,l2info.length,ATM_OAM_NOHEC);
return l2info.header_len;
}