Page MenuHomeFreeBSD

if_ovpn: cleanup offsetof() use
ClosedPublic

Authored by kp on Dec 5 2022, 4:31 PM.
Tags
None
Referenced Files
F132347813: D37607.diff
Thu, Oct 16, 3:11 AM
Unknown Object (File)
Sat, Oct 11, 2:22 PM
Unknown Object (File)
Sat, Oct 11, 2:22 PM
Unknown Object (File)
Sat, Oct 11, 2:22 PM
Unknown Object (File)
Sat, Oct 11, 6:01 AM
Unknown Object (File)
Wed, Oct 1, 2:46 PM
Unknown Object (File)
Tue, Sep 23, 5:39 AM
Unknown Object (File)
Sep 6 2025, 2: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