FreeBSD kernel IPv4 code
in_pcb.h File Reference
#include <sys/queue.h>
#include <sys/epoch.h>
#include <sys/_lock.h>
#include <sys/_mutex.h>
#include <sys/_rwlock.h>
#include <net/route.h>
#include <sys/lock.h>
#include <sys/proc.h>
#include <sys/rwlock.h>
#include <sys/smr.h>
#include <sys/sysctl.h>
#include <net/vnet.h>
#include <vm/uma.h>
#include <sys/ck.h>
Include dependency graph for in_pcb.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  in_addr_4in6
 
union  in_dependaddr
 
struct  in_endpoints
 
struct  in_conninfo
 
struct  inpcb
 
struct  inpcbinfo
 
struct  inpcbstorage
 
struct  inpcblbgroup
 
struct  inpcb_iterator
 

Macros

#define ie_faddr   ie_dependfaddr.id46_addr.ia46_addr4
 
#define ie_laddr   ie_dependladdr.id46_addr.ia46_addr4
 
#define ie6_faddr   ie_dependfaddr.id6_addr
 
#define ie6_laddr   ie_dependladdr.id6_addr
 
#define INC_ISIPV6   0x01
 
#define INC_IPV6MINMTU   0x02
 
#define inc_fport   inc_ie.ie_fport
 
#define inc_lport   inc_ie.ie_lport
 
#define inc_faddr   inc_ie.ie_faddr
 
#define inc_laddr   inc_ie.ie_laddr
 
#define inc6_faddr   inc_ie.ie6_faddr
 
#define inc6_laddr   inc_ie.ie6_laddr
 
#define inc6_zoneid   inc_ie.ie6_zoneid
 
#define inp_start_zero   inp_hpts
 
#define inp_zero_size
 
#define inp_fport   inp_inc.inc_fport
 
#define inp_lport   inp_inc.inc_lport
 
#define inp_faddr   inp_inc.inc_faddr
 
#define inp_laddr   inp_inc.inc_laddr
 
#define in6p_faddr   inp_inc.inc6_faddr
 
#define in6p_laddr   inp_inc.inc6_laddr
 
#define in6p_zoneid   inp_inc.inc6_zoneid
 
#define inp_vnet   inp_pcbinfo->ipi_vnet
 
#define INPCBSTORAGE_DEFINE(prot, lname, zname, iname, hname)
 
#define il_laddr   il_dependladdr.id46_addr.ia46_addr4
 
#define il6_laddr   il_dependladdr.id6_addr
 
#define INP_LOCK_DESTROY(inp)   rw_destroy(&(inp)->inp_lock)
 
#define INP_RLOCK(inp)   rw_rlock(&(inp)->inp_lock)
 
#define INP_WLOCK(inp)   rw_wlock(&(inp)->inp_lock)
 
#define INP_TRY_RLOCK(inp)   rw_try_rlock(&(inp)->inp_lock)
 
#define INP_TRY_WLOCK(inp)   rw_try_wlock(&(inp)->inp_lock)
 
#define INP_RUNLOCK(inp)   rw_runlock(&(inp)->inp_lock)
 
#define INP_WUNLOCK(inp)   rw_wunlock(&(inp)->inp_lock)
 
#define INP_UNLOCK(inp)   rw_unlock(&(inp)->inp_lock)
 
#define INP_TRY_UPGRADE(inp)   rw_try_upgrade(&(inp)->inp_lock)
 
#define INP_DOWNGRADE(inp)   rw_downgrade(&(inp)->inp_lock)
 
#define INP_WLOCKED(inp)   rw_wowned(&(inp)->inp_lock)
 
#define INP_LOCK_ASSERT(inp)   rw_assert(&(inp)->inp_lock, RA_LOCKED)
 
#define INP_RLOCK_ASSERT(inp)   rw_assert(&(inp)->inp_lock, RA_RLOCKED)
 
#define INP_WLOCK_ASSERT(inp)   rw_assert(&(inp)->inp_lock, RA_WLOCKED)
 
#define INP_UNLOCK_ASSERT(inp)   rw_assert(&(inp)->inp_lock, RA_UNLOCKED)
 
#define inp_lock_assert(inp)   do {} while (0)
 
#define inp_unlock_assert(inp)   do {} while (0)
 
#define INP_INFO_WLOCK(ipi)   mtx_lock(&(ipi)->ipi_lock)
 
#define INP_INFO_WLOCKED(ipi)   mtx_owned(&(ipi)->ipi_lock)
 
#define INP_INFO_WUNLOCK(ipi)   mtx_unlock(&(ipi)->ipi_lock)
 
#define INP_INFO_LOCK_ASSERT(ipi)
 
#define INP_INFO_WLOCK_ASSERT(ipi)   mtx_assert(&(ipi)->ipi_lock, MA_OWNED)
 
#define INP_INFO_WUNLOCK_ASSERT(ipi)    mtx_assert(&(ipi)->ipi_lock, MA_NOTOWNED)
 
#define INP_HASH_WLOCK(ipi)   mtx_lock(&(ipi)->ipi_hash_lock)
 
#define INP_HASH_WUNLOCK(ipi)   mtx_unlock(&(ipi)->ipi_hash_lock)
 
#define INP_HASH_LOCK_ASSERT(ipi)
 
#define INP_HASH_WLOCK_ASSERT(ipi)
 
#define IN_ADDR_JHASH32(addr)
 
#define IN6_ADDR_JHASH32(addr)
 
#define INP_PCBHASH(faddr, lport, fport, mask)    ((IN_ADDR_JHASH32(faddr) ^ ntohs((lport) ^ (fport))) & (mask))
 
#define INP6_PCBHASH(faddr, lport, fport, mask)    ((IN6_ADDR_JHASH32(faddr) ^ ntohs((lport) ^ (fport))) & (mask))
 
#define INP_PCBHASH_WILD(lport, mask)    ((V_in_pcbhashseed ^ ntohs(lport)) & (mask))
 
#define INP_PCBLBGROUP_PKTHASH(faddr, lport, fport)    (IN_ADDR_JHASH32(faddr) ^ ntohs((lport) ^ (fport)))
 
#define INP6_PCBLBGROUP_PKTHASH(faddr, lport, fport)    (IN6_ADDR_JHASH32(faddr) ^ ntohs((lport) ^ (fport)))
 
#define INP_PCBPORTHASH(lport, mask)   (ntohs((lport)) & (mask))
 
#define INP_IPV4   0x1
 
#define INP_IPV6   0x2
 
#define INP_IPV6PROTO   0x4 /* opened under IPv6 protocol */
 
#define INP_RECVOPTS   0x00000001 /* receive incoming IP options */
 
#define INP_RECVRETOPTS   0x00000002 /* receive IP options for reply */
 
#define INP_RECVDSTADDR   0x00000004 /* receive IP dst address */
 
#define INP_HDRINCL   0x00000008 /* user supplies entire IP header */
 
#define INP_HIGHPORT   0x00000010 /* user wants "high" port binding */
 
