X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;ds=sidebyside;f=src%2Fnetwork%2Fnetworkd.h;h=239ef1cd38b96652bb300bc474897b311d707e95;hb=b5db00e52ee2e20578839e4e4488f7b9af9abc38;hp=e9c0dd51217389122a3a181fc87aa64117c6633c;hpb=fe8db0c5ee3365a2fc80ee7ebffa238f9a0a2ae2;p=elogind.git diff --git a/src/network/networkd.h b/src/network/networkd.h index e9c0dd512..239ef1cd3 100644 --- a/src/network/networkd.h +++ b/src/network/networkd.h @@ -27,11 +27,13 @@ #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; @@ -125,14 +127,16 @@ struct Network { 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); }; @@ -142,6 +146,7 @@ struct Address { unsigned char family; unsigned char prefixlen; + unsigned char scope; char *label; struct in_addr broadcast; @@ -160,6 +165,8 @@ struct Route { unsigned char family; unsigned char dst_prefixlen; + unsigned char scope; + uint32_t metrics; union { struct in_addr in; @@ -191,6 +198,7 @@ struct Link { char *ifname; char *state_file; struct ether_addr mac; + struct udev_device *udev_device; unsigned flags; @@ -205,6 +213,7 @@ struct Link { sd_dhcp_client *dhcp_client; sd_dhcp_lease *dhcp_lease; uint16_t original_mtu; + sd_ipv4ll *ipv4ll; }; struct Manager { @@ -307,6 +316,8 @@ int route_new_static(Network *network, unsigned section, Route **ret); 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) @@ -351,7 +362,6 @@ int link_new(Manager *manager, struct udev_device *device, Link **ret); 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);