Lines Matching +full:ipi +full:- +full:id

1 /*-
2 * SPDX-License-Identifier: BSD-3-Clause
6 * Copyright (c) 2010-2011 Juniper Networks, Inc.
64 * protocol-specific control block) are stored here.
87 * NOTE: ipv6 addrs should be 64-bit aligned, per RFC 2553. in_conninfo has
89 * NOTE 2: tcp_syncache.c uses first 5 32-bit words, which identify fport,
102 u_int32_t ie6_zoneid; /* scope zone id */
134 * IPv6 sockets. In the case of TCP and UDP, further per-connection state is
137 * a per-inpcb rwlock, inp_lock.
145 * (c) - Constant after initialization
146 * (e) - Protected by the SMR section
147 * (i) - Protected by the inpcb lock
148 * (p) - Protected by the pcbinfo lock for the inpcb
149 * (h) - Protected by the pcbhash lock for the inpcb
150 * (s) - Protected by another subsystem's locks
151 * (x) - Undefined locking
158 * netinet/netinet6-layer code should not assume that the inp_socket pointer
160 * close(2)-related races.
177 #define inp_zero_size (sizeof(struct inpcb) - \
191 uint32_t inp_flowid; /* (x) flow id / queue id */
203 /* Protocol-dependent part; options. */
243 #define inp_vnet inp_pcbinfo->ipi_vnet
254 * alert -- only define if struct xsocket is in scope.
259 * (s) - used by userland utilities in src
260 * (p) - used by utilities in ports
261 * (3) - is known to be used by third party software not in ports
262 * (n) - no known usage
318 * - keydata for rcv, first cipher of length rcv.cipher_key_len, then
320 * - driver data (string) of length rcv.drv_st_len, if the rcv session is
322 * - keydata for snd, first cipher of length snd.cipher_key_len, then
324 * - driver data (string) of length snd.drv_st_len, if the snd session is
339 * Per-VNET pcb database for each high-level protocol (UDP, TCP, ...) in both
343 * are CK-lists. Locking is required to insert a pcb into database. Two
363 * Generation count -- incremented each time a connection is allocated
412 * Global allocation storage for each high-level protocol (UDP, TCP, ...).
413 * Each corresponding per-VNET inpcbinfo points into this one.
430 rw_init_flags(&inp->inp_lock, lname, RW_RECURSE | RW_DUPOK); \
445 #define INP_LOCK_DESTROY(inp) rw_destroy(&(inp)->inp_lock)
446 #define INP_RLOCK(inp) rw_rlock(&(inp)->inp_lock)
447 #define INP_WLOCK(inp) rw_wlock(&(inp)->inp_lock)
448 #define INP_TRY_RLOCK(inp) rw_try_rlock(&(inp)->inp_lock)
449 #define INP_TRY_WLOCK(inp) rw_try_wlock(&(inp)->inp_lock)
450 #define INP_RUNLOCK(inp) rw_runlock(&(inp)->inp_lock)
451 #define INP_WUNLOCK(inp) rw_wunlock(&(inp)->inp_lock)
452 #define INP_UNLOCK(inp) rw_unlock(&(inp)->inp_lock)
453 #define INP_TRY_UPGRADE(inp) rw_try_upgrade(&(inp)->inp_lock)
454 #define INP_DOWNGRADE(inp) rw_downgrade(&(inp)->inp_lock)
455 #define INP_WLOCKED(inp) rw_wowned(&(inp)->inp_lock)
456 #define INP_LOCK_ASSERT(inp) rw_assert(&(inp)->inp_lock, RA_LOCKED)
457 #define INP_RLOCK_ASSERT(inp) rw_assert(&(inp)->inp_lock, RA_RLOCKED)
458 #define INP_WLOCK_ASSERT(inp) rw_assert(&(inp)->inp_lock, RA_WLOCKED)
459 #define INP_UNLOCK_ASSERT(inp) rw_assert(&(inp)->inp_lock, RA_UNLOCKED)
488 #define INP_INFO_WLOCK(ipi) mtx_lock(&(ipi)->ipi_lock) argument
489 #define INP_INFO_WLOCKED(ipi) mtx_owned(&(ipi)->ipi_lock) argument
490 #define INP_INFO_WUNLOCK(ipi) mtx_unlock(&(ipi)->ipi_lock) argument
491 #define INP_INFO_LOCK_ASSERT(ipi) MPASS(SMR_ENTERED((ipi)->ipi_smr) || \ argument
492 mtx_owned(&(ipi)->ipi_lock))
493 #define INP_INFO_WLOCK_ASSERT(ipi) mtx_assert(&(ipi)->ipi_lock, MA_OWNED) argument
494 #define INP_INFO_WUNLOCK_ASSERT(ipi) \ argument
495 mtx_assert(&(ipi)->ipi_lock, MA_NOTOWNED)
497 #define INP_HASH_WLOCK(ipi) mtx_lock(&(ipi)->ipi_hash_lock) argument
498 #define INP_HASH_WUNLOCK(ipi) mtx_unlock(&(ipi)->ipi_hash_lock) argument
499 #define INP_HASH_LOCK_ASSERT(ipi) MPASS(SMR_ENTERED((ipi)->ipi_smr) || \ argument
500 mtx_owned(&(ipi)->ipi_hash_lock))
501 #define INP_HASH_WLOCK_ASSERT(ipi) mtx_assert(&(ipi)->ipi_hash_lock, \ argument
512 ((addr)->s_addr == INADDR_ANY ? V_in_pcbhashseed : \
513 jenkins_hash32((&(addr)->s_addr), 1, V_in_pcbhashseed))
517 jenkins_hash32((addr)->__u6_addr.__u6_addr32, \
518 nitems((addr)->__u6_addr.__u6_addr32), V_in_pcbhashseed))
536 * Flags for inp_vflags -- historically version flags only
563 #define IN6P_HOPOPTS 0x00040000 /* receive hop-by-hop options */
570 #define INP_ONESBCAST 0x02000000 /* send all-ones broadcast */
597 #define INP_RECVRSSBUCKETID 0x00000200 /* populate recv datagram with bucket id */
618 INPLOOKUP_RLOCKPCB = 0x00000002, /* Return inpcb read-locked. */
619 INPLOOKUP_WLOCKPCB = 0x00000004, /* Return inpcb write-locked. */
627 #define sotoinpcb(so) ((struct inpcb *)(so)->so_pcb)
629 #define INP_SOCKAF(so) so->so_proto->pr_domain->dom_family
688 const struct inpcbinfo *ipi; member
693 #define INP_ALL_LIST -1
700 .ipi = (_ipi), \
708 .ipi = (_ipi), \