#define INP_LOWPORT   0x00000020 /* user wants "low" port binding */
 
#define INP_ANONPORT   0x00000040 /* port chosen for user */
 
#define INP_RECVIF   0x00000080 /* receive incoming interface */
 
#define INP_MTUDISC   0x00000100 /* user can do MTU discovery */
 
#define INP_RECVTTL   0x00000400 /* receive incoming IP TTL */
 
#define INP_DONTFRAG   0x00000800 /* don't fragment packet */
 
#define INP_BINDANY   0x00001000 /* allow bind to any address */
 
#define INP_INHASHLIST   0x00002000 /* in_pcbinshash() has been called */
 
#define INP_RECVTOS   0x00004000 /* receive incoming IP TOS */
 
#define IN6P_IPV6_V6ONLY   0x00008000 /* restrict AF_INET6 socket for v6 */
 
#define IN6P_PKTINFO   0x00010000 /* receive IP6 dst and I/F */
 
#define IN6P_HOPLIMIT   0x00020000 /* receive hoplimit */
 
#define IN6P_HOPOPTS   0x00040000 /* receive hop-by-hop options */
 
#define IN6P_DSTOPTS   0x00080000 /* receive dst options after rthdr */
 
#define IN6P_RTHDR   0x00100000 /* receive routing header */
 
#define IN6P_RTHDRDSTOPTS   0x00200000 /* receive dstoptions before rthdr */
 
#define IN6P_TCLASS   0x00400000 /* receive traffic class value */
 
#define IN6P_AUTOFLOWLABEL   0x00800000 /* attach flowlabel automatically */
 
#define INP_TIMEWAIT   0x01000000 /* in TIMEWAIT, ppcb is tcptw */
 
#define INP_ONESBCAST   0x02000000 /* send all-ones broadcast */
 
#define INP_DROPPED   0x04000000 /* protocol drop flag */
 
#define INP_SOCKREF   0x08000000 /* strong socket reference */
 
#define INP_RESERVED_0   0x10000000 /* reserved field */
 
#define INP_RESERVED_1   0x20000000 /* reserved field */
 
#define IN6P_RFC2292   0x40000000 /* used RFC2292 API on the socket */
 
#define IN6P_MTU   0x80000000 /* receive path MTU */
 
#define INP_CONTROLOPTS
 
#define INP_MBUF_L_ACKS   0x00000001 /* We need large mbufs for ack compression */
 
#define INP_MBUF_ACKCMP   0x00000002 /* TCP mbuf ack compression ok */
 
#define INP_REUSEPORT   0x00000008 /* SO_REUSEPORT option is set */
 
#define INP_REUSEADDR   0x00000020 /* SO_REUSEADDR option is set */
 
#define INP_BINDMULTI   0x00000040 /* IP_BINDMULTI option is set */
 
#define INP_RSS_BUCKET_SET   0x00000080 /* IP_RSS_LISTEN_BUCKET is set */
 
#define INP_RECVFLOWID   0x00000100 /* populate recv datagram with flow info */
 
#define INP_RECVRSSBUCKETID   0x00000200 /* populate recv datagram with bucket id */
 
#define INP_RATE_LIMIT_CHANGED   0x00000400 /* rate limit needs attention */
 
#define INP_ORIGDSTADDR   0x00000800 /* receive IP dst address/port */
 
#define INP_CANNOT_DO_ECN   0x00001000 /* The stack does not do ECN */
 
#define INP_REUSEPORT_LB   0x00002000 /* SO_REUSEPORT_LB option is set */
 
#define INP_SUPPORTS_MBUFQ   0x00004000 /* Supports the mbuf queue method of LRO */
 
#define INP_MBUF_QUEUE_READY   0x00008000 /* The transport is pacing, inputs can be queued */
 
#define INP_DONT_SACK_QUEUE   0x00010000 /* If a sack arrives do not wake me */
 
#define INP_2PCP_SET   0x00020000 /* If the Eth PCP should be set explicitly */
 
#define INP_2PCP_BIT0   0x00040000 /* Eth PCP Bit 0 */
 
#define INP_2PCP_BIT1   0x00080000 /* Eth PCP Bit 1 */
 
#define INP_2PCP_BIT2   0x00100000 /* Eth PCP Bit 2 */
 
#define INP_2PCP_BASE   INP_2PCP_BIT0
 
#define INP_2PCP_MASK   (INP_2PCP_BIT0 | INP_2PCP_BIT1 | INP_2PCP_BIT2)
 
#define INP_2PCP_SHIFT   18 /* shift PCP field in/out of inp_flags2 */
 
#define INPLOOKUP_MASK
 
#define INPLOOKUP_LOCKMASK   (INPLOOKUP_RLOCKPCB | INPLOOKUP_WLOCKPCB)
 
#define sotoinpcb(so)   ((struct inpcb *)(so)->so_pcb)
 
#define INP_SOCKAF(so)   so->so_proto->pr_domain->dom_family
 
#define INP_CHECK_SOCKAF(so, af)   (INP_SOCKAF(so) == af)
 
#define V_ipport_reservedhigh   VNET(ipport_reservedhigh)
 
#define V_ipport_reservedlow   VNET(ipport_reservedlow)
 
#define V_ipport_lowfirstauto   VNET(ipport_lowfirstauto)
 
#define V_ipport_lowlastauto   VNET(ipport_lowlastauto)
 
#define V_ipport_firstauto   VNET(ipport_firstauto)
 
#define V_ipport_lastauto   VNET(ipport_lastauto)
 
#define V_ipport_hifirstauto   VNET(ipport_hifirstauto)
 
#define V_ipport_hilastauto   VNET(ipport_hilastauto)
 
#define V_ipport_randomized   VNET(ipport_randomized)
 
#define V_ipport_randomcps   VNET(ipport_randomcps)
 
#define V_ipport_randomtime   VNET(ipport_randomtime)
 
#define V_ipport_stoprandom   VNET(ipport_stoprandom)
 
#define V_ipport_tcpallocs   VNET(ipport_tcpallocs)
 
#define INP_ALL_LIST   -1
 
#define INP_ITERATOR(_ipi, _lock, _match, _ctx)
 
#define INP_ALL_ITERATOR(_ipi, _lock)
 

Typedefs

typedef uint64_t inp_gen_t
 
typedef bool inp_match_t(const struct inpcb *, void *)
 

Enumerations

enum  inp_lookup_t { INPLOOKUP_WILDCARD = 0x00000001 , INPLOOKUP_RLOCKPCB = 0x00000002 , INPLOOKUP_WLOCKPCB = 0x00000004 }
 

Functions

 CK_LIST_HEAD (inpcbhead, inpcb)
 
 CK_LIST_HEAD (inpcbporthead, inpcbport)
 
 CK_LIST_HEAD (inpcblbgrouphead, inpcblbgroup)
 
void inp_wlock (struct inpcb *)
 
void inp_wunlock (struct inpcb *)
 
void inp_rlock (struct inpcb *)
 
void inp_runlock (struct inpcb *)
 
