ANSIify function declarations
This commit is contained in:
parent
402f8626b1
commit
71ef63c98f
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ip_mroute.c,v 1.88 2005/02/02 21:41:55 perry Exp $ */
|
||||
/* $NetBSD: ip_mroute.c,v 1.89 2005/02/03 23:08:43 perry Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -93,7 +93,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ip_mroute.c,v 1.88 2005/02/02 21:41:55 perry Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ip_mroute.c,v 1.89 2005/02/03 23:08:43 perry Exp $");
|
||||
|
||||
#include "opt_inet.h"
|
||||
#include "opt_ipsec.h"
|
||||
@ -460,10 +460,7 @@ u_int32_t upcall_data[51];
|
||||
* Handle MRT setsockopt commands to modify the multicast routing tables.
|
||||
*/
|
||||
int
|
||||
ip_mrouter_set(so, optname, m)
|
||||
struct socket *so;
|
||||
int optname;
|
||||
struct mbuf **m;
|
||||
ip_mrouter_set(struct socket *so, int optname, struct mbuf **m)
|
||||
{
|
||||
int error;
|
||||
|
||||
@ -515,10 +512,7 @@ ip_mrouter_set(so, optname, m)
|
||||
* Handle MRT getsockopt commands
|
||||
*/
|
||||
int
|
||||
ip_mrouter_get(so, optname, m)
|
||||
struct socket *so;
|
||||
int optname;
|
||||
struct mbuf **m;
|
||||
ip_mrouter_get(struct socket *so, int optname, struct mbuf **m)
|
||||
{
|
||||
int error;
|
||||
|
||||
@ -557,10 +551,7 @@ ip_mrouter_get(so, optname, m)
|
||||
* Handle ioctl commands to obtain information from the cache
|
||||
*/
|
||||
int
|
||||
mrt_ioctl(so, cmd, data)
|
||||
struct socket *so;
|
||||
u_long cmd;
|
||||
caddr_t data;
|
||||
mrt_ioctl(struct socket *so, u_long cmd, caddr_t data)
|
||||
{
|
||||
int error;
|
||||
|
||||
@ -586,8 +577,7 @@ mrt_ioctl(so, cmd, data)
|
||||
* returns the packet, byte, rpf-failure count for the source group provided
|
||||
*/
|
||||
static int
|
||||
get_sg_cnt(req)
|
||||
struct sioc_sg_req *req;
|
||||
get_sg_cnt(struct sioc_sg_req *req)
|
||||
{
|
||||
int s;
|
||||
struct mfc *rt;
|
||||
@ -611,8 +601,7 @@ get_sg_cnt(req)
|
||||
* returns the input and output packet and byte counts on the vif provided
|
||||
*/
|
||||
static int
|
||||
get_vif_cnt(req)
|
||||
struct sioc_vif_req *req;
|
||||
get_vif_cnt(struct sioc_vif_req *req)
|
||||
{
|
||||
vifi_t vifi = req->vifi;
|
||||
|
||||
@ -631,9 +620,7 @@ get_vif_cnt(req)
|
||||
* Enable multicast routing
|
||||
*/
|
||||
static int
|
||||
ip_mrouter_init(so, m)
|
||||
struct socket *so;
|
||||
struct mbuf *m;
|
||||
ip_mrouter_init(struct socket *so, struct mbuf *m)
|
||||
{
|
||||
int *v;
|
||||
|
||||
@ -686,7 +673,7 @@ ip_mrouter_init(so, m)
|
||||
* Disable multicast routing
|
||||
*/
|
||||
int
|
||||
ip_mrouter_done()
|
||||
ip_mrouter_done(void)
|
||||
{
|
||||
vifi_t vifi;
|
||||
struct vif *vifp;
|
||||
@ -743,8 +730,7 @@ ip_mrouter_done()
|
||||
}
|
||||
|
||||
void
|
||||
ip_mrouter_detach(ifp)
|
||||
struct ifnet *ifp;
|
||||
ip_mrouter_detach(struct ifnet *ifp)
|
||||
{
|
||||
int vifi, i;
|
||||
struct vif *vifp;
|
||||
@ -770,8 +756,7 @@ ip_mrouter_detach(ifp)
|
||||
}
|
||||
|
||||
static int
|
||||
get_version(m)
|
||||
struct mbuf *m;
|
||||
get_version(struct mbuf *m)
|
||||
{
|
||||
int *v = mtod(m, int *);
|
||||
|
||||
@ -784,8 +769,7 @@ get_version(m)
|
||||
* Set PIM assert processing global
|
||||
*/
|
||||
static int
|
||||
set_assert(m)
|
||||
struct mbuf *m;
|
||||
set_assert(struct mbuf *m)
|
||||
{
|
||||
int *i;
|
||||
|
||||
@ -801,8 +785,7 @@ set_assert(m)
|
||||
* Get PIM assert processing global
|
||||
*/
|
||||
static int
|
||||
get_assert(m)
|
||||
struct mbuf *m;
|
||||
get_assert(struct mbuf *m)
|
||||
{
|
||||
int *i = mtod(m, int *);
|
||||
|
||||
@ -895,8 +878,7 @@ static struct sockaddr_in sin = { sizeof(sin), AF_INET };
|
||||
* Add a vif to the vif table
|
||||
*/
|
||||
static int
|
||||
add_vif(m)
|
||||
struct mbuf *m;
|
||||
add_vif(struct mbuf *m)
|
||||
{
|
||||
struct vifctl *vifcp;
|
||||
struct vif *vifp;
|
||||
@ -1035,8 +1017,7 @@ add_vif(m)
|
||||
}
|
||||
|
||||
void
|
||||
reset_vif(vifp)
|
||||
struct vif *vifp;
|
||||
reset_vif(struct vif *vifp)
|
||||
{
|
||||
struct mbuf *m, *n;
|
||||
struct ifnet *ifp;
|
||||
@ -1080,8 +1061,7 @@ reset_vif(vifp)
|
||||
* Delete a vif from the vif table
|
||||
*/
|
||||
static int
|
||||
del_vif(m)
|
||||
struct mbuf *m;
|
||||
del_vif(struct mbuf *m)
|
||||
{
|
||||
vifi_t *vifip;
|
||||
struct vif *vifp;
|
||||
@ -1157,8 +1137,7 @@ init_mfc_params(struct mfc *rt, struct mfcctl2 *mfccp)
|
||||
}
|
||||
|
||||
static void
|
||||
expire_mfc(rt)
|
||||
struct mfc *rt;
|
||||
expire_mfc(struct mfc *rt)
|
||||
{
|
||||
struct rtdetq *rte, *nrte;
|
||||
|
||||
@ -1178,8 +1157,7 @@ expire_mfc(rt)
|
||||
* Add an mfc entry
|
||||
*/
|
||||
static int
|
||||
add_mfc(m)
|
||||
struct mbuf *m;
|
||||
add_mfc(struct mbuf *m)
|
||||
{
|
||||
struct mfcctl2 mfcctl2;
|
||||
struct mfcctl2 *mfccp;
|
||||
@ -1325,8 +1303,7 @@ add_mfc(m)
|
||||
* collect delay statistics on the upcalls
|
||||
*/
|
||||
static void
|
||||
collate(t)
|
||||
struct timeval *t;
|
||||
collate(struct timeval *t)
|
||||
{
|
||||
u_int32_t d;
|
||||
struct timeval tp;
|
||||
@ -1350,8 +1327,7 @@ collate(t)
|
||||
* Delete an mfc entry
|
||||
*/
|
||||
static int
|
||||
del_mfc(m)
|
||||
struct mbuf *m;
|
||||
del_mfc(struct mbuf *m)
|
||||
{
|
||||
struct mfcctl2 mfcctl2;
|
||||
struct mfcctl2 *mfccp;
|
||||
@ -1401,10 +1377,7 @@ del_mfc(m)
|
||||
}
|
||||
|
||||
static int
|
||||
socket_send(s, mm, src)
|
||||
struct socket *s;
|
||||
struct mbuf *mm;
|
||||
struct sockaddr_in *src;
|
||||
socket_send(struct socket *s, struct mbuf *mm, struct sockaddr_in *src)
|
||||
{
|
||||
if (s) {
|
||||
if (sbappendaddr(&s->so_rcv, sintosa(src), mm,
|
||||
@ -1433,14 +1406,9 @@ socket_send(s, mm, src)
|
||||
|
||||
int
|
||||
#ifdef RSVP_ISI
|
||||
ip_mforward(m, ifp, imo)
|
||||
ip_mforward(struct mbuf *m, struct ifnet *ifp, struct ip_moptions *imo)
|
||||
#else
|
||||
ip_mforward(m, ifp)
|
||||
#endif /* RSVP_ISI */
|
||||
struct mbuf *m;
|
||||
struct ifnet *ifp;
|
||||
#ifdef RSVP_ISI
|
||||
struct ip_moptions *imo;
|
||||
ip_mforward(struct mbuf *m, struct ifnet *ifp)
|
||||
#endif /* RSVP_ISI */
|
||||
{
|
||||
struct ip *ip = mtod(m, struct ip *);
|
||||
@ -1685,8 +1653,7 @@ ip_mforward(m, ifp)
|
||||
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
expire_upcalls(v)
|
||||
void *v;
|
||||
expire_upcalls(void *v)
|
||||
{
|
||||
int i;
|
||||
int s;
|
||||
@ -1737,15 +1704,9 @@ expire_upcalls(v)
|
||||
*/
|
||||
static int
|
||||
#ifdef RSVP_ISI
|
||||
ip_mdq(m, ifp, rt, xmt_vif)
|
||||
ip_mdq(struct mbuf *m, struct ifnet *ifp, struct mfc *rt, vifi_t xmt_vif)
|
||||
#else
|
||||
ip_mdq(m, ifp, rt)
|
||||
#endif /* RSVP_ISI */
|
||||
struct mbuf *m;
|
||||
struct ifnet *ifp;
|
||||
struct mfc *rt;
|
||||
#ifdef RSVP_ISI
|
||||
vifi_t xmt_vif;
|
||||
ip_mdq(struct mbuf *m, struct ifnet *ifp, struct mfc *rt)
|
||||
#endif /* RSVP_ISI */
|
||||
{
|
||||
struct ip *ip = mtod(m, struct ip *);
|
||||
@ -1911,8 +1872,7 @@ ip_mdq(m, ifp, rt)
|
||||
* check if a vif number is legal/ok. This is used by ip_output.
|
||||
*/
|
||||
int
|
||||
legal_vif_num(vif)
|
||||
int vif;
|
||||
legal_vif_num(int vif)
|
||||
{
|
||||
if (vif >= 0 && vif < numvifs)
|
||||
return (1);
|
||||
@ -1922,10 +1882,7 @@ legal_vif_num(vif)
|
||||
#endif /* RSVP_ISI */
|
||||
|
||||
static void
|
||||
phyint_send(ip, vifp, m)
|
||||
struct ip *ip;
|
||||
struct vif *vifp;
|
||||
struct mbuf *m;
|
||||
phyint_send(struct ip *ip, struct vif *vifp, struct mbuf *m)
|
||||
{
|
||||
struct mbuf *mb_copy;
|
||||
int hlen = ip->ip_hl << 2;
|
||||
@ -1948,10 +1905,7 @@ phyint_send(ip, vifp, m)
|
||||
}
|
||||
|
||||
static void
|
||||
encap_send(ip, vifp, m)
|
||||
struct ip *ip;
|
||||
struct vif *vifp;
|
||||
struct mbuf *m;
|
||||
encap_send(struct ip *ip, struct vif *vifp, struct mbuf *m)
|
||||
{
|
||||
struct mbuf *mb_copy;
|
||||
struct ip *ip_copy;
|
||||
@ -2060,11 +2014,7 @@ vif_input(struct mbuf *m, ...)
|
||||
* Check if the packet should be grabbed by us.
|
||||
*/
|
||||
static int
|
||||
vif_encapcheck(m, off, proto, arg)
|
||||
const struct mbuf *m;
|
||||
int off;
|
||||
int proto;
|
||||
void *arg;
|
||||
vif_encapcheck(const struct mbuf *m, int off, int proto, void *arg)
|
||||
{
|
||||
struct vif *vifp;
|
||||
struct ip ip;
|
||||
@ -2109,11 +2059,7 @@ vif_encapcheck(m, off, proto, arg)
|
||||
* Token bucket filter module
|
||||
*/
|
||||
static void
|
||||
tbf_control(vifp, m, ip, len)
|
||||
struct vif *vifp;
|
||||
struct mbuf *m;
|
||||
struct ip *ip;
|
||||
u_int32_t len;
|
||||
tbf_control(struct vif *vifp, struct mbuf *m, struct ip *ip, u_int32_t len)
|
||||
{
|
||||
|
||||
if (len > MAX_BKT_SIZE) {
|
||||
@ -2157,9 +2103,7 @@ tbf_control(vifp, m, ip, len)
|
||||
* adds a packet to the queue at the interface
|
||||
*/
|
||||
static void
|
||||
tbf_queue(vifp, m)
|
||||
struct vif *vifp;
|
||||
struct mbuf *m;
|
||||
tbf_queue(struct vif *vifp, struct mbuf *m)
|
||||
{
|
||||
int s = splsoftnet();
|
||||
|
||||
@ -2176,8 +2120,7 @@ tbf_queue(vifp, m)
|
||||
* processes the queue at the interface
|
||||
*/
|
||||
static void
|
||||
tbf_process_q(vifp)
|
||||
struct vif *vifp;
|
||||
tbf_process_q(struct vif *vifp)
|
||||
{
|
||||
struct mbuf *m;
|
||||
int len;
|
||||
@ -2210,8 +2153,7 @@ tbf_process_q(vifp)
|
||||
}
|
||||
|
||||
static void
|
||||
tbf_reprocess_q(arg)
|
||||
void *arg;
|
||||
tbf_reprocess_q(void *arg)
|
||||
{
|
||||
struct vif *vifp = arg;
|
||||
|
||||
@ -2230,9 +2172,7 @@ tbf_reprocess_q(arg)
|
||||
* based on the precedence value and the priority
|
||||
*/
|
||||
static int
|
||||
tbf_dq_sel(vifp, ip)
|
||||
struct vif *vifp;
|
||||
struct ip *ip;
|
||||
tbf_dq_sel(struct vif *vifp, struct ip *ip)
|
||||
{
|
||||
u_int p;
|
||||
struct mbuf **mp, *m;
|
||||
@ -2259,9 +2199,7 @@ tbf_dq_sel(vifp, ip)
|
||||
}
|
||||
|
||||
static void
|
||||
tbf_send_packet(vifp, m)
|
||||
struct vif *vifp;
|
||||
struct mbuf *m;
|
||||
tbf_send_packet(struct vif *vifp, struct mbuf *m)
|
||||
{
|
||||
int error;
|
||||
int s = splsoftnet();
|
||||
@ -2298,8 +2236,7 @@ tbf_send_packet(vifp, m)
|
||||
* in milliseconds & update the no. of tokens in the bucket
|
||||
*/
|
||||
static void
|
||||
tbf_update_tokens(vifp)
|
||||
struct vif *vifp;
|
||||
tbf_update_tokens(struct vif *vifp)
|
||||
{
|
||||
struct timeval tp;
|
||||
u_int32_t tm;
|
||||
@ -2328,9 +2265,7 @@ tbf_update_tokens(vifp)
|
||||
}
|
||||
|
||||
static int
|
||||
priority(vifp, ip)
|
||||
struct vif *vifp;
|
||||
struct ip *ip;
|
||||
priority(struct vif *vifp, struct ip *ip)
|
||||
{
|
||||
int prio = 50; /* the lowest priority -- default case */
|
||||
|
||||
@ -2371,9 +2306,7 @@ priority(vifp, ip)
|
||||
*/
|
||||
#ifdef RSVP_ISI
|
||||
int
|
||||
ip_rsvp_vif_init(so, m)
|
||||
struct socket *so;
|
||||
struct mbuf *m;
|
||||
ip_rsvp_vif_init(struct socket *so, struct mbuf *m)
|
||||
{
|
||||
int vifi, s;
|
||||
|
||||
@ -2424,9 +2357,7 @@ ip_rsvp_vif_init(so, m)
|
||||
}
|
||||
|
||||
int
|
||||
ip_rsvp_vif_done(so, m)
|
||||
struct socket *so;
|
||||
struct mbuf *m;
|
||||
ip_rsvp_vif_done(struct socket *so, struct mbuf *m)
|
||||
{
|
||||
int vifi, s;
|
||||
|
||||
@ -2471,8 +2402,7 @@ ip_rsvp_vif_done(so, m)
|
||||
}
|
||||
|
||||
void
|
||||
ip_rsvp_force_done(so)
|
||||
struct socket *so;
|
||||
ip_rsvp_force_done(struct socket *so)
|
||||
{
|
||||
int vifi, s;
|
||||
|
||||
@ -2507,9 +2437,7 @@ ip_rsvp_force_done(so)
|
||||
}
|
||||
|
||||
void
|
||||
rsvp_input(m, ifp)
|
||||
struct mbuf *m;
|
||||
struct ifnet *ifp;
|
||||
rsvp_input(struct mbuf *m, struct ifnet *ifp)
|
||||
{
|
||||
int vifi, s;
|
||||
struct ip *ip = mtod(m, struct ip *);
|
||||
@ -3064,7 +2992,7 @@ unschedule_bw_meter(struct bw_meter *x)
|
||||
* looking at.
|
||||
*/
|
||||
static void
|
||||
bw_meter_process()
|
||||
bw_meter_process(void)
|
||||
{
|
||||
int s;
|
||||
static uint32_t last_tv_sec; /* last time we processed this */
|
||||
|
Loading…
Reference in New Issue
Block a user