X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=blobdiff_plain;f=interface.h;h=4b7de5997d3055e1e85938230d3017f0356fa433;hp=0a947b41311061e2675b339714f9bcf4d93869ec;hb=3833d8708e387ffa02f5dca972b0119461cb8629;hpb=d095bf24cf7879150d008c23998676bfedebbde6 diff --git a/interface.h b/interface.h index 0a947b4..4b7de59 100644 --- a/interface.h +++ b/interface.h @@ -23,6 +23,7 @@ struct interface_proto_state; enum interface_event { IFEV_DOWN, IFEV_UP, + IFEV_UPDATE, IFEV_FREE, IFEV_RELOAD, }; @@ -59,6 +60,7 @@ struct interface_ip_settings { bool enabled; bool no_defaultroute; bool no_dns; + bool no_delegation; struct vlist_tree addr; struct vlist_tree route; @@ -86,13 +88,14 @@ struct interface { struct list_head hotplug_list; enum interface_event hotplug_ev; - char name[IFNAMSIZ]; + const char *name; const char *ifname; bool available; bool autostart; bool config_autostart; bool device_config; + bool dynamic; time_t start_time; enum interface_state state; @@ -142,8 +145,9 @@ struct interface { extern struct vlist_tree interfaces; extern const struct uci_blob_param_list interface_attr_list; -void interface_init(struct interface *iface, const char *name, - struct blob_attr *config); +struct interface *interface_alloc(const char *name, struct blob_attr *config); + +void interface_set_dynamic(struct interface *iface); void interface_add(struct interface *iface, struct blob_attr *config); bool interface_add_alias(struct interface *iface, struct blob_attr *config); @@ -163,6 +167,7 @@ void interface_remove_user(struct interface_user *dep); int interface_add_link(struct interface *iface, struct device *dev); int interface_remove_link(struct interface *iface, struct device *dev); +int interface_handle_link(struct interface *iface, const char *name, bool add); void interface_add_error(struct interface *iface, const char *subsystem, const char *code, const char **data, int n_data);