数据结构
/**
* interface object
*/
struct interface {
struct vlist_node node;
struct list_head hotplug_list;
enum interface_event hotplug_ev;
const char *name;
const char *ifname;
bool available;
bool autostart;
bool config_autostart;
bool device_config;
bool enabled;
bool link_state;
bool force_link;
bool dynamic;
time_t start_time;
enum interface_state state;
enum interface_config_state config_state;
enum interface_update_flags updated;
struct list_head users;
const char *parent_ifname;
struct interface_user parent_iface;
/* main interface that the interface is bound to */
struct device_user main_dev;
/* interface that layer 3 communication will go through */
struct device_user l3_dev;
struct blob_attr *config;
/* primary protocol state */
const struct proto_handler *proto_handler;
struct interface_proto_st