summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--missing/getaddrinfo.c2
-rw-r--r--print-bgp.c3
-rw-r--r--print-ip.c5
-rw-r--r--print-isakmp.c20
4 files changed, 21 insertions, 9 deletions
diff --git a/missing/getaddrinfo.c b/missing/getaddrinfo.c
index d57c308d..9da09cbb 100644
--- a/missing/getaddrinfo.c
+++ b/missing/getaddrinfo.c
@@ -562,12 +562,14 @@ explore_fqdn(pai, hostname, servname, res)
for (i = 0; hp->h_addr_list[i] != NULL; i++) {
af = hp->h_addrtype;
ap = hp->h_addr_list[i];
+#ifdef INET6
if (af == AF_INET6
&& IN6_IS_ADDR_V4MAPPED((struct in6_addr *)ap)) {
af = AF_INET;
ap = ap + sizeof(struct in6_addr)
- sizeof(struct in_addr);
}
+#endif
if (af != pai->ai_family)
continue;
diff --git a/print-bgp.c b/print-bgp.c
index dde15baf..895dc698 100644
--- a/print-bgp.c
+++ b/print-bgp.c
@@ -42,9 +42,10 @@
#include <errno.h>
#include <stdio.h>
+#ifdef INET6
#include <netinet/ip6.h>
+#endif
-#include "route6d.h"
#include "interface.h"
#include "addrtoname.h"
diff --git a/print-ip.c b/print-ip.c
index 9ae000e7..93b64388 100644
--- a/print-ip.c
+++ b/print-ip.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.70 1999-10-30 05:11:14 itojun Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.71 1999-10-30 05:30:20 itojun Exp $ (LBL)";
#endif
#include <sys/param.h>
@@ -546,6 +546,9 @@ again:
}
break;
+#ifndef IPPROTO_PIM
+#define IPPROTO_PIM 103
+#endif
case IPPROTO_PIM:
pim_print(cp, len);
break;
diff --git a/print-isakmp.c b/print-isakmp.c
index ff8a066e..58c7344c 100644
--- a/print-isakmp.c
+++ b/print-isakmp.c
@@ -30,7 +30,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-isakmp.c,v 1.3 1999-10-30 05:11:17 itojun Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-isakmp.c,v 1.4 1999-10-30 05:30:20 itojun Exp $ (LBL)";
#endif
#include <string.h>
@@ -68,6 +68,10 @@ struct rtentry;
#include "addrtoname.h"
#include "extract.h" /* must come after interface.h */
+#ifndef HAVE_SOCKADDR_STORAGE
+#define sockaddr_storage sockaddr
+#endif
+
static u_char *isakmp_sa_print __P((struct isakmp_gen *, u_char *, u_int32_t,
u_int32_t, u_int32_t));
static u_char *isakmp_p_print __P((struct isakmp_gen *, u_char *, u_int32_t,
@@ -241,6 +245,7 @@ static int
cookie_sidecheck(int i, const u_char *bp2, int initiator)
{
struct sockaddr_storage ss;
+ struct sockaddr *sa;
struct ip *ip;
struct sockaddr_in *sin;
#ifdef INET6
@@ -270,19 +275,20 @@ cookie_sidecheck(int i, const u_char *bp2, int initiator)
return 0;
}
+ sa = (struct sockaddr *)&ss;
if (initiator) {
- if (ss.__ss_family != cookiecache[i].iaddr.__ss_family)
+ if (sa->sa_family != ((struct sockaddr *)&cookiecache[i].iaddr)->sa_family)
return 0;
- if (ss.__ss_len != cookiecache[i].iaddr.__ss_len)
+ if (sa->sa_len != ((struct sockaddr *)&cookiecache[i].iaddr)->sa_len)
return 0;
- if (memcmp(&ss, &cookiecache[i].iaddr, ss.__ss_len) == 0)
+ if (memcmp(&ss, &cookiecache[i].iaddr, sa->sa_len) == 0)
return 1;
} else {
- if (ss.__ss_family != cookiecache[i].raddr.__ss_family)
+ if (sa->sa_family != ((struct sockaddr *)&cookiecache[i].raddr)->sa_family)
return 0;
- if (ss.__ss_len != cookiecache[i].raddr.__ss_len)
+ if (sa->sa_len != ((struct sockaddr *)&cookiecache[i].raddr)->sa_len)
return 0;
- if (memcmp(&ss, &cookiecache[i].raddr, ss.__ss_len) == 0)
+ if (memcmp(&ss, &cookiecache[i].raddr, sa->sa_len) == 0)
return 1;
}
return 0;