summaryrefslogtreecommitdiff
path: root/print-ldp.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-09-17 14:56:44 -0700
committerGuy Harris <guy@alum.mit.edu>2015-09-17 14:56:44 -0700
commit11f73ad248fa22461ca040baa8dc94b864509efa (patch)
tree5a0e2679a78a1dfbe2388b4bf2d55490a38ef989 /print-ldp.c
parent2a85a1bba4c2e63094a259c5d0ed397f234ba5f3 (diff)
downloadtcpdump-11f73ad248fa22461ca040baa8dc94b864509efa.tar.gz
Don't require IPv6 library support in order to support IPv6 addresses.
Have our own routines to convert between IPv4/IPv6 addresses and strings; that helps if, for example, we want to build binary versions of tcpdump for Windows that can run both on NT 5 (W2K/WXP), which doesn't have inet_ntop() or inet_pton(), and NT 6 (Vista/7/8/10), which do. It also means that we don't require IPv6 library support on UN*X to print addresses (if somebody wants to build tcpdump for older UN*Xes lacking IPv6 support in the system library or in add-on libraries). Get rid of files in the missing directory that we don't need, and various no-longer-necessary autoconf tests.
Diffstat (limited to 'print-ldp.c')
-rw-r--r--print-ldp.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/print-ldp.c b/print-ldp.c
index ceaca150..45a23fe0 100644
--- a/print-ldp.c
+++ b/print-ldp.c
@@ -283,12 +283,10 @@ ldp_tlv_print(netdissect_options *ndo,
TLV_TCHECK(4);
ND_PRINT((ndo, "\n\t IPv4 Transport Address: %s", ipaddr_string(ndo, tptr)));
break;
-#ifdef INET6
case LDP_TLV_IPV6_TRANSPORT_ADDR:
TLV_TCHECK(16);
ND_PRINT((ndo, "\n\t IPv6 Transport Address: %s", ip6addr_string(ndo, tptr)));
break;
-#endif
case LDP_TLV_CONFIG_SEQ_NUMBER:
TLV_TCHECK(4);
ND_PRINT((ndo, "\n\t Sequence Number: %u", EXTRACT_32BITS(tptr)));
@@ -310,7 +308,6 @@ ldp_tlv_print(netdissect_options *ndo,
tptr+=sizeof(struct in_addr);
}
break;
-#ifdef INET6
case AFNUM_INET6:
while(tlv_tlen >= sizeof(struct in6_addr)) {
ND_TCHECK2(*tptr, sizeof(struct in6_addr));
@@ -319,7 +316,6 @@ ldp_tlv_print(netdissect_options *ndo,
tptr+=sizeof(struct in6_addr);
}
break;
-#endif
default:
/* unknown AF */
break;
@@ -364,7 +360,6 @@ ldp_tlv_print(netdissect_options *ndo,
else
ND_PRINT((ndo, ": IPv4 prefix %s", buf));
}
-#ifdef INET6
else if (af == AFNUM_INET6) {
i=decode_prefix6(ndo, tptr, tlv_tlen, buf, sizeof(buf));
if (i == -2)
@@ -376,7 +371,6 @@ ldp_tlv_print(netdissect_options *ndo,
else
ND_PRINT((ndo, ": IPv6 prefix %s", buf));
}
-#endif
else
ND_PRINT((ndo, ": Address family %u prefix", af));
break;