FreeBSD kernel kern code
uipc_socket.c File Reference
#include <sys/cdefs.h>
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_kern_tls.h"
#include "opt_sctp.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/capsicum.h>
#include <sys/fcntl.h>
#include <sys/limits.h>
#include <sys/lock.h>
#include <sys/mac.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
#include <sys/mutex.h>
#include <sys/domain.h>
#include <sys/file.h>
#include <sys/hhook.h>
#include <sys/kernel.h>
#include <sys/khelp.h>
#include <sys/ktls.h>
#include <sys/event.h>
#include <sys/eventhandler.h>
#include <sys/poll.h>
#include <sys/proc.h>
#include <sys/protosw.h>
#include <sys/sbuf.h>
#include <sys/socket.h>
#include <sys/socketvar.h>
#include <sys/resourcevar.h>
#include <net/route.h>
#include <sys/signalvar.h>
#include <sys/stat.h>
#include <sys/sx.h>
#include <sys/sysctl.h>
#include <sys/taskqueue.h>
#include <sys/uio.h>
#include <sys/un.h>
#include <sys/unpcb.h>
#include <sys/jail.h>
#include <sys/syslog.h>
#include <netinet/in.h>
#include <netinet/in_pcb.h>
#include <netinet/tcp.h>
#include <net/vnet.h>
#include <security/mac/mac_framework.h>
#include <vm/uma.h>
Include dependency graph for uipc_socket.c:

Go to the source code of this file.

Macros

#define VNET_SO_ASSERT(so)
 
#define V_socket_hhh   VNET(socket_hhh)
 

Functions

 __FBSDID ("$FreeBSD$")
 
static int soreceive_rcvoob (struct socket *so, struct uio *uio, int flags)
 
static void so_rdknl_lock (void *)
 
static void so_rdknl_unlock (void *)
 
static void so_rdknl_assert_lock (void *, int)
 
static void so_wrknl_lock (void *)
 
static void so_wrknl_unlock (void *)
 
static void so_wrknl_assert_lock (void *, int)
 
static void filt_sordetach (struct knote *kn)
 
static int filt_soread (struct knote *kn, long hint)
 
static void filt_sowdetach (struct knote *kn)
 
static int filt_sowrite (struct knote *kn, long hint)
 
static int filt_soempty (struct knote *kn, long hint)
 
static int hhook_run_socket (struct socket *so, void *hctx, int32_t h_id)
 
 MALLOC_DEFINE (M_SONAME, "soname", "socket name")
 
 MALLOC_DEFINE (M_PCB, "pcb", "protocol control block")
 
 VNET_DEFINE (struct hhook_head *, socket_hhh[HHOOK_SOCKET_LAST+1])
 
static int sysctl_somaxconn (SYSCTL_HANDLER_ARGS)
 
 SYSCTL_PROC (_kern_ipc, OID_AUTO, soacceptqueue, CTLTYPE_UINT|CTLFLAG_RW|CTLFLAG_MPSAFE, 0, sizeof(int), sysctl_somaxconn, "I", "Maximum listen socket pending connection accept queue size")
 
 SYSCTL_PROC (_kern_ipc, KIPC_SOMAXCONN, somaxconn, CTLTYPE_UINT|CTLFLAG_RW|CTLFLAG_SKIP|CTLFLAG_MPSAFE, 0, sizeof(int), sysctl_somaxconn, "I", "Maximum listen socket pending connection accept queue size (compat)")
 
 SYSCTL_INT (_kern_ipc, OID_AUTO, numopensockets, CTLFLAG_RD, &numopensockets, 0, "Number of open sockets")
 
 MTX_SYSINIT (accept_mtx, &accept_mtx, "accept", MTX_DEF)
 
 MTX_SYSINIT (so_global_mtx, &so_global_mtx, "so_glabel", MTX_DEF)
 
 SYSCTL_NODE (_kern, KERN_IPC, ipc, CTLFLAG_RW|CTLFLAG_MPSAFE, 0, "IPC")
 
static void socket_zone_change (void *tag)
 
static void socket_hhook_register (int subtype)
 
static void socket_hhook_deregister (int subtype)
 
static void socket_init (void *tag)
 
 SYSINIT (socket, SI_SUB_PROTO_DOMAININIT, SI_ORDER_ANY, socket_init, NULL)
 
static void socket_vnet_init (const void *unused __unused)
 
 VNET_SYSINIT (socket_vnet_init, SI_SUB_PROTO_DOMAININIT, SI_ORDER_ANY, socket_vnet_init, NULL)
 
static void socket_vnet_uninit (const void *unused __unused)
 
 VNET_SYSUNINIT (socket_vnet_uninit, SI_SUB_PROTO_DOMAININIT, SI_ORDER_ANY, socket_vnet_uninit, NULL)
 
static void init_maxsockets (void *ignored)
 
 SYSINIT (param, SI_SUB_TUNABLES, SI_ORDER_ANY, init_maxsockets, NULL)
 
static int sysctl_maxsockets (SYSCTL_HANDLER_ARGS)
 
 SYSCTL_PROC (_kern_ipc, OID_AUTO, maxsockets, CTLTYPE_INT|CTLFLAG_RW|CTLFLAG_MPSAFE, &maxsockets, 0, sysctl_maxsockets, "IU", "Maximum number of sockets available")
 
static struct socket * soalloc (struct vnet *vnet)
 
static void sodealloc (struct socket *so)
 
int socreate (int dom, struct socket **aso, int type, int proto, struct ucred *cred, struct thread *td)
 
 SYSCTL_TIMEVAL_SEC (_kern_ipc, OID_AUTO, sooverinterval, CTLFLAG_RW, &overinterval, "Delay in seconds between warnings for listen socket overflows")
 
struct socket * sonewconn (struct socket *head, int connstatus)
 
int sobind (struct socket *so, struct sockaddr *nam, struct thread *td)
 
int sobindat (int fd, struct socket *so, struct sockaddr *nam, struct thread *td)
 
int solisten (struct socket *so, int backlog, struct thread *td)
 
int solisten_proto_check (struct socket *so)
 
void solisten_proto_abort (struct socket *so)
 
void solisten_proto (struct socket *so, int backlog)
 
