FreeBSD kernel kern code
|
#include <sys/cdefs.h>
#include "opt_ddb.h"
#include <sys/param.h>
#include <sys/capsicum.h>
#include <sys/domain.h>
#include <sys/eventhandler.h>
#include <sys/fcntl.h>
#include <sys/file.h>
#include <sys/filedesc.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
#include <sys/mount.h>
#include <sys/mutex.h>
#include <sys/namei.h>
#include <sys/proc.h>
#include <sys/protosw.h>
#include <sys/queue.h>
#include <sys/resourcevar.h>
#include <sys/rwlock.h>
#include <sys/socket.h>
#include <sys/socketvar.h>
#include <sys/signalvar.h>
#include <sys/stat.h>
#include <sys/sx.h>
#include <sys/sysctl.h>
#include <sys/systm.h>
#include <sys/taskqueue.h>
#include <sys/un.h>
#include <sys/unpcb.h>
#include <sys/vnode.h>
#include <net/vnet.h>
#include <security/mac/mac_framework.h>
#include <vm/uma.h>
Go to the source code of this file.
Data Structures | |
struct | unp_defer |
Macros | |
#define | PIPSIZ 8192 |
#define | UNP_LINK_LOCK_INIT() |
#define | UNP_LINK_LOCK_ASSERT() |
#define | UNP_LINK_UNLOCK_ASSERT() |
#define | UNP_LINK_RLOCK() rw_rlock(&unp_link_rwlock) |
#define | UNP_LINK_RUNLOCK() rw_runlock(&unp_link_rwlock) |
#define | UNP_LINK_WLOCK() rw_wlock(&unp_link_rwlock) |
#define | UNP_LINK_WUNLOCK() rw_wunlock(&unp_link_rwlock) |
#define | UNP_LINK_WLOCK_ASSERT() |
#define | UNP_LINK_WOWNED() rw_wowned(&unp_link_rwlock) |
#define | UNP_DEFERRED_LOCK_INIT() |
#define | UNP_DEFERRED_LOCK() mtx_lock(&unp_defers_lock) |
#define | UNP_DEFERRED_UNLOCK() mtx_unlock(&unp_defers_lock) |
#define | UNP_REF_LIST_LOCK() UNP_DEFERRED_LOCK(); |
#define | UNP_REF_LIST_UNLOCK() UNP_DEFERRED_UNLOCK(); |
#define | UNP_PCB_LOCK_INIT(unp) |
#define | UNP_PCB_LOCK_DESTROY(unp) mtx_destroy(&(unp)->unp_mtx) |
#define | UNP_PCB_LOCKPTR(unp) (&(unp)->unp_mtx) |
#define | UNP_PCB_LOCK(unp) mtx_lock(&(unp)->unp_mtx) |
#define | UNP_PCB_TRYLOCK(unp) mtx_trylock(&(unp)->unp_mtx) |
#define | UNP_PCB_UNLOCK(unp) mtx_unlock(&(unp)->unp_mtx) |
#define | UNP_PCB_OWNED(unp) mtx_owned(&(unp)->unp_mtx) |
#define | UNP_PCB_LOCK_ASSERT(unp) mtx_assert(&(unp)->unp_mtx, MA_OWNED) |
#define | UNP_PCB_UNLOCK_ASSERT(unp) mtx_assert(&(unp)->unp_mtx, MA_NOTOWNED) |
#define | OPTSET(bit, exclusive) |
Functions | |
__FBSDID ("$FreeBSD$") | |
MALLOC_DECLARE (M_FILECAPS) | |
static | SLIST_HEAD (unp_defer) |
static | SYSCTL_NODE (_net, PF_LOCAL, local, CTLFLAG_RW|CTLFLAG_MPSAFE, 0, "Local domain") |
static | SYSCTL_NODE (_net_local, SOCK_STREAM, stream, CTLFLAG_RW|CTLFLAG_MPSAFE, 0, "SOCK_STREAM") |
static | SYSCTL_NODE (_net_local, SOCK_DGRAM, dgram, CTLFLAG_RW|CTLFLAG_MPSAFE, 0, "SOCK_DGRAM") |
static | SYSCTL_NODE (_net_local, SOCK_SEQPACKET, seqpacket, CTLFLAG_RW|CTLFLAG_MPSAFE, 0, "SOCK_SEQPACKET") |
SYSCTL_ULONG (_net_local_stream, OID_AUTO, sendspace, CTLFLAG_RW, &unpst_sendspace, 0, "Default stream send space.") | |
SYSCTL_ULONG (_net_local_stream, OID_AUTO, recvspace, CTLFLAG_RW, &unpst_recvspace, 0, "Default stream receive space.") | |
SYSCTL_ULONG (_net_local_dgram, OID_AUTO, maxdgram, CTLFLAG_RW, &unpdg_sendspace, 0, "Default datagram send space.") | |
SYSCTL_ULONG (_net_local_dgram, OID_AUTO, recvspace, CTLFLAG_RW, &unpdg_recvspace, 0, "Default datagram receive space.") | |
SYSCTL_ULONG (_net_local_seqpacket, OID_AUTO, maxseqpacket, CTLFLAG_RW, &unpsp_sendspace, 0, "Default seqpacket send space.") | |
SYSCTL_ULONG (_net_local_seqpacket, OID_AUTO, recvspace, CTLFLAG_RW, &unpsp_recvspace, 0, "Default seqpacket receive space.") | |
SYSCTL_INT (_net_local, OID_AUTO, inflight, CTLFLAG_RD, &unp_rights, 0, "File descriptors in flight.") | |
SYSCTL_INT (_net_local, OID_AUTO, deferred, CTLFLAG_RD, &unp_defers_count, 0, "File descriptors deferred to taskqueue for close.") | |
static int | uipc_connect2 (struct socket *, struct socket *) |
static int | uipc_ctloutput (struct socket *, struct sockopt *) |
static int | unp_connect (struct socket *, struct sockaddr *, struct thread *) |
static int | unp_connectat (int, struct socket *, struct sockaddr *, struct thread *) |
static int | unp_connect2 (struct socket *so, struct socket *so2, int) |
static void | unp_disconnect (struct unpcb *unp, struct unpcb *unp2) |
static void | unp_dispose (struct socket *so) |
static void | unp_dispose_mbuf (struct mbuf *) |
static void | unp_shutdown (struct unpcb *) |
static void | unp_drop (struct unpcb *) |
static void | unp_gc (__unused void *, int) |
static void | unp_scan (struct mbuf *, void(*)(struct filedescent **, int)) |
static void | unp_discard (struct file *) |
static void | unp_freerights (struct filedescent **, int) |
static int | unp_internalize (struct mbuf **, struct thread *) |
static void | unp_internalize_fp (struct file *) |
static int | unp_externalize (struct mbuf *, struct mbuf **, int) |
static int | unp_externalize_fp (struct file *) |
static struct mbuf * | unp_addsockcred (struct thread *, struct mbuf *, int) |
static void | unp_process_defers (void *__unused, int) |
static void | unp_pcb_hold (struct unpcb *unp) |
static __result_use_check bool | unp_pcb_rele (struct unpcb *unp) |
static void | unp_pcb_rele_notlast (struct unpcb *unp) |
static void | unp_pcb_lock_pair (struct unpcb *unp, struct unpcb *unp2) |
static void | unp_pcb_unlock_pair (struct unpcb *unp, struct unpcb *unp2) |
static struct unpcb * | unp_pcb_lock_peer (struct unpcb *unp) |
DOMAIN_SET (local) | |
static void | uipc_abort (struct socket *so) |
static int | uipc_accept (struct socket *so, struct sockaddr **nam) |
static int | uipc_attach (struct socket *so, int proto, struct thread *td) |
static int | uipc_bindat (int fd, struct socket *so, struct sockaddr *nam, struct thread *td) |
static int | uipc_bind (struct socket *so, struct sockaddr *nam, struct thread *td) |
static int | uipc_connect (struct socket *so, struct sockaddr *nam, struct thread *td) |
static int | uipc_connectat (int fd, struct socket *so, struct sockaddr *nam, struct thread *td) |
static void | uipc_close (struct socket *so) |
static void | uipc_detach (struct socket *so) |
static int | uipc_disconnect (struct socket *so) |
static int | uipc_listen (struct socket *so, int backlog, struct thread *td) |
static int | uipc_peeraddr (struct socket *so, struct sockaddr **nam) |
static int | uipc_rcvd (struct socket *so, int flags) |
static int | uipc_send (struct socket *so, int flags, struct mbuf *m, struct sockaddr *nam, struct mbuf *control, struct thread *td) |
static bool | uipc_ready_scan (struct socket *so, struct mbuf *m, int count, int *errorp) |
static int | uipc_ready (struct socket *so, struct mbuf *m, int count) |
static int | uipc_sense (struct socket *so, struct stat *sb) |
static int | uipc_shutdown (struct socket *so) |
static int | uipc_sockaddr (struct socket *so, struct sockaddr **nam) |
void | unp_copy_peercred (struct thread *td, struct unpcb *client_unp, struct unpcb *server_unp, struct unpcb *listen_unp) |
static int | unp_pcblist (SYSCTL_HANDLER_ARGS) |
SYSCTL_PROC (_net_local_dgram, OID_AUTO, pcblist, CTLTYPE_OPAQUE|CTLFLAG_RD|CTLFLAG_MPSAFE,(void *)(intptr_t) SOCK_DGRAM, 0, unp_pcblist, "S,xunpcb", "List of active local datagram sockets") | |
SYSCTL_PROC (_net_local_stream, OID_AUTO, pcblist, CTLTYPE_OPAQUE|CTLFLAG_RD|CTLFLAG_MPSAFE,(void *)(intptr_t) SOCK_STREAM, 0, unp_pcblist, "S,xunpcb", "List of active local stream sockets") | |
SYSCTL_PROC (_net_local_seqpacket, OID_AUTO, pcblist, CTLTYPE_OPAQUE|CTLFLAG_RD|CTLFLAG_MPSAFE,(void *)(intptr_t) SOCK_SEQPACKET, 0, unp_pcblist, "S,xunpcb", "List of active local seqpacket sockets") | |
static void | unp_zone_change (void *tag) |
static void | unp_init (void *arg __unused) |
SYSINIT (unp_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_SECOND, unp_init, NULL) | |
static void | unp_internalize_cleanup_rights (struct mbuf *control) |
static struct unpcb * | fptounp (struct file *fp) |
static void | unp_process_defers (void *arg __unused, int pending) |
static void | unp_remove_dead_ref (struct filedescent **fdep, int fdcount) |
static void | unp_restore_undead_ref (struct filedescent **fdep, int fdcount) |
static void | unp_gc_scan (struct unpcb *unp, void(*op)(struct filedescent **, int)) |
SYSCTL_INT (_net_local, OID_AUTO, recycled, CTLFLAG_RD, &unp_recycled, 0, "Number of unreachable sockets claimed by the garbage collector.") | |
SYSCTL_INT (_net_local, OID_AUTO, taskcount, CTLFLAG_RD, &unp_taskcount, 0, "Number of times the garbage collector has run.") | |
SYSCTL_UINT (_net_local, OID_AUTO, sockcount, CTLFLAG_RD, &unp_count, 0, "Number of active local sockets.") | |
void | vfs_unp_reclaim (struct vnode *vp) |
Variables | |
static uma_zone_t | unp_zone |
static unp_gen_t | unp_gencnt |
static u_int | unp_count |
static ino_t | unp_ino |
static int | unp_rights |
static struct unp_head | unp_shead |
static struct unp_head | unp_dhead |
static struct unp_head | unp_sphead |
static struct timeout_task | unp_gc_task |
static struct task | unp_defer_task |
static u_long | unpst_sendspace = PIPSIZ |
static u_long | unpst_recvspace = PIPSIZ |
static u_long | unpdg_sendspace = 2*1024 |
static u_long | unpdg_recvspace = 16*1024 |
static u_long | unpsp_sendspace = PIPSIZ |
static u_long | unpsp_recvspace = PIPSIZ |
static struct rwlock | unp_link_rwlock |
static struct mtx | unp_defers_lock |
static struct domain | localdomain |
static struct pr_usrreqs uipc_usrreqs_dgram | uipc_usrreqs_stream |
static struct pr_usrreqs | uipc_usrreqs_seqpacket |
static struct protosw | localsw [] |
static struct pr_usrreqs | uipc_usrreqs_dgram |
static int | unp_marked |
static int | unp_recycled |
static int | unp_taskcount |
#define OPTSET | ( | bit, | |
exclusive | |||
) |
#define PIPSIZ 8192 |
Definition at line 155 of file uipc_usrreq.c.
#define UNP_DEFERRED_LOCK | ( | ) | mtx_lock(&unp_defers_lock) |
Definition at line 272 of file uipc_usrreq.c.
#define UNP_DEFERRED_LOCK_INIT | ( | ) |
Definition at line 270 of file uipc_usrreq.c.
#define UNP_DEFERRED_UNLOCK | ( | ) | mtx_unlock(&unp_defers_lock) |
Definition at line 273 of file uipc_usrreq.c.
#define UNP_LINK_LOCK_ASSERT | ( | ) |
Definition at line 257 of file uipc_usrreq.c.
#define UNP_LINK_LOCK_INIT | ( | ) |
Definition at line 254 of file uipc_usrreq.c.
#define UNP_LINK_RLOCK | ( | ) | rw_rlock(&unp_link_rwlock) |
Definition at line 262 of file uipc_usrreq.c.
#define UNP_LINK_RUNLOCK | ( | ) | rw_runlock(&unp_link_rwlock) |
Definition at line 263 of file uipc_usrreq.c.
#define UNP_LINK_UNLOCK_ASSERT | ( | ) |
Definition at line 259 of file uipc_usrreq.c.
#define UNP_LINK_WLOCK | ( | ) | rw_wlock(&unp_link_rwlock) |
Definition at line 264 of file uipc_usrreq.c.
#define UNP_LINK_WLOCK_ASSERT | ( | ) |
Definition at line 266 of file uipc_usrreq.c.
#define UNP_LINK_WOWNED | ( | ) | rw_wowned(&unp_link_rwlock) |
Definition at line 268 of file uipc_usrreq.c.
#define UNP_LINK_WUNLOCK | ( | ) | rw_wunlock(&unp_link_rwlock) |
Definition at line 265 of file uipc_usrreq.c.
#define UNP_PCB_LOCK | ( | unp | ) | mtx_lock(&(unp)->unp_mtx) |
Definition at line 283 of file uipc_usrreq.c.
#define UNP_PCB_LOCK_ASSERT | ( | unp | ) | mtx_assert(&(unp)->unp_mtx, MA_OWNED) |
Definition at line 287 of file uipc_usrreq.c.
#define UNP_PCB_LOCK_DESTROY | ( | unp | ) | mtx_destroy(&(unp)->unp_mtx) |
Definition at line 281 of file uipc_usrreq.c.
#define UNP_PCB_LOCK_INIT | ( | unp | ) |
Definition at line 278 of file uipc_usrreq.c.
#define UNP_PCB_LOCKPTR | ( | unp | ) | (&(unp)->unp_mtx) |
Definition at line 282 of file uipc_usrreq.c.
#define UNP_PCB_OWNED | ( | unp | ) | mtx_owned(&(unp)->unp_mtx) |
Definition at line 286 of file uipc_usrreq.c.
#define UNP_PCB_TRYLOCK | ( | unp | ) | mtx_trylock(&(unp)->unp_mtx) |
Definition at line 284 of file uipc_usrreq.c.
#define UNP_PCB_UNLOCK | ( | unp | ) | mtx_unlock(&(unp)->unp_mtx) |
Definition at line 285 of file uipc_usrreq.c.
#define UNP_PCB_UNLOCK_ASSERT | ( | unp | ) | mtx_assert(&(unp)->unp_mtx, MA_NOTOWNED) |
Definition at line 288 of file uipc_usrreq.c.
#define UNP_REF_LIST_LOCK | ( | ) | UNP_DEFERRED_LOCK(); |
Definition at line 275 of file uipc_usrreq.c.
#define UNP_REF_LIST_UNLOCK | ( | ) | UNP_DEFERRED_UNLOCK(); |
Definition at line 276 of file uipc_usrreq.c.
__FBSDID | ( | "$FreeBSD$" | ) |
DOMAIN_SET | ( | local | ) |
|
static |
Definition at line 2465 of file uipc_usrreq.c.
References localdomain.
Referenced by unp_externalize_fp(), unp_internalize_fp(), unp_remove_dead_ref(), and unp_restore_undead_ref().
MALLOC_DECLARE | ( | M_FILECAPS | ) |
|
static |
Definition at line 125 of file uipc_usrreq.c.
Referenced by unp_process_defers().
SYSCTL_INT | ( | _net_local | , |
OID_AUTO | , | ||
deferred | , | ||
CTLFLAG_RD | , | ||
& | unp_defers_count, | ||
0 | , | ||
"File descriptors deferred to taskqueue for close." | |||
) |
SYSCTL_INT | ( | _net_local | , |
OID_AUTO | , | ||
inflight | , | ||
CTLFLAG_RD | , | ||
& | unp_rights, | ||
0 | , | ||
"File descriptors in flight." | |||
) |
SYSCTL_INT | ( | _net_local | , |
OID_AUTO | , | ||
recycled | , | ||
CTLFLAG_RD | , | ||
& | unp_recycled, | ||
0 | , | ||
"Number of unreachable sockets claimed by the garbage collector." | |||
) |
SYSCTL_INT | ( | _net_local | , |
OID_AUTO | , | ||
taskcount | , | ||
CTLFLAG_RD | , | ||
& | unp_taskcount, | ||
0 | , | ||
"Number of times the garbage collector has run." | |||
) |
|
static |
|
static |
|
static |
|
static |
SYSCTL_PROC | ( | _net_local_dgram | , |
OID_AUTO | , | ||
pcblist | , | ||
CTLTYPE_OPAQUE|CTLFLAG_RD| | CTLFLAG_MPSAFE, | ||
(void *)(intptr_t) | SOCK_DGRAM, | ||
0 | , | ||
unp_pcblist | , | ||
" | S, | ||
xunpcb" | , | ||
"List of active local datagram sockets" | |||
) |
SYSCTL_PROC | ( | _net_local_seqpacket | , |
OID_AUTO | , | ||
pcblist | , | ||
CTLTYPE_OPAQUE|CTLFLAG_RD| | CTLFLAG_MPSAFE, | ||
(void *)(intptr_t) | SOCK_SEQPACKET, | ||
0 | , | ||
unp_pcblist | , | ||
" | S, | ||
xunpcb" | , | ||
"List of active local seqpacket sockets" | |||
) |
SYSCTL_PROC | ( | _net_local_stream | , |
OID_AUTO | , | ||
pcblist | , | ||
CTLTYPE_OPAQUE|CTLFLAG_RD| | CTLFLAG_MPSAFE, | ||
(void *)(intptr_t) | SOCK_STREAM, | ||
0 | , | ||
unp_pcblist | , | ||
" | S, | ||
xunpcb" | , | ||
"List of active local stream sockets" | |||
) |
SYSCTL_UINT | ( | _net_local | , |
OID_AUTO | , | ||
sockcount | , | ||
CTLFLAG_RD | , | ||
& | unp_count, | ||
0 | , | ||
"Number of active local sockets." | |||
) |
SYSCTL_ULONG | ( | _net_local_dgram | , |
OID_AUTO | , | ||
maxdgram | , | ||
CTLFLAG_RW | , | ||
& | unpdg_sendspace, | ||
0 | , | ||
"Default datagram send space." | |||
) |
SYSCTL_ULONG | ( | _net_local_dgram | , |
OID_AUTO | , | ||
recvspace | , | ||
CTLFLAG_RW | , | ||
& | unpdg_recvspace, | ||
0 | , | ||
"Default datagram receive space." | |||
) |
SYSCTL_ULONG | ( | _net_local_seqpacket | , |
OID_AUTO | , | ||
maxseqpacket | , | ||
CTLFLAG_RW | , | ||
& | unpsp_sendspace, | ||
0 | , | ||
"Default seqpacket send space." | |||
) |
SYSCTL_ULONG | ( | _net_local_seqpacket | , |
OID_AUTO | , | ||
recvspace | , | ||
CTLFLAG_RW | , | ||
& | unpsp_recvspace, | ||
0 | , | ||
"Default seqpacket receive space." | |||
) |
SYSCTL_ULONG | ( | _net_local_stream | , |
OID_AUTO | , | ||
recvspace | , | ||
CTLFLAG_RW | , | ||
& | unpst_recvspace, | ||
0 | , | ||
"Default stream receive space." | |||
) |
SYSCTL_ULONG | ( | _net_local_stream | , |
OID_AUTO | , | ||
sendspace | , | ||
CTLFLAG_RW | , | ||
& | unpst_sendspace, | ||
0 | , | ||
"Default stream send space." | |||
) |
|
static |
Definition at line 469 of file uipc_usrreq.c.
References unp_drop(), unp_pcb_hold(), UNP_PCB_LOCK, UNP_PCB_UNLOCK, and UNP_PCB_UNLOCK_ASSERT.
|
static |
Definition at line 488 of file uipc_usrreq.c.
References malloc(), UNP_PCB_LOCK, unp_pcb_lock_peer(), UNP_PCB_UNLOCK, and unp_pcb_unlock_pair().
|
static |
Definition at line 516 of file uipc_usrreq.c.
References panic(), soreserve(), unp_count, unp_dhead, unp_gencnt, unp_ino, UNP_LINK_WLOCK, UNP_LINK_WOWNED, UNP_LINK_WUNLOCK, UNP_PCB_LOCK_INIT, unp_shead, unp_sphead, unp_zone, unpdg_recvspace, unpdg_sendspace, unpsp_recvspace, unpsp_sendspace, unpst_recvspace, and unpst_sendspace.
|
static |
Definition at line 702 of file uipc_usrreq.c.
References uipc_bindat().
|
static |
Definition at line 587 of file uipc_usrreq.c.
References buf, fd, free(), malloc(), namei(), NDFREE(), sodupsockaddr(), UNP_PCB_LOCK, UNP_PCB_UNLOCK, vn_finished_write(), vn_start_write(), vput(), vref(), and vrele().
Referenced by uipc_bind().
|
static |
Definition at line 730 of file uipc_usrreq.c.
References mtx, mtx_pool_find(), mtxpool_sleep, unp_disconnect(), UNP_PCB_LOCK, unp_pcb_lock_peer(), UNP_PCB_UNLOCK, and vrele().
|
static |
Definition at line 709 of file uipc_usrreq.c.
References unp_connect().
|
static |
Definition at line 764 of file uipc_usrreq.c.
References unp_connect2(), unp_pcb_lock_pair(), and unp_pcb_unlock_pair().
|
static |
Definition at line 719 of file uipc_usrreq.c.
References fd, and unp_connectat().
|
static |
Definition at line 1384 of file uipc_usrreq.c.
References OPTSET, sooptcopyin(), sooptcopyout(), UNP_PCB_LOCK, and UNP_PCB_UNLOCK.
|
static |
Definition at line 780 of file uipc_usrreq.c.
References free(), mtx, mtx_pool_find(), mtxpool_sleep, sbrelease(), taskqueue_enqueue_timeout(), unp_count, unp_disconnect(), unp_drop(), unp_gc_task, unp_gencnt, UNP_LINK_WLOCK, UNP_LINK_WUNLOCK, unp_pcb_hold(), UNP_PCB_LOCK, unp_pcb_lock_peer(), unp_pcb_rele(), UNP_PCB_UNLOCK, UNP_PCB_UNLOCK_ASSERT, UNP_REF_LIST_LOCK, UNP_REF_LIST_UNLOCK, unp_rights, and vrele().
|
static |
Definition at line 866 of file uipc_usrreq.c.
References unp_disconnect(), UNP_PCB_LOCK, unp_pcb_lock_peer(), and UNP_PCB_UNLOCK.
|
static |
Definition at line 882 of file uipc_usrreq.c.
References cru2xt(), solisten_proto(), solisten_proto_check(), UNP_PCB_LOCK, and UNP_PCB_UNLOCK.
|
static |
Definition at line 917 of file uipc_usrreq.c.
References malloc(), UNP_LINK_RLOCK, UNP_LINK_RUNLOCK, UNP_PCB_LOCK, and UNP_PCB_UNLOCK.
|
static |
Definition at line 950 of file uipc_usrreq.c.
References UNP_PCB_LOCK, and UNP_PCB_UNLOCK.
|
static |
Definition at line 1221 of file uipc_usrreq.c.
References count, sbready(), uipc_ready_scan(), UNP_LINK_RLOCK, UNP_LINK_RUNLOCK, UNP_PCB_LOCK, unp_pcb_lock_peer(), UNP_PCB_UNLOCK, and unp_shead.
|
static |
Definition at line 1188 of file uipc_usrreq.c.
References count, and sbready().
Referenced by uipc_ready().
|
static |
Definition at line 1000 of file uipc_usrreq.c.
References flags, m_freem(), sbappend_locked(), sbappendaddr_locked(), sbappendaddr_nospacecheck_locked(), sbappendcontrol_locked(), socantsendmore(), soroverflow_locked(), unp_addsockcred(), unp_connect(), unp_disconnect(), unp_dispose_mbuf(), unp_internalize(), UNP_PCB_LOCK, unp_pcb_lock_peer(), UNP_PCB_UNLOCK, unp_pcb_unlock_pair(), and unp_shutdown().
|
static |
Definition at line 1268 of file uipc_usrreq.c.
|
static |
Definition at line 1282 of file uipc_usrreq.c.
References socantsendmore(), UNP_PCB_LOCK, UNP_PCB_UNLOCK, and unp_shutdown().
|
static |
Definition at line 1297 of file uipc_usrreq.c.
References malloc(), UNP_PCB_LOCK, and UNP_PCB_UNLOCK.
|
static |
Definition at line 2392 of file uipc_usrreq.c.
References mode, and sbcreatecontrol().
Referenced by uipc_send().
|
static |
Definition at line 1494 of file uipc_usrreq.c.
References unp_connectat().
Referenced by uipc_connect(), and uipc_send().
|
static |
Definition at line 1686 of file uipc_usrreq.c.
References panic(), soisconnected(), soisconnecting(), unp_pcb_hold(), UNP_PCB_LOCK_ASSERT, UNP_REF_LIST_LOCK, and UNP_REF_LIST_UNLOCK.
Referenced by uipc_connect2(), and unp_connectat().
|
static |
Definition at line 1501 of file uipc_usrreq.c.
References buf, fd, free(), malloc(), mtx, mtx_pool_find(), mtxpool_sleep, namei(), sonewconn(), unp_connect2(), unp_copy_peercred(), UNP_PCB_LOCK, unp_pcb_lock_pair(), UNP_PCB_LOCKPTR, UNP_PCB_UNLOCK, unp_pcb_unlock_pair(), and vput().
Referenced by uipc_connectat(), and unp_connect().
void unp_copy_peercred | ( | struct thread * | td, |
struct unpcb * | client_unp, | ||
struct unpcb * | server_unp, | ||
struct unpcb * | listen_unp | ||
) |
Definition at line 1673 of file uipc_usrreq.c.
References cru2xt().
Referenced by kern_socketpair(), and unp_connectat().
|
static |
Definition at line 2479 of file uipc_usrreq.c.
References closef_nothread(), malloc(), taskqueue_enqueue(), unp_defer_task, UNP_DEFERRED_LOCK, UNP_DEFERRED_UNLOCK, and unp_externalize_fp().
Referenced by unp_freerights().
|
static |
Definition at line 1734 of file uipc_usrreq.c.
References soisdisconnected(), UNP_PCB_LOCK_ASSERT, unp_pcb_rele(), unp_pcb_rele_notlast(), UNP_PCB_UNLOCK, UNP_REF_LIST_LOCK, and UNP_REF_LIST_UNLOCK.
Referenced by uipc_close(), uipc_detach(), uipc_disconnect(), uipc_send(), and unp_drop().
|
static |
Definition at line 2793 of file uipc_usrreq.c.
References unp_dispose_mbuf(), UNP_LINK_WLOCK, and UNP_LINK_WUNLOCK.
|
static |
Definition at line 2782 of file uipc_usrreq.c.
References unp_freerights(), and unp_scan().
Referenced by uipc_send(), and unp_dispose().
|
static |
Definition at line 1968 of file uipc_usrreq.c.
References unp_disconnect(), UNP_PCB_LOCK, unp_pcb_lock_peer(), unp_pcb_rele(), unp_pcb_rele_notlast(), and UNP_PCB_UNLOCK.
Referenced by uipc_abort(), and uipc_detach().
|
static |
Definition at line 2009 of file uipc_usrreq.c.
References _finstall(), data, fdallocn(), flags, free(), m_freem(), sbcreatecontrol(), unp_externalize_fp(), unp_freerights(), and UNP_LINK_UNLOCK_ASSERT.
|
static |
Definition at line 2537 of file uipc_usrreq.c.
References fptounp(), UNP_LINK_WLOCK, UNP_LINK_WUNLOCK, and unp_rights.
Referenced by unp_discard(), and unp_externalize().
|
static |
Definition at line 1993 of file uipc_usrreq.c.
References filecaps_free(), free(), and unp_discard().
Referenced by unp_dispose_mbuf(), unp_externalize(), and unp_internalize_cleanup_rights().
|
static |
Definition at line 2652 of file uipc_usrreq.c.
References free(), malloc(), sorflush(), unp_dhead, unp_gc_scan(), UNP_LINK_RLOCK, UNP_LINK_RUNLOCK, unp_marked, unp_recycled, unp_remove_dead_ref(), unp_restore_undead_ref(), unp_shead, unp_sphead, and unp_taskcount.
Referenced by unp_init().
|
static |
Definition at line 2610 of file uipc_usrreq.c.
References unp_scan().
Referenced by unp_gc().
|
static |
Definition at line 2149 of file uipc_usrreq.c.
References maxsockets, unp_defer_task, UNP_DEFERRED_LOCK_INIT, unp_dhead, unp_gc(), unp_gc_task, UNP_LINK_LOCK_INIT, unp_process_defers(), unp_shead, unp_sphead, unp_zone, and unp_zone_change().
|
static |
Definition at line 2195 of file uipc_usrreq.c.
References bintime(), bt, data, filecaps_copy(), m_freem(), malloc(), microtime(), nanotime(), nanouptime(), sbcreatecontrol(), ts, unp_internalize_cleanup_rights(), unp_internalize_fp(), and UNP_LINK_UNLOCK_ASSERT.
Referenced by uipc_send().
|
static |
Definition at line 2176 of file uipc_usrreq.c.
References data, and unp_freerights().
Referenced by unp_internalize().
|
static |
Definition at line 2523 of file uipc_usrreq.c.
References fptounp(), UNP_LINK_WLOCK, UNP_LINK_WUNLOCK, and unp_rights.
Referenced by unp_internalize().
|
static |
Definition at line 314 of file uipc_usrreq.c.
Referenced by uipc_abort(), uipc_detach(), unp_connect2(), unp_pcb_lock_peer(), and unp_pcblist().
|
static |
Definition at line 347 of file uipc_usrreq.c.
References UNP_PCB_LOCK, and UNP_PCB_UNLOCK_ASSERT.
Referenced by uipc_connect2(), and unp_connectat().
|
static |
Definition at line 378 of file uipc_usrreq.c.
References unp_pcb_hold(), UNP_PCB_LOCK, UNP_PCB_LOCK_ASSERT, unp_pcb_rele(), UNP_PCB_TRYLOCK, UNP_PCB_UNLOCK, UNP_PCB_UNLOCK_ASSERT, and wakeup().
Referenced by uipc_accept(), uipc_close(), uipc_detach(), uipc_disconnect(), uipc_ready(), uipc_send(), and unp_drop().
|
static |
Definition at line 323 of file uipc_usrreq.c.
References UNP_PCB_LOCK_ASSERT, UNP_PCB_LOCK_DESTROY, UNP_PCB_UNLOCK, and unp_zone.
Referenced by uipc_detach(), unp_disconnect(), unp_drop(), unp_pcb_lock_peer(), and unp_pcblist().
|
static |
Definition at line 338 of file uipc_usrreq.c.
Referenced by unp_disconnect(), and unp_drop().
|
static |
Definition at line 364 of file uipc_usrreq.c.
References UNP_PCB_UNLOCK.
Referenced by uipc_accept(), uipc_connect2(), uipc_send(), and unp_connectat().
|
static |
Definition at line 1800 of file uipc_usrreq.c.
References cr_cansee(), free(), malloc(), panic(), so_gencnt, sotoxsocket(), unp_count, unp_dhead, unp_gencnt, UNP_LINK_RLOCK, UNP_LINK_RUNLOCK, unp_pcb_hold(), UNP_PCB_LOCK, unp_pcb_rele(), UNP_PCB_UNLOCK, unp_shead, and unp_sphead.
|
static |
|
static |
Definition at line 2496 of file uipc_usrreq.c.
References closef_nothread(), count, free(), SLIST_HEAD(), UNP_DEFERRED_LOCK, and UNP_DEFERRED_UNLOCK.
|
static |
Definition at line 2561 of file uipc_usrreq.c.
References fptounp(), taskqueue_member(), and UNP_LINK_LOCK_ASSERT.
Referenced by unp_gc().
|
static |
Definition at line 2585 of file uipc_usrreq.c.
References fptounp(), taskqueue_member(), UNP_LINK_LOCK_ASSERT, and unp_marked.
Referenced by unp_gc().
|
static |
Definition at line 2806 of file uipc_usrreq.c.
References data.
Referenced by unp_dispose_mbuf(), and unp_gc_scan().
|
static |
Definition at line 1951 of file uipc_usrreq.c.
References socantrcvmore(), and UNP_PCB_LOCK_ASSERT.
Referenced by uipc_send(), and uipc_shutdown().
|
static |
Definition at line 2121 of file uipc_usrreq.c.
References maxsockets, and unp_zone.
Referenced by unp_init().
void vfs_unp_reclaim | ( | struct vnode * | vp | ) |
Definition at line 2855 of file uipc_usrreq.c.
References mtx, mtx_pool_find(), mtxpool_sleep, UNP_PCB_LOCK, UNP_PCB_UNLOCK, and vunref().
Referenced by vgonel().
|
static |
Definition at line 423 of file uipc_usrreq.c.
Referenced by fptounp().
|
static |
Definition at line 426 of file uipc_usrreq.c.
|
static |
Definition at line 1316 of file uipc_usrreq.c.
|
static |
Definition at line 425 of file uipc_usrreq.c.
|
static |
Definition at line 424 of file uipc_usrreq.c.
|
static |
Definition at line 114 of file uipc_usrreq.c.
Referenced by uipc_attach(), uipc_detach(), and unp_pcblist().
|
static |
Definition at line 143 of file uipc_usrreq.c.
Referenced by unp_discard(), and unp_init().
|
static |
Definition at line 252 of file uipc_usrreq.c.
|
static |
Definition at line 118 of file uipc_usrreq.c.
Referenced by uipc_attach(), unp_gc(), unp_init(), and unp_pcblist().
|
static |
Definition at line 136 of file uipc_usrreq.c.
Referenced by uipc_detach(), and unp_init().
|
static |
Definition at line 113 of file uipc_usrreq.c.
Referenced by uipc_attach(), uipc_detach(), and unp_pcblist().
|
static |
Definition at line 115 of file uipc_usrreq.c.
Referenced by uipc_attach().
|
static |
Definition at line 251 of file uipc_usrreq.c.
|
static |
Definition at line 2558 of file uipc_usrreq.c.
Referenced by unp_gc(), and unp_restore_undead_ref().
|
static |
Definition at line 2640 of file uipc_usrreq.c.
Referenced by unp_gc().
|
static |
Definition at line 116 of file uipc_usrreq.c.
Referenced by uipc_detach(), unp_externalize_fp(), and unp_internalize_fp().
|
static |
Definition at line 117 of file uipc_usrreq.c.
Referenced by uipc_attach(), uipc_ready(), unp_gc(), unp_init(), and unp_pcblist().
|
static |
Definition at line 119 of file uipc_usrreq.c.
Referenced by uipc_attach(), unp_gc(), unp_init(), and unp_pcblist().
|
static |
Definition at line 2644 of file uipc_usrreq.c.
Referenced by unp_gc().
|
static |
Definition at line 112 of file uipc_usrreq.c.
Referenced by uipc_attach(), unp_init(), unp_pcb_rele(), and unp_zone_change().
|
static |
Definition at line 160 of file uipc_usrreq.c.
Referenced by uipc_attach().
|
static |
Definition at line 159 of file uipc_usrreq.c.
Referenced by uipc_attach().
|
static |
Definition at line 162 of file uipc_usrreq.c.
Referenced by uipc_attach().
|
static |
Definition at line 161 of file uipc_usrreq.c.
Referenced by uipc_attach().
|
static |
Definition at line 158 of file uipc_usrreq.c.
Referenced by uipc_attach().
|
static |
Definition at line 157 of file uipc_usrreq.c.
Referenced by uipc_attach().