NETDEV_KIND_BOND,
NETDEV_KIND_VLAN,
NETDEV_KIND_MACVLAN,
+ NETDEV_KIND_IPIP,
+ NETDEV_KIND_GRE,
+ NETDEV_KIND_SIT,
_NETDEV_KIND_MAX,
_NETDEV_KIND_INVALID = -1
} NetDevKind;
NETDEV_STATE_FAILED,
NETDEV_STATE_CREATING,
NETDEV_STATE_READY,
+ NETDEV_STATE_LINGER,
_NETDEV_STATE_MAX,
_NETDEV_STATE_INVALID = -1,
} NetDevState;
char *description;
char *name;
+ size_t mtu;
NetDevKind kind;
uint64_t vlanid;
int ifindex;
NetDevState state;
+ unsigned tunnel_ttl;
+ unsigned tunnel_tos;
+ struct in_addr tunnel_local;
+ struct in_addr tunnel_remote;
+
LIST_HEAD(netdev_enslave_callback, callbacks);
};
char *description;
NetDev *bridge;
NetDev *bond;
+ NetDev *tunnel;
Hashmap *vlans;
Hashmap *macvlans;
bool dhcp;
LINK_STATE_CONFIGURED,
LINK_STATE_UNMANAGED,
LINK_STATE_FAILED,
+ LINK_STATE_LINGER,
_LINK_STATE_MAX,
_LINK_STATE_INVALID = -1
} LinkState;
LIST_HEAD(Network, networks);
usec_t network_dirs_ts_usec;
+ struct kmod_ctx *kmod_ctx;
};
extern const char* const network_dirs[];
int manager_update_resolv_conf(Manager *m);
int manager_save(Manager *m);
+int manager_init_kmod_ctx(Manager *m);
DEFINE_TRIVIAL_CLEANUP_FUNC(Manager*, manager_free);
#define _cleanup_manager_free_ _cleanup_(manager_freep)
/* NetDev */
int netdev_load(Manager *manager);
+void netdev_drop(NetDev *netdev);
NetDev *netdev_unref(NetDev *netdev);
NetDev *netdev_ref(NetDev *netdev);
int netdev_get(Manager *manager, const char *name, NetDev **ret);
int netdev_set_ifindex(NetDev *netdev, sd_rtnl_message *newlink);
int netdev_enslave(NetDev *netdev, Link *link, sd_rtnl_message_handler_t cb);
+int netdev_create_tunnel(Link *link, sd_rtnl_message_handler_t callback);
const char *netdev_kind_to_string(NetDevKind d) _const_;
NetDevKind netdev_kind_from_string(const char *d) _pure_;
Network **ret);
int network_apply(Manager *manager, Network *network, Link *link);
-int config_parse_bridge(const char *unit, const char *filename, unsigned line,
+int config_parse_netdev(const char *unit, const char *filename, unsigned line,
const char *section, unsigned section_line, const char *lvalue,
int ltype, const char *rvalue, void *data, void *userdata);
-int config_parse_bond(const char *unit, const char *filename, unsigned line,
- const char *section, unsigned section_line, const char *lvalue,
- int ltype, const char *rvalue, void *data, void *userdata);
-
-int config_parse_vlan(const char *unit, const char *filename, unsigned line,
- const char *section, unsigned section_line, const char *lvalue,
- int ltype, const char *rvalue, void *data, void *userdata);
-
-int config_parse_macvlan(const char *unit, const char *filename, unsigned line,
- const char *section, unsigned section_line, const char *lvalue,
- int ltype, const char *rvalue, void *data, void *userdata);
+int config_parse_tunnel(const char *unit,
+ const char *filename,
+ unsigned line,
+ const char *section,
+ unsigned section_line,
+ const char *lvalue,
+ int ltype,
+ const char *rvalue,
+ void *data,
+ void *userdata);
+
+int config_parse_tunnel_address(const char *unit,
+ const char *filename,
+ unsigned line,
+ const char *section,
+ unsigned section_line,
+ const char *lvalue,
+ int ltype,
+ const char *rvalue,
+ void *data,
+ void *userdata);
/* gperf */
const struct ConfigPerfItem* network_network_gperf_lookup(const char *key, unsigned length);
Link *link_ref(Link *link);
int link_get(Manager *m, int ifindex, Link **ret);
int link_add(Manager *manager, sd_rtnl_message *message, Link **ret);
+void link_drop(Link *link);
int link_update(Link *link, sd_rtnl_message *message);
+int link_rtnl_process_address(sd_rtnl *rtnl, sd_rtnl_message *message, void *userdata);
int link_initialized(Link *link, struct udev_device *device);