#
40462a37 |
| 17-Jan-2025 |
Gleb Smirnoff <glebius@FreeBSD.org> |
genl: stop using struct _getfamily_attrs, snl_genl_ctrl_mcast_group
This program has two modes: monitor a single family and dump known families. The former uses directly snl_get_genl_family_info()
genl: stop using struct _getfamily_attrs, snl_genl_ctrl_mcast_group
This program has two modes: monitor a single family and dump known families. The former uses directly snl_get_genl_family_info() which uses supposedly internal struct _getfamily_attrs as the argument. The latter uses a parser named genl_family_parser that makes a mixture of local definitions and definitions from <netlink_snl_generic.h>. While the struct genl_family_parser is local, it points at struct snl_genl_ctrl_mcast_groups and struct snl_genl_ctrl_mcast_group that are supposedly private to netlink_snl_generic.h, as are hanging off the underscored _getfamily_attrs.
Rewrite this mess by using same parser for both modes, that is fully implemented locally. This parser has another very important difference to the one declared in the header library. It will copy strings out of the message into memory allocated within the snl_state. With the header library parser strings point into received packet and contents will be overwritten on next netlink message. This is not a bug with existing genl(1) program, but it would be with future changes.
Reviewed by: melifaro Differential Revision: https://reviews.freebsd.org/D48479
show more ...
|
Revision tags: release/14.2.0 |
|
#
5fa2e50e |
| 26-Oct-2024 |
Gleb Smirnoff <glebius@FreeBSD.org> |
genl: fix typo
|
#
782766a3 |
| 07-Oct-2024 |
Baptiste Daroussin <bapt@FreeBSD.org> |
genl: small cleanup
Following up from another review using basically the same code: remove useless cast replace uint32_t with unsigned int.
No functional changes expected
|
#
88372289 |
| 07-Oct-2024 |
Baptiste Daroussin <bapt@FreeBSD.org> |
genl: add parser for nlsysevent
genl monitor nlsysevent is now able to print the messages received
|
#
f45132db |
| 07-Oct-2024 |
Baptiste Daroussin <bapt@FreeBSD.org> |
genl: subscribe to all if no group is provided
the monitor command now subscribes too all groups if no "multicast group" is provided, this avoid potential collision with a group that could be named
genl: subscribe to all if no group is provided
the monitor command now subscribes too all groups if no "multicast group" is provided, this avoid potential collision with a group that could be named "all"
show more ...
|
#
65e7a648 |
| 07-Oct-2024 |
Baptiste Daroussin <bapt@FreeBSD.org> |
genl: allow to monitor all know groups
Add a special keyword "all" for the group name, which allows genl to monitor all groups in an existing family
|
Revision tags: release/13.4.0, release/14.1.0, release/13.3.0, release/14.0.0 |
|
#
e19b2ef9 |
| 05-Oct-2023 |
Baptiste Daroussin <bapt@FreeBSD.org> |
genl: add a monitor subcommand
usage: $ genl monitor <family> <multicats group>
this subcommand allows to monitor the message from a multicast group of a given family when received.
If it knows ho
genl: add a monitor subcommand
usage: $ genl monitor <family> <multicats group>
this subcommand allows to monitor the message from a multicast group of a given family when received.
If it knows how to parse the messages received it will dump the decoded version, otherwise it will just inform a new message has been received
So far it only knows how to parse nlctrl notify messages, but the plan to allow to make the parsing extensible via lua scripts
Differential Revision: https://reviews.freebsd.org/D40372
show more ...
|
#
cb1fc924 |
| 30-May-2023 |
Baptiste Daroussin <bapt@FreeBSD.org> |
genl: add new command to list genetlink(4)
This commands list genetlink protocols and its operations and capabilities
Name: nlctrl ID: 0x10, Version: 00, header size: 2, max attributes: 10 suppor
genl: add new command to list genetlink(4)
This commands list genetlink protocols and its operations and capabilities
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)
Reviewed by: melifaro Differential Revision: https://reviews.freebsd.org/D40330
show more ...
|