void inp_apply_all (void(*func)(struct inpcb *, void *), void *arg)
 
int inp_ip_tos_get (const struct inpcb *inp)
 
void inp_ip_tos_set (struct inpcb *inp, int val)
 
struct socket * inp_inpcbtosocket (struct inpcb *inp)
 
struct tcpcbinp_inpcbtotcpcb (struct inpcb *inp)
 
void inp_4tuple_get (struct inpcb *inp, uint32_t *laddr, uint16_t *lp, uint32_t *faddr, uint16_t *fp)
 
int inp_so_options (const struct inpcb *inp)
 
 VNET_DECLARE (int, ipport_reservedhigh)
 
 VNET_DECLARE (int, ipport_reservedlow)
 
 VNET_DECLARE (int, ipport_lowfirstauto)
 
 VNET_DECLARE (int, ipport_lowlastauto)
 
 VNET_DECLARE (int, ipport_firstauto)
 
 VNET_DECLARE (int, ipport_lastauto)
 
 VNET_DECLARE (int, ipport_hifirstauto)
 
 VNET_DECLARE (int, ipport_hilastauto)
 
 VNET_DECLARE (int, ipport_randomized)
 
 VNET_DECLARE (int, ipport_randomcps)
 
 VNET_DECLARE (int, ipport_randomtime)
 
 VNET_DECLARE (int, ipport_stoprandom)
 
 VNET_DECLARE (int, ipport_tcpallocs)
 
void in_pcbinfo_init (struct inpcbinfo *, struct inpcbstorage *, u_int, u_int)
 
void in_pcbinfo_destroy (struct inpcbinfo *)
 
void in_pcbstorage_init (void *)
 
void in_pcbstorage_destroy (void *)
 
int in_pcbbind_check_bindmulti (const struct inpcb *ni, const struct inpcb *oi)
 
void in_pcbpurgeif0 (struct inpcbinfo *, struct ifnet *)
 
int in_pcballoc (struct socket *, struct inpcbinfo *)
 
int in_pcbbind (struct inpcb *, struct sockaddr *, struct ucred *)
 
int in_pcbbind_setup (struct inpcb *, struct sockaddr *, in_addr_t *, u_short *, struct ucred *)
 
int in_pcbconnect (struct inpcb *, struct sockaddr *, struct ucred *, bool)
 
int in_pcbconnect_setup (struct inpcb *, struct sockaddr *, in_addr_t *, u_short *, in_addr_t *, u_short *, struct inpcb **, struct ucred *)
 
void in_pcbdetach (struct inpcb *)
 
void in_pcbdisconnect (struct inpcb *)
 
void in_pcbdrop (struct inpcb *)
 
void in_pcbfree (struct inpcb *)
 
int in_pcbinshash (struct inpcb *)
 
int in_pcbladdr (struct inpcb *, struct in_addr *, struct in_addr *, struct ucred *)
 
int in_pcblbgroup_numa (struct inpcb *, int arg)
 
struct inpcbin_pcblookup (struct inpcbinfo *, struct in_addr, u_int, struct in_addr, u_int, int, struct ifnet *)
 
struct inpcbin_pcblookup_mbuf (struct inpcbinfo *, struct in_addr, u_int, struct in_addr, u_int, int, struct ifnet *, struct mbuf *)
 
void in_pcbnotifyall (struct inpcbinfo *pcbinfo, struct in_addr, int, struct inpcb *(*)(struct inpcb *, int))
 
void in_pcbref (struct inpcb *)
 
void in_pcbrehash (struct inpcb *)
 
bool in_pcbrele_rlocked (struct inpcb *)
 
bool in_pcbrele_wlocked (struct inpcb *)
 
struct inpcbinp_next (struct inpcb_iterator *)
 
void in_losing (struct inpcb *)
 
void in_pcbsetsolabel (struct socket *so)
 
int in_getpeeraddr (struct socket *so, struct sockaddr **nam)
 
int in_getsockaddr (struct socket *so, struct sockaddr **nam)
 
struct sockaddr * in_sockaddr (in_port_t port, struct in_addr *addr)
 
void in_pcbsosetlabel (struct socket *so)
 

Macro Definition Documentation

◆ ie6_faddr

#define ie6_faddr   ie_dependfaddr.id6_addr

Definition at line 104 of file in_pcb.h.

◆ ie6_laddr

#define ie6_laddr   ie_dependladdr.id6_addr

Definition at line 105 of file in_pcb.h.

◆ ie_faddr

#define ie_faddr   ie_dependfaddr.id46_addr.ia46_addr4

Definition at line 102 of file in_pcb.h.

◆ ie_laddr

#define ie_laddr   ie_dependladdr.id46_addr.ia46_addr4

Definition at line 103 of file in_pcb.h.

◆ il6_laddr

#define il6_laddr   il_dependladdr.id6_addr

Definition at line 510 of file in_pcb.h.

◆ il_laddr

#define il_laddr   il_dependladdr.id46_addr.ia46_addr4

Definition at line 509 of file in_pcb.h.

◆ IN6_ADDR_JHASH32

#define IN6_ADDR_JHASH32 (   addr)
Value:
(memcmp((addr), &in6addr_any, sizeof(in6addr_any)) == 0 ? \
V_in_pcbhashseed : \
jenkins_hash32((addr)->__u6_addr.__u6_addr32, \
nitems((addr)->__u6_addr.__u6_addr32), V_in_pcbhashseed))
#define V_in_pcbhashseed
Definition: in_pcb_var.h:48

Definition at line 589 of file in_pcb.h.

◆ IN6P_AUTOFLOWLABEL

#define IN6P_AUTOFLOWLABEL   0x00800000 /* attach flowlabel automatically */

Definition at line 643 of file in_pcb.h.

◆ IN6P_DSTOPTS

#define IN6P_DSTOPTS   0x00080000 /* receive dst options after rthdr */

Definition at line 639 of file in_pcb.h.

◆ in6p_faddr

#define in6p_faddr   inp_inc.inc6_faddr

Definition at line 313 of file in_pcb.h.

◆ IN6P_HOPLIMIT

#define IN6P_HOPLIMIT   0x00020000 /* receive hoplimit */

Definition at line 637 of file in_pcb.h.

◆ IN6P_HOPOPTS

#define IN6P_HOPOPTS   0x00040000 /* receive hop-by-hop options */

Definition at line 638 of file in_pcb.h.

◆ IN6P_IPV6_V6ONLY

#define IN6P_IPV6_V6ONLY   0x00008000 /* restrict AF_INET6 socket for v6 */

Definition at line 635 of file in_pcb.h.

◆ in6p_laddr

#define in6p_laddr   inp_inc.inc6_laddr

Definition at line 314 of file in_pcb.h.

◆ IN6P_MTU

#define IN6P_MTU   0x80000000 /* receive path MTU */

Definition at line 651 of file in_pcb.h.

◆ IN6P_PKTINFO

#define IN6P_PKTINFO   0x00010000 /* receive IP6 dst and I/F */

