STRUCT OVPN_SOCKET(9)
π struct ovpn_socket(9) β a kernel socket referenced in the ovpn code
okay bestie so this is a page from the Kernel API Manual, and honestly? it's giving "small struct, big responsibilities" energy. Sit down, grab a strawberry π, and let me walk you through it.
β¨ NAME β¨
struct ovpn_socket β a kernel socket referenced in the ovpn code π«Ά
like literally that's it, that's the whole name section, we love a concise icon.
πΈ SYNOPSIS πΈ
here's the whole struct, verbatim, no cap β don't let me catch you retyping it by hand:
struct ovpn_socket {
union {
struct {
struct ovpn_priv *ovpn;
netdevice_tracker dev_tracker;
};
struct ovpn_peer *peer;
};
struct sock *sk;
struct kref refcount;
struct work_struct work;
struct work_struct tcp_tx_work;
};
π Members π
okay so inside this struct there's a fake-deep nesting situation, and every field matters, so let's go one by one:
{unnamed_union}β anonymous π» (yes, it really is unnamed, that's the whole vibe){unnamed_struct}β also anonymous π» (matching set, iconic)ovpnβ the ovpn instance that owns this socket. UDP only, bestie, don't come at it with TCP πdev_trackerβ reference tracker for the associated dev. also UDP only β¨peerβ the unique peer transmitting over this socket. TCP only this time β the union said "pick a lane" πskβ the low levelsockobject, the actual little guy underneath it allrefcountβ how many contexts are currently referencing this object. that's its whole job, and it slays at it πworkβ member used to schedule the release routine. β οΈ heads up: it may block β this is a real caveat, not a drill πtcp_tx_workβ work for deferring outgoing packet processing. TCP only π
π¦ quick vibe check: the union means it's either the UDP crew (ovpn+dev_tracker) or the TCP crew (peer) β never both at once. iykyk.
π₯ SEE ALSO π₯
- Kernel file
./drivers/net/ovpn/socket.hβ go read it, it's right there, be so fr
and that's the page!! π§ no notes, 10/10, ate and left no crumbs. this lil manual entry came from ./drivers/net/ovpn, dated October 2026 β so yeah, it's from the future, main character energy only βππ
π¦ 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