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)
Sun, Mar 15, 5:20 AM
Unknown Object (File)
Tue, Mar 10, 5:53 PM
Unknown Object (File)
Mon, Mar 9, 5:26 PM
Unknown Object (File)
Thu, Feb 26, 5:06 AM
Unknown Object (File)
Feb 9 2026, 6:16 AM
Unknown Object (File)
Jan 26 2026, 2:59 PM
Unknown Object (File)
Jan 26 2026, 7:47 AM
Unknown Object (File)
Dec 25 2025, 1:58 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 48617
Build 45503: arc lint + arc unit