From: hannes Date: Tue, 15 Jun 2004 08:17:19 +0000 (+0000) Subject: fix the encapsulation type size (1-->2) for the layer-2 subTLVs X-Git-Tag: tcpdump-3.9.1~334 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/9d5d809b9b1b1e9c8dac6c565cefebcd1eb30a9b fix the encapsulation type size (1-->2) for the layer-2 subTLVs --- diff --git a/print-lspping.c b/print-lspping.c index 0751fbe7..50e28f2b 100644 --- a/print-lspping.c +++ b/print-lspping.c @@ -15,7 +15,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-lspping.c,v 1.6 2004-06-15 07:58:45 hannes Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-lspping.c,v 1.7 2004-06-15 08:17:19 hannes Exp $"; #endif #ifdef HAVE_CONFIG_H @@ -356,7 +356,7 @@ struct lspping_tlv_targetfec_subtlv_l2vpn_endpt_t { u_int8_t rd [8]; u_int8_t sender_ce_id [2]; u_int8_t receiver_ce_id [2]; - u_int8_t encapsulation; + u_int8_t encapsulation[2]; }; /* @@ -375,7 +375,7 @@ struct lspping_tlv_targetfec_subtlv_l2vpn_vcid_t { u_int8_t sender_pe_address [4]; u_int8_t remote_pe_address [4]; u_int8_t vc_id [4]; - u_int8_t encapsulation; + u_int8_t encapsulation[2]; }; void @@ -621,8 +621,8 @@ lspping_print(register const u_char *pptr, register u_int len) { EXTRACT_16BITS(subtlv_ptr.lspping_tlv_targetfec_subtlv_l2vpn_endpt->receiver_ce_id), tok2str(bgp_l2vpn_encaps_values, "unknown", - subtlv_ptr.lspping_tlv_targetfec_subtlv_l2vpn_endpt->encapsulation), - subtlv_ptr.lspping_tlv_targetfec_subtlv_l2vpn_endpt->encapsulation); + EXTRACT_16BITS(subtlv_ptr.lspping_tlv_targetfec_subtlv_l2vpn_endpt->encapsulation)), + EXTRACT_16BITS(subtlv_ptr.lspping_tlv_targetfec_subtlv_l2vpn_endpt->encapsulation)); break; @@ -636,8 +636,8 @@ lspping_print(register const u_char *pptr, register u_int len) { EXTRACT_32BITS(subtlv_ptr.lspping_tlv_targetfec_subtlv_l2vpn_vcid->vc_id), tok2str(bgp_l2vpn_encaps_values, /* FIXME are the L2 encaps codepoints of BGP == LDP ??? */ "unknown", - subtlv_ptr.lspping_tlv_targetfec_subtlv_l2vpn_endpt->encapsulation), - subtlv_ptr.lspping_tlv_targetfec_subtlv_l2vpn_endpt->encapsulation); + EXTRACT_16BITS(subtlv_ptr.lspping_tlv_targetfec_subtlv_l2vpn_endpt->encapsulation)), + EXTRACT_16BITS(subtlv_ptr.lspping_tlv_targetfec_subtlv_l2vpn_endpt->encapsulation)); break;