diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-09-17 14:56:44 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-09-17 14:56:44 -0700 |
commit | 11f73ad248fa22461ca040baa8dc94b864509efa (patch) | |
tree | 5a0e2679a78a1dfbe2388b4bf2d55490a38ef989 /print-sctp.c | |
parent | 2a85a1bba4c2e63094a259c5d0ed397f234ba5f3 (diff) | |
download | tcpdump-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-sctp.c')
-rw-r--r-- | print-sctp.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/print-sctp.c b/print-sctp.c index aebd3c22..49d1cbba 100644 --- a/print-sctp.c +++ b/print-sctp.c @@ -43,9 +43,7 @@ #include "addrtoname.h" #include "extract.h" #include "ip.h" -#ifdef INET6 #include "ip6.h" -#endif /* Definitions from: * @@ -497,9 +495,7 @@ void sctp_print(netdissect_options *ndo, { const struct sctpHeader *sctpPktHdr; const struct ip *ip; -#ifdef INET6 const struct ip6_hdr *ip6; -#endif const void *endPacketPtr; u_short sourcePort, destPort; int chunkCount; @@ -515,12 +511,10 @@ void sctp_print(netdissect_options *ndo, if( (u_long) endPacketPtr > (u_long) ndo->ndo_snapend) endPacketPtr = (const void *) ndo->ndo_snapend; ip = (const struct ip *)bp2; -#ifdef INET6 if (IP_V(ip) == 6) ip6 = (const struct ip6_hdr *)bp2; else ip6 = NULL; -#endif /*INET6*/ ND_TCHECK(*sctpPktHdr); if (sctpPacketLength < sizeof(struct sctpHeader)) @@ -536,7 +530,6 @@ void sctp_print(netdissect_options *ndo, sourcePort = EXTRACT_16BITS(&sctpPktHdr->source); destPort = EXTRACT_16BITS(&sctpPktHdr->destination); -#ifdef INET6 if (ip6) { ND_PRINT((ndo, "%s.%d > %s.%d: sctp", ip6addr_string(ndo, &ip6->ip6_src), @@ -544,7 +537,6 @@ void sctp_print(netdissect_options *ndo, ip6addr_string(ndo, &ip6->ip6_dst), destPort)); } else -#endif /*INET6*/ { ND_PRINT((ndo, "%s.%d > %s.%d: sctp", ipaddr_string(ndo, &ip->ip_src), |