summaryrefslogtreecommitdiff
path: root/src/systemd/sd-netlink.h
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-10-06 13:38:13 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-10-10 14:43:05 +0900
commit545bab1f0afef57dae233d376035540f2cf7a09b (patch)
tree1c461260121f91e78495679752694fabb6a7796b /src/systemd/sd-netlink.h
parent2fea60901da26ac354cde806d8ef8fb5170eec26 (diff)
downloadsystemd-545bab1f0afef57dae233d376035540f2cf7a09b.tar.gz
sd-netlink: add destroy_callback argument to sd_netlink_call_async()
Diffstat (limited to 'src/systemd/sd-netlink.h')
-rw-r--r--src/systemd/sd-netlink.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/systemd/sd-netlink.h b/src/systemd/sd-netlink.h
index 604edb9cfb..01b33c8fc0 100644
--- a/src/systemd/sd-netlink.h
+++ b/src/systemd/sd-netlink.h
@@ -38,6 +38,7 @@ typedef enum {SD_GENL_ID_CTRL, SD_GENL_WIREGUARD, SD_GENL_FOU} sd_genl_family;
/* callback */
typedef int (*sd_netlink_message_handler_t)(sd_netlink *nl, sd_netlink_message *m, void *userdata);
+typedef void (*sd_netlink_destroy_t)(void *userdata);
/* bus */
int sd_netlink_new_from_netlink(sd_netlink **nl, int fd);
@@ -50,11 +51,12 @@ sd_netlink *sd_netlink_unref(sd_netlink *nl);
int sd_netlink_send(sd_netlink *nl, sd_netlink_message *message, uint32_t *serial);
int sd_netlink_call_async(sd_netlink *nl, sd_netlink_message *message,
- sd_netlink_message_handler_t callback,
- void *userdata, uint64_t usec, uint32_t *serial);
+ sd_netlink_message_handler_t callback,
+ sd_netlink_destroy_t destoy_callback,
+ void *userdata, uint64_t usec, uint32_t *serial);
int sd_netlink_call_async_cancel(sd_netlink *nl, uint32_t serial);
int sd_netlink_call(sd_netlink *nl, sd_netlink_message *message, uint64_t timeout,
- sd_netlink_message **reply);
+ sd_netlink_message **reply);
int sd_netlink_get_events(sd_netlink *nl);
int sd_netlink_get_timeout(sd_netlink *nl, uint64_t *timeout);