diff options
author | Arne Kappen <arne.kappen@hhi.fraunhofer.de> | 2020-12-09 16:01:24 +0100 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2021-03-31 01:19:55 +0100 |
commit | 80bf9d74884693cf74914edafe2a0b5e5ed45ada (patch) | |
tree | 7a20c555ca6ff463a4e0ad75300b91dcfff597ac /ubus.c | |
parent | b22f83d752d4d53e120bbbcb089ec2d980cbd957 (diff) | |
download | netifd-80bf9d74884693cf74914edafe2a0b5e5ed45ada.tar.gz |
extdev: add support for external device handlers
This allows to integrate external daemons that configure network devices with
netifd. At startup, netifd generates device handler stubs from descriptions in
/lib/netifd/extdev-config via the mechanism in handler.c. These are then added
to the list of device handlers. Device handlers stubs act as relays forwarding
calls against the device handler interface to the external daemon.
Signed-off-by: Arne Kappen <arne.kappen@hhi.fraunhofer.de>
Diffstat (limited to 'ubus.c')
-rw-r--r-- | ubus.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -1286,6 +1286,13 @@ static struct ubus_object wireless_object = { }; int +netifd_extdev_invoke(uint32_t id, const char *method, struct blob_attr *msg, + ubus_data_handler_t data_cb, void *data) +{ + return ubus_invoke(ubus_ctx, id, method, msg, data_cb, data, 3000); +} + +int netifd_ubus_init(const char *path) { uloop_init(); |