ovpn: introduce the ovpn_peer object
authorAntonio Quartulli <antonio@openvpn.net>
Tue, 15 Apr 2025 11:17:22 +0000 (13:17 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 17 Apr 2025 10:30:02 +0000 (12:30 +0200)
commit80747caef33d77f5c1b3d24644e6d7dae69066b5
tree3dade32873e96a940b8c50f659a4d38af443096a
parent8327a3baa9b0561a410d00b209aae621b5a61b1c
ovpn: introduce the ovpn_peer object

An ovpn_peer object holds the whole status of a remote peer
(regardless whether it is a server or a client).

This includes status for crypto, tx/rx buffers, napi, etc.

Only support for one peer is introduced (P2P mode).
Multi peer support is introduced with a later patch.

Along with the ovpn_peer, also the ovpn_bind object is introcued
as the two are strictly related.
An ovpn_bind object wraps a sockaddr representing the local
coordinates being used to talk to a specific peer.

Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
Link: https://patch.msgid.link/20250415-b4-ovpn-v26-5-577f6097b964@openvpn.net
Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/Kconfig
drivers/net/ovpn/Makefile
drivers/net/ovpn/bind.c [new file with mode: 0644]
drivers/net/ovpn/bind.h [new file with mode: 0644]
drivers/net/ovpn/main.c
drivers/net/ovpn/ovpnpriv.h
drivers/net/ovpn/peer.c [new file with mode: 0644]
drivers/net/ovpn/peer.h [new file with mode: 0644]