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/mbuf.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/socketvar.h>
#include <sys/systm.h>
#include <net/vnet.h>
#include <vm/uma.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 ("$BSDSUniX$")
 
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 *)
 
 MTX_SYSINIT (domain,&dom_mtx,"domain list", MTX_DEF)
 
static void protosw_init (struct protosw *pr)
 
void domain_init (void *arg)
 
void domain_add (void *data)
 
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)
 
void pfctlinput2 (int cmd, struct sockaddr *sa, void *ctlparam)
 

Variables

static struct callout pffast_callout
 
static struct callout pfslow_callout
 
struct domain * domains
 
int domain_init_status = 0
 
static struct mtx dom_mtx
 
struct pr_usrreqs nousrreqs
 

Macro Definition Documentation

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

Referenced by protosw_init().

Function Documentation

__FBSDID ( "$BSDSUniX$"  )
void domain_add ( void *  data)

Definition at line 213 of file uipc_domain.c.

References dom_mtx, domain_init_status, domains, and printf().

Here is the call graph for this function:

void domain_init ( void *  arg)

Definition at line 166 of file uipc_domain.c.

References max_datalen, max_hdr, max_linkhdr, max_protohdr, panic(), pr, and protosw_init().

Here is the call graph for this function:

static void domainfinalize ( void *  dummy)
static

Definition at line 261 of file uipc_domain.c.

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

Here is the call graph for this function:

static void domaininit ( void *  dummy)
static

Definition at line 244 of file uipc_domain.c.

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

Here is the call graph for this function:

MTX_SYSINIT ( domain  ,
dom_mtx,
"domain list"  ,
MTX_DEF   
)
int pf_proto_register ( int  family,
struct protosw *  npr 
)

Definition at line 320 of file uipc_domain.c.

References dom_mtx, domains, pr, and protosw_init().

Here is the call graph for this function:

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

Definition at line 394 of file uipc_domain.c.

References dom_mtx, domains, nousrreqs, and pr.

void pfctlinput ( int  cmd,
struct sockaddr *  sa 
)

Definition at line 458 of file uipc_domain.c.

References domains, and pr.

void pfctlinput2 ( int  cmd,
struct sockaddr *  sa,
void *  ctlparam 
)

Definition at line 470 of file uipc_domain.c.

References domains, and pr.

static void pffasttimo ( void *  arg)
static

Definition at line 506 of file uipc_domain.c.

References domains, hz, pffast_callout, and pr.

Referenced by domainfinalize().

Here is the caller graph for this function:

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

Definition at line 291 of file uipc_domain.c.

References domains, and pr.

Referenced by socreate().

Here is the caller graph for this function:

struct protosw* pffindtype ( int  family,
int  type 
)

Definition at line 274 of file uipc_domain.c.

References domains, and pr.

Referenced by socreate().

Here is the caller graph for this function:

static void pfslowtimo ( void *  arg)
static

Definition at line 493 of file uipc_domain.c.

References domains, hz, pfslow_callout, and pr.

Referenced by domainfinalize().

Here is the caller graph for this function:

SYSINIT ( domain  ,
SI_SUB_PROTO_DOMAININIT  ,
SI_ORDER_ANY  ,
domaininit  ,
NULL   
)
SYSINIT ( domainfin  ,
SI_SUB_PROTO_IFATTACHDOMAIN  ,
SI_ORDER_FIRST  ,
domainfinalize  ,
NULL   
)

Variable Documentation

struct mtx dom_mtx
static
int domain_init_status = 0

Definition at line 77 of file uipc_domain.c.

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

struct pr_usrreqs nousrreqs
Initial value:
= {
.pru_accept = pru_accept_notsupp,
.pru_attach = pru_attach_notsupp,
.pru_bind = pru_bind_notsupp,
.pru_connect = pru_connect_notsupp,
.pru_connect2 = pru_connect2_notsupp,
.pru_control = pru_control_notsupp,
.pru_disconnect = pru_disconnect_notsupp,
.pru_listen = pru_listen_notsupp,
.pru_peeraddr = pru_peeraddr_notsupp,
.pru_rcvd = pru_rcvd_notsupp,
.pru_rcvoob = pru_rcvoob_notsupp,
.pru_send = pru_send_notsupp,
.pru_sense = pru_sense_null,
.pru_shutdown = pru_shutdown_notsupp,
.pru_sockaddr = pru_sockaddr_notsupp,
.pru_sosend = pru_sosend_notsupp,
.pru_soreceive = pru_soreceive_notsupp,
.pru_sopoll = pru_sopoll_notsupp,
}
int pru_rcvd_notsupp(struct socket *so, int flags)
Definition: uipc_socket.c:3182
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: uipc_socket.c:3230
int pru_sense_null(struct socket *so, struct stat *sb)
Definition: uipc_socket.c:3208
int pru_listen_notsupp(struct socket *so, int backlog, struct thread *td)
Definition: uipc_socket.c:3168
int pru_peeraddr_notsupp(struct socket *so, struct sockaddr **nam)
Definition: uipc_socket.c:3175
int pru_disconnect_notsupp(struct socket *so)
Definition: uipc_socket.c:3161
int pru_soreceive_notsupp(struct socket *so, struct sockaddr **paddr, struct uio *uio, struct mbuf **mp0, struct mbuf **controlp, int *flagsp)
Definition: uipc_socket.c:3238
int pru_connect_notsupp(struct socket *so, struct sockaddr *nam, struct thread *td)
Definition: uipc_socket.c:3139
int pru_connect2_notsupp(struct socket *so1, struct socket *so2)
Definition: uipc_socket.c:3146
int pru_attach_notsupp(struct socket *so, int proto, struct thread *td)
Definition: uipc_socket.c:3125
int pru_send_notsupp(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, struct mbuf *control, struct thread *td)
Definition: uipc_socket.c:3196
int pru_sopoll_notsupp(struct socket *so, int events, struct ucred *cred, struct thread *td)
Definition: uipc_socket.c:3246
int pru_shutdown_notsupp(struct socket *so)
Definition: uipc_socket.c:3216
int pru_accept_notsupp(struct socket *so, struct sockaddr **nam)
Definition: uipc_socket.c:3118
int pru_control_notsupp(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp, struct thread *td)
Definition: uipc_socket.c:3153
int pru_bind_notsupp(struct socket *so, struct sockaddr *nam, struct thread *td)
Definition: uipc_socket.c:3132
int pru_sockaddr_notsupp(struct socket *so, struct sockaddr **nam)
Definition: uipc_socket.c:3223
int pru_rcvoob_notsupp(struct socket *so, struct mbuf *m, int flags)
Definition: uipc_socket.c:3189

Definition at line 85 of file uipc_domain.c.

Referenced by pf_proto_unregister().

struct callout pffast_callout
static

Definition at line 70 of file uipc_domain.c.

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

struct callout pfslow_callout
static

Definition at line 71 of file uipc_domain.c.

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