Definition at line 636 of file in_pcb.h.

◆ IN6P_RFC2292

#define IN6P_RFC2292   0x40000000 /* used RFC2292 API on the socket */

Definition at line 650 of file in_pcb.h.

◆ IN6P_RTHDR

#define IN6P_RTHDR   0x00100000 /* receive routing header */

Definition at line 640 of file in_pcb.h.

◆ IN6P_RTHDRDSTOPTS

#define IN6P_RTHDRDSTOPTS   0x00200000 /* receive dstoptions before rthdr */

Definition at line 641 of file in_pcb.h.

◆ IN6P_TCLASS

#define IN6P_TCLASS   0x00400000 /* receive traffic class value */

Definition at line 642 of file in_pcb.h.

◆ in6p_zoneid

#define in6p_zoneid   inp_inc.inc6_zoneid

Definition at line 315 of file in_pcb.h.

◆ IN_ADDR_JHASH32

#define IN_ADDR_JHASH32 (   addr)
Value:
jenkins_hash32((&(addr)->s_addr), 1, V_in_pcbhashseed))
#define INADDR_ANY
Definition: in.h:48
union @45::@47 s_addr

Definition at line 586 of file in_pcb.h.

◆ inc6_faddr

#define inc6_faddr   inc_ie.ie6_faddr

Definition at line 131 of file in_pcb.h.

◆ inc6_laddr

#define inc6_laddr   inc_ie.ie6_laddr

Definition at line 132 of file in_pcb.h.

◆ inc6_zoneid

#define inc6_zoneid   inc_ie.ie6_zoneid

Definition at line 133 of file in_pcb.h.

◆ inc_faddr

#define inc_faddr   inc_ie.ie_faddr

Definition at line 129 of file in_pcb.h.

◆ inc_fport

#define inc_fport   inc_ie.ie_fport

Definition at line 127 of file in_pcb.h.

◆ INC_IPV6MINMTU

#define INC_IPV6MINMTU   0x02

Definition at line 125 of file in_pcb.h.

◆ INC_ISIPV6

#define INC_ISIPV6   0x01

Definition at line 124 of file in_pcb.h.

◆ inc_laddr

#define inc_laddr   inc_ie.ie_laddr

Definition at line 130 of file in_pcb.h.

◆ inc_lport

#define inc_lport   inc_ie.ie_lport

Definition at line 128 of file in_pcb.h.

◆ INP6_PCBHASH

#define INP6_PCBHASH (   faddr,
  lport,
  fport,
  mask 
)     ((IN6_ADDR_JHASH32(faddr) ^ ntohs((lport) ^ (fport))) & (mask))

Definition at line 597 of file in_pcb.h.

◆ INP6_PCBLBGROUP_PKTHASH

#define INP6_PCBLBGROUP_PKTHASH (   faddr,
  lport,
  fport 
)     (IN6_ADDR_JHASH32(faddr) ^ ntohs((lport) ^ (fport)))

Definition at line 605 of file in_pcb.h.

◆ INP_2PCP_BASE

#define INP_2PCP_BASE   INP_2PCP_BIT0

Definition at line 684 of file in_pcb.h.

◆ INP_2PCP_BIT0

#define INP_2PCP_BIT0   0x00040000 /* Eth PCP Bit 0 */

Definition at line 681 of file in_pcb.h.

◆ INP_2PCP_BIT1

#define INP_2PCP_BIT1   0x00080000 /* Eth PCP Bit 1 */

Definition at line 682 of file in_pcb.h.

◆ INP_2PCP_BIT2

#define INP_2PCP_BIT2   0x00100000 /* Eth PCP Bit 2 */

Definition at line 683 of file in_pcb.h.

◆ INP_2PCP_MASK

#define INP_2PCP_MASK   (INP_2PCP_BIT0 | INP_2PCP_BIT1 | INP_2PCP_BIT2)

Definition at line 685 of file in_pcb.h.

◆ INP_2PCP_SET

#define INP_2PCP_SET   0x00020000 /* If the Eth PCP should be set explicitly */

Definition at line 680 of file in_pcb.h.

◆ INP_2PCP_SHIFT

#define INP_2PCP_SHIFT   18 /* shift PCP field in/out of inp_flags2 */

Definition at line 686 of file in_pcb.h.

◆ INP_ALL_ITERATOR

#define INP_ALL_ITERATOR (   _ipi,
  _lock 
)
Value:
{ \
.ipi = (_ipi), \
.lock = (_lock), \
.hash = INP_ALL_LIST, \
}
#define INP_ALL_LIST
Definition: in_pcb.h:782

Definition at line 795 of file in_pcb.h.

◆ INP_ALL_LIST

#define INP_ALL_LIST   -1

Definition at line 782 of file in_pcb.h.

◆ INP_ANONPORT

#define INP_ANONPORT   0x00000040 /* port chosen for user */

Definition at line 626 of file in_pcb.h.

◆ INP_BINDANY

#define INP_BINDANY   0x00001000 /* allow bind to any address */

Definition at line 632 of file in_pcb.h.

◆ INP_BINDMULTI

#define INP_BINDMULTI   0x00000040 /* IP_BINDMULTI option is set */

Definition at line 669 of file in_pcb.h.

◆ INP_CANNOT_DO_ECN

#define INP_CANNOT_DO_ECN   0x00001000 /* The stack does not do ECN */

Definition at line 675 of file in_pcb.h.

◆ INP_CHECK_SOCKAF

#define INP_CHECK_SOCKAF (   so,
  af 
)    (INP_SOCKAF(so) == af)

Definition at line 705 of file in_pcb.h.

◆ INP_CONTROLOPTS

#define INP_CONTROLOPTS
Value:
INP_RECVIF|INP_RECVTTL|INP_RECVTOS|\
IN6P_PKTINFO|IN6P_HOPLIMIT|IN6P_HOPOPTS|\
IN6P_MTU)
#define INP_RECVRETOPTS
Definition: in_pcb.h:621
#define IN6P_HOPOPTS
Definition: in_pcb.h:638
#define INP_RECVTTL
Definition: in_pcb.h:630
#define INP_RECVTOS
Definition: in_pcb.h:634
#define IN6P_RTHDR
Definition: in_pcb.h:640
#define IN6P_RFC2292
Definition: in_pcb.h:650
#define INP_RECVDSTADDR
Definition: in_pcb.h:622
#define INP_RECVOPTS
Definition: in_pcb.h:620
#define IN6P_AUTOFLOWLABEL
Definition: in_pcb.h:643
#define IN6P_RTHDRDSTOPTS
Definition: in_pcb.h:641
#define IN6P_HOPLIMIT
Definition: in_pcb.h:637

Definition at line 653 of file in_pcb.h.

◆ INP_DONT_SACK_QUEUE

#define INP_DONT_SACK_QUEUE   0x00010000 /* If a sack arrives do not wake me */

Definition at line 679 of file in_pcb.h.

◆ INP_DONTFRAG

#define INP_DONTFRAG   0x00000800 /* don't fragment packet */

