diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-05-04 11:31:59 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-05-04 11:31:59 +0200 |
commit | 5119d304ffe4d1bcac27626c842413f5f2defe0d (patch) | |
tree | 885cf6798f613b967fe2c0acd387af9cc371761a /src/network/networkd.h | |
parent | f8e2f4d6a0c6bcb5a03abe580d657b932cdb9798 (diff) | |
parent | 7c285c74190e827c18a336f882cf4d9dcf4ee02a (diff) |
Merge pull request #3156 from keszybz/duid-settings
Rework DUID setting
Diffstat (limited to 'src/network/networkd.h')
-rw-r--r-- | src/network/networkd.h | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/src/network/networkd.h b/src/network/networkd.h index 72a2438ac8..26d9e7d6e0 100644 --- a/src/network/networkd.h +++ b/src/network/networkd.h @@ -24,19 +24,30 @@ #include "sd-bus.h" #include "sd-event.h" #include "sd-netlink.h" +#include "udev.h" +#include "dhcp-identifier.h" #include "hashmap.h" #include "list.h" -#include "udev.h" -typedef struct Manager Manager; - -#include "dhcp-identifier.h" #include "networkd-address-pool.h" #include "networkd-link.h" +#include "networkd-netdev-bond.h" +#include "networkd-netdev-bridge.h" +#include "networkd-netdev-dummy.h" +#include "networkd-netdev-ipvlan.h" +#include "networkd-netdev-macvlan.h" +#include "networkd-netdev-tunnel.h" +#include "networkd-netdev-tuntap.h" +#include "networkd-netdev-veth.h" +#include "networkd-netdev-vlan.h" +#include "networkd-netdev-vlan.h" +#include "networkd-netdev-vxlan.h" #include "networkd-network.h" #include "networkd-util.h" +extern const char* const network_dirs[]; + struct Manager { sd_netlink *rtnl; sd_event *event; @@ -63,17 +74,15 @@ struct Manager { usec_t network_dirs_ts_usec; - /* Value of Type in [DUID] section */ - DUIDType duid_type; - /* DUID type code - RFC 3315 */ - uint16_t dhcp_duid_type; - size_t dhcp_duid_len; - uint8_t dhcp_duid[MAX_DUID_LEN]; + DUID duid; }; -extern const char* const network_dirs[]; - -/* Manager */ +static inline const DUID* link_duid(const Link *link) { + if (link->network->duid.type != _DUID_TYPE_INVALID) + return &link->network->duid; + else + return &link->manager->duid; +} extern const sd_bus_vtable manager_vtable[]; |