Allow sending a fd along a ubus_request Signed-off-by: amine.ahd <amine.ahd@gmail.com>
libubus: remove ubus_msghdr_data() by passing in the right data structure pointer Signed-off-by: Felix Fietkau <nbd@openwrt.org>
libubus: use explicit type name in ubus_msghdr_data instead of typeof() Signed-off-by: Felix Fietkau <nbd@openwrt.org>
libubus: move ubus_msghdr_data to libubus-internal.h Signed-off-by: Felix Fietkau <nbd@openwrt.org>
libubus: always defer processing incoming invoke/unsubscribe/notify if there is a request pending This fixes recursion problems on config reload in netifd and simplifies application handling of requests Signed-off-by: Felix Fietkau <nbd@openwrt.org>
libubus: do not use uloop_run() inside ubus_complete_request Avoid unrelated uloop callbacks by using poll() on the ubus fd instead. Signed-off-by: Felix Fietkau <nbd@openwrt.org>
libubus-internal: use the __hidden definition from libubox Signed-off-by: Felix Fietkau <nbd@openwrt.org>
libubus: implement file descriptor passing support Signed-off-by: Felix Fietkau <nbd@openwrt.org>
libubus: refactor code, move request handling to libubus-req.c Signed-off-by: Felix Fietkau <nbd@openwrt.org>
libubus: reduce code duplication and add stack depth protection for unsubscribe/notify callbacks Signed-off-by: Felix Fietkau <nbd@openwrt.org>
ubus: add notification for subscribers present/gone Signed-off-by: Felix Fietkau <nbd@openwrt.org>
watch add/remove -> subscribe/unsubscribe: rename the ADD_WATCH/REMOVE_WATCH messages to SUBSCRIBE/UNSUBSCRIBE and change the message format and libubus API in preparation for adding object notifications Signed-off-by: Felix Fietkau <nbd@openwrt.org>
libubus: split out some code into separate source files