| Main index | Section 4 | Options |
#include <netlink/netlink.h>
#include <netlink/netlink_generic.h>
All generic netlink families share a common header:
struct genlmsghdr {
uint8_t cmd; /* command within the family */
uint8_t version; /* ABI version for the cmd */
uint16_t reserved; /* reserved: set to 0 */
};
The family id is encoded in the
nlmsg_type
of the base netlink header.
The
cmd
field is the command identifier within the family.
The
version
field is the command version.
The following messages are supported by the framework:
CTRL_ATTR_FAMILY_ID (uint16_t) current family id assigned by kernel CTRL_ATTR_FAMILY_NAME (string) family name
| CTRL_ATTR_FAMILY_ID | |
| (uint16_t) Dynamically-assigned family identifier. | |
| CTRL_ATTR_FAMILY_NAME | |
| (string) Family name. | |
| CTRL_ATTR_HDRSIZE | |
| (uint32_t) Family mandatory header size (typically 0). | |
| CTRL_ATTR_MAXATTR | |
| (uint32_t) Maximum attribute number valid for the family. | |
| CTRL_ATTR_OPS | |
| (nested) List of the operations supported by the family. The attribute consists of a list of nested TLVs, with attribute values monotonically incremented, starting from 0. The following attributes are present in each TLV: | |
| CTRL_ATTR_OP_ID | |
| Operation (message) number. | |
| CTRL_ATTR_OP_FLAGS | |
Operation flags.
The following flags are supported:
GENL_ADMIN_PERM requires elevated permissions GENL_CMD_CAP_DO operation is a modification request GENL_CMD_CAP_DUMP operation is a get/dump request | |
| CTRL_ATTR_MCAST_GROUPS | |
| (nested) List of the notification groups supported by the family. The attribute consists of a list of nested TLVs, with attribute values monotonically incremented, starting from 0. The following attributes are present in each TLV: | |
| CTRL_ATTR_MCAST_GRP_ID | |
| Group id that can be used in NETLINK_ADD_MEMBERSHIP setsockopt(2). | |
| CTRL_ATTR_MCAST_GRP_NAME | |
| (string) Human-readable name of the group. | |
"notify" Notifies on family registrations/removal.
| GENETLINK (4) | November 1, 2022 |
| Main index | Section 4 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
| “ | The āNā in NFS stands for Not, or Need, or perhaps Nightmare | ” |
| — Harry Spencer | ||