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)
Sat, Jul 11, 4:59 PM
Unknown Object (File)
Fri, Jun 26, 6:04 AM
Unknown Object (File)
Sun, Jun 14, 1:33 PM
Unknown Object (File)
May 25 2026, 7:29 PM
Unknown Object (File)
May 13 2026, 1:07 AM
Unknown Object (File)
May 3 2026, 1:27 PM
Unknown Object (File)
Apr 29 2026, 1:30 PM
Unknown Object (File)
Apr 29 2026, 1:24 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