]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/network/networkd-network.h
network: rename settings about DHCPv6 Prefix Delegation
[thirdparty/systemd.git] / src / network / networkd-network.h
index a2fcc5209b5703c6e6444fa7b7a5b11f3713ad46..5dcb3c548bcc74c8ec59e82f0433c01c84bbc8c0 100644 (file)
@@ -17,6 +17,7 @@
 #include "networkd-brvlan.h"
 #include "networkd-dhcp-common.h"
 #include "networkd-dhcp4.h"
+#include "networkd-dhcp6.h"
 #include "networkd-dhcp-server.h"
 #include "networkd-fdb.h"
 #include "networkd-ipv6-proxy-ndp.h"
@@ -31,6 +32,7 @@
 #include "networkd-util.h"
 #include "ordered-set.h"
 #include "resolve-util.h"
+#include "socket-netlink.h"
 
 typedef enum IPv6PrivacyExtensions {
         /* The values map to the kernel's /proc/sys/net/ipv6/conf/xxx/use_tempaddr values */
@@ -52,6 +54,15 @@ typedef enum KeepConfiguration {
         _KEEP_CONFIGURATION_INVALID = -1,
 } KeepConfiguration;
 
+typedef enum IPv6LinkLocalAddressGenMode {
+       IPV6_LINK_LOCAL_ADDRESSS_GEN_MODE_EUI64          = IN6_ADDR_GEN_MODE_EUI64,
+       IPV6_LINK_LOCAL_ADDRESSS_GEN_MODE_NONE           = IN6_ADDR_GEN_MODE_NONE,
+       IPV6_LINK_LOCAL_ADDRESSS_GEN_MODE_STABLE_PRIVACY = IN6_ADDR_GEN_MODE_STABLE_PRIVACY,
+       IPV6_LINK_LOCAL_ADDRESSS_GEN_MODE_RANDOM         = IN6_ADDR_GEN_MODE_RANDOM,
+       _IPV6_LINK_LOCAL_ADDRESS_GEN_MODE_MAX,
+       _IPV6_LINK_LOCAL_ADDRESS_GEN_MODE_INVALID        = -1
+} IPv6LinkLocalAddressGenMode;
+
 typedef struct Manager Manager;
 
 typedef struct NetworkDHCPServerEmitAddress {
@@ -129,7 +140,8 @@ struct Network {
         bool dhcp_send_decline;
         DHCPUseDomains dhcp_use_domains;
         sd_ipv4acd *dhcp_acd;
-        Set *dhcp_black_listed_ip;
+        Set *dhcp_deny_listed_ip;
+        Set *dhcp_allow_listed_ip;
         Set *dhcp_request_options;
         OrderedHashmap *dhcp_client_send_options;
         OrderedHashmap *dhcp_client_send_vendor_options;
@@ -141,7 +153,6 @@ struct Network {
         bool dhcp6_use_dns_set;
         bool dhcp6_use_ntp;
         bool dhcp6_use_ntp_set;
-        bool dhcp6_without_ra;
         uint8_t dhcp6_pd_length;
         uint32_t dhcp6_route_metric;
         bool dhcp6_route_metric_set;
@@ -149,6 +160,7 @@ struct Network {
         char **dhcp6_user_class;
         char **dhcp6_vendor_class;
         struct in6_addr dhcp6_pd_address;
+        DHCP6ClientStartMode dhcp6_without_ra;
         OrderedHashmap *dhcp6_client_send_options;
         OrderedHashmap *dhcp6_client_send_vendor_options;
         Set *dhcp6_request_options;
@@ -163,15 +175,15 @@ struct Network {
         uint32_t dhcp_server_pool_offset;
         uint32_t dhcp_server_pool_size;
 
-        /* IPV4LL Support */
+        /* link local addressing support */
         AddressFamily link_local;
+        IPv6LinkLocalAddressGenMode ipv6ll_address_gen_mode;
         bool ipv4ll_route;
 
         bool default_route_on_device;
 
         /* IPv6 prefix delegation support */
         RADVPrefixDelegation router_prefix_delegation;
-        int64_t router_prefix_subnet_id;
         usec_t router_lifetime_usec;
         uint8_t router_preference;
         bool router_managed;
@@ -185,8 +197,11 @@ struct Network {
         bool dhcp6_force_pd_other_information; /* Start DHCPv6 PD also when 'O'
                                                   RA flag is set, see RFC 7084,
                                                   WPD-4 */
-        bool dhcp6_pd_assign_prefix;
-        union in_addr_union dhcp6_delegation_prefix_token;
+
+        /* DHCPv6 Prefix Delegation support */
+        int64_t dhcp6_pd_subnet_id;
+        bool dhcp6_pd_assign;
+        union in_addr_union dhcp6_pd_token;
 
         /* Bridge Support */
         int use_bpdu;
@@ -241,8 +256,8 @@ struct Network {
         DHCPUseDomains ipv6_accept_ra_use_domains;
         IPv6AcceptRAStartDHCP6Client ipv6_accept_ra_start_dhcp6_client;
         uint32_t ipv6_accept_ra_route_table;
-        Set *ndisc_black_listed_prefix;
-        OrderedHashmap *ipv6_tokens;
+        Set *ndisc_deny_listed_prefix;
+        OrderedSet *ipv6_tokens;
 
         IPv6PrivacyExtensions ipv6_privacy_extensions;
 
@@ -256,7 +271,6 @@ struct Network {
         bool configure_without_carrier;
         int ignore_carrier_loss;
         KeepConfiguration keep_configuration;
-        LinkIPv6AddressGenMode ipv6_address_gen_mode;
         uint32_t iaid;
         DUID duid;
 
@@ -302,9 +316,10 @@ struct Network {
         Hashmap *route_prefixes_by_section;
         Hashmap *rules_by_section;
         OrderedHashmap *tc_by_section;
+        OrderedHashmap *sr_iov_by_section;
 
         /* All kinds of DNS configuration */
-        struct in_addr_data *dns;
+        struct in_addr_full **dns;
         unsigned n_dns;
         OrderedSet *search_domains, *route_domains;
 
@@ -351,6 +366,7 @@ CONFIG_PARSER_PROTOTYPE(config_parse_dnssec_negative_trust_anchors);
 CONFIG_PARSER_PROTOTYPE(config_parse_ntp);
 CONFIG_PARSER_PROTOTYPE(config_parse_required_for_online);
 CONFIG_PARSER_PROTOTYPE(config_parse_keep_configuration);
+CONFIG_PARSER_PROTOTYPE(config_parse_ipv6_link_local_address_gen_mode);
 
 const struct ConfigPerfItem* network_network_gperf_lookup(const char *key, GPERF_LEN_TYPE length);
 
@@ -359,3 +375,6 @@ IPv6PrivacyExtensions ipv6_privacy_extensions_from_string(const char *s) _pure_;
 
 const char* keep_configuration_to_string(KeepConfiguration i) _const_;
 KeepConfiguration keep_configuration_from_string(const char *s) _pure_;
+
+const char* ipv6_link_local_address_gen_mode_to_string(IPv6LinkLocalAddressGenMode s) _const_;
+IPv6LinkLocalAddressGenMode ipv6_link_local_address_gen_mode_from_string(const char *s) _pure_;