Stop using old-style function definitions.

This commit is contained in:
Ralf Corsepius
2008-09-01 06:36:17 +00:00
parent 084492f769
commit dd967330f8
16 changed files with 198 additions and 461 deletions

View File

@@ -122,8 +122,7 @@ static void in_arpinput(struct mbuf *);
*/
/* ARGSUSED */
static void
arptimer(ignored_arg)
void *ignored_arg;
arptimer(void *ignored_arg)
{
int s = splnet();
struct llinfo_arp *la, *ola;
@@ -143,10 +142,7 @@ arptimer(ignored_arg)
* Parallel to llc_rtrequest.
*/
static void
arp_rtrequest(req, rt, sa)
int req;
struct rtentry *rt;
struct sockaddr *sa;
arp_rtrequest(int req, struct rtentry *rt, struct sockaddr *sa)
{
struct sockaddr *gate;
struct llinfo_arp *la;
@@ -278,10 +274,7 @@ arp_rtrequest(req, rt, sa)
* - arp header source ethernet address
*/
static void
arprequest(ac, sip, tip, enaddr)
struct arpcom *ac;
u_long *sip, *tip;
u_char *enaddr;
arprequest(struct arpcom *ac, u_long *sip, u_long *tip, u_char *enaddr)
{
struct mbuf *m;
struct ether_header *eh;
@@ -322,13 +315,13 @@ arprequest(ac, sip, tip, enaddr)
* taken over here, either now or for later transmission.
*/
int
arpresolve(ac, rt, m, dst, desten, rt0)
struct arpcom *ac;
struct rtentry *rt;
struct mbuf *m;
struct sockaddr *dst;
u_char *desten;
struct rtentry *rt0;
arpresolve(
struct arpcom *ac,
struct rtentry *rt,
struct mbuf *m,
struct sockaddr *dst,
u_char *desten,
struct rtentry *rt0)
{
struct llinfo_arp *la = 0;
struct sockaddr_dl *sdl;
@@ -442,8 +435,7 @@ NETISR_SET(NETISR_ARP, arpintr);
* but formerly didn't normally send requests.
*/
static void
in_arpinput(m)
struct mbuf *m;
in_arpinput(struct mbuf *m)
{
struct ether_arp *ea;
struct arpcom *ac = (struct arpcom *)m->m_pkthdr.rcvif;
@@ -583,8 +575,7 @@ reply:
* Free an arp entry.
*/
static void
arptfree(la)
struct llinfo_arp *la;
arptfree(struct llinfo_arp *la)
{
struct rtentry *rt = la->la_rt;
struct sockaddr_dl *sdl;
@@ -604,9 +595,7 @@ arptfree(la)
* Lookup or enter a new address in arptab.
*/
static struct llinfo_arp *
arplookup(addr, create, proxy)
u_long addr;
int create, proxy;
arplookup(u_long addr, int create, int proxy)
{
struct rtentry *rt;
static struct sockaddr_inarp sin = {sizeof(sin), AF_INET };
@@ -639,9 +628,7 @@ arplookup(addr, create, proxy)
}
void
arp_ifinit(ac, ifa)
struct arpcom *ac;
struct ifaddr *ifa;
arp_ifinit(struct arpcom *ac, struct ifaddr *ifa)
{
if (ntohl(IA_SIN(ifa)->sin_addr.s_addr) != INADDR_ANY)
arprequest(ac, &(IA_SIN(ifa)->sin_addr.s_addr),

View File

@@ -81,7 +81,7 @@ static struct router_info *Head;
static void igmp_sendpkt(struct in_multi *, int, unsigned long);
void
igmp_init()
igmp_init(void)
{
struct ipoption *ra;
@@ -109,8 +109,7 @@ igmp_init()
}
static struct router_info *
find_rti(ifp)
struct ifnet *ifp;
find_rti(struct ifnet *ifp)
{
register struct router_info *rti = Head;
@@ -139,9 +138,7 @@ find_rti(ifp)
}
void
igmp_input(m, iphlen)
register struct mbuf *m;
register int iphlen;
igmp_input(struct mbuf *m, int iphlen)
{
register struct igmp *igmp;
register struct ip *ip;
@@ -330,8 +327,7 @@ igmp_input(m, iphlen)
}
void
igmp_joingroup(inm)
struct in_multi *inm;
igmp_joingroup(struct in_multi *inm)
{
int s = splnet();
@@ -351,8 +347,7 @@ igmp_joingroup(inm)
}
void
igmp_leavegroup(inm)
struct in_multi *inm;
igmp_leavegroup(struct in_multi *inm)
{
if (inm->inm_state == IGMP_IREPORTEDLAST &&
inm->inm_addr.s_addr != igmp_all_hosts_group &&
@@ -362,7 +357,7 @@ igmp_leavegroup(inm)
}
void
igmp_fasttimo()
igmp_fasttimo(void)
{
register struct in_multi *inm;
struct in_multistep step;
@@ -394,7 +389,7 @@ igmp_fasttimo()
}
void
igmp_slowtimo()
igmp_slowtimo(void)
{
int s = splnet();
register struct router_info *rti = Head;
@@ -420,10 +415,7 @@ igmp_slowtimo()
static struct route igmprt;
static void
igmp_sendpkt(inm, type, addr)
struct in_multi *inm;
int type;
unsigned long addr;
igmp_sendpkt(struct in_multi *inm, int type, unsigned long addr)
{
struct mbuf *m;
struct igmp *igmp;

View File

@@ -78,8 +78,7 @@ SYSCTL_INT(_net_inet_ip, OID_AUTO, subnets_are_local, CTLFLAG_RW,
* Otherwise, it includes only the directly-connected (sub)nets.
*/
int
in_localaddr(in)
struct in_addr in;
in_localaddr(struct in_addr in)
{
register u_long i = ntohl(in.s_addr);
register struct in_ifaddr *ia;
@@ -102,8 +101,7 @@ in_localaddr(in)
* may be forwarded.
*/
int
in_canforward(in)
struct in_addr in;
in_canforward(struct in_addr in)
{
register u_long i = ntohl(in.s_addr);
register u_long net;
@@ -122,8 +120,7 @@ in_canforward(in)
* Trim a mask in a sockaddr
*/
static void
in_socktrim(ap)
struct sockaddr_in *ap;
in_socktrim(struct sockaddr_in *ap)
{
register char *cplim = (char *) &ap->sin_addr;
register char *cp = (char *) (&ap->sin_addr + 1);
@@ -142,13 +139,8 @@ static int in_interfaces; /* number of external internet interfaces */
* Generic internet control operations (ioctl's).
* Ifp is 0 if not an interface-specific ioctl.
*/
/* ARGSUSED */
int
in_control(so, cmd, data, ifp)
struct socket *so;
u_long cmd;
caddr_t data;
register struct ifnet *ifp;
in_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp)
{
register struct ifreq *ifr = (struct ifreq *)data;
register struct in_ifaddr *ia = 0, *iap;
@@ -449,9 +441,7 @@ in_control(so, cmd, data, ifp)
* Delete any existing route for an interface.
*/
static void
in_ifscrub(ifp, ia)
register struct ifnet *ifp;
register struct in_ifaddr *ia;
in_ifscrub(struct ifnet *ifp, struct in_ifaddr *ia)
{
if ((ia->ia_flags & IFA_ROUTE) == 0)
@@ -468,11 +458,8 @@ in_ifscrub(ifp, ia)
* and routing table entry.
*/
static int
in_ifinit(ifp, ia, sin, scrub)
register struct ifnet *ifp;
register struct in_ifaddr *ia;
struct sockaddr_in *sin;
int scrub;
in_ifinit(struct ifnet *ifp, struct in_ifaddr *ia, struct sockaddr_in *sin,
int scrub)
{
register u_long i = ntohl(sin->sin_addr.s_addr);
struct sockaddr_in oldaddr;
@@ -580,9 +567,7 @@ in_ifinit(ifp, ia, sin, scrub)
* Return 1 if the address might be a local broadcast address.
*/
int
in_broadcast(in, ifp)
struct in_addr in;
struct ifnet *ifp;
in_broadcast(struct in_addr in, struct ifnet *ifp)
{
register struct ifaddr *ifa;
u_long t;
@@ -620,9 +605,7 @@ in_broadcast(in, ifp)
* Add an address to the list of IP multicast addresses for a given interface.
*/
struct in_multi *
in_addmulti(ap, ifp)
register struct in_addr *ap;
register struct ifnet *ifp;
in_addmulti(struct in_addr *ap, struct ifnet *ifp)
{
register struct in_multi *inm;
struct ifreq ifr;
@@ -690,8 +673,7 @@ in_addmulti(ap, ifp)
* Delete a multicast address record.
*/
void
in_delmulti(inm)
register struct in_multi *inm;
in_delmulti(struct in_multi *inm)
{
struct ifreq ifr;
int s = splnet();

View File

@@ -113,9 +113,7 @@ SYSCTL_PROC(_net_inet_ip_portrange, OID_AUTO, hilast, CTLTYPE_INT|CTLFLAG_RW,
&ipport_hilastauto, 0, &sysctl_net_ipport_check, "I", "");
int
in_pcballoc(so, pcbinfo)
struct socket *so;
struct inpcbinfo *pcbinfo;
in_pcballoc(struct socket *so, struct inpcbinfo *pcbinfo)
{
register struct inpcb *inp;
int s;
@@ -137,9 +135,7 @@ in_pcballoc(so, pcbinfo)
}
int
in_pcbbind(inp, nam)
register struct inpcb *inp;
struct mbuf *nam;
in_pcbbind(struct inpcb *inp, struct mbuf *nam)
{
register struct socket *so = inp->inp_socket;
unsigned short *lastport;
@@ -283,10 +279,7 @@ in_pcbbind(inp, nam)
*/
int
in_pcbladdr(inp, nam, plocal_sin)
register struct inpcb *inp;
struct mbuf *nam;
struct sockaddr_in **plocal_sin;
in_pcbladdr(struct inpcb *inp, struct mbuf *nam, struct sockaddr_in **plocal_sin)
{
struct in_ifaddr *ia;
register struct sockaddr_in *sin = mtod(nam, struct sockaddr_in *);
@@ -399,9 +392,7 @@ in_pcbladdr(inp, nam, plocal_sin)
* then pick one.
*/
int
in_pcbconnect(inp, nam)
register struct inpcb *inp;
struct mbuf *nam;
in_pcbconnect(struct inpcb *inp, struct mbuf *nam)
{
struct sockaddr_in *ifaddr;
register struct sockaddr_in *sin = mtod(nam, struct sockaddr_in *);
@@ -429,8 +420,7 @@ in_pcbconnect(inp, nam)
}
void
in_pcbdisconnect(inp)
struct inpcb *inp;
in_pcbdisconnect(struct inpcb *inp)
{
inp->inp_faddr.s_addr = INADDR_ANY;
@@ -441,8 +431,7 @@ in_pcbdisconnect(inp)
}
void
in_pcbdetach(inp)
struct inpcb *inp;
in_pcbdetach(struct inpcb *inp)
{
struct socket *so = inp->inp_socket;
struct inpcbinfo *ipi = inp->inp_pcbinfo;
@@ -464,9 +453,7 @@ in_pcbdetach(inp)
}
void
in_setsockaddr(inp, nam)
register struct inpcb *inp;
struct mbuf *nam;
in_setsockaddr(struct inpcb *inp, struct mbuf *nam)
{
register struct sockaddr_in *sin;
@@ -480,9 +467,7 @@ in_setsockaddr(inp, nam)
}
void
in_setpeeraddr(inp, nam)
struct inpcb *inp;
struct mbuf *nam;
in_setpeeraddr(struct inpcb *inp, struct mbuf *nam)
{
register struct sockaddr_in *sin;
@@ -507,13 +492,9 @@ in_setpeeraddr(inp, nam)
* Must be called at splnet.
*/
void
in_pcbnotify(head, dst, fport_arg, laddr, lport_arg, cmd, notify)
struct inpcbhead *head;
struct sockaddr *dst;
u_int fport_arg, lport_arg;
struct in_addr laddr;
int cmd;
void (*notify)(struct inpcb *, int);
in_pcbnotify(struct inpcbhead *head, struct sockaddr *dst, u_int fport_arg,
struct in_addr laddr, u_int lport_arg, int cmd,
void (*notify)(struct inpcb *, int))
{
register struct inpcb *inp, *oinp;
struct in_addr faddr;
@@ -566,8 +547,7 @@ in_pcbnotify(head, dst, fport_arg, laddr, lport_arg, cmd, notify)
* (by a redirect), time to try a default gateway again.
*/
void
in_losing(inp)
struct inpcb *inp;
in_losing(struct inpcb *inp)
{
register struct rtentry *rt;
struct rt_addrinfo info;
@@ -598,9 +578,7 @@ in_losing(inp)
* and allocate a (hopefully) better one.
*/
static void
in_rtchange(inp, errnum)
register struct inpcb *inp;
int errnum;
in_rtchange(struct inpcb *inp, int errnum)
{
if (inp->inp_route.ro_rt) {
rtfree(inp->inp_route.ro_rt);
@@ -613,11 +591,10 @@ in_rtchange(inp, errnum)
}
struct inpcb *
in_pcblookup(pcbinfo, faddr, fport_arg, laddr, lport_arg, wild_okay)
struct inpcbinfo *pcbinfo;
struct in_addr faddr, laddr;
u_int fport_arg, lport_arg;
int wild_okay;
in_pcblookup(struct inpcbinfo *pcbinfo,
struct in_addr faddr, u_int fport_arg,
struct in_addr laddr, u_int lport_arg,
int wild_okay)
{
register struct inpcb *inp, *match = NULL;
int matchwild = 3, wildcard;
@@ -667,11 +644,10 @@ in_pcblookup(pcbinfo, faddr, fport_arg, laddr, lport_arg, wild_okay)
* Lookup PCB in hash list.
*/
struct inpcb *
in_pcblookuphash(pcbinfo, faddr, fport_arg, laddr, lport_arg, wildcard)
struct inpcbinfo *pcbinfo;
struct in_addr faddr, laddr;
u_int fport_arg, lport_arg;
int wildcard;
in_pcblookuphash(struct inpcbinfo *pcbinfo,
struct in_addr faddr, u_int fport_arg,
struct in_addr laddr, u_int lport_arg,
int wildcard)
{
struct inpcbhead *head;
register struct inpcb *inp;
@@ -730,8 +706,7 @@ found:
* Insert PCB into hash chain. Must be called at splnet.
*/
static void
in_pcbinshash(inp)
struct inpcb *inp;
in_pcbinshash(struct inpcb *inp)
{
struct inpcbhead *head;
@@ -742,8 +717,7 @@ in_pcbinshash(inp)
}
void
in_pcbrehash(inp)
struct inpcb *inp;
in_pcbrehash(struct inpcb *inp)
{
struct inpcbhead *head;
int s;

View File

@@ -108,11 +108,8 @@ unsigned int icmplenPanicAvoided;
* in response to bad packet ip.
*/
void
icmp_error(n, type, code, dest, destifp)
struct mbuf *n;
int type, code;
n_long dest;
struct ifnet *destifp;
icmp_error(struct mbuf *n, int type, int code, n_long dest,
struct ifnet *destifp)
{
register struct ip *oip = mtod(n, struct ip *), *nip;
#ifdef _IP_VHL
@@ -226,9 +223,7 @@ static struct sockaddr_in icmpgw = { sizeof (struct sockaddr_in), AF_INET };
* Process a received ICMP message.
*/
void
icmp_input(m, off)
struct mbuf *m;
int off;
icmp_input(struct mbuf *m, int off)
{
struct icmp *icp;
struct in_ifaddr *ia;
@@ -550,8 +545,7 @@ freeit:
* Reflect the ip packet back to the source
*/
static void
icmp_reflect(m)
struct mbuf *m;
icmp_reflect(struct mbuf *m)
{
struct ip *ip = mtod(m, struct ip *);
struct in_ifaddr *ia;
@@ -686,9 +680,7 @@ done:
* after supplying a checksum.
*/
static void
icmp_send(m, opts)
register struct mbuf *m;
struct mbuf *opts;
icmp_send(struct mbuf *m, struct mbuf *opts)
{
register struct ip *ip = mtod(m, struct ip *);
register int hlen;
@@ -722,7 +714,7 @@ icmp_send(m, opts)
}
n_time
iptime()
iptime(void)
{
struct timeval atv;
u_long t;
@@ -738,9 +730,7 @@ iptime()
* is returned; otherwise, a smaller value is returned.
*/
int
ip_next_mtu(mtu, dir)
int mtu;
int dir;
ip_next_mtu(int mtu, int dir)
{
static int mtutab[] = {
65535, 32000, 17914, 8166, 4352, 2002, 1492, 1280, 1006, 508,

View File

@@ -184,7 +184,7 @@ void ipintr(void);
* All protocols not implemented in kernel go to raw IP protocol handler.
*/
void
ip_init()
ip_init(void)
{
register struct protosw *pr;
register int i;
@@ -619,10 +619,7 @@ NETISR_SET(NETISR_IP, ipintr);
* is given as fp; otherwise have to make a chain.
*/
static struct ip *
ip_reass(ip, fp, where)
register struct ipasfrag *ip;
register struct ipq *fp;
struct ipq *where;
ip_reass(struct ipasfrag *ip, struct ipq *fp, struct ipq *where)
{
register struct mbuf *m = dtom(ip);
register struct ipasfrag *q;
@@ -800,8 +797,7 @@ dropfrag:
* associated datagrams.
*/
static void
ip_freef(fp)
struct ipq *fp;
ip_freef(struct ipq *fp)
{
register struct ipasfrag *q, *p;
@@ -820,8 +816,7 @@ ip_freef(fp)
* Like insque, but pointers in middle of structure.
*/
static void
ip_enq(p, prev)
register struct ipasfrag *p, *prev;
ip_enq(struct ipasfrag *p, struct ipasfrag *prev)
{
p->ipf_prev = prev;
@@ -834,8 +829,7 @@ ip_enq(p, prev)
* To ip_enq as remque is to insque.
*/
static void
ip_deq(p)
register struct ipasfrag *p;
ip_deq(struct ipasfrag *p)
{
p->ipf_prev->ipf_next = p->ipf_next;
@@ -848,7 +842,7 @@ ip_deq(p)
* queue, discard it.
*/
void
ip_slowtimo()
ip_slowtimo(void)
{
register struct ipq *fp;
int s = splnet();
@@ -874,7 +868,7 @@ ip_slowtimo()
* Drain off all datagram fragments.
*/
void
ip_drain()
ip_drain(void)
{
int i;
@@ -895,8 +889,7 @@ ip_drain()
* 0 if the packet should be processed further.
*/
static int
ip_dooptions(m)
struct mbuf *m;
ip_dooptions(struct mbuf *m)
{
register struct ip *ip = mtod(m, struct ip *);
register u_char *cp;
@@ -1114,8 +1107,7 @@ bad:
* return internet address info of interface to be used to get there.
*/
static struct in_ifaddr *
ip_rtaddr(dst)
struct in_addr dst;
ip_rtaddr(struct in_addr dst)
{
struct sockaddr_in *sin;
@@ -1142,9 +1134,7 @@ ip_rtaddr(dst)
* to be picked up later by ip_srcroute if the receiver is interested.
*/
void
save_rte(option, dst)
u_char *option;
struct in_addr dst;
save_rte(u_char *option, struct in_addr dst)
{
unsigned olen;
@@ -1166,7 +1156,7 @@ save_rte(option, dst)
* The first hop is placed before the options, will be removed later.
*/
struct mbuf *
ip_srcroute()
ip_srcroute(void)
{
register struct in_addr *p, *q;
register struct mbuf *m;
@@ -1237,9 +1227,7 @@ ip_srcroute()
* XXX should be deleted; last arg currently ignored.
*/
void
ip_stripoptions(m, mopt)
register struct mbuf *m;
struct mbuf *mopt;
ip_stripoptions(struct mbuf *m, struct mbuf *mopt)
{
register int i;
struct ip *ip = mtod(m, struct ip *);
@@ -1422,11 +1410,8 @@ ip_forward(struct mbuf *m, int srcrt)
}
void
ip_savecontrol(inp, mp, ip, m)
register struct inpcb *inp;
register struct mbuf **mp;
register struct ip *ip;
register struct mbuf *m;
ip_savecontrol(struct inpcb *inp, struct mbuf **mp, struct ip *ip,
struct mbuf *m)
{
if (inp->inp_socket->so_options & SO_TIMESTAMP) {
struct timeval tv;

View File

@@ -75,10 +75,7 @@ struct socket *ip_mrouter = NULL;
u_int rsvpdebug = 0;
int
_ip_mrouter_set(cmd, so, m)
int cmd;
struct socket *so;
struct mbuf *m;
_ip_mrouter_set(int cmd, struct socket *so, struct mbuf *m)
{
return(EOPNOTSUPP);
}
@@ -87,10 +84,7 @@ int (*ip_mrouter_set)(int, struct socket *, struct mbuf *) = _ip_mrouter_set;
int
_ip_mrouter_get(cmd, so, m)
int cmd;
struct socket *so;
struct mbuf **m;
_ip_mrouter_get(int cmd, struct socket *so, struct mbuf **m)
{
return(EOPNOTSUPP);
}
@@ -98,7 +92,7 @@ _ip_mrouter_get(cmd, so, m)
int (*ip_mrouter_get)(int, struct socket *, struct mbuf **) = _ip_mrouter_get;
int
_ip_mrouter_done()
_ip_mrouter_done(void)
{
return(0);
}
@@ -106,11 +100,8 @@ _ip_mrouter_done()
int (*ip_mrouter_done)(void) = _ip_mrouter_done;
int
_ip_mforward(ip, ifp, m, imo)
struct ip *ip;
struct ifnet *ifp;
struct mbuf *m;
struct ip_moptions *imo;
_ip_mforward(struct ip *ip, struct ifnet *ifp, struct mbuf *m,
struct ip_moptions *imo)
{
return(0);
}
@@ -127,9 +118,7 @@ _mrt_ioctl(int req, caddr_t data, struct proc *p)
int (*mrt_ioctl)(int, caddr_t, struct proc *) = _mrt_ioctl;
void
rsvp_input(m, iphlen) /* XXX must fixup manually */
struct mbuf *m;
int iphlen;
rsvp_input(struct mbuf *m, int iphlen)
{
/* Can still get packets with rsvp_on = 0 if there is a local member
* of the group to which the RSVP packet is addressed. But in this
@@ -150,7 +139,8 @@ rsvp_input(m, iphlen) /* XXX must fixup manually */
m_freem(m);
}
void ipip_input(struct mbuf *m, int iphlen) { /* XXX must fixup manually */
void ipip_input(struct mbuf *m, int iphlen)
{ /* XXX must fixup manually */
rip_input(m, iphlen);
}
@@ -166,24 +156,19 @@ _ip_mcast_src(int vifi) { return INADDR_ANY; }
u_long (*ip_mcast_src)(int) = _ip_mcast_src;
int
ip_rsvp_vif_init(so, m)
struct socket *so;
struct mbuf *m;
ip_rsvp_vif_init(struct socket *so, struct mbuf *m)
{
return(EINVAL);
}
int
ip_rsvp_vif_done(so, m)
struct socket *so;
struct mbuf *m;
ip_rsvp_vif_done(struct socket *so, struct mbuf *m)
{
return(EINVAL);
}
void
ip_rsvp_force_done(so)
struct socket *so;
ip_rsvp_force_done(struct socket *so)
{
return;
}
@@ -389,10 +374,7 @@ static void collate(struct timeval *);
* Handle MRT setsockopt commands to modify the multicast routing tables.
*/
static int
X_ip_mrouter_set(cmd, so, m)
int cmd;
struct socket *so;
struct mbuf *m;
X_ip_mrouter_set(int cmd, struct socket *so, struct mbuf *m)
{
if (cmd != MRT_INIT && so != ip_mrouter) return EACCES;
@@ -416,10 +398,7 @@ int (*ip_mrouter_set)(int, struct socket *, struct mbuf *) = X_ip_mrouter_set;
* Handle MRT getsockopt commands
*/
static int
X_ip_mrouter_get(cmd, so, m)
int cmd;
struct socket *so;
struct mbuf **m;
X_ip_mrouter_get(int cmd, struct socket *so, struct mbuf **m)
{
struct mbuf *mb;
@@ -442,9 +421,7 @@ int (*ip_mrouter_get)(int, struct socket *, struct mbuf **) = X_ip_mrouter_get;
* Handle ioctl commands to obtain information from the cache
*/
static int
X_mrt_ioctl(cmd, data)
int cmd;
caddr_t data;
X_mrt_ioctl(int cmd, caddr_t data)
{
int error = 0;
@@ -470,8 +447,7 @@ int (*mrt_ioctl)(int, caddr_t) = X_mrt_ioctl;
* returns the packet, byte, rpf-failure count for the source group provided
*/
static int
get_sg_cnt(req)
register struct sioc_sg_req *req;
get_sg_cnt(struct sioc_sg_req *req)
{
register struct mfc *rt;
int s;
@@ -493,8 +469,7 @@ get_sg_cnt(req)
* returns the input and output packet and byte counts on the vif provided
*/
static int
get_vif_cnt(req)
register struct sioc_vif_req *req;
get_vif_cnt(struct sioc_vif_req *req)
{
register vifi_t vifi = req->vifi;
@@ -512,9 +487,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;
@@ -553,7 +526,7 @@ ip_mrouter_init(so, m)
* Disable multicast routing
*/
static int
X_ip_mrouter_done()
X_ip_mrouter_done(void)
{
vifi_t vifi;
int i;
@@ -630,8 +603,7 @@ int (*ip_mrouter_done)(void) = X_ip_mrouter_done;
#endif
static int
get_version(mb)
struct mbuf *mb;
get_version(struct mbuf *mb)
{
int *v;
@@ -647,8 +619,7 @@ get_version(mb)
* Set PIM assert processing global
*/
static int
set_assert(i)
int *i;
set_assert(int *i)
{
if ((*i != 1) && (*i != 0))
return EINVAL;
@@ -662,8 +633,7 @@ set_assert(i)
* Get PIM assert processing global
*/
static int
get_assert(m)
struct mbuf *m;
get_assert(struct mbuf *m)
{
int *i;
@@ -678,8 +648,7 @@ get_assert(m)
* Add a vif to the vif table
*/
static int
add_vif(vifcp)
register struct vifctl *vifcp;
add_vif(struct vifctl *vifcp)
{
register struct vif *vifp = viftable + vifcp->vifc_vifi;
static struct sockaddr_in sin = {sizeof sin, AF_INET};
@@ -782,8 +751,7 @@ add_vif(vifcp)
* Delete a vif from the vif table
*/
static int
del_vif(vifip)
vifi_t *vifip;
del_vif(vifi_t *vifip)
{
register struct vif *vifp = viftable + *vifip;
register vifi_t vifi;
@@ -838,8 +806,7 @@ del_vif(vifip)
* Add an mfc entry
*/
static int
add_mfc(mfccp)
struct mfcctl *mfccp;
add_mfc(struct mfcctl *mfccp)
{
struct mfc *rt;
register struct mbuf *mb_rt;
@@ -992,8 +959,7 @@ add_mfc(mfccp)
/*
* collect delay statistics on the upcalls
*/
static void collate(t)
register struct timeval *t;
static void collate(struct timeval *t)
{
register u_long d;
register struct timeval tp;
@@ -1018,8 +984,7 @@ register struct timeval *t;
* Delete an mfc entry
*/
static int
del_mfc(mfccp)
struct mfcctl *mfccp;
del_mfc(struct mfcctl *mfccp)
{
struct in_addr origin;
struct in_addr mcastgrp;
@@ -1065,10 +1030,7 @@ del_mfc(mfccp)
* Send a message to mrouted on the multicast routing socket
*/
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,
@@ -1097,11 +1059,8 @@ socket_send(s, mm, src)
#define TUNNEL_LEN 12 /* # bytes of IP option for tunnel encapsulation */
static int
X_ip_mforward(ip, ifp, m, imo)
register struct ip *ip;
struct ifnet *ifp;
struct mbuf *m;
struct ip_moptions *imo;
X_ip_mforward(struct ip *ip, struct ifnet *ifp, struct mbuf *m,
struct ip_moptions *imo)
{
register struct mfc *rt;
register u_char *ipoptions;
@@ -1386,11 +1345,8 @@ expire_upcalls(void *unused)
* Packet forwarding routine once entry in the cache is made
*/
static int
ip_mdq(m, ifp, rt, xmt_vif)
register struct mbuf *m;
register struct ifnet *ifp;
register struct mfc *rt;
register vifi_t xmt_vif;
ip_mdq(struct mbuf *m, struct ifnet *ifp, struct mfc *rt,
vifi_t xmt_vif)
{
register struct ip *ip = mtod(m, struct ip *);
register vifi_t vifi;
@@ -1505,8 +1461,7 @@ ip_mdq(m, ifp, rt, xmt_vif)
* numvifs there,
*/
static int
X_legal_vif_num(vif)
int vif;
X_legal_vif_num(int vif)
{
if (vif >= 0 && vif < numvifs)
return(1);
@@ -1522,8 +1477,7 @@ int (*legal_vif_num)(int) = X_legal_vif_num;
* Return the local address used by this vif
*/
static u_long
X_ip_mcast_src(vifi)
int vifi;
X_ip_mcast_src(int vifi)
{
if (vifi >= 0 && vifi < numvifs)
return viftable[vifi].v_lcl_addr.s_addr;
@@ -1536,10 +1490,7 @@ u_long (*ip_mcast_src)(int) = X_ip_mcast_src;
#endif
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)
{
register struct mbuf *mb_copy;
register int hlen = ip->ip_hl << 2;
@@ -1562,10 +1513,7 @@ phyint_send(ip, vifp, m)
}
static void
encap_send(ip, vifp, m)
register struct ip *ip;
register struct vif *vifp;
register struct mbuf *m;
encap_send(struct ip *ip, struct vif *vifp, struct mbuf *m)
{
register struct mbuf *mb_copy;
register struct ip *ip_copy;
@@ -1629,12 +1577,10 @@ encap_send(ip, vifp, m)
*/
void
#ifdef MROUTE_LKM
X_ipip_input(m, iphlen)
X_ipip_input(struct mbuf *m, int iphlen)
#else
ipip_input(m, iphlen)
ipip_input(struct mbuf *m, int iphlen)
#endif
register struct mbuf *m;
int iphlen;
{
struct ifnet *ifp = m->m_pkthdr.rcvif;
register struct ip *ip = mtod(m, struct ip *);
@@ -1715,11 +1661,7 @@ ipip_input(m, iphlen)
*/
static void
tbf_control(vifp, m, ip, p_len)
register struct vif *vifp;
register struct mbuf *m;
register struct ip *ip;
register u_long p_len;
tbf_control(struct vif *vifp, struct mbuf *m, struct ip *ip, u_long p_len)
{
register struct tbf *t = vifp->v_tbf;
@@ -1769,9 +1711,7 @@ tbf_control(vifp, m, ip, p_len)
* adds a packet to the queue at the interface
*/
static void
tbf_queue(vifp, m)
register struct vif *vifp;
register struct mbuf *m;
tbf_queue(struct vif *vifp, struct mbuf *m)
{
register int s = splnet();
register struct tbf *t = vifp->v_tbf;
@@ -1804,8 +1744,7 @@ tbf_queue(vifp, m)
* processes the queue at the interface
*/
static void
tbf_process_q(vifp)
register struct vif *vifp;
tbf_process_q(struct vif *vifp)
{
register struct mbuf *m;
register int len;
@@ -1841,8 +1780,7 @@ tbf_process_q(vifp)
}
static void
tbf_reprocess_q(xvifp)
void *xvifp;
tbf_reprocess_q(void *xvifp)
{
register struct vif *vifp = xvifp;
if (ip_mrouter == NULL)
@@ -1860,9 +1798,7 @@ tbf_reprocess_q(xvifp)
* based on the precedence value and the priority
*/
static int
tbf_dq_sel(vifp, ip)
register struct vif *vifp;
register struct ip *ip;
tbf_dq_sel(struct vif *vifp, struct ip *ip)
{
register int s = splnet();
register u_int p;
@@ -1897,9 +1833,7 @@ tbf_dq_sel(vifp, ip)
}
static void
tbf_send_packet(vifp, m)
register struct vif *vifp;
register struct mbuf *m;
tbf_send_packet(struct vif *vifp, struct mbuf *m)
{
struct ip_moptions imo;
int error;
@@ -1937,8 +1871,7 @@ tbf_send_packet(vifp, m)
* in milliseconds & update the no. of tokens in the bucket
*/
static void
tbf_update_tokens(vifp)
register struct vif *vifp;
tbf_update_tokens(struct vif *vifp)
{
struct timeval tp;
register u_long tm;
@@ -1968,9 +1901,7 @@ tbf_update_tokens(vifp)
}
static int
priority(vifp, ip)
register struct vif *vifp;
register struct ip *ip;
priority(struct vif *vifp, struct ip *ip)
{
register int prio;
@@ -2012,9 +1943,7 @@ priority(vifp, ip)
*/
int
ip_rsvp_vif_init(so, m)
struct socket *so;
struct mbuf *m;
ip_rsvp_vif_init(struct socket *so, struct mbuf *m)
{
int i;
register int s;
@@ -2063,9 +1992,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 i;
register int s;
@@ -2109,8 +2036,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;
register int s;
@@ -2142,9 +2068,7 @@ ip_rsvp_force_done(so)
}
void
rsvp_input(m, iphlen)
struct mbuf *m;
int iphlen;
rsvp_input(struct mbuf *m, int iphlen)
{
int vifi;
register struct ip *ip = mtod(m, struct ip *);

View File

@@ -86,12 +86,8 @@ extern struct protosw inetsw[];
* The mbuf opt, if present, will not be freed.
*/
int
ip_output(m0, opt, ro, flags, imo)
struct mbuf *m0;
struct mbuf *opt;
struct route *ro;
int flags;
struct ip_moptions *imo;
ip_output(struct mbuf *m0, struct mbuf *opt, struct route *ro, int flags,
struct ip_moptions *imo)
{
struct ip *ip, *mhip;
struct ifnet *ifp;
@@ -537,10 +533,7 @@ bad:
* XXX This routine assumes that the packet has no options in place.
*/
static struct mbuf *
ip_insertoptions(m, opt, phlen)
register struct mbuf *m;
struct mbuf *opt;
int *phlen;
ip_insertoptions(struct mbuf *m, struct mbuf *opt, int *phlen)
{
register struct ipoption *p = mtod(opt, struct ipoption *);
struct mbuf *n;
@@ -588,8 +581,7 @@ ip_insertoptions(m, opt, phlen)
* omitting those not copied during fragmentation.
*/
static int
ip_optcopy(ip, jp)
struct ip *ip, *jp;
ip_optcopy(struct ip *ip, struct ip *jp)
{
register u_char *cp, *dp;
int opt, optlen, cnt;
@@ -629,11 +621,8 @@ ip_optcopy(ip, jp)
* IP socket option processing.
*/
int
ip_ctloutput(op, so, level, optname, mp)
int op;
struct socket *so;
int level, optname;
struct mbuf **mp;
ip_ctloutput(int op, struct socket *so, int level, int optname,
struct mbuf **mp)
{
struct inpcb *inp = sotoinpcb(so);
register struct mbuf *m = *mp;
@@ -839,13 +828,10 @@ ip_ctloutput(op, so, level, optname, mp)
*/
static int
#ifdef notyet
ip_pcbopts(optname, pcbopt, m)
int optname;
ip_pcbopts(int optname, struct mbuf **pcbopt, struct mbuf *m)
#else
ip_pcbopts(pcbopt, m)
ip_pcbopts(struct mbuf **pcbopt, struct mbuf *m)
#endif
struct mbuf **pcbopt;
register struct mbuf *m;
{
register int cnt, optlen;
register u_char *cp;
@@ -943,10 +929,7 @@ bad:
* Set the IP multicast options in response to user setsockopt().
*/
static int
ip_setmoptions(optname, imop, m)
int optname;
struct ip_moptions **imop;
struct mbuf *m;
ip_setmoptions(int optname, struct ip_moptions **imop, struct mbuf *m)
{
int error = 0;
u_char loop;
@@ -1218,10 +1201,8 @@ ip_setmoptions(optname, imop, m)
* Return the IP multicast options in response to user getsockopt().
*/
static int
ip_getmoptions(optname, imo, mp)
int optname;
register struct ip_moptions *imo;
register struct mbuf **mp;
ip_getmoptions(int optname, struct ip_moptions *imo,
struct mbuf **mp)
{
u_char *ttl;
u_char *loop;
@@ -1275,8 +1256,7 @@ ip_getmoptions(optname, imo, mp)
* Discard the IP multicast options.
*/
void
ip_freemoptions(imo)
register struct ip_moptions *imo;
ip_freemoptions(struct ip_moptions *imo)
{
register int i;
@@ -1295,11 +1275,8 @@ ip_freemoptions(imo)
* replicating that code here.
*/
static void
ip_mloopback(ifp, m, dst, hlen)
struct ifnet *ifp;
register struct mbuf *m;
register struct sockaddr_in *dst;
int hlen;
ip_mloopback(struct ifnet *ifp, struct mbuf *m, struct sockaddr_in *dst,
int hlen)
{
register struct ip *ip;
struct mbuf *copym;

View File

@@ -86,7 +86,7 @@ static struct inpcbinfo ripcbinfo;
* Initialize raw connection block q.
*/
void
rip_init()
rip_init(void)
{
LIST_INIT(&ripcb);
ripcbinfo.listhead = &ripcb;
@@ -226,11 +226,8 @@ rip_output(struct mbuf *m, struct socket *so, u_long dst)
* Raw IP socket option processing.
*/
int
rip_ctloutput(op, so, level, optname, m)
int op;
struct socket *so;
int level, optname;
struct mbuf **m;
rip_ctloutput(int op, struct socket *so, int level, int optname,
struct mbuf **m)
{
struct inpcb *inp = sotoinpcb(so);
int error;
@@ -327,10 +324,8 @@ static u_long rip_recvspace = RIPRCVQ; /* XXX sysctl ? */
/*ARGSUSED*/
int
rip_usrreq(so, req, m, nam, control)
register struct socket *so;
int req;
struct mbuf *m, *nam, *control;
rip_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam,
struct mbuf *control)
{
register int error = 0;
register struct inpcb *inp = sotoinpcb(so);

View File

@@ -76,11 +76,8 @@ static int tcp_debx;
* Tcp debug routines
*/
void
tcp_trace(act, ostate, tp, ti, req)
short act, ostate;
struct tcpcb *tp;
struct tcpiphdr *ti;
int req;
tcp_trace(short act, short ostate, struct tcpcb *tp, struct tcpiphdr *ti,
int req)
{
#ifdef TCPDEBUG
tcp_seq seq, ack;

View File

@@ -143,10 +143,7 @@ static void tcp_xmit_timer(struct tcpcb *, int);
#ifndef TUBA_INCLUDE
static int
tcp_reass(tp, ti, m)
register struct tcpcb *tp;
register struct tcpiphdr *ti;
struct mbuf *m;
tcp_reass(struct tcpcb *tp, struct tcpiphdr *ti, struct mbuf *m)
{
register struct tcpiphdr *q;
struct socket *so = tp->t_inpcb->inp_socket;
@@ -270,9 +267,7 @@ present:
* protocol specification dated September, 1981 very closely.
*/
void
tcp_input(m, iphlen)
register struct mbuf *m;
int iphlen;
tcp_input(struct mbuf *m, int iphlen)
{
register struct tcpiphdr *ti;
register struct inpcb *inp;
@@ -1732,12 +1727,8 @@ drop:
}
static void
tcp_dooptions(tp, cp, cnt, ti, to)
struct tcpcb *tp;
u_char *cp;
int cnt;
struct tcpiphdr *ti;
struct tcpopt *to;
tcp_dooptions(struct tcpcb *tp, u_char *cp, int cnt, struct tcpiphdr *ti,
struct tcpopt *to)
{
u_short mss = 0;
int opt, optlen;
@@ -1849,10 +1840,7 @@ tcp_dooptions(tp, cp, cnt, ti, to)
* sequencing purposes.
*/
static void
tcp_pulloutofband(so, ti, m)
struct socket *so;
struct tcpiphdr *ti;
register struct mbuf *m;
tcp_pulloutofband(struct socket *so, struct tcpiphdr *ti, struct mbuf *m)
{
int cnt = ti->ti_urp - 1;
@@ -1880,11 +1868,9 @@ tcp_pulloutofband(so, ti, m)
* and update averages and current timeout.
*/
static void
tcp_xmit_timer(tp, rtt)
register struct tcpcb *tp;
short rtt;
tcp_xmit_timer(struct tcpcb *tp, int rtt)
{
register int delta;
int delta;
tcpstat.tcps_rttupdated++;
tp->t_rttupdated++;
@@ -1982,9 +1968,7 @@ tcp_xmit_timer(tp, rtt)
* MSS of our peer.
*/
void
tcp_mss(tp, offer)
struct tcpcb *tp;
int offer;
tcp_mss(struct tcpcb *tp, int offer)
{
register struct rtentry *rt;
struct ifnet *ifp;
@@ -2147,8 +2131,7 @@ tcp_mss(tp, offer)
* Determine the MSS option to send on an outgoing SYN.
*/
int
tcp_mssopt(tp)
struct tcpcb *tp;
tcp_mssopt(struct tcpcb *tp)
{
struct rtentry *rt;

View File

@@ -69,8 +69,8 @@ extern struct mbuf *m_copypack();
* Tcp output routine: figure out what should be sent and send it.
*/
int
tcp_output(tp)
register struct tcpcb *tp;
tcp_output(
register struct tcpcb *tp)
{
register struct socket *so = tp->t_inpcb->inp_socket;
register long len, win;
@@ -733,8 +733,8 @@ out:
}
void
tcp_setpersist(tp)
register struct tcpcb *tp;
tcp_setpersist(
register struct tcpcb *tp)
{
register int t = ((tp->t_srtt >> 2) + tp->t_rttvar) >> 1;

View File

@@ -98,7 +98,7 @@ static void tcp_notify(struct inpcb *, int);
* Tcp initialization
*/
void
tcp_init()
tcp_init(void)
{
tcp_iss = random(); /* wrong, but better than a constant */
@@ -119,8 +119,7 @@ tcp_init()
* necessary when the connection is used.
*/
struct tcpiphdr *
tcp_template(tp)
struct tcpcb *tp;
tcp_template(struct tcpcb *tp)
{
register struct inpcb *inp = tp->t_inpcb;
register struct mbuf *m;
@@ -168,12 +167,8 @@ tcp_template(tp)
* NOTE: If m != NULL, then ti must point to *inside* the mbuf.
*/
void
tcp_respond(tp, ti, m, ack, seq, flags)
struct tcpcb *tp;
register struct tcpiphdr *ti;
register struct mbuf *m;
tcp_seq ack, seq;
int flags;
tcp_respond(struct tcpcb *tp, struct tcpiphdr *ti, struct mbuf *m,
tcp_seq ack, tcp_seq seq, int flags)
{
register int tlen;
int win = 0;
@@ -248,8 +243,7 @@ tcp_respond(tp, ti, m, ack, seq, flags)
* protocol control block.
*/
struct tcpcb *
tcp_newtcpcb(inp)
struct inpcb *inp;
tcp_newtcpcb(struct inpcb *inp)
{
struct tcpcb *tp;
@@ -285,9 +279,7 @@ tcp_newtcpcb(inp)
* then send a RST to peer.
*/
struct tcpcb *
tcp_drop(tp, errnum)
register struct tcpcb *tp;
int errnum;
tcp_drop(struct tcpcb *tp, int errnum)
{
struct socket *so = tp->t_inpcb->inp_socket;
@@ -310,8 +302,7 @@ tcp_drop(tp, errnum)
* wake up any sleepers
*/
struct tcpcb *
tcp_close(tp)
struct tcpcb *tp;
tcp_close(struct tcpcb *tp)
{
register struct tcpiphdr *t;
struct inpcb *inp = tp->t_inpcb;
@@ -410,7 +401,7 @@ tcp_close(tp)
}
void
tcp_drain()
tcp_drain(void)
{
}
@@ -421,9 +412,7 @@ tcp_drain()
* (for now, won't do anything until can select for soft error).
*/
static void
tcp_notify(inp, error)
struct inpcb *inp;
int error;
tcp_notify(struct inpcb *inp, int error)
{
struct tcpcb *tp = (struct tcpcb *)inp->inp_ppcb;
struct socket *so = inp->inp_socket;
@@ -574,10 +563,7 @@ SYSCTL_PROC(_net_inet_tcp, TCPCTL_PCBLIST, pcblist, CTLFLAG_RD, 0, 0,
tcp_pcblist, "S,xtcpcb", "List of active TCP connections");
void
tcp_ctlinput(cmd, sa, vip)
int cmd;
struct sockaddr *sa;
void *vip;
tcp_ctlinput(int cmd, struct sockaddr *sa, void *vip)
{
struct ip *ip = vip;
struct tcphdr *th;
@@ -611,9 +597,7 @@ tcp_ctlinput(cmd, sa, vip)
* to one segment. We will gradually open it again as we proceed.
*/
void
tcp_quench(inp, errnum)
struct inpcb *inp;
int errnum;
tcp_quench( struct inpcb *inp, int errnum)
{
struct tcpcb *tp = intotcpcb(inp);
@@ -628,9 +612,7 @@ tcp_quench(inp, errnum)
* This duplicates some code in the tcp_mss() function in tcp_input.c.
*/
void
tcp_mtudisc(inp, errnum)
struct inpcb *inp;
int errnum;
tcp_mtudisc(struct inpcb *inp, int errnum)
{
struct tcpcb *tp = intotcpcb(inp);
struct rtentry *rt;
@@ -703,8 +685,7 @@ tcp_mtudisc(inp, errnum)
* to get the interface MTU.
*/
struct rtentry *
tcp_rtlookup(inp)
struct inpcb *inp;
tcp_rtlookup(struct inpcb *inp)
{
struct route *ro;
struct rtentry *rt;
@@ -731,8 +712,7 @@ tcp_rtlookup(inp)
* the route metrics.
*/
struct rmxp_tao *
tcp_gettaocache(inp)
struct inpcb *inp;
tcp_gettaocache(struct inpcb *inp)
{
struct rtentry *rt = tcp_rtlookup(inp);

View File

@@ -95,7 +95,7 @@ static int tcp_maxpersistidle;
* Fast timeout routine for processing delayed acks
*/
void
tcp_fasttimo()
tcp_fasttimo(void)
{
register struct inpcb *inp;
register struct tcpcb *tp;
@@ -121,7 +121,7 @@ tcp_fasttimo()
* causes finite state machine actions if timers expire.
*/
void
tcp_slowtimo()
tcp_slowtimo(void)
{
register struct inpcb *ip, *ipnxt;
register struct tcpcb *tp;
@@ -186,8 +186,7 @@ tpgone:
* Cancel all timers for TCP tp.
*/
void
tcp_canceltimers(tp)
struct tcpcb *tp;
tcp_canceltimers(struct tcpcb *tp)
{
register int i;
@@ -204,9 +203,7 @@ static int tcp_totbackoff = 511; /* sum of tcp_backoff[] */
* TCP timer processing.
*/
struct tcpcb *
tcp_timers(tp, timer)
register struct tcpcb *tp;
int timer;
tcp_timers(struct tcpcb *tp, int timer)
{
register int rexmt;

View File

@@ -529,9 +529,7 @@ struct pr_usrreqs tcp_usrreqs = {
* Initialize connection parameters and enter SYN-SENT state.
*/
static int
tcp_connect(tp, nam)
register struct tcpcb *tp;
struct mbuf *nam;
tcp_connect(struct tcpcb *tp, struct mbuf *nam)
{
struct inpcb *inp = tp->t_inpcb, *oinp;
struct socket *so = inp->inp_socket;
@@ -616,11 +614,8 @@ tcp_connect(tp, nam)
}
int
tcp_ctloutput(op, so, level, optname, mp)
int op;
struct socket *so;
int level, optname;
struct mbuf **mp;
tcp_ctloutput(int op, struct socket *so, int level, int optname,
struct mbuf **mp)
{
int error = 0, s;
struct inpcb *inp;
@@ -731,16 +726,13 @@ SYSCTL_INT(_net_inet_tcp, TCPCTL_RECVSPACE, recvspace,
CTLFLAG_RW, &tcp_recvspace , 0, "");
#if defined(__rtems__)
void rtems_set_tcp_buffer_sizes(
u_long sendspace,
u_long recvspace
)
{
void rtems_set_tcp_buffer_sizes(u_long sendspace, u_long recvspace)
{
if ( sendspace != 0 )
tcp_sendspace = sendspace;
if ( recvspace != 0 )
tcp_recvspace = recvspace;
}
}
#endif
/*
@@ -749,8 +741,7 @@ SYSCTL_INT(_net_inet_tcp, TCPCTL_RECVSPACE, recvspace,
* bufer space, and entering LISTEN state if to accept connections.
*/
static int
tcp_attach(so)
struct socket *so;
tcp_attach(struct socket *so)
{
register struct tcpcb *tp;
struct inpcb *inp;
@@ -787,8 +778,7 @@ tcp_attach(so)
* send segment to peer (with FIN).
*/
static struct tcpcb *
tcp_disconnect(tp)
register struct tcpcb *tp;
tcp_disconnect(struct tcpcb *tp)
{
struct socket *so = tp->t_inpcb->inp_socket;
@@ -817,8 +807,7 @@ tcp_disconnect(tp)
* We can let the user exit from the close as soon as the FIN is acked.
*/
static struct tcpcb *
tcp_usrclosed(tp)
register struct tcpcb *tp;
tcp_usrclosed(struct tcpcb *tp)
{
switch (tp->t_state) {

View File

@@ -92,7 +92,7 @@ static int udp_output(struct inpcb *, struct mbuf *, struct mbuf *,
static void udp_notify(struct inpcb *, int);
void
udp_init()
udp_init(void)
{
LIST_INIT(&udb);
udbinfo.listhead = &udb;
@@ -100,9 +100,7 @@ udp_init()
}
void
udp_input(m, iphlen)
register struct mbuf *m;
int iphlen;
udp_input(struct mbuf *m, int iphlen)
{
register struct ip *ip;
register struct udphdr *uh;
@@ -327,9 +325,7 @@ bad:
* just wake up so that he can collect error status.
*/
static void
udp_notify(inp, errnum)
register struct inpcb *inp;
int errnum;
udp_notify(struct inpcb *inp, int errnum)
{
inp->inp_socket->so_error = errnum;
sorwakeup(inp->inp_socket);
@@ -337,10 +333,7 @@ udp_notify(inp, errnum)
}
void
udp_ctlinput(cmd, sa, vip)
int cmd;
struct sockaddr *sa;
void *vip;
udp_ctlinput(int cmd, struct sockaddr *sa, void *vip)
{
register struct ip *ip = vip;
register struct udphdr *uh;
@@ -357,10 +350,8 @@ udp_ctlinput(cmd, sa, vip)
}
static int
udp_output(inp, m, addr, control)
register struct inpcb *inp;
register struct mbuf *m;
struct mbuf *addr, *control;
udp_output(struct inpcb *inp, struct mbuf *m, struct mbuf *addr,
struct mbuf *control)
{
register struct udpiphdr *ui;
register int len = m->m_pkthdr.len;
@@ -580,24 +571,19 @@ SYSCTL_INT(_net_inet_udp, UDPCTL_RECVSPACE, recvspace, CTLFLAG_RW,
&udp_recvspace, 0, "");
#if defined(__rtems__)
void rtems_set_udp_buffer_sizes(
u_long sendspace,
u_long recvspace
)
{
void rtems_set_udp_buffer_sizes(u_long sendspace, u_long recvspace)
{
if ( sendspace != 0 )
udp_sendspace = sendspace;
if ( recvspace != 0 )
udp_recvspace = recvspace;
}
}
#endif
/*ARGSUSED*/
int
udp_usrreq(so, req, m, addr, control)
struct socket *so;
int req;
struct mbuf *m, *addr, *control;
udp_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *addr,
struct mbuf *control)
{
struct inpcb *inp = sotoinpcb(so);
int error = 0;
@@ -731,8 +717,7 @@ release:
}
static void
udp_detach(inp)
struct inpcb *inp;
udp_detach(struct inpcb *inp)
{
int s = splnet();