void solisten_wakeup (struct socket *sol)
 
int solisten_dequeue (struct socket *head, struct socket **ret, int flags)
 
void sofree (struct socket *so)
 
void sorele_locked (struct socket *so)
 
int soclose (struct socket *so)
 
void soabort (struct socket *so)
 
int soaccept (struct socket *so, struct sockaddr **nam)
 
int soconnect (struct socket *so, struct sockaddr *nam, struct thread *td)
 
int soconnectat (int fd, struct socket *so, struct sockaddr *nam, struct thread *td)
 
int soconnect2 (struct socket *so1, struct socket *so2)
 
int sodisconnect (struct socket *so)
 
int sosend_dgram (struct socket *so, struct sockaddr *addr, struct uio *uio, struct mbuf *top, struct mbuf *control, int flags, struct thread *td)
 
int sosend_generic (struct socket *so, struct sockaddr *addr, struct uio *uio, struct mbuf *top, struct mbuf *control, int flags, struct thread *td)
 
int sosend (struct socket *so, struct sockaddr *addr, struct uio *uio, struct mbuf *top, struct mbuf *control, int flags, struct thread *td)
 
static __inline void sockbuf_pushsync (struct sockbuf *sb, struct mbuf *nextrecord)
 
int soreceive_generic (struct socket *so, struct sockaddr **psa, struct uio *uio, struct mbuf **mp0, struct mbuf **controlp, int *flagsp)
 
int soreceive_stream (struct socket *so, struct sockaddr **psa, struct uio *uio, struct mbuf **mp0, struct mbuf **controlp, int *flagsp)
 
int soreceive_dgram (struct socket *so, struct sockaddr **psa, struct uio *uio, struct mbuf **mp0, struct mbuf **controlp, int *flagsp)
 
int soreceive (struct socket *so, struct sockaddr **psa, struct uio *uio, struct mbuf **mp0, struct mbuf **controlp, int *flagsp)
 
int soshutdown (struct socket *so, int how)
 
void sorflush (struct socket *so)
 
int sooptcopyin (struct sockopt *sopt, void *buf, size_t len, size_t minlen)
 
int so_setsockopt (struct socket *so, int level, int optname, void *optval, size_t optlen)
 
int sosetopt (struct socket *so, struct sockopt *sopt)
 
int sooptcopyout (struct sockopt *sopt, const void *buf, size_t len)
 
int sogetopt (struct socket *so, struct sockopt *sopt)
 
int soopt_getm (struct sockopt *sopt, struct mbuf **mp)
 
int soopt_mcopyin (struct sockopt *sopt, struct mbuf *m)
 
int soopt_mcopyout (struct sockopt *sopt, struct mbuf *m)
 
void sohasoutofband (struct socket *so)
 
int sopoll (struct socket *so, int events, struct ucred *active_cred, struct thread *td)
 
int sopoll_generic (struct socket *so, int events, struct ucred *active_cred, struct thread *td)
 
int soo_kqfilter (struct file *fp, struct knote *kn)
 
int pru_accept_notsupp (struct socket *so, struct sockaddr **nam)
 
int pru_aio_queue_notsupp (struct socket *so, struct kaiocb *job)
 
int pru_attach_notsupp (struct socket *so, int proto, struct thread *td)
 
int pru_bind_notsupp (struct socket *so, struct sockaddr *nam, struct thread *td)
 
int pru_bindat_notsupp (int fd, struct socket *so, struct sockaddr *nam, struct thread *td)
 
int pru_connect_notsupp (struct socket *so, struct sockaddr *nam, struct thread *td)
 
int pru_connectat_notsupp (int fd, struct socket *so, struct sockaddr *nam, struct thread *td)
 
int pru_connect2_notsupp (struct socket *so1, struct socket *so2)
 
int pru_control_notsupp (struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp, struct thread *td)
 
int pru_disconnect_notsupp (struct socket *so)
 
int pru_listen_notsupp (struct socket *so, int backlog, struct thread *td)
 
int pru_peeraddr_notsupp (struct socket *so, struct sockaddr **nam)
 
int pru_rcvd_notsupp (struct socket *so, int flags)
 
int pru_rcvoob_notsupp (struct socket *so, struct mbuf *m, int flags)
 
int pru_send_notsupp (struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, struct mbuf *control, struct thread *td)
 
int pru_ready_notsupp (struct socket *so, struct mbuf *m, int count)
 
int pru_sense_null (struct socket *so, struct stat *sb)
 
int pru_shutdown_notsupp (struct socket *so)
 
int pru_sockaddr_notsupp (struct socket *so, struct sockaddr **nam)
 
int pru_sosend_notsupp (struct socket *so, struct sockaddr *addr, struct uio *uio, struct mbuf *top, struct mbuf *control, int flags, struct thread *td)
 
int pru_soreceive_notsupp (struct socket *so, struct sockaddr **paddr, struct uio *uio, struct mbuf **mp0, struct mbuf **controlp, int *flagsp)
 
int pru_sopoll_notsupp (struct socket *so, int events, struct ucred *cred, struct thread *td)
 
int socheckuid (struct socket *so, uid_t uid)
 
void soisconnecting (struct socket *so)
 
void soisconnected (struct socket *so)
 
void soisdisconnecting (struct socket *so)
 
void soisdisconnected (struct socket *so)
 
int soiolock (struct socket *so, struct sx *sx, int flags)
 
void soiounlock (struct sx *sx)
 
struct sockaddr * sodupsockaddr (const struct sockaddr *sa, int mflags)
 
void sodtor_set (struct socket *so, so_dtor_t *func)
 
void soupcall_set (struct socket *so, int which, so_upcall_t func, void *arg)
 
void soupcall_clear (struct socket *so, int which)
 
void solisten_upcall_set (struct socket *so, so_upcall_t func, void *arg)
 
void sotoxsocket (struct socket *so, struct xsocket *xso)
 
struct sockbuf * so_sockbuf_rcv (struct socket *so)
 
struct sockbuf * so_sockbuf_snd (struct socket *so)
 
int so_state_get (const struct socket *so)
 
void so_state_set (struct socket *so, int val)
 
int so_options_get (const struct socket *so)
 
void so_options_set (struct socket *so, int val)
 
