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)
Thu, Dec 25, 1:58 PM
Unknown Object (File)
Nov 27 2025, 10:06 PM
Unknown Object (File)
Nov 25 2025, 2:51 PM
Unknown Object (File)
Nov 23 2025, 9:56 PM
Unknown Object (File)
Nov 23 2025, 9:54 PM
Unknown Object (File)
Nov 23 2025, 9:48 PM
Unknown Object (File)
Nov 23 2025, 9:48 PM
Unknown Object (File)
Nov 23 2025, 4:21 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