-void init_virtual_device(struct device *dev, const struct device_type *type, const char *name);
-int init_device(struct device *iface, const struct device_type *type, const char *ifname);
-void cleanup_device(struct device *iface);
-struct device *get_device(const char *name, bool create);
-void add_device_user(struct device_user *dep, struct device *iface);
-void remove_device_user(struct device_user *dep);
-
-void set_device_present(struct device *dev, bool state);
-int claim_device(struct device *dev);
-void release_device(struct device *dev);
-int check_device_state(struct device *dev);
+extern const struct uci_blob_param_list device_attr_list;
+extern const struct device_type simple_device_type;
+extern const struct device_type bridge_device_type;
+extern const struct device_type tunnel_device_type;
+extern const struct device_type macvlan_device_type;
+
+void device_lock(void);
+void device_unlock(void);
+
+struct device *device_create(const char *name, const struct device_type *type,
+ struct blob_attr *config);
+void device_init_settings(struct device *dev, struct blob_attr **tb);
+void device_init_pending(void);
+
+enum dev_change_type
+device_set_config(struct device *dev, const struct device_type *type,
+ struct blob_attr *attr);
+
+void device_reset_config(void);
+void device_reset_old(void);
+
+void device_init_virtual(struct device *dev, const struct device_type *type, const char *name);
+int device_init(struct device *iface, const struct device_type *type, const char *ifname);
+void device_cleanup(struct device *iface);
+struct device *device_get(const char *name, int create);
+void device_add_user(struct device_user *dep, struct device *iface);
+void device_remove_user(struct device_user *dep);
+void device_broadcast_event(struct device *dev, enum device_event ev);
+
+void device_set_present(struct device *dev, bool state);
+void device_refresh_present(struct device *dev);
+int device_claim(struct device_user *dep);
+void device_release(struct device_user *dep);
+int device_check_state(struct device *dev);
+void device_dump_status(struct blob_buf *b, struct device *dev);
+
+void device_free(struct device *dev);
+void device_free_unused(struct device *dev);