summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/nd6_nbr.c
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2007-07-05 16:23:49 +0000
committerdelphij <delphij@FreeBSD.org>2007-07-05 16:23:49 +0000
commite6f8b0995d59e493018009921005c7f50759dc53 (patch)
tree81174e8101271154426447c99842b2b14728c14e /sys/netinet6/nd6_nbr.c
parent181b33ba1c42e4a3281278639aae08ff32ebbc29 (diff)
downloadFreeBSD-src-e6f8b0995d59e493018009921005c7f50759dc53.zip
FreeBSD-src-e6f8b0995d59e493018009921005c7f50759dc53.tar.gz
ANSIfy[1] plus some style cleanup nearby.
Discussed with: gnn, rwatson Submitted by: Karl Sj?dahl - dunceor <dunceor gmail com> [1] Approved by: re (rwatson)
Diffstat (limited to 'sys/netinet6/nd6_nbr.c')
-rw-r--r--sys/netinet6/nd6_nbr.c66
1 files changed, 24 insertions, 42 deletions
diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c
index ca73727..c42778c 100644
--- a/sys/netinet6/nd6_nbr.c
+++ b/sys/netinet6/nd6_nbr.c
@@ -89,9 +89,7 @@ static int dad_maxtry = 15; /* max # of *tries* to transmit DAD packet */
* Based on RFC 2462 (duplicate 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 *);
@@ -336,13 +334,13 @@ nd6_ns_input(m, off, icmp6len)
*
* Based on RFC 2461
* Based on RFC 2462 (duplicate address detection)
+ *
+ * ln - for source address determination
+ * dad - duplicate address detection
*/
void
-nd6_ns_output(ifp, daddr6, taddr6, ln, dad)
- struct ifnet *ifp;
- const struct in6_addr *daddr6, *taddr6;
- struct llinfo_nd6 *ln; /* for source address determination */
- int dad; /* duplicate address detection */
+nd6_ns_output(struct ifnet *ifp, const struct in6_addr *daddr6,
+ const struct in6_addr *taddr6, struct llinfo_nd6 *ln, int dad)
{
struct mbuf *m;
struct ip6_hdr *ip6;
@@ -547,9 +545,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 *);
@@ -854,14 +850,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_0, taddr6, flags, tlladdr, sdl0)
- struct ifnet *ifp;
- const struct in6_addr *daddr6_0, *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, const struct in6_addr *daddr6_0,
+ const struct in6_addr *taddr6, u_long flags, int tlladdr,
+ struct sockaddr *sdl0)
{
struct mbuf *m;
struct ip6_hdr *ip6;
@@ -1025,8 +1021,7 @@ nd6_na_output(ifp, daddr6_0, taddr6, flags, tlladdr, sdl0)
}
caddr_t
-nd6_ifptomac(ifp)
- struct ifnet *ifp;
+nd6_ifptomac(struct ifnet *ifp)
{
switch (ifp->if_type) {
case IFT_ARCNET:
@@ -1066,8 +1061,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;
@@ -1079,9 +1073,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)
{
callout_reset(&dp->dad_timer_ch, ticks,
@@ -1089,8 +1081,7 @@ nd6_dad_starttimer(dp, ticks)
}
static void
-nd6_dad_stoptimer(dp)
- struct dadq *dp;
+nd6_dad_stoptimer(struct dadq *dp)
{
callout_stop(&dp->dad_timer_ch);
@@ -1100,9 +1091,7 @@ nd6_dad_stoptimer(dp)
* Start Duplicate Address Detection (DAD) for specified interface address.
*/
void
-nd6_dad_start(ifa, delay)
- struct ifaddr *ifa;
- int delay;
+nd6_dad_start(struct ifaddr *ifa, int delay)
{
struct in6_ifaddr *ia = (struct in6_ifaddr *)ifa;
struct dadq *dp;
@@ -1184,8 +1173,7 @@ nd6_dad_start(ifa, delay)
* terminate DAD unconditionally. used for address removals.
*/
void
-nd6_dad_stop(ifa)
- struct ifaddr *ifa;
+nd6_dad_stop(struct ifaddr *ifa)
{
struct dadq *dp;
@@ -1206,8 +1194,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;
@@ -1311,8 +1298,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 ifnet *ifp;
@@ -1383,9 +1369,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;
@@ -1403,8 +1387,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;
@@ -1454,8 +1437,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;
OpenPOWER on IntegriCloud