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