*/
-#define NETDISSECT_REWORKED
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
-#include <tcpdump-stdinc.h>
+#include <netdissect-stdinc.h>
-#include "interface.h"
+#include "netdissect.h"
#include "extract.h"
#include "addrtoname.h"
void
lspping_print(netdissect_options *ndo,
- register const u_char *pptr, register u_int len) {
-
+ register const u_char *pptr, register u_int len)
+{
const struct lspping_common_header *lspping_com_header;
const struct lspping_tlv_header *lspping_tlv_header;
const struct lspping_tlv_header *lspping_subtlv_header;
subtlv_ptr.lspping_tlv_targetfec_subtlv_ldp_ipv4->prefix_len));
break;
-#ifdef INET6
case LSPPING_TLV_TARGETFEC_SUBTLV_LDP_IPV6:
subtlv_ptr.lspping_tlv_targetfec_subtlv_ldp_ipv6 = \
(const struct lspping_tlv_targetfec_subtlv_ldp_ipv6_t *)subtlv_tptr;
ip6addr_string(ndo, subtlv_ptr.lspping_tlv_targetfec_subtlv_ldp_ipv6->prefix),
subtlv_ptr.lspping_tlv_targetfec_subtlv_ldp_ipv6->prefix_len));
break;
-#endif
case LSPPING_TLV_TARGETFEC_SUBTLV_BGP_IPV4:
subtlv_ptr.lspping_tlv_targetfec_subtlv_bgp_ipv4 = \
ipaddr_string(ndo, subtlv_ptr.lspping_tlv_targetfec_subtlv_bgp_ipv4->sender_id)));
break;
-#ifdef INET6
case LSPPING_TLV_TARGETFEC_SUBTLV_BGP_IPV6:
subtlv_ptr.lspping_tlv_targetfec_subtlv_bgp_ipv6 = \
(const struct lspping_tlv_targetfec_subtlv_bgp_ipv6_t *)subtlv_tptr;
subtlv_ptr.lspping_tlv_targetfec_subtlv_bgp_ipv6->prefix_len,
ip6addr_string(ndo, subtlv_ptr.lspping_tlv_targetfec_subtlv_bgp_ipv6->sender_id)));
break;
-#endif
case LSPPING_TLV_TARGETFEC_SUBTLV_RSVP_IPV4:
subtlv_ptr.lspping_tlv_targetfec_subtlv_rsvp_ipv4 = \
ipaddr_string(ndo, subtlv_ptr.lspping_tlv_targetfec_subtlv_rsvp_ipv4->extended_tunnel_id)));
break;
-#ifdef INET6
case LSPPING_TLV_TARGETFEC_SUBTLV_RSVP_IPV6:
subtlv_ptr.lspping_tlv_targetfec_subtlv_rsvp_ipv6 = \
(const struct lspping_tlv_targetfec_subtlv_rsvp_ipv6_t *)subtlv_tptr;
EXTRACT_16BITS(subtlv_ptr.lspping_tlv_targetfec_subtlv_rsvp_ipv6->tunnel_id),
ip6addr_string(ndo, subtlv_ptr.lspping_tlv_targetfec_subtlv_rsvp_ipv6->extended_tunnel_id)));
break;
-#endif
case LSPPING_TLV_TARGETFEC_SUBTLV_L3VPN_IPV4:
subtlv_ptr.lspping_tlv_targetfec_subtlv_l3vpn_ipv4 = \
subtlv_ptr.lspping_tlv_targetfec_subtlv_l3vpn_ipv4->prefix_len));
break;
-#ifdef INET6
case LSPPING_TLV_TARGETFEC_SUBTLV_L3VPN_IPV6:
subtlv_ptr.lspping_tlv_targetfec_subtlv_l3vpn_ipv6 = \
(const struct lspping_tlv_targetfec_subtlv_l3vpn_ipv6_t *)subtlv_tptr;
ip6addr_string(ndo, subtlv_ptr.lspping_tlv_targetfec_subtlv_l3vpn_ipv6->prefix),
subtlv_ptr.lspping_tlv_targetfec_subtlv_l3vpn_ipv6->prefix_len));
break;
-#endif
case LSPPING_TLV_TARGETFEC_SUBTLV_L2VPN_ENDPT:
subtlv_ptr.lspping_tlv_targetfec_subtlv_l2vpn_endpt = \
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= \
tlv_tptr+=sizeof(struct lspping_tlv_downstream_map_ipv4_t);
tlv_tlen-=sizeof(struct lspping_tlv_downstream_map_ipv4_t);
break;
-#ifdef INET6
case LSPPING_AFI_IPV6:
ND_PRINT((ndo, "\n\t Downstream IP: %s" \
"\n\t Downstream Interface IP: %s",
tlv_tptr+=sizeof(struct lspping_tlv_downstream_map_ipv6_t);
tlv_tlen-=sizeof(struct lspping_tlv_downstream_map_ipv6_t);
break;
-#endif
case LSPPING_AFI_UNMB:
ND_PRINT((ndo, "\n\t Downstream IP: %s" \
"\n\t Downstream Interface Index: 0x%08x",