Lines Matching full:socket

31 .Nm socket
32 .Nd "kernel socket interface"
37 .Fn soabort "struct socket *so"
39 .Fn soaccept "struct socket *so" "struct sockaddr *nam"
41 .Fn socheckuid "struct socket *so" "uid_t uid"
43 .Fn sobind "struct socket *so" "struct sockaddr *nam" "struct thread *td"
45 .Fn soclose "struct socket *so"
47 .Fn soconnect "struct socket *so" "struct sockaddr *nam" "struct thread *td"
50 .Fa "int dom" "struct socket **aso" "int type" "int proto"
54 .Fn sodisconnect "struct socket *so"
57 .Fa "struct socket *so"
58 .Fa "void (*func)(struct socket *)"
63 .Fn sofree "struct socket *so"
65 .Fn sohasoutofband "struct socket *so"
67 .Fn solisten "struct socket *so" "int backlog" "struct thread *td"
69 .Fn solisten_proto "struct socket *so" "int backlog"
71 .Fn solisten_proto_check "struct socket *so"
73 .Fn sonewconn "struct socket *head" "int connstatus"
76 .Fa "struct socket *so" "int events" "struct ucred *active_cred"
81 .Fa "struct socket *so" "int events" "struct ucred *active_cred"
86 .Fa "struct socket *so" "struct sockaddr **psa" "struct uio *uio"
91 .Fa "struct socket *so" "struct sockaddr **paddr"
97 .Fa "struct socket *so" "struct sockaddr **paddr"
103 .Fa "struct socket *so" "struct sockaddr **paddr"
108 .Fn soreserve "struct socket *so" "u_long sndcc" "u_long rcvcc"
110 .Fn sorflush "struct socket *so"
113 .Fa "struct socket *so" "struct sockaddr *addr" "struct uio *uio"
118 .Fa "struct socket *so" "struct sockaddr *addr"
124 .Fa "struct socket *so" "struct sockaddr *addr"
129 .Fn soshutdown "struct socket *so" "int how"
131 .Fn sotoxsocket "struct socket *so" "struct xsocket *xso"
133 .Fn soupcall_clear "struct socket *so" "int which"
136 .Fa "struct socket *so" "int which"
137 .Fa "int (*func)(struct socket *, void *, int)" "void *arg"
140 .Fn sowakeup "struct socket *so" "struct sockbuf *sb"
143 .Fn sosetopt "struct socket *so" "struct sockopt *sopt"
145 .Fn sogetopt "struct socket *so" "struct sockopt *sopt"
154 local and network socket objects in a manner similar to that permitted using
156 .Xr socket 2
162 .Vt "struct socket"
166 The portions of the socket API used by socket consumers and
175 A new socket may be created using
178 .Xr socket 2 ,
183 The socket is returned via
187 socket will be passed via
189 (and will be cached for the lifetime of the socket), and the thread
193 authorization of the socket creation operation will be performed
201 In certain circumstances, it is appropriate to destroy a socket without
207 It must be called on an unreferenced socket, by the thread which
208 removed the socket from its listen queue, to prevent races.
209 It will call into protocol code, so no socket locks may be held
214 The normal path to freeing a socket is
216 which handles reference counting on the socket.
218 reference flags are cleared in socket or protocol code.
221 should not be made from outside the socket layer; outside callers
230 system call, and binds the socket
241 system call, and initiates a connection on the socket
253 while holding the socket mutex and waiting for the
266 disconnects the socket without closing it.
272 system call, and causes part or all of a connection on a socket to be closed
277 .Ss Socket Options
282 system call, and retrieves a socket option on socket
288 system call, and sets a socket option on socket
299 describing the socket option operation.
301 initialized to specify socket option operation arguments:
314 Specify the name of the socket option to set.
316 Kernel space pointer to the argument value for the socket option.
320 .Ss Socket Upcalls
321 In order for the owner of a socket to be notified when the socket
323 the socket.
324 The upcall is a function that will be called by the socket framework
325 when a socket buffer associated with the given socket is ready for
328 is used to register a socket upcall.
349 should be made by the socket framework after the upcall returns.
354 itself due to lock ordering with the socket buffer lock.
363 the upcall will be removed from the socket.
365 Upcalls are removed from their socket by
374 .Ss Socket Destructor Callback
377 function to set a destructor for a socket.
378 The destructor is called when the socket is about to be freed.
381 .Ss Socket I/O
386 system call, and attempts to receive bytes of data from the socket
407 The caller may optionally retrieve a socket address on a protocol with the
430 system call, and attempts to send bytes of data via the socket
466 A socket can be queried for readability, writability, out-of-band data,
488 .Ss Socket Utility Functions
489 The uid of a socket's credential may be compared against a
499 Protocol implementations notify the socket layer of the arrival of
502 so that the socket layer can notify socket consumers of the available data.
507 .Vt struct socket
514 such protocol implementations can call back into the socket layer using
518 to check and set the socket-layer listen state.
520 can order the socket layer and protocol locks as necessary.
532 to create a socket and attach protocol state to that socket.
535 on a listen socket.
536 The returned socket has a reference count of zero.
550 When a protocol creates a new socket structure, it is necessary to
551 reserve socket buffer space for that socket, by calling
555 which is called automatically by the socket framework.
557 When a protocol needs to wake up threads waiting for the socket to
570 for readers and writers, with the corresponding socket buffer lock
589 .Xr socket 2 ,
596 .Xr socket 2
611 socket creation time is inconsistent, and may lead to unexpected behaviour.
632 This manual page does not describe how to register socket upcalls or monitor
633 a socket for readability/writability without using blocking I/O.