Page MenuHomeFreeBSD

genl: add new command to list genetlink(4)
ClosedPublic

Authored by bapt on May 30 2023, 10:08 AM.
Tags
None
Referenced Files
F82974526: D40330.id122601.diff
Sat, May 4, 5:22 PM
F82961162: D40330.diff
Sat, May 4, 1:15 PM
Unknown Object (File)
Apr 3 2024, 12:50 AM
Unknown Object (File)
Mar 16 2024, 6:52 AM
Unknown Object (File)
Mar 12 2024, 11:07 AM
Unknown Object (File)
Mar 12 2024, 11:07 AM
Unknown Object (File)
Mar 12 2024, 10:11 AM
Unknown Object (File)
Dec 20 2023, 4:38 AM

Details

Summary

This commands list genetlink protocols and its operations and
capabilities

$ genl
Name: nlctrl
ID: 0x10, Version: 00, header size: 2, max attributes: 10
supported operations:

  • ID: 0x3, Capabilities: 0xe (can modify; can get/dump;

has policy)
multicast groups:

  • ID: 0x30, Name: notify

Name: carp
ID: 0x11, Version: 00, header size: 2, max attributes: 2
supported operations:

  • ID: 0x1, Capabilities: 0xe (can modify; can get/dump;

has policy)

  • ID: 0x2, Capabilities: 0xb (requires admin permission;

can modify; has policy)

Diff Detail

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

Event Timeline

bapt requested review of this revision.May 30 2023, 10:08 AM

Wow, that's nice!
LGTM, though I'd suggest trying to add structured output from day one. I managed to convert ndp(8) ( D35677 ), so if you could consider looking into that option, that would be awesome!

This revision is now accepted and ready to land.May 30 2023, 10:25 AM
usr.bin/Makefile
238

Also, I think our notation is that we have MK_FEATURE for binaries and MK_FEATURE_SUPPORT for the feature support inside binaries. Here we actually need MK_NETLINK. It was added previously but removed in D39678 with the idea that it can be easily re-added once need. Guess it's time to re-add :-)

This revision was automatically updated to reflect the committed changes.