@@ -431,6 +431,7 @@ global:
l_netlink_destroy;
l_netlink_send;
l_netlink_cancel;
+ l_netlink_request_sent;
l_netlink_register;
l_netlink_unregister;
l_netlink_set_debug;
@@ -467,6 +467,24 @@ LIB_EXPORT bool l_netlink_cancel(struct l_netlink *netlink, unsigned int id)
return true;
}
+LIB_EXPORT bool l_netlink_request_sent(struct l_netlink *netlink,
+ unsigned int id)
+{
+ struct command *command;
+ struct nlmsghdr *hdr;
+
+ if (unlikely(!netlink || !id))
+ return false;
+
+ command = l_hashmap_lookup(netlink->command_lookup, L_UINT_TO_PTR(id));
+ if (!command)
+ return false;
+
+ hdr = command->message->hdr;
+ return l_hashmap_lookup(netlink->command_pending,
+ L_UINT_TO_PTR(hdr->nlmsg_seq));
+}
+
static bool add_membership(struct l_netlink *netlink, uint32_t group)
{
int sk, value = group;
@@ -37,6 +37,7 @@ unsigned int l_netlink_send(struct l_netlink *netlink,
void *user_data,
l_netlink_destroy_func_t destroy);
bool l_netlink_cancel(struct l_netlink *netlink, unsigned int id);
+bool l_netlink_request_sent(struct l_netlink *netlink, unsigned int id);
unsigned int l_netlink_register(struct l_netlink *netlink,
uint32_t group, l_netlink_notify_func_t function,