Page MenuHomeFreeBSD

pf: Convenience function for optional (numeric) arguments
ClosedPublic

Authored by kp on May 27 2021, 2:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 16 2023, 6:44 PM
Unknown Object (File)
Aug 28 2023, 5:27 PM
Unknown Object (File)
Aug 27 2023, 1:34 AM
Unknown Object (File)
Aug 24 2023, 6:21 AM
Unknown Object (File)
May 18 2023, 8:54 PM
Unknown Object (File)
Mar 24 2023, 5:33 PM
Unknown Object (File)
Feb 15 2023, 9:25 PM
Unknown Object (File)
Feb 6 2023, 1:28 PM

Details

Summary

Add _opt() variants for the uint* functions. These functions set the
provided default value if the nvlist doesn't contain the relevant value.
This is helpful for optional values (e.g. when the API is extended to
add new fields).

While here simplify the header by also using macros to create the
prototypes for the macro-generated function implementations.

MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable