STRUCT OVPN_PEER_COLLECTION(9)
πΈ struct ovpn_peer_collection(9) β Kernel API Manual πΈ
ok so this is the manual page for struct ovpn_peer_collection(9), and bestie, it's literally the container of peers for MultiPeer mode π think of it as the group chat where every peer gets sorted into the right little table. we're living in the kernel here, iykyk π
β¨ NAME β¨
struct ovpn_peer_collection β container of peers for MultiPeer mode π«Ά
π¦ SYNOPSIS π¦
no cap, here's the whole struct, copied exactly, don't touch a single space:
struct ovpn_peer_collection {
unsigned long by_id[1 << (( 12) - 1)];
struct hlist_nulls_head by_vpn_addr4[1 << 12];
struct hlist_nulls_head by_vpn_addr6[1 << 12];
struct hlist_nulls_head by_transp_addr[1 << 12];
};
likeβ¦ look at those arrays. absolutely iconic sizing. 1 << 12 this, 1 << (( 12) - 1) that β and yes, that double-paren with the space inside is exactly how it's written, we do not edit the struct, periodt π
π Members π
by_idβ the table of peers, indexed by ID π this is the main-character lookup right here.by_vpn_addr4β table of peers indexed by VPN IPv4 address. heads up: items can be rehashed on the fly due to a peer IP change, so don't get too attached to where a thing lives πby_vpn_addr6β table of peers indexed by VPN IPv6 address. same deal, items can be rehashed on the fly due to a peer IP change π¦by_transp_addrβ table of peers indexed by transport address. and yeah, same warning: items can be rehashed on the fly due to a peer IP change π the way these tables stay flexible is honestly so real.
π SEE ALSO π
- Kernel file
./drivers/net/ovpn/ovpnpriv.h struct ovpn_priv(9)
like, go read those next, bestie, they're literally right there π§
π reminder that those three address tables all say "items can be rehashed on the fly due to peer IP change" and that is not a drill β the peer IP changes, the hashing shifts. don't be out here assuming a fixed bucket, fr fr.
ok that's the whole page!! tysm for reading π this came from ./drivers/net/ovpn, October 2026, and it was iconic of you to make it to the end. slay βππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms