diff options
Diffstat (limited to 'sys/netipx')
| -rw-r--r-- | sys/netipx/ipx.c | 10 | ||||
| -rw-r--r-- | sys/netipx/ipx_usrreq.c | 3 | ||||
| -rw-r--r-- | sys/netipx/spx_usrreq.c | 26 |
3 files changed, 32 insertions, 7 deletions
diff --git a/sys/netipx/ipx.c b/sys/netipx/ipx.c index 59ccffee4e3b..ab2f42aa48b3 100644 --- a/sys/netipx/ipx.c +++ b/sys/netipx/ipx.c @@ -33,7 +33,7 @@ * * @(#)ipx.c * - * $Id: ipx.c,v 1.13 1998/12/04 22:54:54 archie Exp $ + * $Id: ipx.c,v 1.11 1997/06/26 19:35:42 jhay Exp $ */ #include <sys/param.h> @@ -359,7 +359,7 @@ register struct ipx_addr *addr; net = "*"; else { q = work.x_net.c_net; - snprintf(cnet, sizeof(cnet), "%x%x%x%x", + sprintf(cnet, "%x%x%x%x", q[0], q[1], q[2], q[3]); for (p = cnet; *p == '0' && p < cnet + 8; p++) continue; @@ -372,7 +372,7 @@ register struct ipx_addr *addr; host = "*"; else { q = work.x_host.c_host; - snprintf(chost, sizeof(chost), "%x%x%x%x%x%x", + sprintf(chost, "%x%x%x%x%x%x", q[0], q[1], q[2], q[3], q[4], q[5]); for (p = chost; *p == '0' && p < chost + 12; p++) continue; @@ -382,9 +382,9 @@ register struct ipx_addr *addr; if (port) { if (strcmp(host, "*") == 0) { host = ""; - snprintf(cport, sizeof(cport), "%x", port); + sprintf(cport, "%x", port); } else - snprintf(cport, sizeof(cport), ".%x", port); + sprintf(cport, ".%x", port); } else *cport = 0; diff --git a/sys/netipx/ipx_usrreq.c b/sys/netipx/ipx_usrreq.c index 63e140646667..58fb5e24e264 100644 --- a/sys/netipx/ipx_usrreq.c +++ b/sys/netipx/ipx_usrreq.c @@ -33,7 +33,7 @@ * * @(#)ipx_usrreq.c * - * $Id: ipx_usrreq.c,v 1.20 1998/08/23 03:07:15 wollman Exp $ + * $Id: ipx_usrreq.c,v 1.19 1998/02/09 06:10:25 eivind Exp $ */ #include "opt_ipx.h" @@ -314,6 +314,7 @@ ipx_ctloutput(so, sopt) struct socket *so; struct sockopt *sopt; { + register struct mbuf *m; struct ipxpcb *ipxp = sotoipxpcb(so); int mask, error, optval; short soptval; diff --git a/sys/netipx/spx_usrreq.c b/sys/netipx/spx_usrreq.c index 13f336082c3b..e37a2f89f1e3 100644 --- a/sys/netipx/spx_usrreq.c +++ b/sys/netipx/spx_usrreq.c @@ -33,7 +33,7 @@ * * @(#)spx_usrreq.h * - * $Id: spx_usrreq.c,v 1.21 1998/12/07 21:58:42 archie Exp $ + * $Id: spx_usrreq.c,v 1.19 1998/05/01 18:30:02 bde Exp $ */ #include <sys/param.h> @@ -75,10 +75,12 @@ static struct spx_istat spx_istat; static int spx_backoff[SPX_MAXRXTSHIFT+1] = { 1, 2, 4, 8, 16, 32, 64, 64, 64, 64, 64, 64, 64 }; +static void spx_abort(struct ipxpcb *ipxp); static struct spxpcb *spx_close(struct spxpcb *cb); static struct spxpcb *spx_disconnect(struct spxpcb *cb); static struct spxpcb *spx_drop(struct spxpcb *cb, int errno); static int spx_output(struct spxpcb *cb, struct mbuf *m0); +static void spx_quench(struct ipxpcb *ipxp); static int spx_reass(struct spxpcb *cb, struct spx *si); static void spx_setpersist(struct spxpcb *cb); static void spx_template(struct spxpcb *cb); @@ -654,6 +656,19 @@ spx_ctlinput(cmd, arg_as_sa, dummy) break; } } +/* + * When a source quench is received, close congestion window + * to one packet. We will gradually open it again as we proceed. + */ +static void +spx_quench(ipxp) + struct ipxpcb *ipxp; +{ + struct spxpcb *cb = ipxtospxpcb(ipxp); + + if (cb != NULL) + cb->s_cwnd = CUNIT; +} #ifdef notdef int @@ -1143,6 +1158,7 @@ spx_ctloutput(so, sopt) struct socket *so; struct sockopt *sopt; { + register struct mbuf *m; struct ipxpcb *ipxp = sotoipxpcb(so); register struct spxpcb *cb; int mask, error; @@ -1736,6 +1752,14 @@ spx_drop(cb, errno) return (spx_close(cb)); } +static void +spx_abort(ipxp) + struct ipxpcb *ipxp; +{ + + spx_close((struct spxpcb *)ipxp->ipxp_pcb); +} + /* * Fast timeout routine for processing delayed acks */ |
