summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-06-09 06:43:39 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-06-09 06:43:39 +0000
commit5ddbbd9807b495d0890ca9907b336fbf4ec750a6 (patch)
tree815cd14bcc5d22949999b176687a2e1c93bd90ae
parent75509732266590a78449120024a995200067d913 (diff)
No need for net/net_osdep.h
-rw-r--r--sys/netinet6/frag6.c4
-rw-r--r--sys/netinet6/icmp6.c12
-rw-r--r--sys/netinet6/in6.c4
-rw-r--r--sys/netinet6/in6_cksum.c4
-rw-r--r--sys/netinet6/in6_gif.c4
-rw-r--r--sys/netinet6/in6_ifattach.c31
-rw-r--r--sys/netinet6/in6_prefix.c6
-rw-r--r--sys/netinet6/in6_proto.c4
-rw-r--r--sys/netinet6/ip6_forward.c12
-rw-r--r--sys/netinet6/ip6_input.c4
-rw-r--r--sys/netinet6/ip6_mroute.c8
-rw-r--r--sys/netinet6/ip6_output.c4
-rw-r--r--sys/netinet6/mld6.c4
-rw-r--r--sys/netinet6/nd6.c8
-rw-r--r--sys/netinet6/nd6_nbr.c36
-rw-r--r--sys/netinet6/nd6_rtr.c17
-rw-r--r--sys/netinet6/udp6_output.c4
17 files changed, 66 insertions, 100 deletions
diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c
index d2e3cdcbe1d..8c4864575d1 100644
--- a/sys/netinet6/frag6.c
+++ b/sys/netinet6/frag6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: frag6.c,v 1.10 2001/05/17 18:11:26 itojun Exp $ */
+/* $OpenBSD: frag6.c,v 1.11 2001/06/09 06:43:37 angelos Exp $ */
/* $KAME: frag6.c,v 1.31 2001/05/17 13:45:34 jinmei Exp $ */
/*
@@ -53,8 +53,6 @@
#include <dev/rndvar.h>
-#include <net/net_osdep.h>
-
/*
* Define it to get a correct behavior on per-interface statistics.
* You will need to perform an extra routing table lookup, per fragment,
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c
index e09255d997a..f523abb9945 100644
--- a/sys/netinet6/icmp6.c
+++ b/sys/netinet6/icmp6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: icmp6.c,v 1.42 2001/06/01 06:08:22 itojun Exp $ */
+/* $OpenBSD: icmp6.c,v 1.43 2001/06/09 06:43:37 angelos Exp $ */
/* $KAME: icmp6.c,v 1.212 2001/06/01 05:35:52 jinmei Exp $ */
/*
@@ -99,8 +99,6 @@
#include "faith.h"
-#include <net/net_osdep.h>
-
/* inpcb members */
#define in6pcb inpcb
#define in6p_laddr inp_laddr6
@@ -2747,11 +2745,11 @@ fail:
m_freem(m0);
}
-#ifdef HAVE_NRL_INPCB
+/* NRL PCB */
#define sotoin6pcb sotoinpcb
#define in6pcb inpcb
#define in6p_icmp6filt inp_icmp6filt
-#endif
+
/*
* ICMPv6 socket option processing.
*/
@@ -2833,11 +2831,11 @@ icmp6_ctloutput(op, so, level, optname, mp)
return(error);
}
-#ifdef HAVE_NRL_INPCB
+
+/* NRL PCB */
#undef sotoin6pcb
#undef in6pcb
#undef in6p_icmp6filt
-#endif
/*
* Perform rate limit check.
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c
index 86f324d2150..6af82df76f3 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6.c,v 1.27 2001/05/16 12:53:36 ho Exp $ */
+/* $OpenBSD: in6.c,v 1.28 2001/06/09 06:43:37 angelos Exp $ */
/* $KAME: in6.c,v 1.176 2001/02/16 12:49:45 itojun Exp $ */
/*
@@ -94,8 +94,6 @@
#include <netinet6/ip6_mroute.h>
#include <netinet6/in6_ifattach.h>
-#include <net/net_osdep.h>
-
/* backward compatibility for a while... */
#define COMPAT_IN6IFIOCTL
diff --git a/sys/netinet6/in6_cksum.c b/sys/netinet6/in6_cksum.c
index 4486f715bfb..627a5f762be 100644
--- a/sys/netinet6/in6_cksum.c
+++ b/sys/netinet6/in6_cksum.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6_cksum.c,v 1.8 2001/02/16 15:59:38 itojun Exp $ */
+/* $OpenBSD: in6_cksum.c,v 1.9 2001/06/09 06:43:37 angelos Exp $ */
/* $KAME: in6_cksum.c,v 1.10 2000/12/03 00:53:59 itojun Exp $ */
/*
@@ -71,8 +71,6 @@
#include <netinet/in.h>
#include <netinet/ip6.h>
-#include <net/net_osdep.h>
-
/*
* Checksum routine for Internet Protocol family headers (Portable Version).
*
diff --git a/sys/netinet6/in6_gif.c b/sys/netinet6/in6_gif.c
index d48ea8b7876..a9898012189 100644
--- a/sys/netinet6/in6_gif.c
+++ b/sys/netinet6/in6_gif.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6_gif.c,v 1.15 2001/06/08 10:39:37 art Exp $ */
+/* $OpenBSD: in6_gif.c,v 1.16 2001/06/09 06:43:37 angelos Exp $ */
/* $KAME: in6_gif.c,v 1.43 2001/01/22 07:27:17 itojun Exp $ */
/*
@@ -66,8 +66,6 @@
#include <net/if_gif.h>
-#include <net/net_osdep.h>
-
#include "bridge.h"
#ifndef offsetof
diff --git a/sys/netinet6/in6_ifattach.c b/sys/netinet6/in6_ifattach.c
index 7d222266f81..df723fccad1 100644
--- a/sys/netinet6/in6_ifattach.c
+++ b/sys/netinet6/in6_ifattach.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6_ifattach.c,v 1.16 2001/02/16 15:59:38 itojun Exp $ */
+/* $OpenBSD: in6_ifattach.c,v 1.17 2001/06/09 06:43:37 angelos Exp $ */
/* $KAME: in6_ifattach.c,v 1.112 2001/02/10 15:44:59 jinmei Exp $ */
/*
@@ -54,8 +54,6 @@
#include <netinet6/ip6_var.h>
#include <netinet6/nd6.h>
-#include <net/net_osdep.h>
-
struct in6_ifstat **in6_ifstat = NULL;
struct icmp6_ifstat **icmp6_ifstat = NULL;
size_t in6_ifstatmax = 0;
@@ -260,15 +258,16 @@ get_ifid(ifp0, altifp, in6)
/* first, try to get it from the interface itself */
if (get_hw_ifid(ifp0, in6) == 0) {
- nd6log((LOG_DEBUG, "%s: got interface identifier from itself\n",
- if_name(ifp0)));
+ nd6log((LOG_DEBUG,
+ "%s: got interface identifier from itself\n",
+ ifp0->if_xname));
goto success;
}
/* try secondary EUI64 source. this basically is for ATM PVC */
if (altifp && get_hw_ifid(altifp, in6) == 0) {
nd6log((LOG_DEBUG, "%s: got interface identifier from %s\n",
- if_name(ifp0), if_name(altifp)));
+ ifp0->if_xname, altifp->if_xname));
goto success;
}
@@ -287,7 +286,7 @@ get_ifid(ifp0, altifp, in6)
if (IFID_UNIVERSAL(in6)) {
nd6log((LOG_DEBUG,
"%s: borrow interface identifier from %s\n",
- if_name(ifp0), if_name(ifp)));
+ ifp0->if_xname, ifp->if_xname));
goto success;
}
}
@@ -296,17 +295,17 @@ get_ifid(ifp0, altifp, in6)
if (get_rand_ifid(ifp, in6) == 0) {
nd6log((LOG_DEBUG,
"%s: interface identifier generated by random number\n",
- if_name(ifp0)));
+ ifp0->if_xname));
goto success;
}
- printf("%s: failed to get interface identifier\n", if_name(ifp0));
+ printf("%s: failed to get interface identifier\n", ifp0->if_xname);
return -1;
success:
nd6log((LOG_INFO, "%s: ifid: "
"%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n",
- if_name(ifp0),
+ ifp0->if_xname,
in6->s6_addr[8], in6->s6_addr[9],
in6->s6_addr[10], in6->s6_addr[11],
in6->s6_addr[12], in6->s6_addr[13],
@@ -368,10 +367,10 @@ in6_ifattach_addaddr(ifp, ia)
if (error) {
switch (error) {
case EAFNOSUPPORT:
- printf("%s: IPv6 not supported\n", if_name(ifp));
+ printf("%s: IPv6 not supported\n", ifp->if_xname);
break;
default:
- printf("%s: SIOCSIFADDR error %d\n", if_name(ifp),
+ printf("%s: SIOCSIFADDR error %d\n", ifp->if_xname,
error);
break;
}
@@ -493,7 +492,7 @@ in6_ifattach_linklocal(ifp, altifp)
} else {
if (get_ifid(ifp, altifp, &ia->ia_addr.sin6_addr) != 0) {
nd6log((LOG_ERR,
- "%s: no ifid available\n", if_name(ifp)));
+ "%s: no ifid available\n", ifp->if_xname));
free(ia, M_IFADDR);
return -1;
}
@@ -652,7 +651,7 @@ in6_ifattach(ifp, altifp)
*/
if ((ifp->if_flags & IFF_MULTICAST) == 0) {
printf("%s: not multicast capable, IPv6 not enabled\n",
- if_name(ifp));
+ ifp->if_xname);
return;
}
@@ -667,7 +666,7 @@ in6_ifattach(ifp, altifp)
if (ia == NULL) {
printf("%s: failed to add link-local address\n",
- if_name(ifp));
+ ifp->if_xname);
/* we can't initialize multicasts without link-local */
goto statinit;
@@ -861,7 +860,7 @@ in6_ifdetach(ifp)
else {
nd6log((LOG_ERR,
"%s: didn't unlink in6ifaddr from "
- "list\n", if_name(ifp)));
+ "list\n", ifp->if_xname));
}
}
diff --git a/sys/netinet6/in6_prefix.c b/sys/netinet6/in6_prefix.c
index 211980f5c1c..46fa64444a0 100644
--- a/sys/netinet6/in6_prefix.c
+++ b/sys/netinet6/in6_prefix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6_prefix.c,v 1.10 2001/03/25 09:24:26 itojun Exp $ */
+/* $OpenBSD: in6_prefix.c,v 1.11 2001/06/09 06:43:37 angelos Exp $ */
/* $KAME: in6_prefix.c,v 1.47 2001/03/25 08:41:39 itojun Exp $ */
/*
@@ -88,8 +88,6 @@ struct rr_prhead rr_prefix;
struct timeout in6_rr_timer_ch;
-#include <net/net_osdep.h>
-
static void add_each_addr __P((struct socket *so, struct rr_prefix *rpp,
struct rp_addr *rap));
static int create_ra_entry __P((struct rp_addr **rapp));
@@ -577,7 +575,7 @@ add_each_addr(struct socket *so, struct rr_prefix *rpp, struct rp_addr *rap)
/* init ifra */
bzero(&ifra, sizeof(ifra));
- strncpy(ifra.ifra_name, if_name(rpp->rp_ifp), sizeof(ifra.ifra_name));
+ strncpy(ifra.ifra_name, rpp->rp_ifp->if_xname, sizeof(ifra.ifra_name));
ifra.ifra_addr.sin6_family = ifra.ifra_prefixmask.sin6_family =
AF_INET6;
ifra.ifra_addr.sin6_len = ifra.ifra_prefixmask.sin6_len =
diff --git a/sys/netinet6/in6_proto.c b/sys/netinet6/in6_proto.c
index cb703e7952a..a6b8a584f71 100644
--- a/sys/netinet6/in6_proto.c
+++ b/sys/netinet6/in6_proto.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6_proto.c,v 1.28 2001/05/25 22:08:24 itojun Exp $ */
+/* $OpenBSD: in6_proto.c,v 1.29 2001/06/09 06:43:38 angelos Exp $ */
/* $KAME: in6_proto.c,v 1.66 2000/10/10 15:35:47 itojun Exp $ */
/*
@@ -107,8 +107,6 @@
#include <netinet6/in6_gif.h>
#endif
-#include <net/net_osdep.h>
-
/*
* TCP/IP protocol family: IP6, ICMP6, UDP, TCP.
*/
diff --git a/sys/netinet6/ip6_forward.c b/sys/netinet6/ip6_forward.c
index f007c79278a..1275c416e96 100644
--- a/sys/netinet6/ip6_forward.c
+++ b/sys/netinet6/ip6_forward.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_forward.c,v 1.13 2001/03/30 11:09:00 itojun Exp $ */
+/* $OpenBSD: ip6_forward.c,v 1.14 2001/06/09 06:43:38 angelos Exp $ */
/* $KAME: ip6_forward.c,v 1.67 2001/03/29 05:34:31 itojun Exp $ */
/*
@@ -59,8 +59,6 @@
#include <netkey/key_debug.h>
#endif /* IPSEC_IPV6FWD */
-#include <net/net_osdep.h>
-
struct route_in6 ip6_forward_rt;
/*
@@ -127,7 +125,7 @@ ip6_forward(m, srcrt)
ip6_sprintf(&ip6->ip6_src),
ip6_sprintf(&ip6->ip6_dst),
ip6->ip6_nxt,
- if_name(m->m_pkthdr.rcvif));
+ m->m_pkthdr.rcvif->if_xname);
}
m_freem(m);
return;
@@ -351,7 +349,7 @@ ip6_forward(m, srcrt)
ip6_sprintf(&ip6->ip6_src),
ip6_sprintf(&ip6->ip6_dst),
ip6->ip6_nxt,
- if_name(m->m_pkthdr.rcvif), if_name(rt->rt_ifp));
+ m->m_pkthdr.rcvif->if_xname, rt->rt_ifp->if_xname);
}
if (mcopy)
icmp6_error(mcopy, ICMP6_DST_UNREACH,
@@ -445,8 +443,8 @@ ip6_forward(m, srcrt)
"src %s, dst %s, nxt %d, rcvif %s, outif %s\n",
ip6_sprintf(&ip6->ip6_src),
ip6_sprintf(&ip6->ip6_dst),
- ip6->ip6_nxt, if_name(m->m_pkthdr.rcvif),
- if_name(rt->rt_ifp));
+ ip6->ip6_nxt, m->m_pkthdr.rcvif->if_xname,
+ rt->rt_ifp->if_xname);
}
/* we can just use rcvif in forwarding. */
diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c
index 888ab5a1136..ee46c273860 100644
--- a/sys/netinet6/ip6_input.c
+++ b/sys/netinet6/ip6_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_input.c,v 1.30 2001/05/11 17:20:12 aaron Exp $ */
+/* $OpenBSD: ip6_input.c,v 1.31 2001/06/09 06:43:38 angelos Exp $ */
/* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */
/*
@@ -108,8 +108,6 @@
#include "gif.h"
#include "bpfilter.h"
-#include <net/net_osdep.h>
-
extern struct domain inet6domain;
extern struct ip6protosw inet6sw[];
diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c
index dcdd24683b7..e0fd1bd8898 100644
--- a/sys/netinet6/ip6_mroute.c
+++ b/sys/netinet6/ip6_mroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_mroute.c,v 1.15 2001/03/25 09:25:08 itojun Exp $ */
+/* $OpenBSD: ip6_mroute.c,v 1.16 2001/06/09 06:43:38 angelos Exp $ */
/* $KAME: ip6_mroute.c,v 1.45 2001/03/25 08:38:51 itojun Exp $ */
/*
@@ -78,8 +78,6 @@
#include <netinet6/pim6.h>
#include <netinet6/pim6_var.h>
-#include <net/net_osdep.h>
-
#define M_HASCL(m) ((m)->m_flags & M_EXT)
static int ip6_mdq __P((struct mbuf *, struct ifnet *, struct mf6c *));
@@ -971,7 +969,7 @@ ip6_mforward(ip6, ifp, m)
ip6_sprintf(&ip6->ip6_src),
ip6_sprintf(&ip6->ip6_dst),
ip6->ip6_nxt,
- if_name(m->m_pkthdr.rcvif));
+ m->m_pkthdr.rcvif->if_xname);
}
return 0;
}
@@ -1516,7 +1514,7 @@ phyint_send(ip6, mifp, m)
log(LOG_DEBUG,
"phyint_send: packet too big on %s o %s g %s"
" size %d(discarded)\n",
- if_name(ifp),
+ ifp->if_xname,
ip6_sprintf(&ip6->ip6_src),
ip6_sprintf(&ip6->ip6_dst),
mb_copy->m_pkthdr.len);
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c
index 6448b194226..0071b2d0922 100644
--- a/sys/netinet6/ip6_output.c
+++ b/sys/netinet6/ip6_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_output.c,v 1.40 2001/05/30 12:31:09 angelos Exp $ */
+/* $OpenBSD: ip6_output.c,v 1.41 2001/06/09 06:43:38 angelos Exp $ */
/* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */
/*
@@ -103,8 +103,6 @@ extern int ipsec_esp_trans_default_level;
extern int ipsec_esp_network_default_level;
#endif /* IPSEC */
-#include <net/net_osdep.h>
-
struct ip6_exthdrs {
struct mbuf *ip6e_ip6;
struct mbuf *ip6e_hbh;
diff --git a/sys/netinet6/mld6.c b/sys/netinet6/mld6.c
index badc566b512..c99d3a3f84f 100644
--- a/sys/netinet6/mld6.c
+++ b/sys/netinet6/mld6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mld6.c,v 1.9 2001/02/16 16:00:58 itojun Exp $ */
+/* $OpenBSD: mld6.c,v 1.10 2001/06/09 06:43:38 angelos Exp $ */
/* $KAME: mld6.c,v 1.26 2001/02/16 14:50:35 itojun Exp $ */
/*
@@ -86,8 +86,6 @@
#include <netinet/icmp6.h>
#include <netinet6/mld6_var.h>
-#include <net/net_osdep.h>
-
/*
* Protocol constants
*/
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
index 596aec0045c..394dcbb5029 100644
--- a/sys/netinet6/nd6.c
+++ b/sys/netinet6/nd6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nd6.c,v 1.33 2001/05/29 01:08:15 angelos Exp $ */
+/* $OpenBSD: nd6.c,v 1.34 2001/06/09 06:43:38 angelos Exp $ */
/* $KAME: nd6.c,v 1.137 2001/03/21 21:52:06 jinmei Exp $ */
/*
@@ -71,8 +71,6 @@
#include <netinet6/in6_prefix.h>
#include <netinet/icmp6.h>
-#include <net/net_osdep.h>
-
#define ND6_SLOWTIMER_INTERVAL (60 * 60) /* 1 hour */
#define ND6_RECALC_REACHTM_INTERVAL (60 * 120) /* 2 hours */
@@ -730,7 +728,7 @@ nd6_lookup(addr6, create, ifp)
(ifp && rt->rt_ifa->ifa_ifp != ifp)) {
if (create) {
log(LOG_DEBUG, "nd6_lookup: failed to lookup %s (if = %s)\n",
- ip6_sprintf(addr6), ifp ? if_name(ifp) : "unspec");
+ ip6_sprintf(addr6), ifp ? ifp->if_xname : "unspec");
/* xxx more logs... kazu */
}
return(0);
@@ -1116,7 +1114,7 @@ nd6_rtrequest(req, rt, info)
gate->sa_len < sizeof(null_sdl)) {
log(LOG_DEBUG,
"nd6_rtrequest: bad gateway value: %s\n",
- if_name(ifp));
+ ifp->if_xname);
break;
}
SDL(gate)->sdl_type = ifp->if_type;
diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c
index 2cea5d8c037..8d6b0d8112e 100644
--- a/sys/netinet6/nd6_nbr.c
+++ b/sys/netinet6/nd6_nbr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nd6_nbr.c,v 1.16 2001/02/23 08:01:15 itojun Exp $ */
+/* $OpenBSD: nd6_nbr.c,v 1.17 2001/06/09 06:43:38 angelos Exp $ */
/* $KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $ */
/*
@@ -57,8 +57,6 @@
#include <netinet6/nd6.h>
#include <netinet/icmp6.h>
-#include <net/net_osdep.h>
-
#include <dev/rndvar.h>
#define SDL(s) ((struct sockaddr_dl *)s)
@@ -118,7 +116,7 @@ nd6_ns_input(m, off, icmp6len)
nd6log((LOG_ERR,
"nd6_ns_input: invalid hlim (%d) from %s to %s on %s\n",
ip6->ip6_hlim, ip6_sprintf(&ip6->ip6_src),
- ip6_sprintf(&ip6->ip6_dst), if_name(ifp)));
+ ip6_sprintf(&ip6->ip6_dst), ifp->if_xname));
goto bad;
}
@@ -542,7 +540,7 @@ nd6_na_input(m, off, icmp6len)
nd6log((LOG_ERR,
"nd6_na_input: invalid hlim (%d) from %s to %s on %s\n",
ip6->ip6_hlim, ip6_sprintf(&ip6->ip6_src),
- ip6_sprintf(&ip6->ip6_dst), if_name(ifp)));
+ ip6_sprintf(&ip6->ip6_dst), ifp->if_xname));
goto bad;
}
@@ -1028,7 +1026,7 @@ nd6_dad_start(ifa, tick)
"nd6_dad_start: called with non-tentative address "
"%s(%s)\n",
ip6_sprintf(&ia->ia_addr.sin6_addr),
- ifa->ifa_ifp ? if_name(ifa->ifa_ifp) : "???");
+ ifa->ifa_ifp ? ifa->ifa_ifp->if_xname : "???");
return;
}
if (ia->ia6_flags & IN6_IFF_ANYCAST) {
@@ -1053,14 +1051,14 @@ nd6_dad_start(ifa, tick)
log(LOG_ERR, "nd6_dad_start: memory allocation failed for "
"%s(%s)\n",
ip6_sprintf(&ia->ia_addr.sin6_addr),
- ifa->ifa_ifp ? if_name(ifa->ifa_ifp) : "???");
+ ifa->ifa_ifp ? ifa->ifa_ifp->if_xname : "???");
return;
}
bzero(dp, sizeof(*dp));
bzero(&dp->dad_timer_ch, sizeof(dp->dad_timer_ch));
TAILQ_INSERT_TAIL(&dadq, (struct dadq *)dp, dad_list);
- nd6log((LOG_DEBUG, "%s: starting DAD for %s\n", if_name(ifa->ifa_ifp),
+ nd6log((LOG_DEBUG, "%s: starting DAD for %s\n", ifa->ifa_ifp->if_xname,
ip6_sprintf(&ia->ia_addr.sin6_addr)));
/*
@@ -1141,21 +1139,21 @@ nd6_dad_timer(ifa)
log(LOG_ERR, "nd6_dad_timer: called with duplicated address "
"%s(%s)\n",
ip6_sprintf(&ia->ia_addr.sin6_addr),
- ifa->ifa_ifp ? if_name(ifa->ifa_ifp) : "???");
+ ifa->ifa_ifp ? ifa->ifa_ifp->if_xname : "???");
goto done;
}
if ((ia->ia6_flags & IN6_IFF_TENTATIVE) == 0) {
log(LOG_ERR, "nd6_dad_timer: called with non-tentative address "
"%s(%s)\n",
ip6_sprintf(&ia->ia_addr.sin6_addr),
- ifa->ifa_ifp ? if_name(ifa->ifa_ifp) : "???");
+ ifa->ifa_ifp ? ifa->ifa_ifp->if_xname : "???");
goto done;
}
/* timeouted with IFF_{RUNNING,UP} check */
if (dp->dad_ns_tcount > dad_maxtry) {
nd6log((LOG_INFO, "%s: could not run DAD, driver problem?\n",
- if_name(ifa->ifa_ifp)));
+ ifa->ifa_ifp->if_xname));
TAILQ_REMOVE(&dadq, (struct dadq *)dp, dad_list);
free(dp, M_IP6NDP);
@@ -1206,7 +1204,7 @@ nd6_dad_timer(ifa)
log(LOG_INFO, "DAD questionable for %s(%s): "
"network card loops back multicast?\n",
ip6_sprintf(&ia->ia_addr.sin6_addr),
- if_name(ifa->ifa_ifp));
+ ifa->ifa_ifp->if_xname);
/* XXX consider it a duplicate or not? */
/* duplicate++; */
} else {
@@ -1232,7 +1230,7 @@ nd6_dad_timer(ifa)
nd6log((LOG_DEBUG,
"%s: DAD complete for %s - no duplicates found\n",
- if_name(ifa->ifa_ifp),
+ ifa->ifa_ifp->if_xname,
ip6_sprintf(&ia->ia_addr.sin6_addr)));
TAILQ_REMOVE(&dadq, (struct dadq *)dp, dad_list);
@@ -1260,7 +1258,7 @@ nd6_dad_duplicated(ifa)
}
log(LOG_ERR, "%s: DAD detected duplicate IPv6 address %s: %d NS, "
- "%d NA\n", if_name(ifa->ifa_ifp),
+ "%d NA\n", ifa->ifa_ifp->if_xname,
ip6_sprintf(&ia->ia_addr.sin6_addr),
dp->dad_ns_icount, dp->dad_na_icount);
@@ -1271,9 +1269,9 @@ nd6_dad_duplicated(ifa)
nd6_dad_stoptimer(dp);
log(LOG_ERR, "%s: DAD complete for %s - duplicate found\n",
- if_name(ifa->ifa_ifp), ip6_sprintf(&ia->ia_addr.sin6_addr));
+ ifa->ifa_ifp->if_xname, ip6_sprintf(&ia->ia_addr.sin6_addr));
log(LOG_ERR, "%s: manual intervention required\n",
- if_name(ifa->ifa_ifp));
+ ifa->ifa_ifp->if_xname);
TAILQ_REMOVE(&dadq, (struct dadq *)dp, dad_list);
free(dp, M_IP6NDP);
@@ -1292,13 +1290,13 @@ nd6_dad_ns_output(dp, ifa)
dp->dad_ns_tcount++;
if ((ifp->if_flags & IFF_UP) == 0) {
#if 0
- printf("%s: interface down?\n", if_name(ifp));
+ printf("%s: interface down?\n", ifp->if_xname);
#endif
return;
}
if ((ifp->if_flags & IFF_RUNNING) == 0) {
#if 0
- printf("%s: interface not running?\n", if_name(ifp));
+ printf("%s: interface not running?\n", ifp->if_xname);
#endif
return;
}
@@ -1337,7 +1335,7 @@ nd6_dad_ns_input(ifa)
nd6log((LOG_INFO,
"nd6_dad_ns_input: ignoring DAD NS packet for "
"address %s(%s)\n", ip6_sprintf(taddr6),
- if_name(ifa->ifa_ifp)));
+ ifa->ifa_ifp->if_xname));
return;
}
diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c
index bf8b8452110..d398db4729f 100644
--- a/sys/netinet6/nd6_rtr.c
+++ b/sys/netinet6/nd6_rtr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nd6_rtr.c,v 1.10 2001/04/04 06:22:57 itojun Exp $ */
+/* $OpenBSD: nd6_rtr.c,v 1.11 2001/06/09 06:43:38 angelos Exp $ */
/* $KAME: nd6_rtr.c,v 1.97 2001/02/07 11:09:13 itojun Exp $ */
/*
@@ -56,8 +56,6 @@
#include <netinet6/nd6.h>
#include <netinet/icmp6.h>
-#include <net/net_osdep.h>
-
#define SDL(s) ((struct sockaddr_dl *)s)
static struct nd_defrouter *defrtrlist_update __P((struct nd_defrouter *));
@@ -123,7 +121,7 @@ nd6_rs_input(m, off, icmp6len)
nd6log((LOG_ERR,
"nd6_rs_input: invalid hlim (%d) from %s to %s on %s\n",
ip6->ip6_hlim, ip6_sprintf(&ip6->ip6_src),
- ip6_sprintf(&ip6->ip6_dst), if_name(ifp)));
+ ip6_sprintf(&ip6->ip6_dst), ifp->if_xname));
goto bad;
}
@@ -211,7 +209,7 @@ nd6_ra_input(m, off, icmp6len)
nd6log((LOG_ERR,
"nd6_ra_input: invalid hlim (%d) from %s to %s on %s\n",
ip6->ip6_hlim, ip6_sprintf(&ip6->ip6_src),
- ip6_sprintf(&ip6->ip6_dst), if_name(ifp)));
+ ip6_sprintf(&ip6->ip6_dst), ifp->if_xname));
goto bad;
}
@@ -470,8 +468,7 @@ defrouter_addifreq(ifp)
if ((ifa = ifaof_ifpforaddr((struct sockaddr *)&def, ifp)) == NULL) {
nd6log((LOG_ERR, /* better error? */
"defrouter_addifreq: failed to find an ifaddr "
- "to install a route to interface %s\n",
- if_name(ifp)));
+ "to install a route to interface %s\n", ifp->if_xname));
return;
}
@@ -484,7 +481,7 @@ defrouter_addifreq(ifp)
nd6log((LOG_ERR,
"defrouter_addifreq: failed to install a route to "
"interface %s (errno = %d)\n",
- if_name(ifp), error));
+ ifp->if_xname, error));
}
}
@@ -1238,7 +1235,7 @@ in6_ifadd(ifp, in6, addr, prefixlen)
/* prefixlen + ifidlen must be equal to 128 */
if (prefixlen != in6_mask2len(&ib->ia_prefixmask.sin6_addr)) {
nd6log((LOG_ERR, "in6_ifadd: wrong prefixlen for %s"
- "(prefix=%d ifid=%d)\n", if_name(ifp),
+ "(prefix=%d ifid=%d)\n", ifp->if_xname,
prefixlen,
128 - in6_mask2len(&ib->ia_prefixmask.sin6_addr)));
return NULL;
@@ -1319,7 +1316,7 @@ in6_ifadd(ifp, in6, addr, prefixlen)
"in6_ifadd: failed to add an interface route "
"for %s/%d on %s, errno = %d\n",
ip6_sprintf(&ia->ia_addr.sin6_addr), prefixlen,
- if_name(ifp), error));
+ ifp->if_xname, error));
}
else
ia->ia_flags |= IFA_ROUTE;
diff --git a/sys/netinet6/udp6_output.c b/sys/netinet6/udp6_output.c
index b7448cd4dde..9348a37f8a8 100644
--- a/sys/netinet6/udp6_output.c
+++ b/sys/netinet6/udp6_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udp6_output.c,v 1.3 2001/02/16 08:19:32 itojun Exp $ */
+/* $OpenBSD: udp6_output.c,v 1.4 2001/06/09 06:43:38 angelos Exp $ */
/* $KAME: udp6_output.c,v 1.21 2001/02/07 11:51:54 itojun Exp $ */
/*
@@ -97,8 +97,6 @@
#include "faith.h"
-#include <net/net_osdep.h>
-
/*
* UDP protocol inplementation.
* Per RFC 768, August, 1980.