X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/57be4eb7ed4974965910d0ec179540b59bfe7a19..9fcec3cada18c2523fb0589a0239ecfc7f586c90:/print-juniper.c diff --git a/print-juniper.c b/print-juniper.c index c02de78e..d9bc1f52 100644 --- a/print-juniper.c +++ b/print-juniper.c @@ -22,9 +22,7 @@ __RCSID("NetBSD: print-juniper.c,v 1.3 2007/07/25 06:31:32 dogcow Exp "); #endif -#ifdef HAVE_CONFIG_H #include -#endif #include "netdissect-stdinc.h" @@ -495,13 +493,13 @@ juniper_ggsn_if_print(netdissect_options *ndo, 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) { @@ -1011,7 +1009,7 @@ juniper_mlfr_if_print(netdissect_options *ndo, * ATM1 PIC cookie format * * +-----+-------------------------+-------------------------------+ - * |fmtid| vc index | channel ID | + * |fmtid| vc index | channel ID | * +-----+-------------------------+-------------------------------+ */ @@ -1072,7 +1070,7 @@ juniper_atm1_if_print(netdissect_options *ndo, * ATM2 PIC cookie format * * +-------------------------------+---------+---+-----+-----------+ - * | channel ID | reserv |AAL| CCRQ| gap cnt | + * | channel ID |reserved |AAL| CCRQ| gap count | * +-------------------------------+---------+---+-----+-----------+ */ @@ -1166,7 +1164,6 @@ juniper_ppp_heuristic_guess(netdissect_options *ndo, default: return 0; /* did not find a ppp header */ - break; } return 1; /* we printed a ppp packet */ } @@ -1210,7 +1207,6 @@ ip_heuristic_guess(netdissect_options *ndo, break; default: return 0; /* did not find a ip header */ - break; } return 1; /* we printed an v4/v6 packet */ } @@ -1559,10 +1555,18 @@ juniper_parse_header(netdissect_options *ndo, } 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; @@ -1583,6 +1587,18 @@ juniper_parse_header(netdissect_options *ndo, 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);