__RCSID("NetBSD: print-juniper.c,v 1.3 2007/07/25 06:31:32 dogcow Exp ");
#endif
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
#include "netdissect-stdinc.h"
p+=l2info.header_len;
gh = (struct juniper_ggsn_header *)&l2info.cookie;
- ND_TCHECK_SIZE(gh);
- proto = GET_U_1(gh->proto);
+ /* use EXTRACT_, not GET_ (not packet buffer pointer) */
+ proto = EXTRACT_U_1(gh->proto);
if (ndo->ndo_eflag) {
ND_PRINT("proto %s (%u), vlan %u: ",
tok2str(juniper_protocol_values,"Unknown",proto),
proto,
- GET_BE_U_2(gh->vlan_id));
+ EXTRACT_BE_U_2(gh->vlan_id));
}
switch (proto) {
* ATM1 PIC cookie format
*
* +-----+-------------------------+-------------------------------+
- * |fmtid| vc index | channel ID |
+ * |fmtid| vc index | channel ID |
* +-----+-------------------------+-------------------------------+
*/
* ATM2 PIC cookie format
*
* +-------------------------------+---------+---+-----+-----------+
- * | channel ID | reserv |AAL| CCRQ| gap cnt |
+ * | channel ID |reserved |AAL| CCRQ| gap count |
* +-------------------------------+---------+---+-----+-----------+
*/
/* sanity checks */
if (tlv_type == 0 || tlv_len == 0)
break;
- ND_LCHECK_U(extension_length, tlv_len + JUNIPER_EXT_TLV_OVERHEAD);
+ ND_ICHECK_U(extension_length, <,
+ tlv_len + JUNIPER_EXT_TLV_OVERHEAD);
if (ndo->ndo_vflag > 1)
ND_PRINT("\n\t %s Extension TLV #%u, length %u, value ",
}
break;
#endif
+#ifdef DLT_JUNIPER_ES
+ case DLT_JUNIPER_ES:
+ break;
+#endif
#ifdef DLT_JUNIPER_GGSN
case DLT_JUNIPER_GGSN:
break;
#endif
+#ifdef DLT_JUNIPER_SERVICES
+ case DLT_JUNIPER_SERVICES:
+ break;
+#endif
#ifdef DLT_JUNIPER_ATM1
case DLT_JUNIPER_ATM1:
break;
case DLT_JUNIPER_FRELAY:
break;
#endif
+#ifdef DLT_JUNIPER_MONITOR
+ case DLT_JUNIPER_MONITOR:
+ break;
+#endif
+#ifdef DLT_JUNIPER_PPPOE
+ case DLT_JUNIPER_PPPOE:
+ break;
+#endif
+#ifdef DLT_JUNIPER_PPPOE_ATM
+ case DLT_JUNIPER_PPPOE_ATM:
+ break;
+#endif
default:
ND_PRINT("Unknown Juniper DLT_ type %u: ", l2info->pictype);