lldp: add sd_lldp_get_event() call
sd-ndisc has something like this, let's add this for sd-lldp, too.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user