Definition at line 631 of file in_pcb.h.

◆ INP_DOWNGRADE

#define INP_DOWNGRADE (   inp)    rw_downgrade(&(inp)->inp_lock)

Definition at line 525 of file in_pcb.h.

◆ INP_DROPPED

#define INP_DROPPED   0x04000000 /* protocol drop flag */

Definition at line 646 of file in_pcb.h.

◆ inp_faddr

#define inp_faddr   inp_inc.inc_faddr

Definition at line 310 of file in_pcb.h.

◆ inp_fport

#define inp_fport   inp_inc.inc_fport

Definition at line 308 of file in_pcb.h.

◆ INP_HASH_LOCK_ASSERT

#define INP_HASH_LOCK_ASSERT (   ipi)
Value:
MPASS(SMR_ENTERED((ipi)->ipi_smr) || \
mtx_owned(&(ipi)->ipi_hash_lock))

Definition at line 574 of file in_pcb.h.

◆ INP_HASH_WLOCK

#define INP_HASH_WLOCK (   ipi)    mtx_lock(&(ipi)->ipi_hash_lock)

Definition at line 572 of file in_pcb.h.

◆ INP_HASH_WLOCK_ASSERT

#define INP_HASH_WLOCK_ASSERT (   ipi)
Value:
mtx_assert(&(ipi)->ipi_hash_lock, \
MA_OWNED)

Definition at line 576 of file in_pcb.h.

◆ INP_HASH_WUNLOCK

#define INP_HASH_WUNLOCK (   ipi)    mtx_unlock(&(ipi)->ipi_hash_lock)

Definition at line 573 of file in_pcb.h.

◆ INP_HDRINCL

#define INP_HDRINCL   0x00000008 /* user supplies entire IP header */

Definition at line 623 of file in_pcb.h.

◆ INP_HIGHPORT

#define INP_HIGHPORT   0x00000010 /* user wants "high" port binding */

Definition at line 624 of file in_pcb.h.

◆ INP_INFO_LOCK_ASSERT

#define INP_INFO_LOCK_ASSERT (   ipi)
Value:
MPASS(SMR_ENTERED((ipi)->ipi_smr) || \
mtx_owned(&(ipi)->ipi_lock))

Definition at line 566 of file in_pcb.h.

◆ INP_INFO_WLOCK

#define INP_INFO_WLOCK (   ipi)    mtx_lock(&(ipi)->ipi_lock)

Definition at line 563 of file in_pcb.h.

◆ INP_INFO_WLOCK_ASSERT

#define INP_INFO_WLOCK_ASSERT (   ipi)    mtx_assert(&(ipi)->ipi_lock, MA_OWNED)

Definition at line 568 of file in_pcb.h.

◆ INP_INFO_WLOCKED

#define INP_INFO_WLOCKED (   ipi)    mtx_owned(&(ipi)->ipi_lock)

Definition at line 564 of file in_pcb.h.

◆ INP_INFO_WUNLOCK

#define INP_INFO_WUNLOCK (   ipi)    mtx_unlock(&(ipi)->ipi_lock)

Definition at line 565 of file in_pcb.h.

◆ INP_INFO_WUNLOCK_ASSERT

#define INP_INFO_WUNLOCK_ASSERT (   ipi)     mtx_assert(&(ipi)->ipi_lock, MA_NOTOWNED)

Definition at line 569 of file in_pcb.h.

◆ INP_INHASHLIST

#define INP_INHASHLIST   0x00002000 /* in_pcbinshash() has been called */

Definition at line 633 of file in_pcb.h.

◆ INP_IPV4

#define INP_IPV4   0x1

Definition at line 613 of file in_pcb.h.

◆ INP_IPV6

#define INP_IPV6   0x2

Definition at line 614 of file in_pcb.h.

◆ INP_IPV6PROTO

#define INP_IPV6PROTO   0x4 /* opened under IPv6 protocol */

Definition at line 615 of file in_pcb.h.

◆ INP_ITERATOR

#define INP_ITERATOR (   _ipi,
  _lock,
  _match,
  _ctx 
)
Value:
{ \
.ipi = (_ipi), \
.lock = (_lock), \
.hash = INP_ALL_LIST, \
.match = (_match), \
.ctx = (_ctx), \
}

Definition at line 787 of file in_pcb.h.

◆ inp_laddr

#define inp_laddr   inp_inc.inc_laddr

Definition at line 311 of file in_pcb.h.

◆ INP_LOCK_ASSERT

#define INP_LOCK_ASSERT (   inp)    rw_assert(&(inp)->inp_lock, RA_LOCKED)

Definition at line 527 of file in_pcb.h.

◆ inp_lock_assert

#define inp_lock_assert (   inp)    do {} while (0)

Definition at line 546 of file in_pcb.h.

◆ INP_LOCK_DESTROY

#define INP_LOCK_DESTROY (   inp)    rw_destroy(&(inp)->inp_lock)

Definition at line 516 of file in_pcb.h.

◆ INP_LOWPORT

#define INP_LOWPORT   0x00000020 /* user wants "low" port binding */

Definition at line 625 of file in_pcb.h.

◆ inp_lport

#define inp_lport   inp_inc.inc_lport

Definition at line 309 of file in_pcb.h.

◆ INP_MBUF_ACKCMP

#define INP_MBUF_ACKCMP   0x00000002 /* TCP mbuf ack compression ok */

Definition at line 664 of file in_pcb.h.

◆ INP_MBUF_L_ACKS

#define INP_MBUF_L_ACKS   0x00000001 /* We need large mbufs for ack compression */

Definition at line 663 of file in_pcb.h.

◆ INP_MBUF_QUEUE_READY

#define INP_MBUF_QUEUE_READY   0x00008000 /* The transport is pacing, inputs can be queued */

Definition at line 678 of file in_pcb.h.

◆ INP_MTUDISC

#define INP_MTUDISC   0x00000100 /* user can do MTU discovery */

Definition at line 628 of file in_pcb.h.

◆ INP_ONESBCAST

#define INP_ONESBCAST   0x02000000 /* send all-ones broadcast */

Definition at line 645 of file in_pcb.h.

◆ INP_ORIGDSTADDR

#define INP_ORIGDSTADDR   0x00000800 /* receive IP dst address/port */

Definition at line 674 of file in_pcb.h.

◆ INP_PCBHASH

#define INP_PCBHASH (   faddr,
  lport,
  fport,
  mask 
)     ((IN_ADDR_JHASH32(faddr) ^ ntohs((lport) ^ (fport))) & (mask))

Definition at line 595 of file in_pcb.h.

◆ INP_PCBHASH_WILD

#define INP_PCBHASH_WILD (   lport,
  mask 
)     ((V_in_pcbhashseed ^ ntohs(lport)) & (mask))

Definition at line 600 of file in_pcb.h.

◆ INP_PCBLBGROUP_PKTHASH

#define INP_PCBLBGROUP_PKTHASH (   faddr,
  lport,
  fport 
)     (IN_ADDR_JHASH32(faddr) ^ ntohs((lport) ^ (fport)))

