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, Aug 11, 11:37 PM
Unknown Object (File)
Tue, Aug 11, 11:35 PM
Unknown Object (File)
Tue, Aug 11, 11:28 PM
Unknown Object (File)
Sat, Aug 8, 10:28 PM
Unknown Object (File)
Sun, Aug 2, 6:39 AM
Unknown Object (File)
Sat, Jul 25, 11:47 PM
Unknown Object (File)
Jul 11 2026, 4:59 PM
Unknown Object (File)
Jun 26 2026, 6:04 AM

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