HomeFreeBSD

if_ovpn: cleanup offsetof() use

Description

if_ovpn: cleanup offsetof() use

Move the use of the `offsetof(struct ovpn_counters, fieldname) /
sizeof(uint64_t)` construct into a macro.
This removes a fair bit of code duplication and should make things a
little easier to read.

Reviewed by: zlei
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D37607

Details

Provenance
kpAuthored on Dec 5 2022, 1:14 PM
Reviewer
zlei
Differential Revision
D37607: if_ovpn: cleanup offsetof() use
Parents
rGc357bf397f2e: if_ovpn: include peer counters in a OVPN_NOTIF_DEL_PEER message
Branches
Unknown
Tags
Unknown