summaryrefslogtreecommitdiff
path: root/print-sunrpc.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-sunrpc.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-sunrpc.c')
-rw-r--r--print-sunrpc.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/print-sunrpc.c b/print-sunrpc.c
index 771602d2..2394dd03 100644
--- a/print-sunrpc.c
+++ b/print-sunrpc.c
@@ -55,9 +55,7 @@
#include "extract.h"
#include "ip.h"
-#ifdef INET6
#include "ip6.h"
-#endif
#include "rpc_auth.h"
#include "rpc_msg.h"
@@ -170,9 +168,7 @@ sunrpcrequest_print(netdissect_options *ndo, register const u_char *bp,
{
register const struct sunrpc_msg *rp;
register const struct ip *ip;
-#ifdef INET6
register const struct ip6_hdr *ip6;
-#endif
uint32_t x;
char srcid[20], dstid[20]; /*fits 32bit*/
@@ -195,14 +191,12 @@ sunrpcrequest_print(netdissect_options *ndo, register const u_char *bp,
ipaddr_string(ndo, &ip->ip_src), srcid,
ipaddr_string(ndo, &ip->ip_dst), dstid, length));
break;
-#ifdef INET6
case 6:
ip6 = (const struct ip6_hdr *)bp2;
ND_PRINT((ndo, "%s.%s > %s.%s: %d",
ip6addr_string(ndo, &ip6->ip6_src), srcid,
ip6addr_string(ndo, &ip6->ip6_dst), dstid, length));
break;
-#endif
default:
ND_PRINT((ndo, "%s.%s > %s.%s: %d", "?", srcid, "?", dstid, length));
break;