int so_error_get (const struct socket *so)
 
void so_error_set (struct socket *so, int val)
 
int so_linger_get (const struct socket *so)
 
void so_linger_set (struct socket *so, int val)
 
struct protosw * so_protosw_get (const struct socket *so)
 
void so_protosw_set (struct socket *so, struct protosw *val)
 
void so_sorwakeup (struct socket *so)
 
void so_sowwakeup (struct socket *so)
 
void so_sorwakeup_locked (struct socket *so)
 
void so_sowwakeup_locked (struct socket *so)
 
void so_lock (struct socket *so)
 
void so_unlock (struct socket *so)
 

Variables

fo_kqfilter_t soo_kqfilter
 
static struct filterops soread_filtops
 
static struct filterops sowrite_filtops
 
static struct filterops soempty_filtops
 
so_gen_t so_gencnt
 
static u_int somaxconn = SOMAXCONN
 
static int numopensockets
 
struct mtx accept_mtx
 
static struct mtx so_global_mtx
 
static uma_zone_t socket_zone
 
int maxsockets
 
static struct timeval overinterval = { 60, 0 }
 

Macro Definition Documentation

◆ V_socket_hhh

#define V_socket_hhh   VNET(socket_hhh)

Definition at line 208 of file uipc_socket.c.

◆ VNET_SO_ASSERT

#define VNET_SO_ASSERT (   so)
Value:
VNET_ASSERT(curvnet != NULL, \
("%s:%d curvnet is NULL, so=%p", __func__, __LINE__, (so)));

Definition at line 203 of file uipc_socket.c.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ filt_soempty()

static int filt_soempty ( struct knote kn,
long  hint 
)
static

Definition at line 3977 of file uipc_socket.c.

◆ filt_sordetach()

static void filt_sordetach ( struct knote kn)
static

Definition at line 3883 of file uipc_socket.c.

References knlist_empty(), knlist_remove(), so_rdknl_lock(), and so_rdknl_unlock().

Here is the call graph for this function:

◆ filt_soread()

static int filt_soread ( struct knote kn,
long  hint 
)
static

Definition at line 3896 of file uipc_socket.c.

References hhook_run_socket().

Here is the call graph for this function:

◆ filt_sowdetach()

static void filt_sowdetach ( struct knote kn)
static

Definition at line 3934 of file uipc_socket.c.

References knlist_empty(), knlist_remove(), so_wrknl_lock(), and so_wrknl_unlock().

Here is the call graph for this function:

◆ filt_sowrite()

static int filt_sowrite ( struct knote kn,
long  hint 
)
static

Definition at line 3947 of file uipc_socket.c.

References hhook_run_socket().

Here is the call graph for this function:

◆ hhook_run_socket()

static int hhook_run_socket ( struct socket *  so,
void *  hctx,
int32_t  h_id 
)
inlinestatic

Definition at line 2990 of file uipc_socket.c.

References V_socket_hhh.

Referenced by filt_soread(), filt_sowrite(), soalloc(), sodealloc(), sogetopt(), and sosetopt().

Here is the caller graph for this function:

◆ init_maxsockets()

static void init_maxsockets ( void *  ignored)
static

Definition at line 348 of file uipc_socket.c.

References maxfiles, and maxsockets.

◆ MALLOC_DEFINE() [1/2]

MALLOC_DEFINE ( M_PCB  ,
"pcb"  ,
"protocol control block"   
)

◆ MALLOC_DEFINE() [2/2]

MALLOC_DEFINE ( M_SONAME  ,
"soname"  ,
"socket name  
)

◆ MTX_SYSINIT() [1/2]

MTX_SYSINIT ( accept_mtx  ,
accept_mtx,
"accept"  ,
MTX_DEF   
)

◆ MTX_SYSINIT() [2/2]

MTX_SYSINIT ( so_global_mtx  ,
so_global_mtx,
"so_glabel"  ,
MTX_DEF   
)

◆ pru_accept_notsupp()

int pru_accept_notsupp ( struct socket *  so,
struct sockaddr **  nam 
)

Definition at line 3713 of file uipc_socket.c.

Referenced by pr_usrreqs_init().

Here is the caller graph for this function:

◆ pru_aio_queue_notsupp()

int pru_aio_queue_notsupp ( struct socket *  so,
struct kaiocb *  job 
)

Definition at line 3720 of file uipc_socket.c.

Referenced by pr_usrreqs_init().

Here is the caller graph for this function:

◆ pru_attach_notsupp()

int pru_attach_notsupp ( struct socket *  so,
int  proto,
struct thread *  td 
)

Definition at line 3727 of file uipc_socket.c.

Referenced by socreate().

Here is the caller graph for this function:

◆ pru_bind_notsupp()

int pru_bind_notsupp ( struct socket *  so,
struct sockaddr *  nam,
struct thread *  td 
)

Definition at line 3734 of file uipc_socket.c.

Referenced by pr_usrreqs_init().

Here is the caller graph for this function:

◆ pru_bindat_notsupp()

int pru_bindat_notsupp ( int  fd,
struct socket *  so,
struct sockaddr *  nam,
struct thread *  td 
)

Definition at line 3741 of file uipc_socket.c.

Referenced by pr_usrreqs_init().

Here is the caller graph for this function:

◆ pru_connect2_notsupp()

int pru_connect2_notsupp ( struct socket *  so1,
struct socket *  so2 
)

Definition at line 3764 of file uipc_socket.c.

Referenced by pr_usrreqs_init().

Here is the caller graph for this function:

◆ pru_connect_notsupp()

int pru_connect_notsupp ( struct socket *  so,
struct sockaddr *  nam,
struct thread *  td 
)

Definition at line 3749 of file uipc_socket.c.

Referenced by pr_usrreqs_init().

Here is the caller graph for this function:

◆ pru_connectat_notsupp()

int pru_connectat_notsupp ( int  fd,
struct socket *  so,
struct sockaddr *  nam,
struct thread *  td 
)

Definition at line 3756 of file uipc_socket.c.

Referenced by pr_usrreqs_init().

Here is the caller graph for this function:

◆ pru_control_notsupp()

