FreeBSD kernel kern code
uipc_accf.c File Reference
#include <sys/cdefs.h>
#include "opt_param.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/domain.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
#include <sys/module.h>
#include <sys/mutex.h>
#include <sys/protosw.h>
#include <sys/sysctl.h>
#include <sys/socket.h>
#include <sys/socketvar.h>
#include <sys/queue.h>
Include dependency graph for uipc_accf.c:

Go to the source code of this file.

Macros

#define ACCEPT_FILTER_MOD
 
#define ACCEPT_FILTER_LOCK()   mtx_lock(&accept_filter_mtx)
 
#define ACCEPT_FILTER_UNLOCK()   mtx_unlock(&accept_filter_mtx)
 

Functions

 __FBSDID ("$FreeBSD$")
 
 MTX_SYSINIT (accept_filter, &accept_filter_mtx, "accept_filter_mtx", MTX_DEF)
 
static SLIST_HEAD (accept_filter)
 
int accept_filt_del (char *name)
 
struct accept_filter * accept_filt_get (char *name)
 
int accept_filt_generic_mod_event (module_t mod, int event, void *data)
 
int accept_filt_getopt (struct socket *so, struct sockopt *sopt)
 
int accept_filt_setopt (struct socket *so, struct sockopt *sopt)
 

Variables

static struct mtx accept_filter_mtx
 

Macro Definition Documentation

◆ ACCEPT_FILTER_LOCK

#define ACCEPT_FILTER_LOCK ( )    mtx_lock(&accept_filter_mtx)

Definition at line 55 of file uipc_accf.c.

◆ ACCEPT_FILTER_MOD

#define ACCEPT_FILTER_MOD

Definition at line 34 of file uipc_accf.c.

◆ ACCEPT_FILTER_UNLOCK

#define ACCEPT_FILTER_UNLOCK ( )    mtx_unlock(&accept_filter_mtx)

Definition at line 56 of file uipc_accf.c.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ accept_filt_del()

int accept_filt_del ( char *  name)

Definition at line 101 of file uipc_accf.c.

References accept_filt_get(), and name.

Referenced by accept_filt_generic_mod_event().

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

◆ accept_filt_generic_mod_event()

int accept_filt_generic_mod_event ( module_t  mod,
int  event,
void *  data 
)

Definition at line 128 of file uipc_accf.c.

References accept_filt_del(), data, malloc(), and unloadable.

Here is the call graph for this function:

◆ accept_filt_get()

struct accept_filter * accept_filt_get ( char *  name)

Definition at line 114 of file uipc_accf.c.

References ACCEPT_FILTER_LOCK, ACCEPT_FILTER_UNLOCK, and name.

Referenced by accept_filt_del(), and accept_filt_setopt().

Here is the caller graph for this function:

◆ accept_filt_getopt()

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

Definition at line 167 of file uipc_accf.c.

References free(), malloc(), and sooptcopyout().

Referenced by sogetopt().

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

◆ accept_filt_setopt()

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

Definition at line 195 of file uipc_accf.c.

References accept_filt_get(), free(), malloc(), solisten_wakeup(), sooptcopyin(), and wakeup().

Referenced by sodealloc(), and sosetopt().

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

◆ MTX_SYSINIT()

MTX_SYSINIT ( accept_filter  ,
accept_filter_mtx,
"accept_filter_mtx"  ,
MTX_DEF   
)

◆ SLIST_HEAD()

static SLIST_HEAD ( accept_filter  )
static

Definition at line 58 of file uipc_accf.c.

Variable Documentation

◆ accept_filter_mtx

struct mtx accept_filter_mtx
static

Definition at line 52 of file uipc_accf.c.