X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=blobdiff_plain;f=interface.h;h=61189a13de1e6e813e84214bdc4da38a76418389;hp=2d13b482c7f0520ee7ff198592d2976d8295e83a;hb=0f63c8af256fc5b7ba1c5e3ee1572d2e6f27a566;hpb=273550337f70b8b2175875e0c4f0bbd483cfe326 diff --git a/interface.h b/interface.h index 2d13b48..61189a1 100644 --- a/interface.h +++ b/interface.h @@ -2,6 +2,7 @@ #define __NETIFD_INTERFACE_H #include "device.h" +#include "config.h" struct interface; struct interface_proto_state; @@ -56,14 +57,16 @@ struct interface { struct ubus_object ubus; }; +extern const struct config_param_list interface_attr_list; + struct interface *get_interface(const char *name); -struct interface *alloc_interface(const char *name, struct uci_section *s); +struct interface *alloc_interface(const char *name, struct uci_section *s, struct blob_attr *attr); void free_interface(struct interface *iface); void interface_set_proto_state(struct interface *iface, struct interface_proto_state *state); -int set_interface_up(struct interface *iface); -int set_interface_down(struct interface *iface); +int interface_set_up(struct interface *iface); +int interface_set_down(struct interface *iface); int interface_add_link(struct interface *iface, struct device *llif); void interface_remove_link(struct interface *iface, struct device *llif); @@ -77,6 +80,10 @@ int interface_add_address(struct interface *iface, struct device_addr *addr); void interface_del_address(struct interface *iface, struct device_addr *addr); void interface_del_ctx_addr(struct interface *iface, void *ctx); +int interface_add_route(struct interface *iface, struct device_route *route); +void interface_del_route(struct interface *iface, struct device_route *route); +void interface_del_all_routes(struct interface *iface); + void start_pending_interfaces(void); #endif