Definition at line 603 of file in_pcb.h.

◆ INP_PCBPORTHASH

#define INP_PCBPORTHASH (   lport,
  mask 
)    (ntohs((lport)) & (mask))

Definition at line 608 of file in_pcb.h.

◆ INP_RATE_LIMIT_CHANGED

#define INP_RATE_LIMIT_CHANGED   0x00000400 /* rate limit needs attention */

Definition at line 673 of file in_pcb.h.

◆ INP_RECVDSTADDR

#define INP_RECVDSTADDR   0x00000004 /* receive IP dst address */

Definition at line 622 of file in_pcb.h.

◆ INP_RECVFLOWID

#define INP_RECVFLOWID   0x00000100 /* populate recv datagram with flow info */

Definition at line 671 of file in_pcb.h.

◆ INP_RECVIF

#define INP_RECVIF   0x00000080 /* receive incoming interface */

Definition at line 627 of file in_pcb.h.

◆ INP_RECVOPTS

#define INP_RECVOPTS   0x00000001 /* receive incoming IP options */

Definition at line 620 of file in_pcb.h.

◆ INP_RECVRETOPTS

#define INP_RECVRETOPTS   0x00000002 /* receive IP options for reply */

Definition at line 621 of file in_pcb.h.

◆ INP_RECVRSSBUCKETID

#define INP_RECVRSSBUCKETID   0x00000200 /* populate recv datagram with bucket id */

Definition at line 672 of file in_pcb.h.

◆ INP_RECVTOS

#define INP_RECVTOS   0x00004000 /* receive incoming IP TOS */

Definition at line 634 of file in_pcb.h.

◆ INP_RECVTTL

#define INP_RECVTTL   0x00000400 /* receive incoming IP TTL */

Definition at line 630 of file in_pcb.h.

◆ INP_RESERVED_0

#define INP_RESERVED_0   0x10000000 /* reserved field */

Definition at line 648 of file in_pcb.h.

◆ INP_RESERVED_1

#define INP_RESERVED_1   0x20000000 /* reserved field */

Definition at line 649 of file in_pcb.h.

◆ INP_REUSEADDR

#define INP_REUSEADDR   0x00000020 /* SO_REUSEADDR option is set */

Definition at line 668 of file in_pcb.h.

◆ INP_REUSEPORT

#define INP_REUSEPORT   0x00000008 /* SO_REUSEPORT option is set */

Definition at line 666 of file in_pcb.h.

◆ INP_REUSEPORT_LB

#define INP_REUSEPORT_LB   0x00002000 /* SO_REUSEPORT_LB option is set */

Definition at line 676 of file in_pcb.h.

◆ INP_RLOCK

#define INP_RLOCK (   inp)    rw_rlock(&(inp)->inp_lock)

Definition at line 517 of file in_pcb.h.

◆ INP_RLOCK_ASSERT

#define INP_RLOCK_ASSERT (   inp)    rw_assert(&(inp)->inp_lock, RA_RLOCKED)

Definition at line 528 of file in_pcb.h.

◆ INP_RSS_BUCKET_SET

#define INP_RSS_BUCKET_SET   0x00000080 /* IP_RSS_LISTEN_BUCKET is set */

Definition at line 670 of file in_pcb.h.

◆ INP_RUNLOCK

#define INP_RUNLOCK (   inp)    rw_runlock(&(inp)->inp_lock)

Definition at line 521 of file in_pcb.h.

◆ INP_SOCKAF

#define INP_SOCKAF (   so)    so->so_proto->pr_domain->dom_family

Definition at line 703 of file in_pcb.h.

◆ INP_SOCKREF

#define INP_SOCKREF   0x08000000 /* strong socket reference */

Definition at line 647 of file in_pcb.h.

◆ inp_start_zero

#define inp_start_zero   inp_hpts

Definition at line 222 of file in_pcb.h.

◆ INP_SUPPORTS_MBUFQ

#define INP_SUPPORTS_MBUFQ   0x00004000 /* Supports the mbuf queue method of LRO */

Definition at line 677 of file in_pcb.h.

◆ INP_TIMEWAIT

#define INP_TIMEWAIT   0x01000000 /* in TIMEWAIT, ppcb is tcptw */

Definition at line 644 of file in_pcb.h.

◆ INP_TRY_RLOCK

#define INP_TRY_RLOCK (   inp)    rw_try_rlock(&(inp)->inp_lock)

Definition at line 519 of file in_pcb.h.

◆ INP_TRY_UPGRADE

#define INP_TRY_UPGRADE (   inp)    rw_try_upgrade(&(inp)->inp_lock)

Definition at line 524 of file in_pcb.h.

◆ INP_TRY_WLOCK

#define INP_TRY_WLOCK (   inp)    rw_try_wlock(&(inp)->inp_lock)

Definition at line 520 of file in_pcb.h.

◆ INP_UNLOCK

#define INP_UNLOCK (   inp)    rw_unlock(&(inp)->inp_lock)

Definition at line 523 of file in_pcb.h.

◆ INP_UNLOCK_ASSERT

#define INP_UNLOCK_ASSERT (   inp)    rw_assert(&(inp)->inp_lock, RA_UNLOCKED)

Definition at line 530 of file in_pcb.h.

◆ inp_unlock_assert

#define inp_unlock_assert (   inp)    do {} while (0)

Definition at line 547 of file in_pcb.h.

◆ inp_vnet

#define inp_vnet   inp_pcbinfo->ipi_vnet

Definition at line 317 of file in_pcb.h.

◆ INP_WLOCK

#define INP_WLOCK (   inp)    rw_wlock(&(inp)->inp_lock)

Definition at line 518 of file in_pcb.h.

◆ INP_WLOCK_ASSERT

#define INP_WLOCK_ASSERT (   inp)    rw_assert(&(inp)->inp_lock, RA_WLOCKED)

Definition at line 529 of file in_pcb.h.

◆ INP_WLOCKED

#define INP_WLOCKED (   inp)    rw_wowned(&(inp)->inp_lock)

Definition at line 526 of file in_pcb.h.

◆ INP_WUNLOCK

#define INP_WUNLOCK (   inp)    rw_wunlock(&(inp)->inp_lock)

Definition at line 522 of file in_pcb.h.

◆ inp_zero_size

#define inp_zero_size
Value:
(sizeof(struct inpcb) - \
offsetof(struct inpcb, inp_start_zero))
#define inp_start_zero
Definition: in_pcb.h:222
Definition: in_pcb.h:217

Definition at line 223 of file in_pcb.h.

◆ INPCBSTORAGE_DEFINE

