]>
Commit | Line | Data |
---|---|---|
c0dda186 TG |
1 | %{ |
2 | #include <stddef.h> | |
3 | #include "conf-parser.h" | |
4 | #include "networkd.h" | |
c6f7c917 | 5 | #include "network-internal.h" |
c0dda186 TG |
6 | %} |
7 | struct ConfigPerfItem; | |
8 | %null_strings | |
9 | %language=ANSI-C | |
10 | %define slot-name section_and_lvalue | |
11 | %define hash-function-name network_network_gperf_hash | |
12 | %define lookup-function-name network_network_gperf_lookup | |
13 | %readonly-tables | |
14 | %omit-struct-type | |
15 | %struct-type | |
16 | %includes | |
17 | %% | |
4f2e437a SS |
18 | Match.MACAddress, config_parse_hwaddr, 0, offsetof(Network, match_mac) |
19 | Match.Path, config_parse_strv, 0, offsetof(Network, match_path) | |
20 | Match.Driver, config_parse_strv, 0, offsetof(Network, match_driver) | |
21 | Match.Type, config_parse_strv, 0, offsetof(Network, match_type) | |
22 | Match.Name, config_parse_ifnames, 0, offsetof(Network, match_name) | |
23 | Match.Host, config_parse_net_condition, CONDITION_HOST, offsetof(Network, match_host) | |
24 | Match.Virtualization, config_parse_net_condition, CONDITION_VIRTUALIZATION, offsetof(Network, match_virt) | |
25 | Match.KernelCommandLine, config_parse_net_condition, CONDITION_KERNEL_COMMAND_LINE, offsetof(Network, match_kernel) | |
26 | Match.Architecture, config_parse_net_condition, CONDITION_ARCHITECTURE, offsetof(Network, match_arch) | |
27 | Link.MACAddress, config_parse_hwaddr, 0, offsetof(Network, mac) | |
28 | Link.MTUBytes, config_parse_iec_size, 0, offsetof(Network, mtu) | |
29 | Network.Description, config_parse_string, 0, offsetof(Network, description) | |
30 | Network.Bridge, config_parse_netdev, 0, offsetof(Network, bridge) | |
31 | Network.Bond, config_parse_netdev, 0, offsetof(Network, bond) | |
32 | Network.VLAN, config_parse_netdev, 0, 0 | |
33 | Network.MACVLAN, config_parse_netdev, 0, 0 | |
34 | Network.MACVTAP, config_parse_netdev, 0, 0 | |
35 | Network.IPVLAN, config_parse_netdev, 0, 0 | |
36 | Network.VXLAN, config_parse_netdev, 0, 0 | |
37 | Network.Tunnel, config_parse_tunnel, 0, 0 | |
38 | Network.DHCP, config_parse_dhcp, 0, offsetof(Network, dhcp) | |
39 | Network.DHCPServer, config_parse_bool, 0, offsetof(Network, dhcp_server) | |
40 | Network.LinkLocalAddressing, config_parse_address_family_boolean, 0, offsetof(Network, link_local) | |
41 | Network.IPv4LLRoute, config_parse_bool, 0, offsetof(Network, ipv4ll_route) | |
42 | Network.IPv6Token, config_parse_ipv6token, 0, offsetof(Network, ipv6_token) | |
43 | Network.LLDP, config_parse_bool, 0, offsetof(Network, lldp) | |
44 | Network.Address, config_parse_address, 0, 0 | |
45 | Network.Gateway, config_parse_gateway, 0, 0 | |
46 | Network.Domains, config_parse_domains, 0, offsetof(Network, domains) | |
47 | Network.DNS, config_parse_strv, 0, offsetof(Network, dns) | |
48 | Network.LLMNR, config_parse_resolve, 0, offsetof(Network, llmnr) | |
49 | Network.NTP, config_parse_strv, 0, offsetof(Network, ntp) | |
50 | Network.IPForward, config_parse_address_family_boolean_with_kernel,0, offsetof(Network, ip_forward) | |
51 | Network.IPMasquerade, config_parse_bool, 0, offsetof(Network, ip_masquerade) | |
52 | Network.IPv6PrivacyExtensions, config_parse_ipv6_privacy_extensions, 0, offsetof(Network, ipv6_privacy_extensions) | |
53 | Network.IPv6AcceptRouterAdvertisements, config_parse_tristate, 0, offsetof(Network, ipv6_accept_ra) | |
54 | Network.BindCarrier, config_parse_strv, 0, offsetof(Network, bind_carrier) | |
55 | Address.Address, config_parse_address, 0, 0 | |
56 | Address.Peer, config_parse_address, 0, 0 | |
57 | Address.Broadcast, config_parse_broadcast, 0, 0 | |
58 | Address.Label, config_parse_label, 0, 0 | |
59 | Route.Gateway, config_parse_gateway, 0, 0 | |
60 | Route.Destination, config_parse_destination, 0, 0 | |
61 | Route.Source, config_parse_destination, 0, 0 | |
62 | Route.Metric, config_parse_route_priority, 0, 0 | |
63 | Route.Scope, config_parse_route_scope, 0, 0 | |
0d07e595 | 64 | Route.PreferredSource, config_parse_preferred_src, 0, 0 |
4f2e437a SS |
65 | DHCP.ClientIdentifier, config_parse_dhcp_client_identifier, 0, offsetof(Network, dhcp_client_identifier) |
66 | DHCP.UseDNS, config_parse_bool, 0, offsetof(Network, dhcp_dns) | |
67 | DHCP.UseNTP, config_parse_bool, 0, offsetof(Network, dhcp_ntp) | |
68 | DHCP.UseMTU, config_parse_bool, 0, offsetof(Network, dhcp_mtu) | |
69 | DHCP.UseHostname, config_parse_bool, 0, offsetof(Network, dhcp_hostname) | |
70 | DHCP.UseDomains, config_parse_bool, 0, offsetof(Network, dhcp_domains) | |
71 | DHCP.UseRoutes, config_parse_bool, 0, offsetof(Network, dhcp_routes) | |
72 | DHCP.SendHostname, config_parse_bool, 0, offsetof(Network, dhcp_sendhost) | |
73 | DHCP.Hostname, config_parse_hostname, 0, offsetof(Network, hostname) | |
74 | DHCP.RequestBroadcast, config_parse_bool, 0, offsetof(Network, dhcp_broadcast) | |
75 | DHCP.CriticalConnection, config_parse_bool, 0, offsetof(Network, dhcp_critical) | |
76 | DHCP.VendorClassIdentifier, config_parse_string, 0, offsetof(Network, dhcp_vendor_class_identifier) | |
77 | DHCP.RouteMetric, config_parse_unsigned, 0, offsetof(Network, dhcp_route_metric) | |
78 | DHCP.UseTimezone, config_parse_bool, 0, offsetof(Network, dhcp_timezone) | |
79 | DHCPServer.MaxLeaseTimeSec, config_parse_sec, 0, offsetof(Network, dhcp_server_max_lease_time_usec) | |
80 | DHCPServer.DefaultLeaseTimeSec, config_parse_sec, 0, offsetof(Network, dhcp_server_default_lease_time_usec) | |
81 | DHCPServer.EmitDNS, config_parse_bool, 0, offsetof(Network, dhcp_server_emit_dns) | |
82 | DHCPServer.DNS, config_parse_dhcp_server_dns, 0, 0 | |
83 | DHCPServer.EmitNTP, config_parse_bool, 0, offsetof(Network, dhcp_server_emit_ntp) | |
84 | DHCPServer.NTP, config_parse_dhcp_server_ntp, 0, 0 | |
85 | DHCPServer.EmitTimezone, config_parse_bool, 0, offsetof(Network, dhcp_server_emit_timezone) | |
86 | DHCPServer.Timezone, config_parse_timezone, 0, offsetof(Network, dhcp_server_timezone) | |
87 | DHCPServer.PoolOffset, config_parse_uint32, 0, offsetof(Network, dhcp_server_pool_offset) | |
88 | DHCPServer.PoolSize, config_parse_uint32, 0, offsetof(Network, dhcp_server_pool_size) | |
89 | Bridge.Cost, config_parse_unsigned, 0, offsetof(Network, cost) | |
90 | Bridge.UseBPDU, config_parse_bool, 0, offsetof(Network, use_bpdu) | |
91 | Bridge.HairPin, config_parse_bool, 0, offsetof(Network, hairpin) | |
92 | Bridge.FastLeave, config_parse_bool, 0, offsetof(Network, fast_leave) | |
93 | Bridge.AllowPortToBeRoot, config_parse_bool, 0, offsetof(Network, allow_port_to_be_root) | |
94 | Bridge.UnicastFlood, config_parse_bool, 0, offsetof(Network, unicast_flood) | |
95 | BridgeFDB.MACAddress, config_parse_fdb_hwaddr, 0, 0 | |
96 | BridgeFDB.VLANId, config_parse_fdb_vlan_id, 0, 0 | |
4cc7a82c | 97 | /* backwards compatibility: do not add new entries to this section */ |
4f2e437a SS |
98 | Network.IPv4LL, config_parse_ipv4ll, 0, offsetof(Network, link_local) |
99 | DHCPv4.UseDNS, config_parse_bool, 0, offsetof(Network, dhcp_dns) | |
100 | DHCPv4.UseMTU, config_parse_bool, 0, offsetof(Network, dhcp_mtu) | |
101 | DHCPv4.UseHostname, config_parse_bool, 0, offsetof(Network, dhcp_hostname) | |
102 | DHCP.UseDomainName, config_parse_bool, 0, offsetof(Network, dhcp_domains) | |
103 | DHCPv4.UseDomainName, config_parse_bool, 0, offsetof(Network, dhcp_domains) | |
104 | DHCPv4.CriticalConnection, config_parse_bool, 0, offsetof(Network, dhcp_critical) |