int pru_control_notsupp ( struct socket *  so,
u_long  cmd,
caddr_t  data,
struct ifnet *  ifp,
struct thread *  td 
)

Definition at line 3771 of file uipc_socket.c.

Referenced by pr_usrreqs_init().

Here is the caller graph for this function:

◆ pru_disconnect_notsupp()

int pru_disconnect_notsupp ( struct socket *  so)

Definition at line 3779 of file uipc_socket.c.

Referenced by pr_usrreqs_init().

Here is the caller graph for this function:

◆ pru_listen_notsupp()

int pru_listen_notsupp ( struct socket *  so,
int  backlog,
struct thread *  td 
)

Definition at line 3786 of file uipc_socket.c.

Referenced by pr_usrreqs_init().

Here is the caller graph for this function:

◆ pru_peeraddr_notsupp()

int pru_peeraddr_notsupp ( struct socket *  so,
struct sockaddr **  nam 
)

Definition at line 3793 of file uipc_socket.c.

Referenced by pr_usrreqs_init().

Here is the caller graph for this function:

◆ pru_rcvd_notsupp()

int pru_rcvd_notsupp ( struct socket *  so,
int  flags 
)

Definition at line 3800 of file uipc_socket.c.

Referenced by pr_usrreqs_init().

Here is the caller graph for this function:

◆ pru_rcvoob_notsupp()

int pru_rcvoob_notsupp ( struct socket *  so,
struct mbuf *  m,
int  flags 
)

Definition at line 3807 of file uipc_socket.c.

Referenced by pr_usrreqs_init().

Here is the caller graph for this function:

◆ pru_ready_notsupp()

int pru_ready_notsupp ( struct socket *  so,
struct mbuf *  m,
int  count 
)

Definition at line 3826 of file uipc_socket.c.

Referenced by pr_usrreqs_init().

Here is the caller graph for this function:

◆ pru_send_notsupp()

int pru_send_notsupp ( struct socket *  so,
int  flags,
struct mbuf *  m,
struct sockaddr *  addr,
struct mbuf *  control,
struct thread *  td 
)

Definition at line 3814 of file uipc_socket.c.

References flags, and m_freem().

Here is the call graph for this function:

◆ pru_sense_null()

int pru_sense_null ( struct socket *  so,
struct stat *  sb 
)

Definition at line 3837 of file uipc_socket.c.

Referenced by pr_usrreqs_init().

Here is the caller graph for this function:

◆ pru_shutdown_notsupp()

int pru_shutdown_notsupp ( struct socket *  so)

Definition at line 3845 of file uipc_socket.c.

Referenced by pr_usrreqs_init().

Here is the caller graph for this function:

◆ pru_sockaddr_notsupp()

int pru_sockaddr_notsupp ( struct socket *  so,
struct sockaddr **  nam 
)

Definition at line 3852 of file uipc_socket.c.

Referenced by pr_usrreqs_init().

Here is the caller graph for this function:

◆ pru_sopoll_notsupp()

int pru_sopoll_notsupp ( struct socket *  so,
int  events,
struct ucred *  cred,
struct thread *  td 
)

Definition at line 3875 of file uipc_socket.c.

◆ pru_soreceive_notsupp()

int pru_soreceive_notsupp ( struct socket *  so,
struct sockaddr **  paddr,
struct uio *  uio,
struct mbuf **  mp0,
struct mbuf **  controlp,
int *  flagsp 
)

Definition at line 3867 of file uipc_socket.c.

◆ pru_sosend_notsupp()

int pru_sosend_notsupp ( struct socket *  so,
struct sockaddr *  addr,
struct uio *  uio,
struct mbuf *  top,
struct mbuf *  control,
int  flags,
struct thread *  td 
)

Definition at line 3859 of file uipc_socket.c.

◆ so_error_get()

int so_error_get ( const struct socket *  so)

Definition at line 4450 of file uipc_socket.c.

◆ so_error_set()

void so_error_set ( struct socket *  so,
int  val 
)

Definition at line 4457 of file uipc_socket.c.

◆ so_linger_get()

int so_linger_get ( const struct socket *  so)

Definition at line 4464 of file uipc_socket.c.

◆ so_linger_set()

void so_linger_set ( struct socket *  so,
int  val 
)

Definition at line 4471 of file uipc_socket.c.

References hz.

◆ so_lock()

void so_lock ( struct socket *  so)

Definition at line 4523 of file uipc_socket.c.

◆ so_options_get()

int so_options_get ( const struct socket *  so)

Definition at line 4436 of file uipc_socket.c.

◆ so_options_set()

void so_options_set ( struct socket *  so,
int  val 
)

Definition at line 4443 of file uipc_socket.c.

◆ so_protosw_get()

struct protosw * so_protosw_get ( const struct socket *  so)

Definition at line 4481 of file uipc_socket.c.

◆ so_protosw_set()

void so_protosw_set ( struct socket *  so,
struct protosw *  val 
)

Definition at line 4488 of file uipc_socket.c.

◆ so_rdknl_assert_lock()

static void so_rdknl_assert_lock ( void *  arg,
int  what 
)
static

Definition at line 4310 of file uipc_socket.c.

Referenced by socreate(), and sonewconn().

Here is the caller graph for this function:

◆ so_rdknl_lock()

static void so_rdknl_lock ( void *  arg)
static

Definition at line 4288 of file uipc_socket.c.

Referenced by filt_sordetach(), socreate(), and sonewconn().

Here is the caller graph for this function:

◆ so_rdknl_unlock()

static void so_rdknl_unlock ( void *  arg)
static

Definition at line 4299 of file uipc_socket.c.

Referenced by filt_sordetach(), socreate(), and sonewconn().

Here is the caller graph for this function:

◆ so_setsockopt()

int so_setsockopt ( struct socket *  so,
int  level,
int  optname,
void *  optval,
size_t  optlen 
)

Definition at line 3043 of file uipc_socket.c.

References level, and sosetopt().

Here is the call graph for this function:

◆ so_sockbuf_rcv()

struct sockbuf * so_sockbuf_rcv ( struct socket *  so)

Definition at line 4408 of file uipc_socket.c.

◆ so_sockbuf_snd()

struct sockbuf * so_sockbuf_snd ( struct socket *  so)

