FreeBSD kernel kern code
uipc_domain.c File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/socket.h>
#include <sys/protosw.h>
#include <sys/domain.h>
#include <sys/eventhandler.h>
#include <sys/epoch.h>
#include <sys/mbuf.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/rmlock.h>
#include <sys/socketvar.h>
#include <sys/systm.h>
#include <machine/atomic.h>
#include <net/vnet.h>
Include dependency graph for uipc_domain.c:

Go to the source code of this file.

Macros

#define DEFAULT(foo, bar)   if ((foo) == NULL) (foo) = (bar)
 

Functions

 __FBSDID ("$FreeBSD$")
 
static void domaininit (void *)
 
 SYSINIT (domain, SI_SUB_PROTO_DOMAININIT, SI_ORDER_ANY, domaininit, NULL)
 
static void domainfinalize (void *)
 
 SYSINIT (domainfin, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_FIRST, domainfinalize, NULL)
 
static void pffasttimo (void *)
 
static void pfslowtimo (void *)
 
 RM_SYSINIT (pftimo_lock, &pftimo_lock, "pftimo")
 
static LIST_HEAD (protosw)
 
static void pr_usrreqs_init (struct protosw *pr)
 
void domain_init (void *arg)
 
void domain_add (void *data)
 
struct domainpffinddomain (int family)
 
struct protosw * pffindtype (int family, int type)
 
struct protosw * pffindproto (int family, int protocol, int type)
 
int pf_proto_register (int family, struct protosw *npr)
 
int pf_proto_unregister (int family, int protocol, int type)
 
void pfctlinput (int cmd, struct sockaddr *sa)
 

Variables

static struct callout pffast_callout
 
static struct callout pfslow_callout
 
static struct rmlock pftimo_lock
 

Macro Definition Documentation

◆ DEFAULT

#define DEFAULT (   foo,
  bar 
)    if ((foo) == NULL) (foo) = (bar)

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ domain_add()

void domain_add ( void *  data)

Definition at line 219 of file uipc_domain.c.

References data, domain, and printf().

Here is the call graph for this function:

◆ domain_init()

void domain_init ( void *  arg)

Definition at line 180 of file uipc_domain.c.

References domain, flags, max_datalen, max_hdr, max_linkhdr, max_protohdr, panic(), pftimo_lock, pr, and pr_usrreqs_init().

Here is the call graph for this function:

◆ domainfinalize()

static void domainfinalize ( void *  dummy)
static

Definition at line 261 of file uipc_domain.c.

References pffast_callout, pffasttimo(), pfslow_callout, and pfslowtimo().

Here is the call graph for this function:

◆ domaininit()

static void domaininit ( void *  dummy)
static

Definition at line 244 of file uipc_domain.c.

References callout_init(), max_linkhdr, pffast_callout, and pfslow_callout.

Here is the call graph for this function:

◆ LIST_HEAD()

static LIST_HEAD ( protosw  )
static

Definition at line 83 of file uipc_domain.c.

◆ pf_proto_register()

int pf_proto_register ( int  family,
struct protosw *  npr 
)

Definition at line 331 of file uipc_domain.c.

References domain, pffinddomain(), pftimo_lock, pr, and pr_usrreqs_init().

Here is the call graph for this function:

◆ pf_proto_unregister()

int pf_proto_unregister ( int  family,
int  protocol,
int  type 
)

Definition at line 401 of file uipc_domain.c.

References domain, pffinddomain(), pftimo_lock, pr, and type.

Here is the call graph for this function:

◆ pfctlinput()

void pfctlinput ( int  cmd,
struct sockaddr *  sa 
)

Definition at line 469 of file uipc_domain.c.

References domain, and pr.

◆ pffasttimo()

static void pffasttimo ( void *  arg)
static

Definition at line 500 of file uipc_domain.c.

References hz, pffast_callout, pffasttimo(), pftimo_lock, and pr.

Referenced by domainfinalize(), and pffasttimo().

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

◆ pffinddomain()

struct domain * pffinddomain ( int  family)

Definition at line 274 of file uipc_domain.c.

References domain.

Referenced by pf_proto_register(), pf_proto_unregister(), pffindproto(), pffindtype(), and socreate().

Here is the caller graph for this function:

◆ pffindproto()

struct protosw * pffindproto ( int  family,
int  protocol,
int  type 
)

Definition at line 301 of file uipc_domain.c.

References domain, pffinddomain(), pr, and type.

Referenced by socreate().

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

◆ pffindtype()

struct protosw * pffindtype ( int  family,
int  type 
)

Definition at line 285 of file uipc_domain.c.

References domain, pffinddomain(), pr, and type.

Referenced by socreate().

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

◆ pfslowtimo()

static void pfslowtimo ( void *  arg)
static

Definition at line 483 of file uipc_domain.c.

References hz, pfslow_callout, pfslowtimo(), pftimo_lock, and pr.

Referenced by domainfinalize(), and pfslowtimo().

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

◆ pr_usrreqs_init()

◆ RM_SYSINIT()

RM_SYSINIT ( pftimo_lock  ,
pftimo_lock,
"pftimo"   
)

◆ SYSINIT() [1/2]

SYSINIT ( domain  ,
SI_SUB_PROTO_DOMAININIT  ,
SI_ORDER_ANY  ,
domaininit  ,
NULL   
)

◆ SYSINIT() [2/2]

SYSINIT ( domainfin  ,
SI_SUB_PROTO_IFATTACHDOMAIN  ,
SI_ORDER_FIRST  ,
domainfinalize  ,
NULL   
)

Variable Documentation

◆ pffast_callout

struct callout pffast_callout
static

Definition at line 74 of file uipc_domain.c.

Referenced by domainfinalize(), domaininit(), and pffasttimo().

◆ pfslow_callout

struct callout pfslow_callout
static

Definition at line 75 of file uipc_domain.c.

Referenced by domainfinalize(), domaininit(), and pfslowtimo().

◆ pftimo_lock

struct rmlock pftimo_lock
static