summaryrefslogtreecommitdiff
path: root/sys/netinet6/nd6_nbr.c
diff options
context:
space:
mode:
authorRyan Thomas McBride <mcbride@cvs.openbsd.org>2008-06-11 19:00:51 +0000
committerRyan Thomas McBride <mcbride@cvs.openbsd.org>2008-06-11 19:00:51 +0000
commita281bd593a87ccc180424f328c5bef3e6fb98fa9 (patch)
tree0050fce1befa8937159804f47977a0ab6e60e91f /sys/netinet6/nd6_nbr.c
parent9d8f085596f968dd3bc919a11ae130b2381b52cb (diff)
ANSIfy to sync with KAME. From Karl Sjodahl <dunceor@gmail.com>.
ok todd deraadt naddy bluhm
Diffstat (limited to 'sys/netinet6/nd6_nbr.c')
-rw-r--r--sys/netinet6/nd6_nbr.c70
1 files changed, 27 insertions, 43 deletions
diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c
index 355af558a00..7a0acfc950b 100644
--- a/sys/netinet6/nd6_nbr.c
+++ b/sys/netinet6/nd6_nbr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nd6_nbr.c,v 1.50 2008/05/11 03:50:23 krw Exp $ */
+/* $OpenBSD: nd6_nbr.c,v 1.51 2008/06/11 19:00:50 mcbride Exp $ */
/* $KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $ */
/*
@@ -85,9 +85,7 @@ static int dad_maxtry = 15; /* max # of *tries* to transmit DAD packet */
* Based on RFC 2462 (duplicated address detection)
*/
void
-nd6_ns_input(m, off, icmp6len)
- struct mbuf *m;
- int off, icmp6len;
+nd6_ns_input(struct mbuf *m, int off, int icmp6len)
{
struct ifnet *ifp = m->m_pkthdr.rcvif;
struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *);
@@ -328,13 +326,13 @@ nd6_ns_input(m, off, icmp6len)
*
* Based on RFC 2461
* Based on RFC 2462 (duplicated address detection)
+ *
+ * ln - for source address determination
+ * dad - duplicated address detection
*/
void
-nd6_ns_output(ifp, daddr6, taddr6, ln, dad)
- struct ifnet *ifp;
- struct in6_addr *daddr6, *taddr6;
- struct llinfo_nd6 *ln; /* for source address determination */
- int dad; /* duplicated address detection */
+nd6_ns_output(struct ifnet *ifp, struct in6_addr *daddr6,
+ struct in6_addr *taddr6, struct llinfo_nd6 *ln, int dad)
{
struct mbuf *m;
struct ip6_hdr *ip6;
@@ -537,9 +535,7 @@ nd6_ns_output(ifp, daddr6, taddr6, ln, dad)
* - anycast advertisement delay rule (RFC2461 7.2.7, SHOULD)
*/
void
-nd6_na_input(m, off, icmp6len)
- struct mbuf *m;
- int off, icmp6len;
+nd6_na_input(struct mbuf *m, int off, int icmp6len)
{
struct ifnet *ifp = m->m_pkthdr.rcvif;
struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *);
@@ -834,14 +830,14 @@ nd6_na_input(m, off, icmp6len)
* the following items are not implemented yet:
* - proxy advertisement delay rule (RFC2461 7.2.8, last paragraph, SHOULD)
* - anycast advertisement delay rule (RFC2461 7.2.7, SHOULD)
+ *
+ * tlladdr - 1 if include target link-layer address
+ * sdl0 - sockaddr_dl (= proxy NA) or NULL
*/
void
-nd6_na_output(ifp, daddr6, taddr6, flags, tlladdr, sdl0)
- struct ifnet *ifp;
- struct in6_addr *daddr6, *taddr6;
- u_long flags;
- int tlladdr; /* 1 if include target link-layer address */
- struct sockaddr *sdl0; /* sockaddr_dl (= proxy NA) or NULL */
+nd6_na_output(struct ifnet *ifp, struct in6_addr *daddr6,
+ struct in6_addr *taddr6, u_long flags, int tlladdr,
+ struct sockaddr *sdl0)
{
struct mbuf *m;
struct ip6_hdr *ip6;
@@ -999,8 +995,7 @@ nd6_na_output(ifp, daddr6, taddr6, flags, tlladdr, sdl0)
}
caddr_t
-nd6_ifptomac(ifp)
- struct ifnet *ifp;
+nd6_ifptomac(struct ifnet *ifp)
{
switch (ifp->if_type) {
case IFT_ETHER:
@@ -1032,8 +1027,7 @@ static struct dadq_head dadq;
static int dad_init = 0;
static struct dadq *
-nd6_dad_find(ifa)
- struct ifaddr *ifa;
+nd6_dad_find(struct ifaddr *ifa)
{
struct dadq *dp;
@@ -1045,9 +1039,7 @@ nd6_dad_find(ifa)
}
static void
-nd6_dad_starttimer(dp, ticks)
- struct dadq *dp;
- int ticks;
+nd6_dad_starttimer(struct dadq *dp, int ticks)
{
timeout_set(&dp->dad_timer_ch, (void (*)(void *))nd6_dad_timer,
@@ -1056,8 +1048,7 @@ nd6_dad_starttimer(dp, ticks)
}
static void
-nd6_dad_stoptimer(dp)
- struct dadq *dp;
+nd6_dad_stoptimer(struct dadq *dp)
{
timeout_del(&dp->dad_timer_ch);
@@ -1065,11 +1056,11 @@ nd6_dad_stoptimer(dp)
/*
* Start Duplicated Address Detection (DAD) for specified interface address.
+ *
+ * tick - minimum delay ticks for IFF_UP event
*/
void
-nd6_dad_start(ifa, tick)
- struct ifaddr *ifa;
- int *tick; /* minimum delay ticks for IFF_UP event */
+nd6_dad_start(struct ifaddr *ifa, int *tick)
{
struct in6_ifaddr *ia = (struct in6_ifaddr *)ifa;
struct dadq *dp;
@@ -1156,8 +1147,7 @@ nd6_dad_start(ifa, tick)
* terminate DAD unconditionally. used for address removals.
*/
void
-nd6_dad_stop(ifa)
- struct ifaddr *ifa;
+nd6_dad_stop(struct ifaddr *ifa)
{
struct dadq *dp;
@@ -1178,8 +1168,7 @@ nd6_dad_stop(ifa)
}
static void
-nd6_dad_timer(ifa)
- struct ifaddr *ifa;
+nd6_dad_timer(struct ifaddr *ifa)
{
int s;
struct in6_ifaddr *ia = (struct in6_ifaddr *)ifa;
@@ -1282,8 +1271,7 @@ done:
}
void
-nd6_dad_duplicated(ifa)
- struct ifaddr *ifa;
+nd6_dad_duplicated(struct ifaddr *ifa)
{
struct in6_ifaddr *ia = (struct in6_ifaddr *)ifa;
struct dadq *dp;
@@ -1317,9 +1305,7 @@ nd6_dad_duplicated(ifa)
}
static void
-nd6_dad_ns_output(dp, ifa)
- struct dadq *dp;
- struct ifaddr *ifa;
+nd6_dad_ns_output(struct dadq *dp, struct ifaddr *ifa)
{
struct in6_ifaddr *ia = (struct in6_ifaddr *)ifa;
struct ifnet *ifp = ifa->ifa_ifp;
@@ -1343,8 +1329,7 @@ nd6_dad_ns_output(dp, ifa)
}
static void
-nd6_dad_ns_input(ifa)
- struct ifaddr *ifa;
+nd6_dad_ns_input(struct ifaddr *ifa)
{
struct in6_ifaddr *ia;
struct ifnet *ifp;
@@ -1393,8 +1378,7 @@ nd6_dad_ns_input(ifa)
}
static void
-nd6_dad_na_input(ifa)
- struct ifaddr *ifa;
+nd6_dad_na_input(struct ifaddr *ifa)
{
struct dadq *dp;