Page MenuHomeFreeBSD

netlink: dump interface capabilities with other interface data

Authored by melifaro on May 30 2023, 10:47 AM.
Referenced Files
F72225046: D40331.diff
Sun, Dec 3, 8:55 PM
Unknown Object (File)
Mon, Nov 20, 12:45 PM
Unknown Object (File)
Mon, Nov 13, 12:58 PM
Unknown Object (File)
Fri, Nov 10, 9:43 AM
Unknown Object (File)
Sat, Nov 4, 9:17 PM
Unknown Object (File)
Oct 31 2023, 8:35 PM
Unknown Object (File)
Oct 19 2023, 11:36 AM
Unknown Object (File)
Oct 9 2023, 8:41 AM



This change exports interface capabilities using the standard Netlink attribute type, bitset, and switches ifconfig(8) to use it when displaying interface data.

Bitset comes in two representations. The first one is "compact", where the bits are exported via two arrays - "mask" listing the "valid" bits and "values, providing the values for those bits. The second one is more verbose, listing each bit as a separate item, with its name, id and value. The latter option is handy when submitting update requests.

The support for setting capabilities will be added in the upcoming diffs.

Diff Detail

rG FreeBSD src repository
Lint Passed
No Test Coverage
Build Status
Buildable 51860
Build 48751: arc lint + arc unit

Event Timeline

melifaro retitled this revision from netlink: add support for getting ifcaps to netlink: dump interface capabilities with other interface data.May 30 2023, 10:58 AM
melifaro edited the summary of this revision. (Show Details)
melifaro added reviewers: network, kib.

At very least, can you add something along IFCAP_BIT() and make IFCAP_XXX expressed as IFCAP_BIT(IFCAP_B_XXX) and IFCAP2_BIT() as needed?


Why do we need this array embedded into each compilation unit including if.h?

melifaro edited the summary of this revision. (Show Details)

Address comments.


Indeed. Does it look better now?


No. Moved to a separate header.

This revision was not accepted when it landed; it landed in state Needs Review.Jun 16 2023, 3:34 PM
This revision was automatically updated to reflect the committed changes.