Page MenuHomeFreeBSD

if_ovpn: cleanup offsetof() use
ClosedPublic

Authored by kp on Dec 5 2022, 4:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 7, 7:43 AM
Unknown Object (File)
Sat, Apr 4, 5:56 AM
Unknown Object (File)
Mon, Mar 30, 8:21 AM
Unknown Object (File)
Sat, Mar 28, 8:25 AM
Unknown Object (File)
Wed, Mar 25, 3:13 AM
Unknown Object (File)
Mar 15 2026, 5:20 AM
Unknown Object (File)
Mar 10 2026, 5:53 PM
Unknown Object (File)
Mar 9 2026, 5:26 PM

Details

Summary

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.

Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable