diff options
Diffstat (limited to 'sys/kern/uipc_socket2.c')
-rw-r--r-- | sys/kern/uipc_socket2.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/sys/kern/uipc_socket2.c b/sys/kern/uipc_socket2.c index d4af592..dc153bd 100644 --- a/sys/kern/uipc_socket2.c +++ b/sys/kern/uipc_socket2.c @@ -44,6 +44,14 @@ #include <sys/socket.h> #include <sys/socketvar.h> +void soqinsque __P((struct socket *, struct socket *, int)); +void sowakeup __P((struct socket *, struct sockbuf *)); +void sbrelease __P((struct sockbuf *)); +void sbappendrecord __P((struct sockbuf *, struct mbuf *)); +void sbcompress __P((struct sockbuf *, struct mbuf *, struct mbuf *)); +void sbflush __P((struct sockbuf *)); +void sbdrop __P((struct sockbuf *, int)); + /* * Primitive routines for operating on sockets and socket buffers */ @@ -85,6 +93,7 @@ u_long sb_max = SB_MAX; /* patchable */ * cause software-interrupt process scheduling. */ +void soisconnecting(so) register struct socket *so; { @@ -93,6 +102,7 @@ soisconnecting(so) so->so_state |= SS_ISCONNECTING; } +void soisconnected(so) register struct socket *so; { @@ -111,6 +121,7 @@ soisconnected(so) } } +void soisdisconnecting(so) register struct socket *so; { @@ -122,6 +133,7 @@ soisdisconnecting(so) sorwakeup(so); } +void soisdisconnected(so) register struct socket *so; { @@ -181,6 +193,7 @@ sonewconn1(head, connstatus) return (so); } +void soqinsque(head, so, q) register struct socket *head, *so; int q; @@ -202,6 +215,7 @@ soqinsque(head, so, q) *prev = so; } +int soqremque(so, q) register struct socket *so; int q; @@ -240,6 +254,7 @@ soqremque(so, q) * Data queued for reading in the socket may yet be read. */ +void socantsendmore(so) struct socket *so; { @@ -248,6 +263,7 @@ socantsendmore(so) sowwakeup(so); } +void socantrcvmore(so) struct socket *so; { @@ -259,6 +275,7 @@ socantrcvmore(so) /* * Wait for data to arrive at/drain from a socket buffer. */ +int sbwait(sb) struct sockbuf *sb; { @@ -273,6 +290,7 @@ sbwait(sb) * Lock a sockbuf already known to be locked; * return any error returned from sleep (EINTR). */ +int sb_lock(sb) register struct sockbuf *sb; { @@ -294,6 +312,7 @@ sb_lock(sb) * Do asynchronous notification via SIGIO * if the socket has the SS_ASYNC flag set. */ +void sowakeup(so, sb) register struct socket *so; register struct sockbuf *sb; @@ -346,6 +365,7 @@ sowakeup(so, sb) * should be released by calling sbrelease() when the socket is destroyed. */ +int soreserve(so, sndcc, rcvcc) register struct socket *so; u_long sndcc, rcvcc; @@ -373,6 +393,7 @@ bad: * Attempt to scale mbmax so that mbcnt doesn't become limiting * if buffering efficiency is near the normal case. */ +int sbreserve(sb, cc) struct sockbuf *sb; u_long cc; @@ -390,6 +411,7 @@ sbreserve(sb, cc) /* * Free mbufs held by a socket, and reserved mbuf space. */ +void sbrelease(sb) struct sockbuf *sb; { @@ -429,6 +451,7 @@ sbrelease(sb) * the mbuf chain is recorded in sb. Empty mbufs are * discarded and mbufs are compacted where possible. */ +void sbappend(sb, m) struct sockbuf *sb; struct mbuf *m; @@ -451,6 +474,7 @@ sbappend(sb, m) } #ifdef SOCKBUF_DEBUG +void sbcheck(sb) register struct sockbuf *sb; { @@ -477,6 +501,7 @@ sbcheck(sb) * As above, except the mbuf chain * begins a new record. */ +void sbappendrecord(sb, m0) register struct sockbuf *sb; register struct mbuf *m0; @@ -511,6 +536,7 @@ sbappendrecord(sb, m0) * is inserted at the beginning of the sockbuf, * but after any other OOB data. */ +void sbinsertoob(sb, m0) register struct sockbuf *sb; register struct mbuf *m0; @@ -555,6 +581,7 @@ sbinsertoob(sb, m0) * m0 must include a packet header with total length. * Returns 0 if no space in sockbuf or insufficient mbufs. */ +int sbappendaddr(sb, asa, m0, control) register struct sockbuf *sb; struct sockaddr *asa; @@ -597,6 +624,7 @@ panic("sbappendaddr"); return (1); } +int sbappendcontrol(sb, m0, control) struct sockbuf *sb; struct mbuf *control, *m0; @@ -633,6 +661,7 @@ sbappendcontrol(sb, m0, control) * buffer sb following mbuf n. If n * is null, the buffer is presumed empty. */ +void sbcompress(sb, m, n) register struct sockbuf *sb; register struct mbuf *m, *n; @@ -681,6 +710,7 @@ sbcompress(sb, m, n) * Free all mbufs in a sockbuf. * Check that all resources are reclaimed. */ +void sbflush(sb) register struct sockbuf *sb; { @@ -696,6 +726,7 @@ sbflush(sb) /* * Drop data from (the front of) a sockbuf. */ +void sbdrop(sb, len) register struct sockbuf *sb; register int len; @@ -739,6 +770,7 @@ sbdrop(sb, len) * Drop a record off the front of a sockbuf * and move the next record to the front. */ +void sbdroprecord(sb) register struct sockbuf *sb; { |