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)
Thu, Dec 26, 3:18 AM
Unknown Object (File)
Dec 10 2024, 4:59 PM
Unknown Object (File)
Nov 19 2024, 4:32 PM
Unknown Object (File)
Nov 17 2024, 2:05 AM
Unknown Object (File)
Nov 17 2024, 1:29 AM
Unknown Object (File)
Nov 16 2024, 11:32 PM
Unknown Object (File)
Oct 18 2024, 10:01 AM
Unknown Object (File)
Oct 18 2024, 10:01 AM

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