summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/ip6_input.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet6/ip6_input.c')
-rw-r--r--sys/netinet6/ip6_input.c76
1 files changed, 21 insertions, 55 deletions
diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c
index 65818cc..7367a51 100644
--- a/sys/netinet6/ip6_input.c
+++ b/sys/netinet6/ip6_input.c
@@ -140,7 +140,7 @@ static struct mbuf *ip6_pullexthdr __P((struct mbuf *, size_t, int));
* All protocols not implemented in kernel go to raw IP6 protocol handler.
*/
void
-ip6_init()
+ip6_init(void)
{
struct ip6protosw *pr;
int i;
@@ -187,8 +187,7 @@ ip6_init()
}
static void
-ip6_init2(dummy)
- void *dummy;
+ip6_init2(void *dummy)
{
/* nd6_timer_init */
@@ -210,8 +209,7 @@ SYSINIT(netinet6init2, SI_SUB_PROTO_DOMAIN, SI_ORDER_MIDDLE, ip6_init2, NULL);
extern struct route_in6 ip6_forward_rt;
void
-ip6_input(m)
- struct mbuf *m;
+ip6_input(struct mbuf *m)
{
struct ip6_hdr *ip6;
int off = sizeof(struct ip6_hdr), nest;
@@ -782,9 +780,7 @@ passin:
* XXX backward compatibility wrapper
*/
static struct ip6aux *
-ip6_setdstifaddr(m, ia6)
- struct mbuf *m;
- struct in6_ifaddr *ia6;
+ip6_setdstifaddr(struct mbuf *m, struct in6_ifaddr *ia6)
{
struct ip6aux *ip6a;
@@ -795,8 +791,7 @@ ip6_setdstifaddr(m, ia6)
}
struct in6_ifaddr *
-ip6_getdstifaddr(m)
- struct mbuf *m;
+ip6_getdstifaddr(struct mbuf *m)
{
struct ip6aux *ip6a;
@@ -810,13 +805,12 @@ ip6_getdstifaddr(m)
/*
* Hop-by-Hop options header processing. If a valid jumbo payload option is
* included, the real payload length will be stored in plenp.
+ *
+ * rtalertp - XXX: should be stored more smart way
*/
static int
-ip6_hopopts_input(plenp, rtalertp, mp, offp)
- u_int32_t *plenp;
- u_int32_t *rtalertp; /* XXX: should be stored more smart way */
- struct mbuf **mp;
- int *offp;
+ip6_hopopts_input(u_int32_t *plenp, u_int32_t *rtalertp,
+ struct mbuf **mp, int *offp)
{
struct mbuf *m = *mp;
int off = *offp, hbhlen;
@@ -870,12 +864,8 @@ ip6_hopopts_input(plenp, rtalertp, mp, offp)
* opthead + hbhlen is located in continuous memory region.
*/
int
-ip6_process_hopopts(m, opthead, hbhlen, rtalertp, plenp)
- struct mbuf *m;
- u_int8_t *opthead;
- int hbhlen;
- u_int32_t *rtalertp;
- u_int32_t *plenp;
+ip6_process_hopopts(struct mbuf *m, u_int8_t *opthead, int hbhlen,
+ u_int32_t *rtalertp, u_int32_t *plenp)
{
struct ip6_hdr *ip6;
int optlen = 0;
@@ -1007,10 +997,7 @@ ip6_process_hopopts(m, opthead, hbhlen, rtalertp, plenp)
* is not continuous in order to return an ICMPv6 error.
*/
int
-ip6_unknown_opt(optp, m, off)
- u_int8_t *optp;
- struct mbuf *m;
- int off;
+ip6_unknown_opt(u_int8_t *optp, struct mbuf *m, int off)
{
struct ip6_hdr *ip6;
@@ -1051,9 +1038,7 @@ ip6_unknown_opt(optp, m, off)
* very first mbuf on the mbuf chain.
*/
void
-ip6_savecontrol(in6p, m, mp)
- struct inpcb *in6p;
- struct mbuf *m, **mp;
+ip6_savecontrol(struct inpcb *in6p, struct mbuf *m, struct mbuf **mp)
{
#define IS2292(x, y) ((in6p->in6p_flags & IN6P_RFC2292) ? (x) : (y))
struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *);
@@ -1286,10 +1271,7 @@ ip6_savecontrol(in6p, m, mp)
}
void
-ip6_notify_pmtu(in6p, dst, mtu)
- struct inpcb *in6p;
- struct sockaddr_in6 *dst;
- u_int32_t *mtu;
+ip6_notify_pmtu(struct inpcb *in6p, struct sockaddr_in6 *dst, u_int32_t *mtu)
{
struct socket *so;
struct mbuf *m_mtu;
@@ -1331,10 +1313,7 @@ ip6_notify_pmtu(in6p, dst, mtu)
* contains the result, or NULL on error.
*/
static struct mbuf *
-ip6_pullexthdr(m, off, nxt)
- struct mbuf *m;
- size_t off;
- int nxt;
+ip6_pullexthdr(struct mbuf *m, size_t off, int nxt)
{
struct ip6_ext ip6e;
size_t elen;
@@ -1394,9 +1373,7 @@ ip6_pullexthdr(m, off, nxt)
* we develop `neater' mechanism to process extension headers.
*/
char *
-ip6_get_prevhdr(m, off)
- struct mbuf *m;
- int off;
+ip6_get_prevhdr(struct mbuf *m, int off)
{
struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *);
@@ -1435,11 +1412,7 @@ ip6_get_prevhdr(m, off)
* get next header offset. m will be retained.
*/
int
-ip6_nexthdr(m, off, proto, nxtp)
- struct mbuf *m;
- int off;
- int proto;
- int *nxtp;
+ip6_nexthdr(struct mbuf *m, int off, int proto, int *nxtp)
{
struct ip6_hdr ip6;
struct ip6_ext ip6e;
@@ -1514,11 +1487,7 @@ ip6_nexthdr(m, off, proto, nxtp)
* get offset for the last header in the chain. m will be kept untainted.
*/
int
-ip6_lasthdr(m, off, proto, nxtp)
- struct mbuf *m;
- int off;
- int proto;
- int *nxtp;
+ip6_lasthdr(struct mbuf *m, int off, int proto, int *nxtp)
{
int newoff;
int nxt;
@@ -1542,8 +1511,7 @@ ip6_lasthdr(m, off, proto, nxtp)
}
struct ip6aux *
-ip6_addaux(m)
- struct mbuf *m;
+ip6_addaux(struct mbuf *m)
{
struct m_tag *mtag;
@@ -1560,8 +1528,7 @@ ip6_addaux(m)
}
struct ip6aux *
-ip6_findaux(m)
- struct mbuf *m;
+ip6_findaux(struct mbuf *m)
{
struct m_tag *mtag;
@@ -1570,8 +1537,7 @@ ip6_findaux(m)
}
void
-ip6_delaux(m)
- struct mbuf *m;
+ip6_delaux(struct mbuf *m)
{
struct m_tag *mtag;
OpenPOWER on IntegriCloud