mirror of
https://github.com/opnsense/src.git
synced 2026-02-04 03:00:53 -06:00
inpcb: Move the definition of struct inpcblbgroup to in_pcb_var.h
It's only needed for in_pcb.c and in6_pcb.c, so can go to the private header. No functional change intended. Reported by: glebius MFC after: 2 weeks Sponsored by: Klara, Inc. Sponsored by: Stormshield (cherry picked from commit ca94f92c23fd09b28ac3398657ae2ae9367bcdf5)
This commit is contained in:
parent
f8f116ac6a
commit
8bc2fd13e9
@ -423,28 +423,6 @@ SYSINIT(prot##_inpcbstorage_init, SI_SUB_PROTO_DOMAIN, \
|
||||
SYSUNINIT(prot##_inpcbstorage_uninit, SI_SUB_PROTO_DOMAIN, \
|
||||
SI_ORDER_SECOND, in_pcbstorage_destroy, &prot)
|
||||
|
||||
/*
|
||||
* Load balance groups used for the SO_REUSEPORT_LB socket option. Each group
|
||||
* (or unique address:port combination) can be re-used at most
|
||||
* INPCBLBGROUP_SIZMAX (256) times. The inpcbs are stored in il_inp which
|
||||
* is dynamically resized as processes bind/unbind to that specific group.
|
||||
*/
|
||||
struct inpcblbgroup {
|
||||
CK_LIST_ENTRY(inpcblbgroup) il_list;
|
||||
struct epoch_context il_epoch_ctx;
|
||||
struct ucred *il_cred;
|
||||
uint16_t il_lport; /* (c) */
|
||||
u_char il_vflag; /* (c) */
|
||||
uint8_t il_numa_domain;
|
||||
int il_fibnum;
|
||||
union in_dependaddr il_dependladdr; /* (c) */
|
||||
#define il_laddr il_dependladdr.id46_addr.ia46_addr4
|
||||
#define il6_laddr il_dependladdr.id6_addr
|
||||
uint32_t il_inpsiz; /* max count in il_inp[] (h) */
|
||||
uint32_t il_inpcnt; /* cur count in il_inp[] (h) */
|
||||
struct inpcb *il_inp[]; /* (h) */
|
||||
};
|
||||
|
||||
#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)
|
||||
|
||||
@ -64,4 +64,26 @@ struct inpcbport {
|
||||
u_short phd_port;
|
||||
};
|
||||
|
||||
/*
|
||||
* Load balance groups used for the SO_REUSEPORT_LB socket option. Each group
|
||||
* (or unique address:port combination) can be re-used at most
|
||||
* INPCBLBGROUP_SIZMAX (256) times. The inpcbs are stored in il_inp which
|
||||
* is dynamically resized as processes bind/unbind to that specific group.
|
||||
*/
|
||||
struct inpcblbgroup {
|
||||
CK_LIST_ENTRY(inpcblbgroup) il_list;
|
||||
struct epoch_context il_epoch_ctx;
|
||||
struct ucred *il_cred;
|
||||
uint16_t il_lport; /* (c) */
|
||||
u_char il_vflag; /* (c) */
|
||||
uint8_t il_numa_domain;
|
||||
int il_fibnum;
|
||||
union in_dependaddr il_dependladdr; /* (c) */
|
||||
#define il_laddr il_dependladdr.id46_addr.ia46_addr4
|
||||
#define il6_laddr il_dependladdr.id6_addr
|
||||
uint32_t il_inpsiz; /* max count in il_inp[] (h) */
|
||||
uint32_t il_inpcnt; /* cur count in il_inp[] (h) */
|
||||
struct inpcb *il_inp[]; /* (h) */
|
||||
};
|
||||
|
||||
#endif /* !_NETINET_IN_PCB_VAR_H_ */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user