X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=blobdiff_plain;f=device.h;h=33278c9b0679a9f7d00ebc4a8f1bc4e5021bb97d;hp=0f8d3827794e2cf416d3a7eef38bd6e5cadea036;hb=c1b3cab4e1916f49e1f9e1868c698bf391029684;hpb=273550337f70b8b2175875e0c4f0bbd483cfe326 diff --git a/device.h b/device.h index 0f8d382..33278c9 100644 --- a/device.h +++ b/device.h @@ -120,24 +120,28 @@ struct device_hotplug_ops { }; static inline void -free_device(struct device *dev) +device_free(struct device *dev) { dev->type->free(dev); } +extern const struct config_param_list device_attr_list; + +struct device *device_create(struct blob_attr *attr, struct uci_section *s); + 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); +void device_cleanup(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 device_add_user(struct device_user *dep, struct device *iface); +void device_remove_user(struct device_user *dep); -void set_device_present(struct device *dev, bool state); +void device_set_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); -void cleanup_devices(void); +void device_free_all(void); struct device *get_vlan_device_chain(const char *ifname, bool create); struct device *bridge_create(const char *name, struct uci_section *s);