sd-netlink: support NLMSG_DONE
This commit is contained in:
parent
4e8f0ef921
commit
2be081ffd6
|
@ -144,6 +144,8 @@ int nlmsg_type_to_genl_family(sd_netlink *nl, uint16_t type, sd_genl_family *ret
|
|||
|
||||
if (type == NLMSG_ERROR)
|
||||
*ret = SD_GENL_ERROR;
|
||||
else if (type == NLMSG_DONE)
|
||||
*ret = SD_GENL_DONE;
|
||||
else if (type == GENL_ID_CTRL)
|
||||
*ret = SD_GENL_ID_CTRL;
|
||||
else {
|
||||
|
|
|
@ -1004,6 +1004,7 @@ const NLTypeSystem genl_family_type_system_root = {
|
|||
|
||||
static const NLType genl_types[] = {
|
||||
[SD_GENL_ERROR] = { .type = NETLINK_TYPE_NESTED, .type_system = &empty_type_system, .size = sizeof(struct nlmsgerr) },
|
||||
[SD_GENL_DONE] = { .type = NETLINK_TYPE_NESTED, .type_system = &empty_type_system },
|
||||
[SD_GENL_ID_CTRL] = { .type = NETLINK_TYPE_NESTED, .type_system = &genl_get_family_type_system, .size = sizeof(struct genlmsghdr) },
|
||||
};
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ typedef struct sd_netlink_slot sd_netlink_slot;
|
|||
|
||||
typedef enum sd_gen_family {
|
||||
SD_GENL_ERROR,
|
||||
SD_GENL_DONE,
|
||||
SD_GENL_ID_CTRL,
|
||||
SD_GENL_WIREGUARD,
|
||||
SD_GENL_FOU,
|
||||
|
|
Loading…
Reference in a new issue