X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/b6de7c62fa990ce21bfc802939a145c0d8d7560f..4c45483ea9fb51e495c5cc57c7032ab8d97dd211:/sys/netns/spp_usrreq.c diff --git a/sys/netns/spp_usrreq.c b/sys/netns/spp_usrreq.c index 7f9d3c68ff..24156548b3 100644 --- a/sys/netns/spp_usrreq.c +++ b/sys/netns/spp_usrreq.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)spp_usrreq.c 7.15 (Berkeley) 6/27/91 - * $Id: spp_usrreq.c,v 1.2 1993/10/16 19:54:39 rgrimes Exp $ + * $Id: spp_usrreq.c,v 1.3 1993/11/07 17:50:39 wollman Exp $ */ #include "param.h" @@ -58,12 +58,18 @@ #include "spp_var.h" #include "spp_debug.h" +static void spp_quench(struct nspcb *); +static void spp_abort(struct nspcb *); +static void spp_setpersist(struct sppcb *); +static void spp_template(struct sppcb *); + struct spp_istat spp_istat; u_short spp_iss; /* * SP protocol implementation. */ +void spp_init() { @@ -77,6 +83,7 @@ int spp_use_delack = 0; u_short spp_newchecks[50]; /*ARGSUSED*/ +void spp_input(m, nsp) register struct mbuf *m; register struct nspcb *nsp; @@ -84,7 +91,7 @@ spp_input(m, nsp) register struct sppcb *cb; register struct spidp *si = mtod(m, struct spidp *); register struct socket *so; - short ostate; + short ostate = 0; int dropsocket = 0; @@ -290,6 +297,7 @@ int spprexmtthresh = 3; * but its function is somewhat different: It merely queues * packets up, and suppresses duplicates. */ +int spp_reass(cb, si) register struct sppcb *cb; register struct spidp *si; @@ -578,15 +586,15 @@ present: return (0); } +void spp_ctlinput(cmd, arg) int cmd; caddr_t arg; { struct ns_addr *na; extern u_char nsctlerrmap[]; - extern spp_abort(), spp_quench(); extern struct nspcb *idp_drop(); - struct ns_errp *errp; + struct ns_errp *errp = 0; struct nspcb *nsp; struct sockaddr_ns *sns; int type; @@ -642,6 +650,7 @@ spp_ctlinput(cmd, arg) * When a source quench is received, close congestion window * to one packet. We will gradually open it again as we proceed. */ +static void spp_quench(nsp) struct nspcb *nsp; { @@ -700,6 +709,7 @@ register struct nspcb *nsp; } #endif +int spp_output(cb, m0) register struct sppcb *cb; struct mbuf *m0; @@ -1115,6 +1125,7 @@ send: int spp_do_persist_panics = 0; +static void spp_setpersist(cb) register struct sppcb *cb; { @@ -1132,10 +1143,13 @@ spp_setpersist(cb) if (cb->s_rxtshift < SPP_MAXRXTSHIFT) cb->s_rxtshift++; } + /*ARGSUSED*/ +int spp_ctloutput(req, so, level, name, value) int req; struct socket *so; + int level; int name; struct mbuf **value; { @@ -1258,13 +1272,14 @@ spp_ctloutput(req, so, level, name, value) } /*ARGSUSED*/ +int spp_usrreq(so, req, m, nam, controlp) struct socket *so; int req; struct mbuf *m, *nam, *controlp; { struct nspcb *nsp = sotonspcb(so); - register struct sppcb *cb; + register struct sppcb *cb = 0; int s = splnet(); int error = 0, ostate; struct mbuf *mm; @@ -1510,6 +1525,7 @@ release: return (error); } +int spp_usrreq_sp(so, req, m, nam, controlp) struct socket *so; int req; @@ -1531,6 +1547,7 @@ spp_usrreq_sp(so, req, m, nam, controlp) * in a skeletal spp header (choosing connection id), * minimizing the amount of work necessary when the connection is used. */ +static void spp_template(cb) register struct sppcb *cb; { @@ -1625,6 +1642,7 @@ spp_drop(cb, errno) return (spp_close(cb)); } +static void spp_abort(nsp) struct nspcb *nsp; { @@ -1637,6 +1655,7 @@ int spp_backoff[SPP_MAXRXTSHIFT+1] = /* * Fast timeout routine for processing delayed acks */ +void spp_fasttimo() { register struct nspcb *nsp; @@ -1661,6 +1680,7 @@ spp_fasttimo() * Updates the timers in all active pcb's and * causes finite state machine actions if timers expire. */ +void spp_slowtimo() { register struct nspcb *ip, *ipnxt;