drivers/net/ovpn/ovpnpriv.h

Source file repositories/reference/linux-study-clean/drivers/net/ovpn/ovpnpriv.h

File Facts

System
Linux kernel
Corpus path
drivers/net/ovpn/ovpnpriv.h
Extension
.h
Size
1833 bytes
Lines
56
Domain
Driver Families
Bucket
drivers/net
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

struct ovpn_peer_collection {
	DECLARE_HASHTABLE(by_id, 12);
	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];
};

/**
 * struct ovpn_priv - per ovpn interface state
 * @dev: the actual netdev representing the tunnel
 * @mode: device operation mode (i.e. p2p, mp, ..)
 * @lock: protect this object
 * @peers: data structures holding multi-peer references
 * @peer: in P2P mode, this is the only remote peer
 * @gro_cells: pointer to the Generic Receive Offload cell
 * @keepalive_work: struct used to schedule keepalive periodic job
 */
struct ovpn_priv {
	struct net_device *dev;
	enum ovpn_mode mode;
	spinlock_t lock; /* protect writing to the ovpn_priv object */
	struct ovpn_peer_collection *peers;
	struct ovpn_peer __rcu *peer;
	struct gro_cells gro_cells;
	struct delayed_work keepalive_work;
};

#endif /* _NET_OVPN_OVPNSTRUCT_H_ */

Annotation

Implementation Notes