]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/network/networkd-network-gperf.gperf
hibernate-resume: add resumeflags= kernel option
[thirdparty/systemd.git] / src / network / networkd-network-gperf.gperf
1 %{
2 #if __GNUC__ >= 7
3 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
4 #endif
5 #include <stddef.h>
6 #include "conf-parser.h"
7 #include "network-internal.h"
8 #include "networkd-conf.h"
9 #include "networkd-ndisc.h"
10 #include "networkd-network.h"
11 #include "vlan-util.h"
12 %}
13 struct ConfigPerfItem;
14 %null_strings
15 %language=ANSI-C
16 %define slot-name section_and_lvalue
17 %define hash-function-name network_network_gperf_hash
18 %define lookup-function-name network_network_gperf_lookup
19 %readonly-tables
20 %omit-struct-type
21 %struct-type
22 %includes
23 %%
24 Match.MACAddress, config_parse_hwaddrs, 0, offsetof(Network, match_mac)
25 Match.Path, config_parse_strv, 0, offsetof(Network, match_path)
26 Match.Driver, config_parse_strv, 0, offsetof(Network, match_driver)
27 Match.Type, config_parse_strv, 0, offsetof(Network, match_type)
28 Match.Name, config_parse_ifnames, 0, offsetof(Network, match_name)
29 Match.Host, config_parse_net_condition, CONDITION_HOST, offsetof(Network, conditions)
30 Match.Virtualization, config_parse_net_condition, CONDITION_VIRTUALIZATION, offsetof(Network, conditions)
31 Match.KernelCommandLine, config_parse_net_condition, CONDITION_KERNEL_COMMAND_LINE, offsetof(Network, conditions)
32 Match.KernelVersion, config_parse_net_condition, CONDITION_KERNEL_VERSION, offsetof(Network, conditions)
33 Match.Architecture, config_parse_net_condition, CONDITION_ARCHITECTURE, offsetof(Network, conditions)
34 Link.MACAddress, config_parse_hwaddr, 0, offsetof(Network, mac)
35 Link.MTUBytes, config_parse_mtu, AF_UNSPEC, offsetof(Network, mtu)
36 Link.ARP, config_parse_tristate, 0, offsetof(Network, arp)
37 Link.Multicast, config_parse_tristate, 0, offsetof(Network, multicast)
38 Link.AllMulticast, config_parse_tristate, 0, offsetof(Network, allmulticast)
39 Link.Unmanaged, config_parse_bool, 0, offsetof(Network, unmanaged)
40 Link.RequiredForOnline, config_parse_required_for_online, 0, 0
41 Network.Description, config_parse_string, 0, offsetof(Network, description)
42 Network.Bridge, config_parse_ifname, 0, offsetof(Network, bridge_name)
43 Network.Bond, config_parse_ifname, 0, offsetof(Network, bond_name)
44 Network.VLAN, config_parse_stacked_netdev, NETDEV_KIND_VLAN, offsetof(Network, stacked_netdev_names)
45 Network.MACVLAN, config_parse_stacked_netdev, NETDEV_KIND_MACVLAN, offsetof(Network, stacked_netdev_names)
46 Network.MACVTAP, config_parse_stacked_netdev, NETDEV_KIND_MACVTAP, offsetof(Network, stacked_netdev_names)
47 Network.IPVLAN, config_parse_stacked_netdev, NETDEV_KIND_IPVLAN, offsetof(Network, stacked_netdev_names)
48 Network.IPVTAP, config_parse_stacked_netdev, NETDEV_KIND_IPVTAP, offsetof(Network, stacked_netdev_names)
49 Network.VXLAN, config_parse_stacked_netdev, NETDEV_KIND_VXLAN, offsetof(Network, stacked_netdev_names)
50 Network.L2TP, config_parse_stacked_netdev, NETDEV_KIND_L2TP, offsetof(Network, stacked_netdev_names)
51 Network.MACsec, config_parse_stacked_netdev, NETDEV_KIND_MACSEC, offsetof(Network, stacked_netdev_names)
52 Network.Tunnel, config_parse_stacked_netdev, _NETDEV_KIND_TUNNEL, offsetof(Network, stacked_netdev_names)
53 Network.VRF, config_parse_ifname, 0, offsetof(Network, vrf_name)
54 Network.DHCP, config_parse_dhcp, 0, offsetof(Network, dhcp)
55 Network.DHCPServer, config_parse_bool, 0, offsetof(Network, dhcp_server)
56 Network.LinkLocalAddressing, config_parse_link_local_address_family_boolean, 0, offsetof(Network, link_local)
57 Network.IPv4LLRoute, config_parse_bool, 0, offsetof(Network, ipv4ll_route)
58 Network.DefaultRouteOnDevice, config_parse_bool, 0, offsetof(Network, default_route_on_device)
59 Network.IPv6Token, config_parse_ipv6token, 0, offsetof(Network, ipv6_token)
60 Network.LLDP, config_parse_lldp_mode, 0, offsetof(Network, lldp_mode)
61 Network.EmitLLDP, config_parse_lldp_emit, 0, offsetof(Network, lldp_emit)
62 Network.Address, config_parse_address, 0, 0
63 Network.Gateway, config_parse_gateway, 0, 0
64 Network.Domains, config_parse_domains, 0, 0
65 Network.DNS, config_parse_dns, 0, 0
66 Network.DNSDefaultRoute, config_parse_tristate, 0, offsetof(Network, dns_default_route)
67 Network.LLMNR, config_parse_resolve_support, 0, offsetof(Network, llmnr)
68 Network.MulticastDNS, config_parse_resolve_support, 0, offsetof(Network, mdns)
69 Network.DNSOverTLS, config_parse_dns_over_tls_mode, 0, offsetof(Network, dns_over_tls_mode)
70 Network.DNSSEC, config_parse_dnssec_mode, 0, offsetof(Network, dnssec_mode)
71 Network.DNSSECNegativeTrustAnchors, config_parse_dnssec_negative_trust_anchors, 0, 0
72 Network.NTP, config_parse_ntp, 0, offsetof(Network, ntp)
73 Network.IPForward, config_parse_address_family_boolean_with_kernel, 0, offsetof(Network, ip_forward)
74 Network.IPMasquerade, config_parse_bool, 0, offsetof(Network, ip_masquerade)
75 Network.IPv6PrivacyExtensions, config_parse_ipv6_privacy_extensions, 0, offsetof(Network, ipv6_privacy_extensions)
76 Network.IPv6AcceptRA, config_parse_tristate, 0, offsetof(Network, ipv6_accept_ra)
77 Network.IPv6AcceptRouterAdvertisements, config_parse_tristate, 0, offsetof(Network, ipv6_accept_ra)
78 Network.IPv6DuplicateAddressDetection, config_parse_int, 0, offsetof(Network, ipv6_dad_transmits)
79 Network.IPv6HopLimit, config_parse_int, 0, offsetof(Network, ipv6_hop_limit)
80 Network.IPv6ProxyNDP, config_parse_tristate, 0, offsetof(Network, ipv6_proxy_ndp)
81 Network.IPv6MTUBytes, config_parse_mtu, AF_INET6, offsetof(Network, ipv6_mtu)
82 Network.ActiveSlave, config_parse_bool, 0, offsetof(Network, active_slave)
83 Network.PrimarySlave, config_parse_bool, 0, offsetof(Network, primary_slave)
84 Network.IPv4ProxyARP, config_parse_tristate, 0, offsetof(Network, proxy_arp)
85 Network.ProxyARP, config_parse_tristate, 0, offsetof(Network, proxy_arp)
86 Network.IPv6ProxyNDPAddress, config_parse_ipv6_proxy_ndp_address, 0, 0
87 Network.BindCarrier, config_parse_strv, 0, offsetof(Network, bind_carrier)
88 Network.ConfigureWithoutCarrier, config_parse_bool, 0, offsetof(Network, configure_without_carrier)
89 Network.IgnoreCarrierLoss, config_parse_bool, 0, offsetof(Network, ignore_carrier_loss)
90 Address.Address, config_parse_address, 0, 0
91 Address.Peer, config_parse_address, 0, 0
92 Address.Broadcast, config_parse_broadcast, 0, 0
93 Address.Label, config_parse_label, 0, 0
94 Address.PreferredLifetime, config_parse_lifetime, 0, 0
95 Address.HomeAddress, config_parse_address_flags, 0, 0
96 Address.DuplicateAddressDetection, config_parse_address_flags, 0, 0
97 Address.ManageTemporaryAddress, config_parse_address_flags, 0, 0
98 Address.PrefixRoute, config_parse_address_flags, 0, 0
99 Address.AutoJoin, config_parse_address_flags, 0, 0
100 Address.Scope, config_parse_address_scope, 0, 0
101 IPv6AddressLabel.Prefix, config_parse_address_label_prefix, 0, 0
102 IPv6AddressLabel.Label, config_parse_address_label, 0, 0
103 Neighbor.Address, config_parse_neighbor_address, 0, 0
104 Neighbor.MACAddress, config_parse_neighbor_hwaddr, 0, 0
105 RoutingPolicyRule.TypeOfService, config_parse_routing_policy_rule_tos, 0, 0
106 RoutingPolicyRule.Priority, config_parse_routing_policy_rule_priority, 0, 0
107 RoutingPolicyRule.Table, config_parse_routing_policy_rule_table, 0, 0
108 RoutingPolicyRule.FirewallMark, config_parse_routing_policy_rule_fwmark_mask, 0, 0
109 RoutingPolicyRule.From, config_parse_routing_policy_rule_prefix, 0, 0
110 RoutingPolicyRule.To, config_parse_routing_policy_rule_prefix, 0, 0
111 RoutingPolicyRule.IncomingInterface, config_parse_routing_policy_rule_device, 0, 0
112 RoutingPolicyRule.OutgoingInterface, config_parse_routing_policy_rule_device, 0, 0
113 RoutingPolicyRule.IPProtocol, config_parse_routing_policy_rule_ip_protocol, 0, 0
114 RoutingPolicyRule.SourcePort, config_parse_routing_policy_rule_port_range, 0, 0
115 RoutingPolicyRule.DestinationPort, config_parse_routing_policy_rule_port_range, 0, 0
116 RoutingPolicyRule.InvertRule, config_parse_routing_policy_rule_invert, 0, 0
117 Route.Gateway, config_parse_gateway, 0, 0
118 Route.Destination, config_parse_destination, 0, 0
119 Route.Source, config_parse_destination, 0, 0
120 Route.Metric, config_parse_route_priority, 0, 0
121 Route.Scope, config_parse_route_scope, 0, 0
122 Route.PreferredSource, config_parse_preferred_src, 0, 0
123 Route.Table, config_parse_route_table, 0, 0
124 Route.MTUBytes, config_parse_route_mtu, AF_UNSPEC, 0
125 Route.GatewayOnLink, config_parse_gateway_onlink, 0, 0
126 Route.GatewayOnlink, config_parse_gateway_onlink, 0, 0
127 Route.IPv6Preference, config_parse_ipv6_route_preference, 0, 0
128 Route.Protocol, config_parse_route_protocol, 0, 0
129 Route.Type, config_parse_route_type, 0, 0
130 Route.InitialCongestionWindow, config_parse_tcp_window, 0, 0
131 Route.InitialAdvertisedReceiveWindow, config_parse_tcp_window, 0, 0
132 Route.QuickAck, config_parse_quickack, 0, 0
133 Route.FastOpenNoCookie, config_parse_fast_open_no_cookie, 0, 0
134 Route.TTLPropagate, config_parse_route_ttl_propagate, 0, 0
135 DHCP.ClientIdentifier, config_parse_dhcp_client_identifier, 0, offsetof(Network, dhcp_client_identifier)
136 DHCP.UseDNS, config_parse_bool, 0, offsetof(Network, dhcp_use_dns)
137 DHCP.UseNTP, config_parse_bool, 0, offsetof(Network, dhcp_use_ntp)
138 DHCP.UseMTU, config_parse_bool, 0, offsetof(Network, dhcp_use_mtu)
139 DHCP.UseHostname, config_parse_bool, 0, offsetof(Network, dhcp_use_hostname)
140 DHCP.UseDomains, config_parse_dhcp_use_domains, 0, offsetof(Network, dhcp_use_domains)
141 DHCP.UseRoutes, config_parse_bool, 0, offsetof(Network, dhcp_use_routes)
142 DHCP.Anonymize, config_parse_bool, 0, offsetof(Network, dhcp_anonymize)
143 DHCP.SendHostname, config_parse_bool, 0, offsetof(Network, dhcp_send_hostname)
144 DHCP.Hostname, config_parse_hostname, 0, offsetof(Network, dhcp_hostname)
145 DHCP.RequestBroadcast, config_parse_bool, 0, offsetof(Network, dhcp_broadcast)
146 DHCP.CriticalConnection, config_parse_bool, 0, offsetof(Network, dhcp_critical)
147 DHCP.VendorClassIdentifier, config_parse_string, 0, offsetof(Network, dhcp_vendor_class_identifier)
148 DHCP.MaxAttempts, config_parse_dhcp_max_attempts, 0, 0
149 DHCP.UserClass, config_parse_dhcp_user_class, 0, offsetof(Network, dhcp_user_class)
150 DHCP.DUIDType, config_parse_duid_type, 0, offsetof(Network, duid)
151 DHCP.DUIDRawData, config_parse_duid_rawdata, 0, offsetof(Network, duid)
152 DHCP.RouteMetric, config_parse_unsigned, 0, offsetof(Network, dhcp_route_metric)
153 DHCP.RouteTable, config_parse_section_route_table, 0, 0
154 DHCP.UseTimezone, config_parse_bool, 0, offsetof(Network, dhcp_use_timezone)
155 DHCP.IAID, config_parse_iaid, 0, 0
156 DHCP.ListenPort, config_parse_uint16, 0, offsetof(Network, dhcp_client_port)
157 DHCP.SendRelease, config_parse_bool, 0, offsetof(Network, dhcp_send_release)
158 DHCP.RapidCommit, config_parse_bool, 0, offsetof(Network, rapid_commit)
159 DHCP.BlackList, config_parse_dhcp_black_listed_ip_address, 0, 0
160 DHCP.ForceDHCPv6PDOtherInformation, config_parse_bool, 0, offsetof(Network, dhcp6_force_pd_other_information)
161 IPv6AcceptRA.UseAutonomousPrefix, config_parse_bool, 0, offsetof(Network, ipv6_accept_ra_use_autonomous_prefix)
162 IPv6AcceptRA.UseOnLinkPrefix, config_parse_bool, 0, offsetof(Network, ipv6_accept_ra_use_onlink_prefix)
163 IPv6AcceptRA.UseDNS, config_parse_bool, 0, offsetof(Network, ipv6_accept_ra_use_dns)
164 IPv6AcceptRA.UseDomains, config_parse_dhcp_use_domains, 0, offsetof(Network, ipv6_accept_ra_use_domains)
165 IPv6AcceptRA.RouteTable, config_parse_section_route_table, 0, 0
166 IPv6AcceptRA.BlackList, config_parse_ndisc_black_listed_prefix, 0, 0
167 DHCPServer.MaxLeaseTimeSec, config_parse_sec, 0, offsetof(Network, dhcp_server_max_lease_time_usec)
168 DHCPServer.DefaultLeaseTimeSec, config_parse_sec, 0, offsetof(Network, dhcp_server_default_lease_time_usec)
169 DHCPServer.EmitDNS, config_parse_bool, 0, offsetof(Network, dhcp_server_emit_dns)
170 DHCPServer.DNS, config_parse_dhcp_server_dns, 0, 0
171 DHCPServer.EmitNTP, config_parse_bool, 0, offsetof(Network, dhcp_server_emit_ntp)
172 DHCPServer.NTP, config_parse_dhcp_server_ntp, 0, 0
173 DHCPServer.EmitRouter, config_parse_bool, 0, offsetof(Network, dhcp_server_emit_router)
174 DHCPServer.EmitTimezone, config_parse_bool, 0, offsetof(Network, dhcp_server_emit_timezone)
175 DHCPServer.Timezone, config_parse_timezone, 0, offsetof(Network, dhcp_server_timezone)
176 DHCPServer.PoolOffset, config_parse_uint32, 0, offsetof(Network, dhcp_server_pool_offset)
177 DHCPServer.PoolSize, config_parse_uint32, 0, offsetof(Network, dhcp_server_pool_size)
178 Bridge.Cost, config_parse_uint32, 0, offsetof(Network, cost)
179 Bridge.UseBPDU, config_parse_tristate, 0, offsetof(Network, use_bpdu)
180 Bridge.HairPin, config_parse_tristate, 0, offsetof(Network, hairpin)
181 Bridge.FastLeave, config_parse_tristate, 0, offsetof(Network, fast_leave)
182 Bridge.AllowPortToBeRoot, config_parse_tristate, 0, offsetof(Network, allow_port_to_be_root)
183 Bridge.UnicastFlood, config_parse_tristate, 0, offsetof(Network, unicast_flood)
184 Bridge.MulticastFlood, config_parse_tristate, 0, offsetof(Network, multicast_flood)
185 Bridge.MulticastToUnicast, config_parse_tristate, 0, offsetof(Network, multicast_to_unicast)
186 Bridge.NeighborSuppression, config_parse_tristate, 0, offsetof(Network, neighbor_suppression)
187 Bridge.Learning, config_parse_tristate, 0, offsetof(Network, learning)
188 Bridge.ProxyARP, config_parse_tristate, 0, offsetof(Network, bridge_proxy_arp)
189 Bridge.ProxyARPWiFi, config_parse_tristate, 0, offsetof(Network, bridge_proxy_arp_wifi)
190 Bridge.Priority, config_parse_bridge_port_priority, 0, offsetof(Network, priority)
191 Bridge.MulticastRouter, config_parse_multicast_router, 0, offsetof(Network, multicast_router)
192 BridgeFDB.MACAddress, config_parse_fdb_hwaddr, 0, 0
193 BridgeFDB.VLANId, config_parse_fdb_vlan_id, 0, 0
194 BridgeFDB.Destination, config_parse_fdb_destination, 0, 0
195 BridgeFDB.VNI, config_parse_fdb_vxlan_vni, 0, 0
196 BridgeFDB.AssociatedWith, config_parse_fdb_ntf_flags, 0, 0
197 BridgeVLAN.PVID, config_parse_brvlan_pvid, 0, 0
198 BridgeVLAN.VLAN, config_parse_brvlan_vlan, 0, 0
199 BridgeVLAN.EgressUntagged, config_parse_brvlan_untagged, 0, 0
200 Network.IPv6PrefixDelegation, config_parse_router_prefix_delegation, 0, 0
201 IPv6PrefixDelegation.RouterLifetimeSec, config_parse_sec, 0, offsetof(Network, router_lifetime_usec)
202 IPv6PrefixDelegation.Managed, config_parse_bool, 0, offsetof(Network, router_managed)
203 IPv6PrefixDelegation.OtherInformation, config_parse_bool, 0, offsetof(Network, router_other_information)
204 IPv6PrefixDelegation.RouterPreference, config_parse_router_preference, 0, 0
205 IPv6PrefixDelegation.EmitDNS, config_parse_bool, 0, offsetof(Network, router_emit_dns)
206 IPv6PrefixDelegation.DNS, config_parse_radv_dns, 0, 0
207 IPv6PrefixDelegation.EmitDomains, config_parse_bool, 0, offsetof(Network, router_emit_domains)
208 IPv6PrefixDelegation.Domains, config_parse_radv_search_domains, 0, 0
209 IPv6PrefixDelegation.DNSLifetimeSec, config_parse_sec, 0, offsetof(Network, router_dns_lifetime_usec)
210 IPv6Prefix.Prefix, config_parse_prefix, 0, 0
211 IPv6Prefix.OnLink, config_parse_prefix_flags, 0, 0
212 IPv6Prefix.AddressAutoconfiguration, config_parse_prefix_flags, 0, 0
213 IPv6Prefix.ValidLifetimeSec, config_parse_prefix_lifetime, 0, 0
214 IPv6Prefix.PreferredLifetimeSec, config_parse_prefix_lifetime, 0, 0
215 CAN.BitRate, config_parse_si_size, 0, offsetof(Network, can_bitrate)
216 CAN.SamplePoint, config_parse_permille, 0, offsetof(Network, can_sample_point)
217 CAN.RestartSec, config_parse_sec, 0, offsetof(Network, can_restart_us)
218 CAN.TripleSampling, config_parse_tristate, 0, offsetof(Network, can_triple_sampling)
219 /* backwards compatibility: do not add new entries to this section */
220 Network.IPv4LL, config_parse_ipv4ll, 0, offsetof(Network, link_local)
221 DHCPv4.UseDNS, config_parse_bool, 0, offsetof(Network, dhcp_use_dns)
222 DHCPv4.UseMTU, config_parse_bool, 0, offsetof(Network, dhcp_use_mtu)
223 DHCPv4.UseHostname, config_parse_bool, 0, offsetof(Network, dhcp_use_hostname)
224 DHCP.UseDomainName, config_parse_dhcp_use_domains, 0, offsetof(Network, dhcp_use_domains)
225 DHCPv4.UseDomainName, config_parse_dhcp_use_domains, 0, offsetof(Network, dhcp_use_domains)
226 DHCPv4.CriticalConnection, config_parse_bool, 0, offsetof(Network, dhcp_critical)