diff options
author | Umut Tezduyar Lindskog <umut.tezduyar@axis.com> | 2014-02-28 16:10:20 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-03-03 23:24:34 +0100 |
commit | 5c1d3fc93d91384bbac29adf01074fa4375317ea (patch) | |
tree | a71f0587b742f42d110a44c2700b522bcbedaf2c /src/network/networkd.h | |
parent | b6b8adbff4b1a67a2fffc2c225f1b083d9e4a69e (diff) |
sd-network: IPv4 link-local support [v2]
Implements IPv4LL with respect to RFC 3927
(http://tools.ietf.org/rfc/rfc3927.txt) and integrates it
with networkd. Majority of the IPv4LL state machine is
taken from avahi (http://avahi.org/) project's autoip.
IPv4LL can be enabled by IPv4LL=yes under [Network]
section of .network file.
IPv4LL works independent of DHCP but if DHCP lease is
aquired, then LL address will be dropped.
[tomegun: removed a trailing newline and a compiler warning]
Diffstat (limited to 'src/network/networkd.h')
-rw-r--r-- | src/network/networkd.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/network/networkd.h b/src/network/networkd.h index e9c0dd5121..d8cd7ec0e8 100644 --- a/src/network/networkd.h +++ b/src/network/networkd.h @@ -27,6 +27,7 @@ #include "sd-rtnl.h" #include "sd-bus.h" #include "sd-dhcp-client.h" +#include "sd-ipv4ll.h" #include "udev.h" #include "rtnl-util.h" @@ -125,6 +126,7 @@ struct Network { bool dhcp_hostname; bool dhcp_domainname; bool dhcp_critical; + bool ipv4ll; LIST_HEAD(Address, static_addresses); LIST_HEAD(Route, static_routes); @@ -142,6 +144,7 @@ struct Address { unsigned char family; unsigned char prefixlen; + unsigned char scope; char *label; struct in_addr broadcast; @@ -160,6 +163,8 @@ struct Route { unsigned char family; unsigned char dst_prefixlen; + unsigned char scope; + uint32_t metrics; union { struct in_addr in; @@ -205,6 +210,7 @@ struct Link { sd_dhcp_client *dhcp_client; sd_dhcp_lease *dhcp_lease; uint16_t original_mtu; + sd_ipv4ll *ipv4ll; }; struct Manager { @@ -307,6 +313,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) |