diff options
Diffstat (limited to 'sys/netinet6/ip6_mroute.c')
-rw-r--r-- | sys/netinet6/ip6_mroute.c | 58 |
1 files changed, 16 insertions, 42 deletions
diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c index daab702..b2f6b08 100644 --- a/sys/netinet6/ip6_mroute.c +++ b/sys/netinet6/ip6_mroute.c @@ -407,8 +407,7 @@ X_mrt6_ioctl(int cmd, caddr_t data) * returns the packet, byte, rpf-failure count for the source group provided */ static int -get_sg_cnt(req) - struct sioc_sg_req6 *req; +get_sg_cnt(struct sioc_sg_req6 *req) { struct mf6c *rt; int s; @@ -433,8 +432,7 @@ get_sg_cnt(req) * returns the input and output packet and byte counts on the mif provided */ static int -get_mif6_cnt(req) - struct sioc_mif_req6 *req; +get_mif6_cnt(struct sioc_mif_req6 *req) { mifi_t mifi = req->mifi; @@ -450,8 +448,7 @@ get_mif6_cnt(req) } static int -set_pim6(i) - int *i; +set_pim6(int *i) { if ((*i != 1) && (*i != 0)) return (EINVAL); @@ -465,10 +462,7 @@ set_pim6(i) * Enable multicast routing */ static int -ip6_mrouter_init(so, v, cmd) - struct socket *so; - int v; - int cmd; +ip6_mrouter_init(struct socket *so, int v, int cmd) { #ifdef MRT6DEBUG if (mrt6debug) @@ -603,8 +597,7 @@ static struct sockaddr_in6 sin6 = { sizeof(sin6), AF_INET6 }; * Add a mif to the mif table */ static int -add_m6if(mifcp) - struct mif6ctl *mifcp; +add_m6if(struct mif6ctl *mifcp) { struct mif6 *mifp; struct ifnet *ifp; @@ -681,8 +674,7 @@ add_m6if(mifcp) * Delete a mif from the mif table */ static int -del_m6if(mifip) - mifi_t *mifip; +del_m6if(mifi_t *mifip) { struct mif6 *mifp = mif6table + *mifip; mifi_t mifi; @@ -736,8 +728,7 @@ del_m6if(mifip) * Add an mfc entry */ static int -add_m6fc(mfccp) - struct mf6cctl *mfccp; +add_m6fc(struct mf6cctl *mfccp) { struct mf6c *rt; u_long hash; @@ -899,8 +890,7 @@ add_m6fc(mfccp) * collect delay statistics on the upcalls */ static void -collate(t) - struct timeval *t; +collate(struct timeval *t) { u_long d; struct timeval tp; @@ -925,8 +915,7 @@ collate(t) * Delete an mfc entry */ static int -del_m6fc(mfccp) - struct mf6cctl *mfccp; +del_m6fc(struct mf6cctl *mfccp) { struct sockaddr_in6 origin; struct sockaddr_in6 mcastgrp; @@ -975,11 +964,9 @@ del_m6fc(mfccp) } static int -socket_send(s, mm, src) - struct socket *s; - struct mbuf *mm; - struct sockaddr_in6 *src; +socket_send(struct socket *s, struct mbuf *mm, struct sockaddr_in6 *src) { + if (s) { if (sbappendaddr(&s->so_rcv, (struct sockaddr *)src, @@ -1010,7 +997,6 @@ socket_send(s, mm, src) * that if this function is called from somewhere else in the originating * context in the future. */ - int X_ip6_mforward(struct ip6_hdr *ip6, struct ifnet *ifp, struct mbuf *m) { @@ -1277,8 +1263,7 @@ X_ip6_mforward(struct ip6_hdr *ip6, struct ifnet *ifp, struct mbuf *m) * Call from the Slow Timeout mechanism, every half second. */ static void -expire_upcalls(unused) - void *unused; +expire_upcalls(void *unused) { struct rtdetq *rte; struct mf6c *mfc, **nptr; @@ -1338,10 +1323,7 @@ expire_upcalls(unused) * Packet forwarding routine once entry in the cache is made */ static int -ip6_mdq(m, ifp, rt) - struct mbuf *m; - struct ifnet *ifp; - struct mf6c *rt; +ip6_mdq(struct mbuf *m, struct ifnet *ifp, struct mf6c *rt) { struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *); mifi_t mifi, iif; @@ -1519,10 +1501,7 @@ ip6_mdq(m, ifp, rt) } static void -phyint_send(ip6, mifp, m) - struct ip6_hdr *ip6; - struct mif6 *mifp; - struct mbuf *m; +phyint_send(struct ip6_hdr *ip6, struct mif6 *mifp, struct mbuf *m) { struct mbuf *mb_copy; struct ifnet *ifp = mifp->m6_ifp; @@ -1637,10 +1616,7 @@ phyint_send(ip6, mifp, m) } static int -register_send(ip6, mif, m) - struct ip6_hdr *ip6; - struct mif6 *mif; - struct mbuf *m; +register_send(struct ip6_hdr *ip6, struct mif6 *mif, struct mbuf *m) { struct mbuf *mm; int i, len = m->m_pkthdr.len; @@ -1712,9 +1688,7 @@ register_send(ip6, mif, m) * is stripped off, and the inner packet is passed to register_mforward. */ int -pim6_input(mp, offp, proto) - struct mbuf **mp; - int *offp, proto; +pim6_input(struct mbuf **mp, int *offp, int proto) { struct pim *pim; /* pointer to a pim struct */ struct ip6_hdr *ip6; |