]>
Commit | Line | Data |
---|---|---|
c0dda186 TG |
1 | %{ |
2 | #include <stddef.h> | |
3 | #include "conf-parser.h" | |
413708d1 | 4 | #include "networkd-conf.h" |
23f53b99 | 5 | #include "networkd-network.h" |
c6f7c917 | 6 | #include "network-internal.h" |
13b498f9 | 7 | #include "vlan-util.h" |
c0dda186 TG |
8 | %} |
9 | struct ConfigPerfItem; | |
10 | %null_strings | |
11 | %language=ANSI-C | |
12 | %define slot-name section_and_lvalue | |
13 | %define hash-function-name network_network_gperf_hash | |
14 | %define lookup-function-name network_network_gperf_lookup | |
15 | %readonly-tables | |
16 | %omit-struct-type | |
17 | %struct-type | |
18 | %includes | |
19 | %% | |
4f2e437a SS |
20 | Match.MACAddress, config_parse_hwaddr, 0, offsetof(Network, match_mac) |
21 | Match.Path, config_parse_strv, 0, offsetof(Network, match_path) | |
22 | Match.Driver, config_parse_strv, 0, offsetof(Network, match_driver) | |
23 | Match.Type, config_parse_strv, 0, offsetof(Network, match_type) | |
24 | Match.Name, config_parse_ifnames, 0, offsetof(Network, match_name) | |
25 | Match.Host, config_parse_net_condition, CONDITION_HOST, offsetof(Network, match_host) | |
26 | Match.Virtualization, config_parse_net_condition, CONDITION_VIRTUALIZATION, offsetof(Network, match_virt) | |
27 | Match.KernelCommandLine, config_parse_net_condition, CONDITION_KERNEL_COMMAND_LINE, offsetof(Network, match_kernel) | |
28 | Match.Architecture, config_parse_net_condition, CONDITION_ARCHITECTURE, offsetof(Network, match_arch) | |
29 | Link.MACAddress, config_parse_hwaddr, 0, offsetof(Network, mac) | |
30 | Link.MTUBytes, config_parse_iec_size, 0, offsetof(Network, mtu) | |
99d2baa2 | 31 | Link.ARP, config_parse_tristate, 0, offsetof(Network, arp) |
a09dc546 | 32 | Link.Unmanaged, config_parse_bool, 0, offsetof(Network, unmanaged) |
4f2e437a SS |
33 | Network.Description, config_parse_string, 0, offsetof(Network, description) |
34 | Network.Bridge, config_parse_netdev, 0, offsetof(Network, bridge) | |
35 | Network.Bond, config_parse_netdev, 0, offsetof(Network, bond) | |
36 | Network.VLAN, config_parse_netdev, 0, 0 | |
37 | Network.MACVLAN, config_parse_netdev, 0, 0 | |
38 | Network.MACVTAP, config_parse_netdev, 0, 0 | |
39 | Network.IPVLAN, config_parse_netdev, 0, 0 | |
40 | Network.VXLAN, config_parse_netdev, 0, 0 | |
41 | Network.Tunnel, config_parse_tunnel, 0, 0 | |
6cb955c6 | 42 | Network.VRF, config_parse_netdev, 0, 0 |
4f2e437a SS |
43 | Network.DHCP, config_parse_dhcp, 0, offsetof(Network, dhcp) |
44 | Network.DHCPServer, config_parse_bool, 0, offsetof(Network, dhcp_server) | |
45 | Network.LinkLocalAddressing, config_parse_address_family_boolean, 0, offsetof(Network, link_local) | |
46 | Network.IPv4LLRoute, config_parse_bool, 0, offsetof(Network, ipv4ll_route) | |
47 | Network.IPv6Token, config_parse_ipv6token, 0, offsetof(Network, ipv6_token) | |
34437b4f | 48 | Network.LLDP, config_parse_lldp_mode, 0, offsetof(Network, lldp_mode) |
7272b25e | 49 | Network.EmitLLDP, config_parse_lldp_emit, 0, offsetof(Network, lldp_emit) |
4f2e437a SS |
50 | Network.Address, config_parse_address, 0, 0 |
51 | Network.Gateway, config_parse_gateway, 0, 0 | |
3df9bec5 | 52 | Network.Domains, config_parse_domains, 0, 0 |
53253824 | 53 | Network.DNS, config_parse_dns, 0, 0 |
af49ca27 | 54 | Network.LLMNR, config_parse_resolve_support, 0, offsetof(Network, llmnr) |
aaa297d4 | 55 | Network.MulticastDNS, config_parse_resolve_support, 0, offsetof(Network, mdns) |
ad6c0475 | 56 | Network.DNSSEC, config_parse_dnssec_mode, 0, offsetof(Network, dnssec_mode) |
5733d88d | 57 | Network.DNSSECNegativeTrustAnchors, config_parse_dnssec_negative_trust_anchors, 0, 0 |
26575990 | 58 | Network.NTP, config_parse_ntp, 0, offsetof(Network, ntp) |
4f2e437a SS |
59 | Network.IPForward, config_parse_address_family_boolean_with_kernel,0, offsetof(Network, ip_forward) |
60 | Network.IPMasquerade, config_parse_bool, 0, offsetof(Network, ip_masquerade) | |
61 | Network.IPv6PrivacyExtensions, config_parse_ipv6_privacy_extensions, 0, offsetof(Network, ipv6_privacy_extensions) | |
f921f573 | 62 | Network.IPv6AcceptRA, config_parse_tristate, 0, offsetof(Network, ipv6_accept_ra) |
4f2e437a | 63 | Network.IPv6AcceptRouterAdvertisements, config_parse_tristate, 0, offsetof(Network, ipv6_accept_ra) |
8749cbcd | 64 | Network.IPv6DuplicateAddressDetection, config_parse_int, 0, offsetof(Network, ipv6_dad_transmits) |
b69c3180 | 65 | Network.IPv6HopLimit, config_parse_int, 0, offsetof(Network, ipv6_hop_limit) |
cbd50adc ZJS |
66 | Network.ActiveSlave, config_parse_bool, 0, offsetof(Network, active_slave) |
67 | Network.PrimarySlave, config_parse_bool, 0, offsetof(Network, primary_slave) | |
8f9a206b | 68 | Network.IPv4ProxyARP, config_parse_tristate, 0, offsetof(Network, proxy_arp) |
cbd50adc | 69 | Network.ProxyARP, config_parse_tristate, 0, offsetof(Network, proxy_arp) |
a0e5c15d | 70 | Network.IPv6ProxyNDPAddress, config_parse_ipv6_proxy_ndp_address, 0, 0 |
4f2e437a SS |
71 | Network.BindCarrier, config_parse_strv, 0, offsetof(Network, bind_carrier) |
72 | Address.Address, config_parse_address, 0, 0 | |
73 | Address.Peer, config_parse_address, 0, 0 | |
74 | Address.Broadcast, config_parse_broadcast, 0, 0 | |
75 | Address.Label, config_parse_label, 0, 0 | |
b5834a0b | 76 | Address.PreferredLifetime, config_parse_lifetime, 0, 0 |
e63be084 SS |
77 | Address.HomeAddress, config_parse_address_flags, 0, 0 |
78 | Address.DuplicateAddressDetection, config_parse_address_flags, 0, 0 | |
79 | Address.ManageTemporaryAddress, config_parse_address_flags, 0, 0 | |
80 | Address.PrefixRoute, config_parse_address_flags, 0, 0 | |
81 | Address.AutoJoin, config_parse_address_flags, 0, 0 | |
4f2e437a SS |
82 | Route.Gateway, config_parse_gateway, 0, 0 |
83 | Route.Destination, config_parse_destination, 0, 0 | |
84 | Route.Source, config_parse_destination, 0, 0 | |
85 | Route.Metric, config_parse_route_priority, 0, 0 | |
86 | Route.Scope, config_parse_route_scope, 0, 0 | |
0d07e595 | 87 | Route.PreferredSource, config_parse_preferred_src, 0, 0 |
c953b24c | 88 | Route.Table, config_parse_route_table, 0, 0 |
28959f7d | 89 | Route.GatewayOnlink, config_parse_gateway_onlink, 0, 0 |
b5bf6f64 | 90 | Route.IPv6Preference, config_parse_ipv6_route_preference, 0, 0 |
4f2e437a | 91 | DHCP.ClientIdentifier, config_parse_dhcp_client_identifier, 0, offsetof(Network, dhcp_client_identifier) |
27cb34f5 LP |
92 | DHCP.UseDNS, config_parse_bool, 0, offsetof(Network, dhcp_use_dns) |
93 | DHCP.UseNTP, config_parse_bool, 0, offsetof(Network, dhcp_use_ntp) | |
94 | DHCP.UseMTU, config_parse_bool, 0, offsetof(Network, dhcp_use_mtu) | |
95 | DHCP.UseHostname, config_parse_bool, 0, offsetof(Network, dhcp_use_hostname) | |
b2a81c0b | 96 | DHCP.UseDomains, config_parse_dhcp_use_domains, 0, offsetof(Network, dhcp_use_domains) |
27cb34f5 LP |
97 | DHCP.UseRoutes, config_parse_bool, 0, offsetof(Network, dhcp_use_routes) |
98 | DHCP.SendHostname, config_parse_bool, 0, offsetof(Network, dhcp_send_hostname) | |
99 | DHCP.Hostname, config_parse_hostname, 0, offsetof(Network, dhcp_hostname) | |
4f2e437a SS |
100 | DHCP.RequestBroadcast, config_parse_bool, 0, offsetof(Network, dhcp_broadcast) |
101 | DHCP.CriticalConnection, config_parse_bool, 0, offsetof(Network, dhcp_critical) | |
102 | DHCP.VendorClassIdentifier, config_parse_string, 0, offsetof(Network, dhcp_vendor_class_identifier) | |
8341a5c3 ZJS |
103 | DHCP.DUIDType, config_parse_duid_type, 0, offsetof(Network, duid.type) |
104 | DHCP.DUIDRawData, config_parse_duid_rawdata, 0, offsetof(Network, duid) | |
4f2e437a | 105 | DHCP.RouteMetric, config_parse_unsigned, 0, offsetof(Network, dhcp_route_metric) |
f594276b | 106 | DHCP.RouteTable, config_parse_dhcp_route_table, 0, offsetof(Network, dhcp_route_table) |
27cb34f5 | 107 | DHCP.UseTimezone, config_parse_bool, 0, offsetof(Network, dhcp_use_timezone) |
d05def16 | 108 | DHCP.IAID, config_parse_iaid, 0, offsetof(Network, iaid) |
9c77d107 | 109 | DHCP.ListenPort, config_parse_uint16, 0, offsetof(Network, dhcp_client_port) |
f921f573 LP |
110 | IPv6AcceptRA.UseDNS, config_parse_bool, 0, offsetof(Network, ipv6_accept_ra_use_dns) |
111 | IPv6AcceptRA.UseDomains, config_parse_dhcp_use_domains, 0, offsetof(Network, ipv6_accept_ra_use_domains) | |
2ba31d29 | 112 | IPv6AcceptRA.RouteTable, config_parse_dhcp_route_table, 0, offsetof(Network, ipv6_accept_ra_route_table) |
4f2e437a SS |
113 | DHCPServer.MaxLeaseTimeSec, config_parse_sec, 0, offsetof(Network, dhcp_server_max_lease_time_usec) |
114 | DHCPServer.DefaultLeaseTimeSec, config_parse_sec, 0, offsetof(Network, dhcp_server_default_lease_time_usec) | |
115 | DHCPServer.EmitDNS, config_parse_bool, 0, offsetof(Network, dhcp_server_emit_dns) | |
116 | DHCPServer.DNS, config_parse_dhcp_server_dns, 0, 0 | |
117 | DHCPServer.EmitNTP, config_parse_bool, 0, offsetof(Network, dhcp_server_emit_ntp) | |
118 | DHCPServer.NTP, config_parse_dhcp_server_ntp, 0, 0 | |
77ff6022 | 119 | DHCPServer.EmitRouter, config_parse_bool, 0, offsetof(Network, dhcp_server_emit_router) |
4f2e437a SS |
120 | DHCPServer.EmitTimezone, config_parse_bool, 0, offsetof(Network, dhcp_server_emit_timezone) |
121 | DHCPServer.Timezone, config_parse_timezone, 0, offsetof(Network, dhcp_server_timezone) | |
122 | DHCPServer.PoolOffset, config_parse_uint32, 0, offsetof(Network, dhcp_server_pool_offset) | |
123 | DHCPServer.PoolSize, config_parse_uint32, 0, offsetof(Network, dhcp_server_pool_size) | |
b56be296 | 124 | Bridge.Cost, config_parse_uint32, 0, offsetof(Network, cost) |
4f2e437a SS |
125 | Bridge.UseBPDU, config_parse_bool, 0, offsetof(Network, use_bpdu) |
126 | Bridge.HairPin, config_parse_bool, 0, offsetof(Network, hairpin) | |
127 | Bridge.FastLeave, config_parse_bool, 0, offsetof(Network, fast_leave) | |
128 | Bridge.AllowPortToBeRoot, config_parse_bool, 0, offsetof(Network, allow_port_to_be_root) | |
129 | Bridge.UnicastFlood, config_parse_bool, 0, offsetof(Network, unicast_flood) | |
b56be296 | 130 | Bridge.Priority, config_parse_uint16, 0, offsetof(Network, priority) |
4f2e437a SS |
131 | BridgeFDB.MACAddress, config_parse_fdb_hwaddr, 0, 0 |
132 | BridgeFDB.VLANId, config_parse_fdb_vlan_id, 0, 0 | |
ffff9abe | 133 | BridgeVLAN.PVID, config_parse_brvlan_pvid, 0, 0 |
13b498f9 TJ |
134 | BridgeVLAN.VLAN, config_parse_brvlan_vlan, 0, 0 |
135 | BridgeVLAN.EgressUntagged, config_parse_brvlan_untagged, 0, 0 | |
4cc7a82c | 136 | /* backwards compatibility: do not add new entries to this section */ |
4f2e437a | 137 | Network.IPv4LL, config_parse_ipv4ll, 0, offsetof(Network, link_local) |
27cb34f5 LP |
138 | DHCPv4.UseDNS, config_parse_bool, 0, offsetof(Network, dhcp_use_dns) |
139 | DHCPv4.UseMTU, config_parse_bool, 0, offsetof(Network, dhcp_use_mtu) | |
140 | DHCPv4.UseHostname, config_parse_bool, 0, offsetof(Network, dhcp_use_hostname) | |
b2a81c0b LP |
141 | DHCP.UseDomainName, config_parse_dhcp_use_domains, 0, offsetof(Network, dhcp_use_domains) |
142 | DHCPv4.UseDomainName, config_parse_dhcp_use_domains, 0, offsetof(Network, dhcp_use_domains) | |
4f2e437a | 143 | DHCPv4.CriticalConnection, config_parse_bool, 0, offsetof(Network, dhcp_critical) |