X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=blobdiff_plain;f=interface.h;h=5e3f3833df44b92d3502419f320fca3fde5e2d86;hp=750c0f2bb44b880a740b0de9cfdb51b575a8bdb9;hb=1aa37f77cd92a6aee0c512ca6e3f56f388ed2922;hpb=aff73720b65ca33a487c813f27644f8d5aea0df1 diff --git a/interface.h b/interface.h index 750c0f2..5e3f383 100644 --- a/interface.h +++ b/interface.h @@ -51,6 +51,11 @@ struct interface_ip_settings { struct vlist_simple_tree dns_search; }; +struct interface_data { + struct avl_node node; + struct blob_attr data[]; +}; + /* * interface configuration */ @@ -76,7 +81,7 @@ struct interface { struct device_user main_dev; /* interface that layer 3 communication will go through */ - struct device_user *l3_dev; + struct device_user l3_dev; struct blob_attr *config; @@ -87,9 +92,14 @@ struct interface { struct interface_ip_settings proto_ip; struct interface_ip_settings config_ip; + int metric; + /* errors/warnings while trying to bring up the interface */ struct list_head errors; + /* extra data provided by protocol handlers or modules */ + struct avl_tree data; + struct uloop_timeout remove_timer; struct ubus_object ubus; }; @@ -109,6 +119,8 @@ int interface_set_up(struct interface *iface); int interface_set_down(struct interface *iface); void __interface_set_down(struct interface *iface, bool force); +void interface_set_main_dev(struct interface *iface, struct device *dev); +void interface_set_l3_dev(struct interface *iface, struct device *dev); void interface_add_user(struct interface_user *dep, struct interface *iface); void interface_remove_user(struct interface_user *dep); @@ -119,6 +131,8 @@ int interface_remove_link(struct interface *iface, struct device *dev); void interface_add_error(struct interface *iface, const char *subsystem, const char *code, const char **data, int n_data); +int interface_add_data(struct interface *iface, const struct blob_attr *data); + void interface_update_start(struct interface *iface); void interface_update_complete(struct interface *iface);