2
0

ubus.h 1.1 KB

123456789101112131415161718192021222324252627282930
  1. /*
  2. * netifd - network interface daemon
  3. * Copyright (C) 2012 Felix Fietkau <nbd@openwrt.org>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 2
  7. * as published by the Free Software Foundation
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. */
  14. #ifndef __NETIFD_UBUS_H
  15. #define __NETIFD_UBUS_H
  16. extern struct ubus_context *ubus_ctx;
  17. int netifd_ubus_init(const char *path);
  18. void netifd_ubus_done(void);
  19. int netifd_extdev_invoke(uint32_t id, const char *method,
  20. struct blob_attr *msg, ubus_data_handler_t data_cb, void *data);
  21. void netifd_ubus_add_interface(struct interface *iface);
  22. void netifd_ubus_remove_interface(struct interface *iface);
  23. void netifd_ubus_interface_event(struct interface *iface, bool up);
  24. void netifd_ubus_interface_notify(struct interface *iface, bool up);
  25. void netifd_ubus_device_notify(const char *event, struct blob_attr *data, int timeout);
  26. #endif