#define INPCBSTORAGE_DEFINE (   prot,
  lname,
  zname,
  iname,
  hname 
)
Value:
static int \
prot##_inpcb_init(void *mem, int size __unused, int flags __unused) \
{ \
struct inpcb *inp = mem; \
\
rw_init_flags(&inp->inp_lock, lname, RW_RECURSE | RW_DUPOK); \
return (0); \
} \
static struct inpcbstorage prot = { \
.ips_pcbinit = prot##_inpcb_init, \
.ips_zone_name = zname, \
.ips_portzone_name = zname " ports", \
.ips_infolock_name = iname, \
.ips_hashlock_name = hname, \
}; \
SYSINIT(prot##_inpcbstorage_init, SI_SUB_PROTO_DOMAIN, \
SI_ORDER_SECOND, in_pcbstorage_init, &prot); \
SYSUNINIT(prot##_inpcbstorage_uninit, SI_SUB_PROTO_DOMAIN, \
SI_ORDER_SECOND, in_pcbstorage_destroy, &prot)
void in_pcbstorage_init(void *)
Definition: in_pcb.c:573
void in_pcbstorage_destroy(void *)
Definition: in_pcb.c:590
const char * ips_zone_name
Definition: in_pcb.h:468
uma_init ips_pcbinit
Definition: in_pcb.h:467

Definition at line 474 of file in_pcb.h.

◆ INPLOOKUP_LOCKMASK

#define INPLOOKUP_LOCKMASK   (INPLOOKUP_RLOCKPCB | INPLOOKUP_WLOCKPCB)

Definition at line 699 of file in_pcb.h.

◆ INPLOOKUP_MASK

#define INPLOOKUP_MASK
Value:
INPLOOKUP_WLOCKPCB)
@ INPLOOKUP_RLOCKPCB
Definition: in_pcb.h:693
@ INPLOOKUP_WILDCARD
Definition: in_pcb.h:692

Definition at line 697 of file in_pcb.h.

◆ sotoinpcb

#define sotoinpcb (   so)    ((struct inpcb *)(so)->so_pcb)

Definition at line 701 of file in_pcb.h.

◆ V_ipport_firstauto

#define V_ipport_firstauto   VNET(ipport_firstauto)

Definition at line 726 of file in_pcb.h.

◆ V_ipport_hifirstauto

#define V_ipport_hifirstauto   VNET(ipport_hifirstauto)

Definition at line 728 of file in_pcb.h.

◆ V_ipport_hilastauto

#define V_ipport_hilastauto   VNET(ipport_hilastauto)

Definition at line 729 of file in_pcb.h.

◆ V_ipport_lastauto

#define V_ipport_lastauto   VNET(ipport_lastauto)

Definition at line 727 of file in_pcb.h.

◆ V_ipport_lowfirstauto

#define V_ipport_lowfirstauto   VNET(ipport_lowfirstauto)

Definition at line 724 of file in_pcb.h.

◆ V_ipport_lowlastauto

#define V_ipport_lowlastauto   VNET(ipport_lowlastauto)

Definition at line 725 of file in_pcb.h.

◆ V_ipport_randomcps

#define V_ipport_randomcps   VNET(ipport_randomcps)

Definition at line 731 of file in_pcb.h.

◆ V_ipport_randomized

#define V_ipport_randomized   VNET(ipport_randomized)

Definition at line 730 of file in_pcb.h.

◆ V_ipport_randomtime

#define V_ipport_randomtime   VNET(ipport_randomtime)

Definition at line 732 of file in_pcb.h.

◆ V_ipport_reservedhigh

#define V_ipport_reservedhigh   VNET(ipport_reservedhigh)

Definition at line 722 of file in_pcb.h.

◆ V_ipport_reservedlow

#define V_ipport_reservedlow   VNET(ipport_reservedlow)

Definition at line 723 of file in_pcb.h.

◆ V_ipport_stoprandom

#define V_ipport_stoprandom   VNET(ipport_stoprandom)

Definition at line 733 of file in_pcb.h.

◆ V_ipport_tcpallocs

#define V_ipport_tcpallocs   VNET(ipport_tcpallocs)

Definition at line 734 of file in_pcb.h.

Typedef Documentation

◆ inp_gen_t

typedef uint64_t inp_gen_t

Definition at line 72 of file in_pcb.h.

◆ inp_match_t

typedef bool inp_match_t(const struct inpcb *, void *)

Definition at line 775 of file in_pcb.h.

Enumeration Type Documentation

◆ inp_lookup_t

Enumerator
INPLOOKUP_WILDCARD 
INPLOOKUP_RLOCKPCB 
INPLOOKUP_WLOCKPCB 

Definition at line 691 of file in_pcb.h.

Function Documentation

◆ CK_LIST_HEAD() [1/3]

CK_LIST_HEAD ( inpcbhead  ,
inpcb   
)

◆ CK_LIST_HEAD() [2/3]

CK_LIST_HEAD ( inpcblbgrouphead  ,
inpcblbgroup   
)

◆ CK_LIST_HEAD() [3/3]

CK_LIST_HEAD ( inpcbporthead  ,
inpcbport   
)

◆ in_getpeeraddr()

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

◆ in_getsockaddr()

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

◆ in_losing()

void in_losing ( struct inpcb inp)

Definition at line 2577 of file in_pcb.c.

References inpcb::inp_route.

Referenced by bbr_timeout_rxt(), rack_timeout_rxt(), and tcp_timer_rexmt().

Here is the caller graph for this function:

◆ in_pcballoc()

◆ in_pcbbind()

int in_pcbbind ( struct inpcb ,
struct sockaddr *  ,
struct ucred *   
)

Referenced by div_bind().

Here is the caller graph for this function:

◆ in_pcbbind_check_bindmulti()

int in_pcbbind_check_bindmulti ( const struct inpcb ni,
const struct inpcb oi 
)

Definition at line 904 of file in_pcb.c.

References INP_BINDMULTI, inpcb::inp_cred, and inpcb::inp_flags2.

◆ in_pcbbind_setup()

int in_pcbbind_setup ( struct inpcb ,
struct sockaddr *  ,
in_addr_t ,
u_short *  ,
struct ucred *   
)

◆ in_pcbconnect()

int in_pcbconnect ( struct inpcb ,
struct sockaddr *  ,
struct ucred *  ,
bool   
)

Referenced by syncache_socket().

Here is the caller graph for this function:

◆ in_pcbconnect_setup()

int in_pcbconnect_setup ( struct inpcb ,
struct sockaddr *  ,
in_addr_t ,
u_short *  ,
in_addr_t ,
u_short *  ,
struct inpcb **  ,
struct ucred *   
)

◆ in_pcbdetach()

void in_pcbdetach ( struct inpcb inp)

Definition at line 1524 of file in_pcb.c.

References inpcb::inp_snd_tag, and inpcb::inp_socket.

Referenced by div_detach(), tcp_usr_attach(), and tcp_usr_detach().

Here is the caller graph for this function:

◆ in_pcbdisconnect()

void in_pcbdisconnect ( struct inpcb )

◆ in_pcbdrop()

void in_pcbdrop ( struct inpcb inp)

◆ in_pcbfree()

◆ in_pcbinfo_destroy()

void in_pcbinfo_destroy ( struct inpcbinfo pcbinfo)

◆ in_pcbinfo_init()

