diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-06-02 17:51:56 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-06-06 19:59:08 +0200 |
commit | 3db2ec568c01676a2f5482b8127ba0005c5fa2b2 (patch) | |
tree | 1dc1f80eb08a6192a7ac20d814d7079d38f434eb /src | |
parent | f3315c5860548b5560ef114a1e2af4eaafb32c6b (diff) |
lldp: add sd_lldp_get_event() call
sd-ndisc has something like this, let's add this for sd-lldp, too.
Diffstat (limited to 'src')
-rw-r--r-- | src/libsystemd-network/sd-lldp.c | 6 | ||||
-rw-r--r-- | src/systemd/sd-lldp.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/libsystemd-network/sd-lldp.c b/src/libsystemd-network/sd-lldp.c index 66d5dbf203..cbf62734a8 100644 --- a/src/libsystemd-network/sd-lldp.c +++ b/src/libsystemd-network/sd-lldp.c @@ -322,6 +322,12 @@ _public_ int sd_lldp_detach_event(sd_lldp *lldp) { return 0; } +_public_ sd_event* sd_lldp_get_event(sd_lldp *lldp) { + assert_return(lldp, NULL); + + return lldp->event; +} + _public_ int sd_lldp_set_callback(sd_lldp *lldp, sd_lldp_callback_t cb, void *userdata) { assert_return(lldp, -EINVAL); diff --git a/src/systemd/sd-lldp.h b/src/systemd/sd-lldp.h index f9b79a0c40..ef9596838b 100644 --- a/src/systemd/sd-lldp.h +++ b/src/systemd/sd-lldp.h @@ -129,6 +129,7 @@ int sd_lldp_stop(sd_lldp *lldp); int sd_lldp_attach_event(sd_lldp *lldp, sd_event *event, int64_t priority); int sd_lldp_detach_event(sd_lldp *lldp); +sd_event *sd_lldp_get_event(sd_lldp *lldp); int sd_lldp_set_callback(sd_lldp *lldp, sd_lldp_callback_t cb, void *userdata); int sd_lldp_set_ifindex(sd_lldp *lldp, int ifindex); |