Definition at line 4415 of file uipc_socket.c.

◆ so_sorwakeup()

void so_sorwakeup ( struct socket *  so)

Definition at line 4495 of file uipc_socket.c.

◆ so_sorwakeup_locked()

void so_sorwakeup_locked ( struct socket *  so)

Definition at line 4509 of file uipc_socket.c.

◆ so_sowwakeup()

void so_sowwakeup ( struct socket *  so)

Definition at line 4502 of file uipc_socket.c.

◆ so_sowwakeup_locked()

void so_sowwakeup_locked ( struct socket *  so)

Definition at line 4516 of file uipc_socket.c.

◆ so_state_get()

int so_state_get ( const struct socket *  so)

Definition at line 4422 of file uipc_socket.c.

◆ so_state_set()

void so_state_set ( struct socket *  so,
int  val 
)

Definition at line 4429 of file uipc_socket.c.

◆ so_unlock()

void so_unlock ( struct socket *  so)

Definition at line 4530 of file uipc_socket.c.

◆ so_wrknl_assert_lock()

static void so_wrknl_assert_lock ( void *  arg,
int  what 
)
static

Definition at line 4350 of file uipc_socket.c.

Referenced by socreate(), and sonewconn().

Here is the caller graph for this function:

◆ so_wrknl_lock()

static void so_wrknl_lock ( void *  arg)
static

Definition at line 4328 of file uipc_socket.c.

Referenced by filt_sowdetach(), socreate(), and sonewconn().

Here is the caller graph for this function:

◆ so_wrknl_unlock()

static void so_wrknl_unlock ( void *  arg)
static

Definition at line 4339 of file uipc_socket.c.

Referenced by filt_sowdetach(), socreate(), and sonewconn().

Here is the caller graph for this function:

◆ soabort()

void soabort ( struct socket *  so)

Definition at line 1334 of file uipc_socket.c.

References sofree(), and VNET_SO_ASSERT.

Referenced by soclose(), and sonewconn().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ soaccept()

int soaccept ( struct socket *  so,
struct sockaddr **  nam 
)

Definition at line 1355 of file uipc_socket.c.

Referenced by kern_accept4().

Here is the caller graph for this function:

◆ soalloc()

static struct socket * soalloc ( struct vnet *  vnet)
static

Definition at line 397 of file uipc_socket.c.

References hhook_run_socket(), khelp_init_osd(), numopensockets, so_gencnt, so_global_mtx, soaio_rcv(), soaio_snd(), and socket_zone.

Referenced by socreate(), and sonewconn().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sobind()

int sobind ( struct socket *  so,
struct sockaddr *  nam,
struct thread *  td 
)

Definition at line 860 of file uipc_socket.c.

Referenced by kern_bindat().

Here is the caller graph for this function:

◆ sobindat()

int sobindat ( int  fd,
struct socket *  so,
struct sockaddr *  nam,
struct thread *  td 
)

Definition at line 871 of file uipc_socket.c.

References fd.

Referenced by kern_bindat().

Here is the caller graph for this function:

◆ socheckuid()

int socheckuid ( struct socket *  so,
uid_t  uid 
)

Definition at line 3996 of file uipc_socket.c.

◆ sockbuf_pushsync()

static __inline void sockbuf_pushsync ( struct sockbuf *  sb,
struct mbuf *  nextrecord 
)
static

Definition at line 1918 of file uipc_socket.c.

Referenced by soreceive_dgram(), and soreceive_generic().

Here is the caller graph for this function:

◆ socket_hhook_deregister()

static void socket_hhook_deregister ( int  subtype)
static

Definition at line 300 of file uipc_socket.c.

References hhook_head_deregister(), printf(), and V_socket_hhh.

Referenced by socket_vnet_uninit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ socket_hhook_register()

static void socket_hhook_register ( int  subtype)
static

Definition at line 290 of file uipc_socket.c.

References hhook_head_register(), printf(), and V_socket_hhh.

Referenced by socket_vnet_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ socket_init()

static void socket_init ( void *  tag)
static

Definition at line 308 of file uipc_socket.c.

References maxsockets, socket_zone, and socket_zone_change().

Here is the call graph for this function:

◆ socket_vnet_init()

static void socket_vnet_init ( const void *unused  __unused)
static

Definition at line 321 of file uipc_socket.c.

References socket_hhook_register().

Here is the call graph for this function:

◆ socket_vnet_uninit()

static void socket_vnet_uninit ( const void *unused  __unused)
static

Definition at line 333 of file uipc_socket.c.

References socket_hhook_deregister().

Here is the call graph for this function:

◆ socket_zone_change()

static void socket_zone_change ( void *  tag)
static

Definition at line 283 of file uipc_socket.c.

References maxsockets, and socket_zone.

Referenced by socket_init().

Here is the caller graph for this function:

◆ soclose()

int soclose ( struct socket *  so)

Definition at line 1239 of file uipc_socket.c.

References funsetown(), hz, soabort(), sodisconnect(), and sorele_locked().

Referenced by kern_socketpair(), and soo_close().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ soconnect()

int soconnect ( struct socket *  so,
struct sockaddr *  nam,
struct thread *  td 
)

Definition at line 1371 of file uipc_socket.c.

References soconnectat().

Here is the call graph for this function:

◆ soconnect2()

int soconnect2 ( struct socket *  so1,
struct socket *  so2 
)

Definition at line 1412 of file uipc_socket.c.

Referenced by kern_socketpair().

Here is the caller graph for this function:

◆ soconnectat()

int soconnectat ( int  fd,
struct socket *  so,
struct sockaddr *  nam,
struct thread *  td 
)

Definition at line 1378 of file uipc_socket.c.

References fd, and sodisconnect().

Referenced by kern_connectat(), and soconnect().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ socreate()

int socreate ( int  dom,
struct socket **  aso,
int  type,
int  proto,
struct ucred *  cred,
struct thread *  td 
)

Definition at line 507 of file uipc_socket.c.

References crhold(), knlist_init(), pffinddomain(), pffindproto(), pffindtype(), prison_check_af(), pru_attach_notsupp(), so_rdknl_assert_lock(), so_rdknl_lock(), so_rdknl_unlock(), so_wrknl_assert_lock(), so_wrknl_lock(), so_wrknl_unlock(), soalloc(), sodealloc(), and type.

