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, Nov 2, 5:44 PM
Unknown Object (File)
Thu, Oct 10, 9:12 PM
Unknown Object (File)
Sep 30 2024, 2:31 PM
Unknown Object (File)
Sep 24 2024, 11:28 PM
Unknown Object (File)
Sep 24 2024, 4:22 PM
Unknown Object (File)
Sep 24 2024, 8:36 AM
Unknown Object (File)
Sep 23 2024, 10:29 PM
Unknown Object (File)
Sep 23 2024, 8:18 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