X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/8863fc0e5d6cc6bf64875fa4156ddfd54c6cf9c9..refs/pull/433/head:/print-lspping.c diff --git a/print-lspping.c b/print-lspping.c index 4103a924..1786cd2c 100644 --- a/print-lspping.c +++ b/print-lspping.c @@ -56,18 +56,18 @@ */ struct lspping_common_header { - u_int8_t version[2]; - u_int8_t reserved[2]; - u_int8_t msg_type; - u_int8_t reply_mode; - u_int8_t return_code; - u_int8_t return_subcode; - u_int8_t sender_handle[4]; - u_int8_t seq_number[4]; - u_int8_t ts_sent_sec[4]; - u_int8_t ts_sent_usec[4]; - u_int8_t ts_rcvd_sec[4]; - u_int8_t ts_rcvd_usec[4]; + uint8_t version[2]; + uint8_t reserved[2]; + uint8_t msg_type; + uint8_t reply_mode; + uint8_t return_code; + uint8_t return_subcode; + uint8_t sender_handle[4]; + uint8_t seq_number[4]; + uint8_t ts_sent_sec[4]; + uint8_t ts_sent_usec[4]; + uint8_t ts_rcvd_sec[4]; + uint8_t ts_rcvd_usec[4]; }; #define LSPPING_VERSION 1 @@ -119,8 +119,8 @@ static const struct tok lspping_return_code_values[] = { */ struct lspping_tlv_header { - u_int8_t type[2]; - u_int8_t length[2]; + uint8_t type[2]; + uint8_t length[2]; }; #define LSPPING_TLV_TARGET_FEC_STACK 1 @@ -186,8 +186,8 @@ static const struct tok lspping_tlvtargetfec_subtlv_values[] = { * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */ struct lspping_tlv_targetfec_subtlv_ldp_ipv4_t { - u_int8_t prefix [4]; - u_int8_t prefix_len; + uint8_t prefix [4]; + uint8_t prefix_len; }; /* @@ -203,8 +203,8 @@ struct lspping_tlv_targetfec_subtlv_ldp_ipv4_t { * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */ struct lspping_tlv_targetfec_subtlv_ldp_ipv6_t { - u_int8_t prefix [16]; - u_int8_t prefix_len; + uint8_t prefix [16]; + uint8_t prefix_len; }; /* @@ -218,9 +218,9 @@ struct lspping_tlv_targetfec_subtlv_ldp_ipv6_t { * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */ struct lspping_tlv_targetfec_subtlv_bgp_ipv4_t { - u_int8_t sender_id [4]; - u_int8_t prefix [4]; - u_int8_t prefix_len; + uint8_t sender_id [4]; + uint8_t prefix [4]; + uint8_t prefix_len; }; /* @@ -240,9 +240,9 @@ struct lspping_tlv_targetfec_subtlv_bgp_ipv4_t { * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */ struct lspping_tlv_targetfec_subtlv_bgp_ipv6_t { - u_int8_t sender_id [16]; - u_int8_t prefix [16]; - u_int8_t prefix_len; + uint8_t sender_id [16]; + uint8_t prefix [16]; + uint8_t prefix_len; }; /* @@ -261,13 +261,13 @@ struct lspping_tlv_targetfec_subtlv_bgp_ipv6_t { * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */ struct lspping_tlv_targetfec_subtlv_rsvp_ipv4_t { - u_int8_t tunnel_endpoint [4]; - u_int8_t res[2]; - u_int8_t tunnel_id[2]; - u_int8_t extended_tunnel_id[4]; - u_int8_t tunnel_sender [4]; - u_int8_t res2[2]; - u_int8_t lsp_id [2]; + uint8_t tunnel_endpoint [4]; + uint8_t res[2]; + uint8_t tunnel_id[2]; + uint8_t extended_tunnel_id[4]; + uint8_t tunnel_sender [4]; + uint8_t res2[2]; + uint8_t lsp_id [2]; }; /* @@ -295,13 +295,13 @@ struct lspping_tlv_targetfec_subtlv_rsvp_ipv4_t { * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */ struct lspping_tlv_targetfec_subtlv_rsvp_ipv6_t { - u_int8_t tunnel_endpoint [16]; - u_int8_t res[2]; - u_int8_t tunnel_id[2]; - u_int8_t extended_tunnel_id[16]; - u_int8_t tunnel_sender [16]; - u_int8_t res2[2]; - u_int8_t lsp_id [2]; + uint8_t tunnel_endpoint [16]; + uint8_t res[2]; + uint8_t tunnel_id[2]; + uint8_t extended_tunnel_id[16]; + uint8_t tunnel_sender [16]; + uint8_t res2[2]; + uint8_t lsp_id [2]; }; /* @@ -317,9 +317,9 @@ struct lspping_tlv_targetfec_subtlv_rsvp_ipv6_t { * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */ struct lspping_tlv_targetfec_subtlv_l3vpn_ipv4_t { - u_int8_t rd [8]; - u_int8_t prefix [4]; - u_int8_t prefix_len; + uint8_t rd [8]; + uint8_t prefix [4]; + uint8_t prefix_len; }; /* @@ -338,9 +338,9 @@ struct lspping_tlv_targetfec_subtlv_l3vpn_ipv4_t { * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */ struct lspping_tlv_targetfec_subtlv_l3vpn_ipv6_t { - u_int8_t rd [8]; - u_int8_t prefix [16]; - u_int8_t prefix_len; + uint8_t rd [8]; + uint8_t prefix [16]; + uint8_t prefix_len; }; /* @@ -357,10 +357,10 @@ struct lspping_tlv_targetfec_subtlv_l3vpn_ipv6_t { * 0 1 2 3 */ 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[2]; + uint8_t rd [8]; + uint8_t sender_ce_id [2]; + uint8_t receiver_ce_id [2]; + uint8_t encapsulation[2]; }; /* @@ -374,9 +374,9 @@ struct lspping_tlv_targetfec_subtlv_l2vpn_endpt_t { * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */ struct lspping_tlv_targetfec_subtlv_l2vpn_vcid_old_t { - u_int8_t remote_pe_address [4]; - u_int8_t vc_id [4]; - u_int8_t encapsulation[2]; + uint8_t remote_pe_address [4]; + uint8_t vc_id [4]; + uint8_t encapsulation[2]; }; /* @@ -392,10 +392,10 @@ struct lspping_tlv_targetfec_subtlv_l2vpn_vcid_old_t { * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */ 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[2]; + uint8_t sender_pe_address [4]; + uint8_t remote_pe_address [4]; + uint8_t vc_id [4]; + uint8_t encapsulation[2]; }; /* @@ -424,25 +424,25 @@ struct lspping_tlv_targetfec_subtlv_l2vpn_vcid_t { * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */ struct lspping_tlv_downstream_map_ipv4_t { - u_int8_t mtu [2]; - u_int8_t address_type; - u_int8_t res; - u_int8_t downstream_ip[4]; - u_int8_t downstream_interface[4]; + uint8_t mtu [2]; + uint8_t address_type; + uint8_t res; + uint8_t downstream_ip[4]; + uint8_t downstream_interface[4]; }; struct lspping_tlv_downstream_map_ipv6_t { - u_int8_t mtu [2]; - u_int8_t address_type; - u_int8_t res; - u_int8_t downstream_ip[16]; - u_int8_t downstream_interface[16]; + uint8_t mtu [2]; + uint8_t address_type; + uint8_t res; + uint8_t downstream_ip[16]; + uint8_t downstream_interface[16]; }; struct lspping_tlv_downstream_map_info_t { - u_int8_t hash_key_type; - u_int8_t depth_limit; - u_int8_t multipath_length [2]; + uint8_t hash_key_type; + uint8_t depth_limit; + uint8_t multipath_length [2]; }; #define LSPPING_AFI_IPV4 1 @@ -568,8 +568,7 @@ lspping_print(netdissect_options *ndo, while(tlen>(int)sizeof(struct lspping_tlv_header)) { /* did we capture enough for fully decoding the tlv header ? */ - if (!ND_TTEST2(*tptr, sizeof(struct lspping_tlv_header))) - goto trunc; + ND_TCHECK2(*tptr, sizeof(struct lspping_tlv_header)); lspping_tlv_header = (const struct lspping_tlv_header *)tptr; lspping_tlv_type=EXTRACT_16BITS(lspping_tlv_header->type); @@ -595,8 +594,7 @@ lspping_print(netdissect_options *ndo, tlv_tlen=lspping_tlv_len; /* header not included -> no adjustment */ /* did we capture enough for fully decoding the tlv ? */ - if (!ND_TTEST2(*tptr, lspping_tlv_len)) - goto trunc; + ND_TCHECK2(*tptr, lspping_tlv_len); tlv_hexdump=FALSE; switch(lspping_tlv_type) { @@ -604,8 +602,7 @@ lspping_print(netdissect_options *ndo, while(tlv_tlen>(int)sizeof(struct lspping_tlv_header)) { /* did we capture enough for fully decoding the subtlv header ? */ - if (!ND_TTEST2(*tptr, sizeof(struct lspping_tlv_header))) - goto trunc; + ND_TCHECK2(*tptr, sizeof(struct lspping_tlv_header)); subtlv_hexdump=FALSE; lspping_subtlv_header = (const struct lspping_tlv_header *)tlv_tptr; @@ -629,7 +626,7 @@ lspping_print(netdissect_options *ndo, subtlv_ptr.lspping_tlv_targetfec_subtlv_ldp_ipv4 = \ (const struct lspping_tlv_targetfec_subtlv_ldp_ipv4_t *)subtlv_tptr; ND_PRINT((ndo, "\n\t %s/%u", - ipaddr_string(subtlv_ptr.lspping_tlv_targetfec_subtlv_ldp_ipv4->prefix), + ipaddr_string(ndo, subtlv_ptr.lspping_tlv_targetfec_subtlv_ldp_ipv4->prefix), subtlv_ptr.lspping_tlv_targetfec_subtlv_ldp_ipv4->prefix_len)); break; @@ -638,7 +635,7 @@ lspping_print(netdissect_options *ndo, subtlv_ptr.lspping_tlv_targetfec_subtlv_ldp_ipv6 = \ (const struct lspping_tlv_targetfec_subtlv_ldp_ipv6_t *)subtlv_tptr; ND_PRINT((ndo, "\n\t %s/%u", - ip6addr_string(subtlv_ptr.lspping_tlv_targetfec_subtlv_ldp_ipv6->prefix), + ip6addr_string(ndo, subtlv_ptr.lspping_tlv_targetfec_subtlv_ldp_ipv6->prefix), subtlv_ptr.lspping_tlv_targetfec_subtlv_ldp_ipv6->prefix_len)); break; #endif @@ -647,9 +644,9 @@ lspping_print(netdissect_options *ndo, subtlv_ptr.lspping_tlv_targetfec_subtlv_bgp_ipv4 = \ (const struct lspping_tlv_targetfec_subtlv_bgp_ipv4_t *)subtlv_tptr; ND_PRINT((ndo, "\n\t %s/%u, sender-id %s", - ipaddr_string(subtlv_ptr.lspping_tlv_targetfec_subtlv_bgp_ipv4->prefix), + ipaddr_string(ndo, subtlv_ptr.lspping_tlv_targetfec_subtlv_bgp_ipv4->prefix), subtlv_ptr.lspping_tlv_targetfec_subtlv_bgp_ipv4->prefix_len, - ipaddr_string(subtlv_ptr.lspping_tlv_targetfec_subtlv_bgp_ipv4->sender_id))); + ipaddr_string(ndo, subtlv_ptr.lspping_tlv_targetfec_subtlv_bgp_ipv4->sender_id))); break; #ifdef INET6 @@ -657,9 +654,9 @@ lspping_print(netdissect_options *ndo, subtlv_ptr.lspping_tlv_targetfec_subtlv_bgp_ipv6 = \ (const struct lspping_tlv_targetfec_subtlv_bgp_ipv6_t *)subtlv_tptr; ND_PRINT((ndo, "\n\t %s/%u, sender-id %s", - ip6addr_string(subtlv_ptr.lspping_tlv_targetfec_subtlv_bgp_ipv6->prefix), + ip6addr_string(ndo, subtlv_ptr.lspping_tlv_targetfec_subtlv_bgp_ipv6->prefix), subtlv_ptr.lspping_tlv_targetfec_subtlv_bgp_ipv6->prefix_len, - ip6addr_string(subtlv_ptr.lspping_tlv_targetfec_subtlv_bgp_ipv6->sender_id))); + ip6addr_string(ndo, subtlv_ptr.lspping_tlv_targetfec_subtlv_bgp_ipv6->sender_id))); break; #endif @@ -668,11 +665,11 @@ lspping_print(netdissect_options *ndo, (const struct lspping_tlv_targetfec_subtlv_rsvp_ipv4_t *)subtlv_tptr; ND_PRINT((ndo, "\n\t tunnel end-point %s, tunnel sender %s, lsp-id 0x%04x" \ "\n\t tunnel-id 0x%04x, extended tunnel-id %s", - ipaddr_string(subtlv_ptr.lspping_tlv_targetfec_subtlv_rsvp_ipv4->tunnel_endpoint), - ipaddr_string(subtlv_ptr.lspping_tlv_targetfec_subtlv_rsvp_ipv4->tunnel_sender), + ipaddr_string(ndo, subtlv_ptr.lspping_tlv_targetfec_subtlv_rsvp_ipv4->tunnel_endpoint), + ipaddr_string(ndo, subtlv_ptr.lspping_tlv_targetfec_subtlv_rsvp_ipv4->tunnel_sender), EXTRACT_16BITS(subtlv_ptr.lspping_tlv_targetfec_subtlv_rsvp_ipv4->lsp_id), EXTRACT_16BITS(subtlv_ptr.lspping_tlv_targetfec_subtlv_rsvp_ipv4->tunnel_id), - ipaddr_string(subtlv_ptr.lspping_tlv_targetfec_subtlv_rsvp_ipv4->extended_tunnel_id))); + ipaddr_string(ndo, subtlv_ptr.lspping_tlv_targetfec_subtlv_rsvp_ipv4->extended_tunnel_id))); break; #ifdef INET6 @@ -681,11 +678,11 @@ lspping_print(netdissect_options *ndo, (const struct lspping_tlv_targetfec_subtlv_rsvp_ipv6_t *)subtlv_tptr; ND_PRINT((ndo, "\n\t tunnel end-point %s, tunnel sender %s, lsp-id 0x%04x" \ "\n\t tunnel-id 0x%04x, extended tunnel-id %s", - ip6addr_string(subtlv_ptr.lspping_tlv_targetfec_subtlv_rsvp_ipv6->tunnel_endpoint), - ip6addr_string(subtlv_ptr.lspping_tlv_targetfec_subtlv_rsvp_ipv6->tunnel_sender), + ip6addr_string(ndo, subtlv_ptr.lspping_tlv_targetfec_subtlv_rsvp_ipv6->tunnel_endpoint), + ip6addr_string(ndo, subtlv_ptr.lspping_tlv_targetfec_subtlv_rsvp_ipv6->tunnel_sender), EXTRACT_16BITS(subtlv_ptr.lspping_tlv_targetfec_subtlv_rsvp_ipv6->lsp_id), EXTRACT_16BITS(subtlv_ptr.lspping_tlv_targetfec_subtlv_rsvp_ipv6->tunnel_id), - ip6addr_string(subtlv_ptr.lspping_tlv_targetfec_subtlv_rsvp_ipv6->extended_tunnel_id))); + ip6addr_string(ndo, subtlv_ptr.lspping_tlv_targetfec_subtlv_rsvp_ipv6->extended_tunnel_id))); break; #endif @@ -694,7 +691,7 @@ lspping_print(netdissect_options *ndo, (const struct lspping_tlv_targetfec_subtlv_l3vpn_ipv4_t *)subtlv_tptr; ND_PRINT((ndo, "\n\t RD: %s, %s/%u", bgp_vpn_rd_print(ndo, subtlv_ptr.lspping_tlv_targetfec_subtlv_l3vpn_ipv4->rd), - ipaddr_string(subtlv_ptr.lspping_tlv_targetfec_subtlv_l3vpn_ipv4->prefix), + ipaddr_string(ndo, subtlv_ptr.lspping_tlv_targetfec_subtlv_l3vpn_ipv4->prefix), subtlv_ptr.lspping_tlv_targetfec_subtlv_l3vpn_ipv4->prefix_len)); break; @@ -704,7 +701,7 @@ lspping_print(netdissect_options *ndo, (const struct lspping_tlv_targetfec_subtlv_l3vpn_ipv6_t *)subtlv_tptr; ND_PRINT((ndo, "\n\t RD: %s, %s/%u", bgp_vpn_rd_print(ndo, subtlv_ptr.lspping_tlv_targetfec_subtlv_l3vpn_ipv6->rd), - ip6addr_string(subtlv_ptr.lspping_tlv_targetfec_subtlv_l3vpn_ipv6->prefix), + ip6addr_string(ndo, subtlv_ptr.lspping_tlv_targetfec_subtlv_l3vpn_ipv6->prefix), subtlv_ptr.lspping_tlv_targetfec_subtlv_l3vpn_ipv6->prefix_len)); break; #endif @@ -730,7 +727,7 @@ lspping_print(netdissect_options *ndo, (const struct lspping_tlv_targetfec_subtlv_l2vpn_vcid_old_t *)subtlv_tptr; ND_PRINT((ndo, "\n\t Remote PE: %s" \ "\n\t VC-ID: 0x%08x, Encapsulation Type: %s (%u)", - ipaddr_string(subtlv_ptr.lspping_tlv_targetfec_subtlv_l2vpn_vcid_old->remote_pe_address), + ipaddr_string(ndo, subtlv_ptr.lspping_tlv_targetfec_subtlv_l2vpn_vcid_old->remote_pe_address), EXTRACT_32BITS(subtlv_ptr.lspping_tlv_targetfec_subtlv_l2vpn_vcid_old->vc_id), tok2str(l2vpn_encaps_values, "unknown", @@ -744,8 +741,8 @@ lspping_print(netdissect_options *ndo, (const struct lspping_tlv_targetfec_subtlv_l2vpn_vcid_t *)subtlv_tptr; ND_PRINT((ndo, "\n\t Sender PE: %s, Remote PE: %s" \ "\n\t VC-ID: 0x%08x, Encapsulation Type: %s (%u)", - ipaddr_string(subtlv_ptr.lspping_tlv_targetfec_subtlv_l2vpn_vcid->sender_pe_address), - ipaddr_string(subtlv_ptr.lspping_tlv_targetfec_subtlv_l2vpn_vcid->remote_pe_address), + ipaddr_string(ndo, subtlv_ptr.lspping_tlv_targetfec_subtlv_l2vpn_vcid->sender_pe_address), + ipaddr_string(ndo, subtlv_ptr.lspping_tlv_targetfec_subtlv_l2vpn_vcid->remote_pe_address), EXTRACT_32BITS(subtlv_ptr.lspping_tlv_targetfec_subtlv_l2vpn_vcid->vc_id), tok2str(l2vpn_encaps_values, "unknown", @@ -771,7 +768,7 @@ lspping_print(netdissect_options *ndo, case LSPPING_TLV_DOWNSTREAM_MAPPING: /* that strange thing with the downstream map TLV is that until now - * we do not know if its IPv4 or IPv6 , after we found the adress-type + * we do not know if its IPv4 or IPv6 , after we found the address-type * lets recast the tlv_tptr and move on */ tlv_ptr.lspping_tlv_downstream_map_ipv4= \ @@ -790,8 +787,8 @@ lspping_print(netdissect_options *ndo, case LSPPING_AFI_IPV4: ND_PRINT((ndo, "\n\t Downstream IP: %s" \ "\n\t Downstream Interface IP: %s", - ipaddr_string(tlv_ptr.lspping_tlv_downstream_map_ipv4->downstream_ip), - ipaddr_string(tlv_ptr.lspping_tlv_downstream_map_ipv4->downstream_interface))); + ipaddr_string(ndo, tlv_ptr.lspping_tlv_downstream_map_ipv4->downstream_ip), + ipaddr_string(ndo, tlv_ptr.lspping_tlv_downstream_map_ipv4->downstream_interface))); tlv_tptr+=sizeof(struct lspping_tlv_downstream_map_ipv4_t); tlv_tlen-=sizeof(struct lspping_tlv_downstream_map_ipv4_t); break; @@ -799,8 +796,8 @@ lspping_print(netdissect_options *ndo, case LSPPING_AFI_IPV6: ND_PRINT((ndo, "\n\t Downstream IP: %s" \ "\n\t Downstream Interface IP: %s", - ip6addr_string(tlv_ptr.lspping_tlv_downstream_map_ipv6->downstream_ip), - ip6addr_string(tlv_ptr.lspping_tlv_downstream_map_ipv6->downstream_interface))); + ip6addr_string(ndo, tlv_ptr.lspping_tlv_downstream_map_ipv6->downstream_ip), + ip6addr_string(ndo, tlv_ptr.lspping_tlv_downstream_map_ipv6->downstream_interface))); tlv_tptr+=sizeof(struct lspping_tlv_downstream_map_ipv6_t); tlv_tlen-=sizeof(struct lspping_tlv_downstream_map_ipv6_t); break; @@ -808,7 +805,7 @@ lspping_print(netdissect_options *ndo, case LSPPING_AFI_UNMB: ND_PRINT((ndo, "\n\t Downstream IP: %s" \ "\n\t Downstream Interface Index: 0x%08x", - ipaddr_string(tlv_ptr.lspping_tlv_downstream_map_ipv4->downstream_ip), + ipaddr_string(ndo, tlv_ptr.lspping_tlv_downstream_map_ipv4->downstream_ip), EXTRACT_32BITS(tlv_ptr.lspping_tlv_downstream_map_ipv4->downstream_interface))); tlv_tptr+=sizeof(struct lspping_tlv_downstream_map_ipv4_t); tlv_tlen-=sizeof(struct lspping_tlv_downstream_map_ipv4_t); @@ -837,17 +834,15 @@ lspping_print(netdissect_options *ndo, case LSPPING_TLV_BFD_DISCRIMINATOR: tptr += sizeof(struct lspping_tlv_header); - if (!ND_TTEST2(*tptr, LSPPING_TLV_BFD_DISCRIMINATOR_LEN)) - goto trunc; + ND_TCHECK2(*tptr, LSPPING_TLV_BFD_DISCRIMINATOR_LEN); ND_PRINT((ndo, "\n\t BFD Discriminator 0x%08x", EXTRACT_32BITS(tptr))); break; case LSPPING_TLV_VENDOR_ENTERPRISE: { - u_int32_t vendor_id; + uint32_t vendor_id; - if (!ND_TTEST2(*tptr, LSPPING_TLV_VENDOR_ENTERPRISE_LEN)) - goto trunc; + ND_TCHECK2(*tptr, LSPPING_TLV_VENDOR_ENTERPRISE_LEN); vendor_id = EXTRACT_32BITS(tlv_tptr); ND_PRINT((ndo, "\n\t Vendor: %s (0x%04x)", tok2str(smi_values, "Unknown", vendor_id),