Referenced by kern_socket(), and kern_socketpair().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sodealloc()

static void sodealloc ( struct socket *  so)
static

Definition at line 461 of file uipc_socket.c.

References accept_filt_setopt(), chgsbsize(), crfree(), hhook_run_socket(), khelp_destroy_osd(), numopensockets, so_gencnt, so_global_mtx, socket_zone, and sx_destroy().

Referenced by socreate(), sofree(), and sonewconn().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sodisconnect()

int sodisconnect ( struct socket *  so)

Definition at line 1423 of file uipc_socket.c.

References VNET_SO_ASSERT.

Referenced by soclose(), and soconnectat().

Here is the caller graph for this function:

◆ sodtor_set()

void sodtor_set ( struct socket *  so,
so_dtor_t *  func 
)

Definition at line 4220 of file uipc_socket.c.

◆ sodupsockaddr()

struct sockaddr * sodupsockaddr ( const struct sockaddr *  sa,
int  mflags 
)

Definition at line 4206 of file uipc_socket.c.

References malloc().

Referenced by soreceive_dgram(), soreceive_generic(), and uipc_bindat().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sofree()

void sofree ( struct socket *  so)

Definition at line 1120 of file uipc_socket.c.

References knlist_destroy(), pr, sbdestroy(), seldrain(), sodealloc(), sorele_locked(), and VNET_SO_ASSERT.

Referenced by soabort(), and sorele_locked().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sogetopt()

int sogetopt ( struct socket *  so,
struct sockopt *  sopt 
)

Definition at line 3292 of file uipc_socket.c.

References accept_filt_getopt(), hhook_run_socket(), sooptcopyin(), sooptcopyout(), and V_socket_hhh.

Referenced by kern_getsockopt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sohasoutofband()

void sohasoutofband ( struct socket *  so)

Definition at line 3588 of file uipc_socket.c.

References pgsigio(), and selwakeuppri().

Here is the call graph for this function:

◆ soiolock()

int soiolock ( struct socket *  so,
struct sx *  sx,
int  flags 
)

Definition at line 4170 of file uipc_socket.c.

References flags.

◆ soiounlock()

void soiounlock ( struct sx *  sx)

Definition at line 4197 of file uipc_socket.c.

◆ soisconnected()

void soisconnected ( struct socket *  so)

Definition at line 4049 of file uipc_socket.c.

References solisten_wakeup(), sorele_locked(), soupcall_clear(), soupcall_set(), and wakeup().

Referenced by sowakeup(), and unp_connect2().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ soisconnecting()

void soisconnecting ( struct socket *  so)

Definition at line 4039 of file uipc_socket.c.

Referenced by unp_connect2().

Here is the caller graph for this function:

◆ soisdisconnected()

void soisdisconnected ( struct socket *  so)

Definition at line 4141 of file uipc_socket.c.

References sbdrop_locked(), socantrcvmore_locked(), socantsendmore_locked(), and wakeup().

Referenced by unp_disconnect().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ soisdisconnecting()

void soisdisconnecting ( struct socket *  so)

Definition at line 4123 of file uipc_socket.c.

References socantrcvmore_locked(), socantsendmore_locked(), and wakeup().

Here is the call graph for this function:

◆ solisten()

int solisten ( struct socket *  so,
int  backlog,
struct thread *  td 
)

Definition at line 894 of file uipc_socket.c.

Referenced by kern_listen().

Here is the caller graph for this function:

◆ solisten_dequeue()

int solisten_dequeue ( struct socket *  head,
struct socket **  ret,
int  flags 
)

Definition at line 1052 of file uipc_socket.c.

References flags, and sorele_locked().

Referenced by kern_accept4().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ solisten_proto()

void solisten_proto ( struct socket *  so,
int  backlog 
)

Definition at line 954 of file uipc_socket.c.

References sbdestroy(), and somaxconn.

Referenced by uipc_listen().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ solisten_proto_abort()

void solisten_proto_abort ( struct socket *  so)

Definition at line 945 of file uipc_socket.c.

Referenced by solisten_proto_check().

Here is the caller graph for this function:

◆ solisten_proto_check()

int solisten_proto_check ( struct socket *  so)

Definition at line 909 of file uipc_socket.c.

References solisten_proto_abort().

Referenced by uipc_listen().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ solisten_upcall_set()

void solisten_upcall_set ( struct socket *  so,
so_upcall_t  func,
void *  arg 
)

Definition at line 4279 of file uipc_socket.c.

◆ solisten_wakeup()

void solisten_wakeup ( struct socket *  sol)

Definition at line 1027 of file uipc_socket.c.

References pgsigio(), selwakeuppri(), and wakeup_one().

Referenced by accept_filt_setopt(), soisconnected(), sonewconn(), and soshutdown().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sonewconn()

struct socket * sonewconn ( struct socket *  head,
int  connstatus 
)

◆ soo_kqfilter()

int soo_kqfilter ( struct file *  fp,
struct knote kn 
)

Definition at line 3669 of file uipc_socket.c.

References knlist_add(), soempty_filtops, soread_filtops, and sowrite_filtops.

Here is the call graph for this function:

◆ soopt_getm()

int soopt_getm ( struct sockopt *  sopt,
struct mbuf **  mp 
)

Definition at line 3474 of file uipc_socket.c.

References m_freem().

Here is the call graph for this function:

◆ soopt_mcopyin()

int soopt_mcopyin ( struct sockopt *  sopt,
struct mbuf *  m 
)

Definition at line 3522 of file uipc_socket.c.

References m_freem(), and panic().

Here is the call graph for this function:

◆ soopt_mcopyout()

int soopt_mcopyout ( struct sockopt *  sopt,
struct mbuf *  m 
)

Definition at line 3550 of file uipc_socket.c.

References m_freem().

Here is the call graph for this function:

◆ sooptcopyin()

int sooptcopyin ( struct sockopt *  sopt,
void *  buf,
size_t  len,
size_t  minlen 
)

Definition at line 3015 of file uipc_socket.c.

References buf.

Referenced by accept_filt_setopt(), sogetopt(), sosetopt(), and uipc_ctloutput().

