interface: rework code to get rid of interface_set_dynamic
[project/netifd.git] / interface.h
index e5639eb326cd425e18d277c67ba983ecbeb68d85..f92a35eb7651bd52483194a4e6de9ad81c610fb3 100644 (file)
@@ -174,19 +174,16 @@ struct interface {
 extern struct vlist_tree interfaces;
 extern const struct uci_blob_param_list interface_attr_list;
 
-struct interface *interface_alloc(const char *name, struct blob_attr *config);
+struct interface *interface_alloc(const char *name, struct blob_attr *config, bool dynamic);
 
-void interface_set_dynamic(struct interface *iface);
-
-void interface_add(struct interface *iface, struct blob_attr *config);
+bool interface_add(struct interface *iface, struct blob_attr *config);
 bool interface_add_alias(struct interface *iface, struct blob_attr *config);
 
 void interface_set_proto_state(struct interface *iface, struct interface_proto_state *state);
 
 void interface_set_available(struct interface *iface, bool new_state);
-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_up(struct interface *iface);
+void interface_set_down(struct interface *iface);
 int interface_renew(struct interface *iface);
 
 void interface_set_main_dev(struct interface *iface, struct device *dev);