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
Unknown Object (File)
Mon, Dec 16, 2:44 AM
Unknown Object (File)
Nov 29 2024, 8:13 AM
Unknown Object (File)
Nov 17 2024, 2:21 AM
Unknown Object (File)
Nov 13 2024, 3:25 PM
Unknown Object (File)
Nov 11 2024, 11:22 PM
Unknown Object (File)
Nov 11 2024, 7:49 PM
Unknown Object (File)
Nov 11 2024, 4:33 AM
Unknown Object (File)
Nov 11 2024, 3:16 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.