Here is the caller graph for this function:

◆ sooptcopyout()

int sooptcopyout ( struct sockopt *  sopt,
const void *  buf,
size_t  len 
)

Definition at line 3265 of file uipc_socket.c.

References buf.

Referenced by accept_filt_getopt(), sogetopt(), and uipc_ctloutput().

Here is the caller graph for this function:

◆ sopoll()

int sopoll ( struct socket *  so,
int  events,
struct ucred *  active_cred,
struct thread *  td 
)

Definition at line 3597 of file uipc_socket.c.

Referenced by selsocket(), and soo_poll().

Here is the caller graph for this function:

◆ sopoll_generic()

int sopoll_generic ( struct socket *  so,
int  events,
struct ucred *  active_cred,
struct thread *  td 
)

Definition at line 3610 of file uipc_socket.c.

References selrecord().

Referenced by pr_usrreqs_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ soreceive()

int soreceive ( struct socket *  so,
struct sockaddr **  psa,
struct uio *  uio,
struct mbuf **  mp0,
struct mbuf **  controlp,
int *  flagsp 
)

Definition at line 2859 of file uipc_socket.c.

Referenced by kern_recvit(), soaio_process_job(), and soo_read().

Here is the caller graph for this function:

◆ soreceive_dgram()

int soreceive_dgram ( struct socket *  so,
struct sockaddr **  psa,
struct uio *  uio,
struct mbuf **  mp0,
struct mbuf **  controlp,
int *  flagsp 
)

Definition at line 2677 of file uipc_socket.c.

References flags, m_freem(), pr, sbfree(), sbwait(), sockbuf_pushsync(), sodupsockaddr(), soreceive_generic(), and uiomove().

Here is the call graph for this function:

◆ soreceive_generic()

int soreceive_generic ( struct socket *  so,
struct sockaddr **  psa,
struct uio *  uio,
struct mbuf **  mp0,
struct mbuf **  controlp,
int *  flagsp 
)

Definition at line 1961 of file uipc_socket.c.

References flags, m_copym(), m_freem(), m_unmapped_uiomove(), pr, sbcut_locked(), sbdroprecord_locked(), sbfree(), sbwait(), sockbuf_pushsync(), sodupsockaddr(), soreceive_rcvoob(), type, uiomove(), and VNET_SO_ASSERT.

Referenced by pr_usrreqs_init(), soreceive_dgram(), and soreceive_stream().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ soreceive_rcvoob()

static int soreceive_rcvoob ( struct socket *  so,
struct uio *  uio,
int  flags 
)
static

Definition at line 1885 of file uipc_socket.c.

References flags, m_freem(), pr, uiomove(), and VNET_SO_ASSERT.

Referenced by soreceive_generic(), and soreceive_stream().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ soreceive_stream()

int soreceive_stream ( struct socket *  so,
struct sockaddr **  psa,
struct uio *  uio,
struct mbuf **  mp0,
struct mbuf **  controlp,
int *  flagsp 
)

Definition at line 2453 of file uipc_socket.c.

References flags, m_cat(), m_copym(), m_mbuftouio(), sbdrop_locked(), sbfree(), sbwait(), soreceive_generic(), soreceive_rcvoob(), and VNET_SO_ASSERT.

Here is the call graph for this function:

◆ sorele_locked()

void sorele_locked ( struct socket *  so)

Definition at line 1221 of file uipc_socket.c.

References sofree().

Referenced by soclose(), sofree(), soisconnected(), solisten_dequeue(), and sonewconn().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sorflush()

void sorflush ( struct socket *  so)

Definition at line 2931 of file uipc_socket.c.

References pr, sbrelease_internal(), socantrcvmore(), and VNET_SO_ASSERT.

Referenced by soshutdown(), and unp_gc().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sosend()

int sosend ( struct socket *  so,
struct sockaddr *  addr,
struct uio *  uio,
struct mbuf *  top,
struct mbuf *  control,
int  flags,
struct thread *  td 
)

Definition at line 1864 of file uipc_socket.c.

References addr, and flags.

Referenced by kern_sendit(), soaio_process_job(), and soo_write().

Here is the caller graph for this function:

◆ sosend_dgram()

int sosend_dgram ( struct socket *  so,
struct sockaddr *  addr,
struct uio *  uio,
struct mbuf *  top,
struct mbuf *  control,
int  flags,
struct thread *  td 
)

Definition at line 1437 of file uipc_socket.c.

References addr, flags, m_freem(), m_uiotombuf(), max_hdr, and VNET_SO_ASSERT.

Here is the call graph for this function:

◆ sosend_generic()

int sosend_generic ( struct socket *  so,
struct sockaddr *  addr,
struct uio *  uio,
struct mbuf *  top,
struct mbuf *  control,
int  flags,
struct thread *  td 
)

Definition at line 1602 of file uipc_socket.c.

References addr, flags, ktls_enqueue(), ktls_frame(), ktls_permit_empty_frames(), m_freem(), m_length(), m_uiotombuf(), max_hdr, sbwait(), and VNET_SO_ASSERT.

Referenced by pr_usrreqs_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sosetopt()

int sosetopt ( struct socket *  so,
struct sockopt *  sopt 
)

Definition at line 3058 of file uipc_socket.c.

References accept_filt_setopt(), hhook_run_socket(), hz, sbsetopt(), sooptcopyin(), and V_socket_hhh.

Referenced by kern_setsockopt(), and so_setsockopt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ soshutdown()

int soshutdown ( struct socket *  so,
int  how 
)

Definition at line 2872 of file uipc_socket.c.

References pr, solisten_wakeup(), sorflush(), and wakeup().

Referenced by kern_shutdown().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sotoxsocket()

void sotoxsocket ( struct socket *  so,
struct xsocket *  xso 
)

Definition at line 4376 of file uipc_socket.c.

References sbtoxsockbuf().

Referenced by unp_pcblist().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ soupcall_clear()

void soupcall_clear ( struct socket *  so,
int  which 
)

Definition at line 4254 of file uipc_socket.c.

References panic().

Referenced by soisconnected(), and sowakeup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ soupcall_set()

void soupcall_set ( struct socket *  so,
int  which,
so_upcall_t  func,
void *  arg 
)

