Lines Matching refs:socket

80 TAILQ_HEAD(soqhead, socket);
83 * Variables for socket buffering.
88 struct socket *sb_so; /* back pointer to socket */
100 socket buffer */
116 #define SB_AUTOSIZE 0x800 /* automatically size socket buffer */
119 * Kernel structure per socket.
124 struct socket {
127 short so_type; /* generic type, see socket.h */
128 short so_options; /* from socket call, see socket.h */
137 * If so_head is 0, socket is not related to an accept.
138 * For head socket so_q0 queues partially completed connections,
143 * and limit on number of queued connections for this socket.
145 struct socket *so_head; /* back pointer to accept socket */
149 TAILQ_ENTRY(socket) so_qe; /* our queue entry (q or q0) */
162 void (*so_upcall) (struct socket *, void *, int, int);
164 int (*so_send) (struct socket *, struct mbuf *,
167 int (*so_receive) (struct socket *,
171 struct mowner *so_mowner; /* who owns mbufs for this socket */
172 struct uidinfo *so_uidinfo; /* who opened the socket */
180 kauth_cred_t so_cred; /* socket credentials */
196 #define SS_ISCONNECTED 0x002 /* socket connected to a peer */
204 #define SS_ISDISCONNECTED 0x800 /* socket disconnected from peer */
212 #define SS_ISAPIPE 0x1000 /* socket is implementing a pipe */
213 #define SS_NBIO 0x2000 /* socket is in non blocking I/O */
220 (struct socket *, void *, int, int);
222 (struct socket *, char *);
224 (struct socket *);
249 struct mbuf *getsombuf(struct socket *, int);
279 void sbrelease(struct sockbuf *, struct socket *);
280 int sbreserve(struct sockbuf *, u_long, struct socket *);
286 int soabort(struct socket *);
287 int soaccept(struct socket *, struct mbuf *);
288 int sofamily(const struct socket *);
289 int sobind(struct socket *, struct mbuf *, struct lwp *);
290 void socantrcvmore(struct socket *);
291 void socantsendmore(struct socket *);
292 int soclose(struct socket *);
293 int soconnect(struct socket *, struct mbuf *, struct lwp *);
294 int soconnect2(struct socket *, struct socket *);
295 int socreate(int, struct socket **, int, int, struct lwp *,
296 struct socket *);
297 int fsocreate(int, struct socket **, int, int, struct lwp *, int *);
298 int sodisconnect(struct socket *);
299 void sofree(struct socket *);
300 int sogetopt(struct socket *, struct sockopt *);
301 void sohasoutofband(struct socket *);
302 void soisconnected(struct socket *);
303 void soisconnecting(struct socket *);
304 void soisdisconnected(struct socket *);
305 void soisdisconnecting(struct socket *);
306 int solisten(struct socket *, int, struct lwp *);
307 struct socket *
308 sonewconn(struct socket *, int);
309 void soqinsque(struct socket *, struct socket *, int);
310 int soqremque(struct socket *, int);
311 int soreceive(struct socket *, struct mbuf **, struct uio *,
313 int soreserve(struct socket *, u_long, u_long);
314 void sorflush(struct socket *);
315 int sosend(struct socket *, struct mbuf *, struct uio *,
317 int sosetopt(struct socket *, struct sockopt *);
318 int so_setsockopt(struct lwp *, struct socket *, int, int, const void *, size_t);
319 int soshutdown(struct socket *, int);
320 void sorestart(struct socket *);
321 void sowakeup(struct socket *, struct sockbuf *, int);
323 int sopoll(struct socket *, int);
324 struct socket *soget(bool);
325 void soput(struct socket *);
326 bool solocked(struct socket *);
327 bool solocked2(struct socket *, struct socket *);
330 int sowait(struct socket *, bool, int);
331 void solockretry(struct socket *, kmutex_t *);
332 void sosetlock(struct socket *);
333 void solockreset(struct socket *, kmutex_t *);
359 * Inline functions for sockets and socket buffering.
378 * How much space is there in a socket buffer (so->so_snd or so->so_rcv)?
392 /* do we have to send all at once on a socket? */
394 sosendallatonce(struct socket *so)
402 soreadable(struct socket *so)
414 sowritable(struct socket *so)
453 sorwakeup(struct socket *so)
463 sowwakeup(struct socket *so)
473 solock(struct socket *so)
484 sounlock(struct socket *so)
495 * => panic if the socket buffer is inconsistent.
511 vaddr_t sokvaalloc(vaddr_t, vsize_t, struct socket *);
516 * Values for socket-buffer-append priority argument to sbappendaddrchain().
519 * SB_PRIO_NONE: honour normal socket-buffer limits.
521 * SB_PRIO_ONESHOT_OVERFLOW: if the socket has any space,
526 * aboce normal socket limits. Intended messages indicating
531 * require "reliable" delivery, nd where the source socket/protocol
544 int accept_filt_getopt(struct socket *, struct sockopt *);
545 int accept_filt_setopt(struct socket *, const struct sockopt *);
546 int accept_filt_clear(struct socket *);