summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/scope6.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet6/scope6.c')
-rw-r--r--sys/netinet6/scope6.c49
1 files changed, 19 insertions, 30 deletions
diff --git a/sys/netinet6/scope6.c b/sys/netinet6/scope6.c
index 06ef215..50646ae 100644
--- a/sys/netinet6/scope6.c
+++ b/sys/netinet6/scope6.c
@@ -67,7 +67,7 @@ static struct scope6_id sid_default;
(((struct in6_ifextra *)(ifp)->if_afdata[AF_INET6])->scope6_id)
void
-scope6_init()
+scope6_init(void)
{
SCOPE6_LOCK_INIT();
@@ -75,8 +75,7 @@ scope6_init()
}
struct scope6_id *
-scope6_ifattach(ifp)
- struct ifnet *ifp;
+scope6_ifattach(struct ifnet *ifp)
{
struct scope6_id *sid;
@@ -99,17 +98,14 @@ scope6_ifattach(ifp)
}
void
-scope6_ifdetach(sid)
- struct scope6_id *sid;
+scope6_ifdetach(struct scope6_id *sid)
{
free(sid, M_IFADDR);
}
int
-scope6_set(ifp, idlist)
- struct ifnet *ifp;
- struct scope6_id *idlist;
+scope6_set(struct ifnet *ifp, struct scope6_id *idlist)
{
int i;
int error = 0;
@@ -176,9 +172,7 @@ scope6_set(ifp, idlist)
}
int
-scope6_get(ifp, idlist)
- struct ifnet *ifp;
- struct scope6_id *idlist;
+scope6_get(struct ifnet *ifp, struct scope6_id *idlist)
{
/* We only need to lock the interface's afdata for SID() to work. */
IF_AFDATA_LOCK(ifp);
@@ -202,8 +196,7 @@ scope6_get(ifp, idlist)
* Get a scope of the address. Node-local, link-local, site-local or global.
*/
int
-in6_addrscope(addr)
- struct in6_addr *addr;
+in6_addrscope(struct in6_addr *addr)
{
int scope;
@@ -261,9 +254,12 @@ in6_addrscope(addr)
return IPV6_ADDR_SCOPE_GLOBAL;
}
+/*
+ * ifp - note that this might be NULL
+ */
+
void
-scope6_setdefault(ifp)
- struct ifnet *ifp; /* note that this might be NULL */
+scope6_setdefault(struct ifnet *ifp)
{
/*
* Currently, this function just sets the default "interfaces"
@@ -285,8 +281,7 @@ scope6_setdefault(ifp)
}
int
-scope6_get_default(idlist)
- struct scope6_id *idlist;
+scope6_get_default(struct scope6_id *idlist)
{
SCOPE6_LOCK();
@@ -297,8 +292,7 @@ scope6_get_default(idlist)
}
u_int32_t
-scope6_addr2default(addr)
- struct in6_addr *addr;
+scope6_addr2default(struct in6_addr *addr)
{
u_int32_t id;
@@ -328,9 +322,7 @@ scope6_addr2default(addr)
* address.
*/
int
-sa6_embedscope(sin6, defaultok)
- struct sockaddr_in6 *sin6;
- int defaultok;
+sa6_embedscope(struct sockaddr_in6 *sin6, int defaultok)
{
struct ifnet *ifp;
u_int32_t zoneid;
@@ -366,8 +358,7 @@ sa6_embedscope(sin6, defaultok)
* generate standard sockaddr_in6 from embedded form.
*/
int
-sa6_recoverscope(sin6)
- struct sockaddr_in6 *sin6;
+sa6_recoverscope(struct sockaddr_in6 *sin6)
{
char ip6buf[INET6_ADDRSTRLEN];
u_int32_t zoneid;
@@ -402,12 +393,11 @@ sa6_recoverscope(sin6)
* Determine the appropriate scope zone ID for in6 and ifp. If ret_id is
* non NULL, it is set to the zone ID. If the zone ID needs to be embedded
* in the in6_addr structure, in6 will be modified.
+ *
+ * ret_id - unnecessary?
*/
int
-in6_setscope(in6, ifp, ret_id)
- struct in6_addr *in6;
- struct ifnet *ifp;
- u_int32_t *ret_id; /* unnecessary? */
+in6_setscope(struct in6_addr *in6, struct ifnet *ifp, u_int32_t *ret_id)
{
int scope;
u_int32_t zoneid = 0;
@@ -481,8 +471,7 @@ in6_setscope(in6, ifp, ret_id)
* is intact; return non 0 if the address is modified.
*/
int
-in6_clearscope(in6)
- struct in6_addr *in6;
+in6_clearscope(struct in6_addr *in6)
{
int modified = 0;
OpenPOWER on IntegriCloud