#include "sd-rtnl.h"
#include "sd-bus.h"
#include "sd-dhcp-client.h"
+#include "sd-ipv4ll.h"
#include "udev.h"
#include "rtnl-util.h"
#include "hashmap.h"
#include "list.h"
+#include "set.h"
#include "condition-util.h"
typedef struct NetDev NetDev;
bool dhcp_hostname;
bool dhcp_domainname;
bool dhcp_critical;
+ bool ipv4ll;
LIST_HEAD(Address, static_addresses);
LIST_HEAD(Route, static_routes);
- Address *dns;
Hashmap *addresses_by_section;
Hashmap *routes_by_section;
+ Set *dns;
+
LIST_FIELDS(Network, networks);
};
unsigned char family;
unsigned char prefixlen;
+ unsigned char scope;
char *label;
struct in_addr broadcast;
unsigned char family;
unsigned char dst_prefixlen;
+ unsigned char scope;
+ uint32_t metrics;
union {
struct in_addr in;
uint64_t ifindex;
char *ifname;
+ char *state_file;
struct ether_addr mac;
unsigned flags;
sd_dhcp_client *dhcp_client;
sd_dhcp_lease *dhcp_lease;
uint16_t original_mtu;
+ sd_ipv4ll *ipv4ll;
};
struct Manager {
int route_new_dynamic(Route **ret);
void route_free(Route *route);
int route_configure(Route *route, Link *link, sd_rtnl_message_handler_t callback);
+int route_drop(Route *route, Link *link, sd_rtnl_message_handler_t callback);
+
DEFINE_TRIVIAL_CLEANUP_FUNC(Route*, route_free);
#define _cleanup_route_free_ _cleanup_(route_freep)
void link_free(Link *link);
int link_get(Manager *m, int ifindex, Link **ret);
int link_add(Manager *manager, struct udev_device *device, Link **ret);
-int link_configure(Link *link);
int link_update(Link *link, sd_rtnl_message *message);
+int link_save(Link *link);
+
+const char* link_state_to_string(LinkState s) _const_;
+LinkState link_state_from_string(const char *s) _pure_;
+
DEFINE_TRIVIAL_CLEANUP_FUNC(Link*, link_free);
#define _cleanup_link_free_ _cleanup_(link_freep)