Lines Matching refs:socket
41 #include <sys/socket.h>
47 * Primitive routines for operating on sockets and socket buffers
56 * Procedures to manipulate state flags of socket
69 * From the passive side, a socket is created with
72 * As a protocol is preparing incoming connections, it creates a socket
75 * socket structure to so_q, making it available to accept().
77 * If a socket is closed with sockets on either
86 soisconnecting(struct socket *so)
94 soisconnected(struct socket *so)
96 struct socket *head = so->so_head;
129 soisdisconnecting(struct socket *so)
149 soisdisconnected(struct socket *so)
170 * When an attempt at a new connection is noted on a socket
174 * data structure of the original socket, and return this.
177 struct socket *
178 sonewconn(struct socket *head, int connstatus, int wait)
180 struct socket *so;
253 soqinsque(struct socket *head, struct socket *so, int q)
272 soqremque(struct socket *so, int q)
274 struct socket *head = so->so_head;
296 * socket; it would normally be applied to a socket when the user
299 * will be received, and will normally be applied to the socket by a
301 * Data queued for reading in the socket may yet be read.
305 socantsendmore(struct socket *so)
315 socantrcvmore(struct socket *so)
324 solock(struct socket *so)
338 solock_shared(struct socket *so)
350 solock_nonet(struct socket *so)
362 solock_persocket(struct socket *so)
374 solock_pair(struct socket *so1, struct socket *so2)
390 sounlock(struct socket *so)
404 sounlock_shared(struct socket *so)
416 sounlock_nonet(struct socket *so)
422 soassertlocked_readonly(struct socket *so)
436 soassertlocked(struct socket *so)
457 sosleep_nsec(struct socket *so, void *ident, int prio, const char *wmesg,
487 * Wait for data to arrive at/drain from a socket buffer.
525 * Wakeup processes waiting on a socket buffer.
527 * if the socket buffer has the SB_ASYNC flag set.
530 sowakeup(struct socket *so, struct sockbuf *sb)
555 * Each socket contains two socket buffers: one for sending data and
561 * Data stored in a socket buffer is maintained as a list of records.
577 * Before using a new socket structure it is first necessary to reserve
578 * buffer space to the socket, by calling sbreserve(). This should commit
580 * socket (currently, it does nothing but enforce limits). The space
581 * should be released by calling sbrelease() when the socket is destroyed.
585 soreserve(struct socket *so, u_long sndcc, u_long rcvcc)
621 sbreserve(struct socket *so, struct sockbuf *sb, u_long cc)
666 * Free mbufs held by a socket, and reserved mbuf space.
669 sbrelease(struct socket *so, struct sockbuf *sb)
681 * append new mbufs to a socket buffer, after checking that adequate
686 * socket receive buffer, sbappendaddr() should be used. To place
687 * access rights and data in a socket receive buffer, sbappendrights()
694 * Reliable protocols may use the socket send buffer to hold data
695 * awaiting acknowledgement. Data is normally copied from a socket
697 * and then removing the data from the socket buffer with sbdrop()
758 * socket buffer sb. The additional space associated
763 sbappend(struct socket *so, struct sockbuf *sb, struct mbuf *m)
787 * If this is the first record in the socket buffer, it's
799 * in the socket buffer, that is, a stream protocol (such as TCP).
802 sbappendstream(struct socket *so, struct sockbuf *sb, struct mbuf *m)
818 sbcheck(struct socket *so, struct sockbuf *sb)
846 sbappendrecord(struct socket *so, struct sockbuf *sb, struct mbuf *m0)
874 * to the receive queue of a socket. If present,
879 sbappendaddr(struct socket *so, struct sockbuf *sb, const struct sockaddr *asa,
928 sbappendcontrol(struct socket *so, struct sockbuf *sb, struct mbuf *m0,
975 * Compress mbuf chain m into the socket
980 sbcompress(struct socket *so, struct sockbuf *sb, struct mbuf *m,
1037 sbflush(struct socket *so, struct sockbuf *sb)
1056 sbdrop(struct socket *so, struct sockbuf *sb, int len)
1113 sbdroprecord(struct socket *so, struct sockbuf *sb)
1130 * with the specified type for presentation on a socket buffer.