Definition at line 4231 of file uipc_socket.c.

References panic().

Referenced by soisconnected().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SYSCTL_INT()

SYSCTL_INT ( _kern_ipc  ,
OID_AUTO  ,
numopensockets  ,
CTLFLAG_RD  ,
numopensockets,
,
"Number of open sockets"   
)

◆ sysctl_maxsockets()

static int sysctl_maxsockets ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 361 of file uipc_socket.c.

References maxfiles, maxsockets, and sysctl_handle_int().

Here is the call graph for this function:

◆ SYSCTL_NODE()

SYSCTL_NODE ( _kern  ,
KERN_IPC  ,
ipc  ,
CTLFLAG_RW|  CTLFLAG_MPSAFE,
,
"IPC"   
)

◆ SYSCTL_PROC() [1/3]

SYSCTL_PROC ( _kern_ipc  ,
KIPC_SOMAXCONN  ,
somaxconn  ,
CTLTYPE_UINT|CTLFLAG_RW|CTLFLAG_SKIP|  CTLFLAG_MPSAFE,
,
sizeof(int)  ,
sysctl_somaxconn  ,
"I"  ,
"Maximum listen socket pending connection accept queue size (compat)"   
)

◆ SYSCTL_PROC() [2/3]

SYSCTL_PROC ( _kern_ipc  ,
OID_AUTO  ,
maxsockets  ,
CTLTYPE_INT|CTLFLAG_RW|  CTLFLAG_MPSAFE,
maxsockets,
,
sysctl_maxsockets  ,
"IU"  ,
"Maximum number of sockets available"   
)

◆ SYSCTL_PROC() [3/3]

SYSCTL_PROC ( _kern_ipc  ,
OID_AUTO  ,
soacceptqueue  ,
CTLTYPE_UINT|CTLFLAG_RW|  CTLFLAG_MPSAFE,
,
sizeof(int)  ,
sysctl_somaxconn  ,
"I"  ,
"Maximum listen socket pending connection accept queue size"   
)

◆ sysctl_somaxconn()

static int sysctl_somaxconn ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 219 of file uipc_socket.c.

References somaxconn, and sysctl_handle_int().

Here is the call graph for this function:

◆ SYSCTL_TIMEVAL_SEC()

SYSCTL_TIMEVAL_SEC ( _kern_ipc  ,
OID_AUTO  ,
sooverinterval  ,
CTLFLAG_RW  ,
overinterval,
"Delay in seconds between warnings for listen socket overflows"   
)

◆ SYSINIT() [1/2]

SYSINIT ( param  ,
SI_SUB_TUNABLES  ,
SI_ORDER_ANY  ,
init_maxsockets  ,
NULL   
)

◆ SYSINIT() [2/2]

SYSINIT ( socket  ,
SI_SUB_PROTO_DOMAININIT  ,
SI_ORDER_ANY  ,
socket_init  ,
NULL   
)

◆ VNET_DEFINE()

VNET_DEFINE ( struct hhook_head *  ,
socket_hhh  [HHOOK_SOCKET_LAST+1] 
)

◆ VNET_SYSINIT()

VNET_SYSINIT ( socket_vnet_init  ,
SI_SUB_PROTO_DOMAININIT  ,
SI_ORDER_ANY  ,
socket_vnet_init  ,
NULL   
)

◆ VNET_SYSUNINIT()

VNET_SYSUNINIT ( socket_vnet_uninit  ,
SI_SUB_PROTO_DOMAININIT  ,
SI_ORDER_ANY  ,
socket_vnet_uninit  ,
NULL   
)

Variable Documentation

◆ accept_mtx

struct mtx accept_mtx

Definition at line 258 of file uipc_socket.c.

◆ maxsockets

int maxsockets

◆ numopensockets

int numopensockets
static

Definition at line 250 of file uipc_socket.c.

Referenced by soalloc(), and sodealloc().

◆ overinterval

struct timeval overinterval = { 60, 0 }
static

Definition at line 582 of file uipc_socket.c.

Referenced by sonewconn().

◆ so_gencnt

so_gen_t so_gencnt

Definition at line 198 of file uipc_socket.c.

Referenced by soalloc(), sodealloc(), and unp_pcblist().

◆ so_global_mtx

struct mtx so_global_mtx
static

Definition at line 265 of file uipc_socket.c.

Referenced by soalloc(), and sodealloc().

◆ socket_zone

uma_zone_t socket_zone
static

Definition at line 279 of file uipc_socket.c.

Referenced by soalloc(), socket_init(), socket_zone_change(), and sodealloc().

◆ soempty_filtops

struct filterops soempty_filtops
static
Initial value:
= {
.f_isfd = 1,
.f_detach = filt_sowdetach,
.f_event = filt_soempty,
}
static int filt_soempty(struct knote *kn, long hint)
Definition: uipc_socket.c:3977
static void filt_sowdetach(struct knote *kn)
Definition: uipc_socket.c:3934

Definition at line 192 of file uipc_socket.c.

Referenced by soo_kqfilter().

◆ somaxconn

u_int somaxconn = SOMAXCONN
static

Definition at line 216 of file uipc_socket.c.

Referenced by solisten_proto(), and sysctl_somaxconn().

◆ soo_kqfilter

fo_kqfilter_t soo_kqfilter

Definition at line 180 of file uipc_socket.c.

◆ soread_filtops

struct filterops soread_filtops
static
Initial value:
= {
.f_isfd = 1,
.f_detach = filt_sordetach,
.f_event = filt_soread,
}
static int filt_soread(struct knote *kn, long hint)
Definition: uipc_socket.c:3896
static void filt_sordetach(struct knote *kn)
Definition: uipc_socket.c:3883

Definition at line 182 of file uipc_socket.c.

Referenced by soo_kqfilter().

◆ sowrite_filtops

struct filterops sowrite_filtops
static
Initial value:
= {
.f_isfd = 1,
.f_detach = filt_sowdetach,
.f_event = filt_sowrite,
}
static int filt_sowrite(struct knote *kn, long hint)
Definition: uipc_socket.c:3947

Definition at line 187 of file uipc_socket.c.

Referenced by soo_kqfilter().