◆ in_pcbinshash()

◆ in_pcbladdr()

int in_pcbladdr ( struct inpcb ,
struct in_addr ,
struct in_addr ,
struct ucred *   
)

◆ in_pcblbgroup_numa()

int in_pcblbgroup_numa ( struct inpcb inp,
int  arg 
)

◆ in_pcblookup()

struct inpcb * in_pcblookup ( struct inpcbinfo ,
struct in_addr  ,
u_int  ,
struct in_addr  ,
u_int  ,
int  ,
struct ifnet *   
)

Referenced by siftr_findinpcb(), sysctl_drop(), tcp_input_with_port(), and toe_4tuple_check().

Here is the caller graph for this function:

◆ in_pcblookup_mbuf()

struct inpcb * in_pcblookup_mbuf ( struct inpcbinfo ,
struct in_addr  ,
u_int  ,
struct in_addr  ,
u_int  ,
int  ,
struct ifnet *  ,
struct mbuf *   
)

Referenced by tcp_input_with_port().

Here is the caller graph for this function:

◆ in_pcbnotifyall()

void in_pcbnotifyall ( struct inpcbinfo pcbinfo,
struct in_addr  ,
int  ,
struct inpcb *)(struct inpcb *, int 
)

◆ in_pcbpurgeif0()

void in_pcbpurgeif0 ( struct inpcbinfo ,
struct ifnet *   
)

Referenced by in_ifdetach().

Here is the caller graph for this function:

◆ in_pcbref()

void in_pcbref ( struct inpcb inp)

Definition at line 1762 of file in_pcb.c.

References inpcb::inp_refcount.

Referenced by inp_hpts_insert(), inp_join_group(), tcp_log_tcpcbfini(), tcp_newtcpcb(), tcp_tw_2msl_scan(), and tcp_twstart().

Here is the caller graph for this function:

◆ in_pcbrehash()

◆ in_pcbrele_rlocked()

bool in_pcbrele_rlocked ( struct inpcb inp)

Definition at line 1775 of file in_pcb.c.

References inpcb::inp_flags, INP_FREED, inpcb::inp_in_hpts, inpcb::inp_pcbinfo, inpcb::inp_refcount, INP_RLOCK_ASSERT, INP_RUNLOCK, inpcb::inp_socket, and inpcbinfo::ipi_zone.

Referenced by in_pcbrele().

Here is the caller graph for this function:

◆ in_pcbrele_wlocked()

◆ in_pcbsetsolabel()

void in_pcbsetsolabel ( struct socket *  so)

◆ in_pcbsosetlabel()

void in_pcbsosetlabel ( struct socket *  so)

Definition at line 2589 of file in_pcb.c.

References INP_WLOCK, INP_WUNLOCK, and sotoinpcb.

◆ in_pcbstorage_destroy()

void in_pcbstorage_destroy ( void *  arg)

Definition at line 590 of file in_pcb.c.

References inpcbstorage::ips_portzone, and inpcbstorage::ips_zone.

◆ in_pcbstorage_init()

void in_pcbstorage_init ( void *  arg)

◆ in_sockaddr()

struct sockaddr * in_sockaddr ( in_port_t  port,
struct in_addr addr 
)

◆ inp_4tuple_get()

void inp_4tuple_get ( struct inpcb inp,
uint32_t laddr,
uint16_t lp,
uint32_t faddr,
uint16_t fp 
)

Definition at line 2743 of file in_pcb.c.

References INP_LOCK_ASSERT.

◆ inp_apply_all()

void inp_apply_all ( void(*)(struct inpcb *, void *)  func,
void *  arg 
)

Definition at line 2702 of file in_pcb.c.

References INP_ALL_ITERATOR, inp_next(), INPLOOKUP_WLOCKPCB, and V_tcbinfo.

Referenced by register_toedev().

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

◆ inp_inpcbtosocket()

struct socket * inp_inpcbtosocket ( struct inpcb inp)

Definition at line 2713 of file in_pcb.c.

References inpcb::inp_socket, and INP_WLOCK_ASSERT.

◆ inp_inpcbtotcpcb()

struct tcpcb * inp_inpcbtotcpcb ( struct inpcb inp)

Definition at line 2721 of file in_pcb.c.

References inpcb::inp_ppcb, and INP_WLOCK_ASSERT.

◆ inp_ip_tos_get()

int inp_ip_tos_get ( const struct inpcb inp)

Definition at line 2729 of file in_pcb.c.

References inpcb::inp_ip_tos.

◆ inp_ip_tos_set()

void inp_ip_tos_set ( struct inpcb inp,
int  val 
)

Definition at line 2736 of file in_pcb.c.

References inpcb::inp_ip_tos.

◆ inp_next()

◆ inp_rlock()

void inp_rlock ( struct inpcb inp)

Definition at line 2672 of file in_pcb.c.

References INP_RLOCK.

◆ inp_runlock()

void inp_runlock ( struct inpcb inp)

Definition at line 2679 of file in_pcb.c.

References INP_RUNLOCK.

◆ inp_so_options()

int inp_so_options ( const struct inpcb inp)

Referenced by in_pcbinshash().

Here is the caller graph for this function:

◆ inp_wlock()

void inp_wlock ( struct inpcb inp)

Definition at line 2658 of file in_pcb.c.

References INP_WLOCK.

◆ inp_wunlock()

void inp_wunlock ( struct inpcb inp)

Definition at line 2665 of file in_pcb.c.

References INP_WUNLOCK.

◆ VNET_DECLARE() [1/13]

VNET_DECLARE ( int  ,
ipport_firstauto   
)

◆ VNET_DECLARE() [2/13]

VNET_DECLARE ( int  ,
ipport_hifirstauto   
)

◆ VNET_DECLARE() [3/13]

VNET_DECLARE ( int  ,
ipport_hilastauto   
)

◆ VNET_DECLARE() [4/13]

VNET_DECLARE ( int  ,
ipport_lastauto   
)

◆ VNET_DECLARE() [5/13]

VNET_DECLARE ( int  ,
ipport_lowfirstauto   
)

◆ VNET_DECLARE() [6/13]

VNET_DECLARE ( int  ,
ipport_lowlastauto   
)

◆ VNET_DECLARE() [7/13]

VNET_DECLARE ( int  ,
ipport_randomcps   
)

◆ VNET_DECLARE() [8/13]

VNET_DECLARE ( int  ,
ipport_randomized   
)

◆ VNET_DECLARE() [9/13]

VNET_DECLARE ( int  ,
ipport_randomtime   
)

◆ VNET_DECLARE() [10/13]

VNET_DECLARE ( int  ,
ipport_reservedhigh   
)

◆ VNET_DECLARE() [11/13]

VNET_DECLARE ( int  ,
ipport_reservedlow   
)

◆ VNET_DECLARE() [12/13]

VNET_DECLARE ( int  ,
ipport_stoprandom   
)

◆ VNET_DECLARE() [13/13]

VNET_DECLARE ( int  ,
ipport_tcpallocs   
)