Home
last modified time | relevance | path

Searched refs:network (Results 1 – 25 of 226) sorted by relevance

12345678910

/systemd-251/src/network/
Dnetworkd-network.c50 static int network_resolve_netdev_one(Network *network, const char *name, NetDevKind kind, NetDev *… in network_resolve_netdev_one() argument
59 assert(network); in network_resolve_netdev_one()
60 assert(network->manager); in network_resolve_netdev_one()
61 assert(network->filename); in network_resolve_netdev_one()
71 network->filename, name); in network_resolve_netdev_one()
74 r = netdev_get(network->manager, name, &netdev); in network_resolve_netdev_one()
77 network->filename, name); in network_resolve_netdev_one()
93 network->filename, name, kind_string); in network_resolve_netdev_one()
99 static int network_resolve_stacked_netdevs(Network *network) { in network_resolve_stacked_netdevs() argument
103 assert(network); in network_resolve_stacked_netdevs()
[all …]
Dnetworkd-can.c19 assert(link->network); in can_set_netlink_message()
34 if (link->network->can_bitrate > 0) { in can_set_netlink_message()
36 .bitrate = link->network->can_bitrate, in can_set_netlink_message()
37 .sample_point = link->network->can_sample_point, in can_set_netlink_message()
38 .sjw = link->network->can_sync_jump_width, in can_set_netlink_message()
42 if (link->network->can_sample_point > 0) in can_set_netlink_message()
50 } else if (link->network->can_time_quanta_ns > 0) { in can_set_netlink_message()
52 .tq = link->network->can_time_quanta_ns, in can_set_netlink_message()
53 .prop_seg = link->network->can_propagation_segment, in can_set_netlink_message()
54 .phase_seg1 = link->network->can_phase_buffer_segment_1, in can_set_netlink_message()
[all …]
Dnetworkd-dhcp-server.c32 if (!link->network) in link_dhcp4_server_enabled()
38 return link->network->dhcp_server; in link_dhcp4_server_enabled()
41 void network_adjust_dhcp_server(Network *network) { in network_adjust_dhcp_server() argument
42 assert(network); in network_adjust_dhcp_server()
44 if (!network->dhcp_server) in network_adjust_dhcp_server()
47 if (network->bond) { in network_adjust_dhcp_server()
49 network->filename); in network_adjust_dhcp_server()
50 network->dhcp_server = false; in network_adjust_dhcp_server()
54 if (!in4_addr_is_set(&network->dhcp_server_address)) { in network_adjust_dhcp_server()
58 ORDERED_HASHMAP_FOREACH(address, network->addresses_by_section) { in network_adjust_dhcp_server()
[all …]
Dnetworkd-dhcp-common.c25 assert(link->network); in link_get_vrf_table()
27 return link->network->vrf ? VRF(link->network->vrf)->table : RT_TABLE_MAIN; in link_get_vrf_table()
32 assert(link->network); in link_get_dhcp4_route_table()
37 if (link->network->dhcp_route_table_set) in link_get_dhcp4_route_table()
38 return link->network->dhcp_route_table; in link_get_dhcp4_route_table()
44 assert(link->network); in link_get_ipv6_accept_ra_route_table()
46 if (link->network->ipv6_accept_ra_route_table_set) in link_get_ipv6_accept_ra_route_table()
47 return link->network->ipv6_accept_ra_route_table; in link_get_ipv6_accept_ra_route_table()
71 if (!link->network) in link_dhcp_enabled()
74 … return link->network->dhcp & (family == AF_INET ? ADDRESS_FAMILY_IPV4 : ADDRESS_FAMILY_IPV6); in link_dhcp_enabled()
[all …]
Dnetworkd-radv.c25 void network_adjust_radv(Network *network) { in network_adjust_radv() argument
26 assert(network); in network_adjust_radv()
30 if (network->dhcp_pd < 0) in network_adjust_radv()
32network->dhcp_pd = FLAGS_SET(network->router_prefix_delegation, RADV_PREFIX_DELEGATION_DHCP6); in network_adjust_radv()
34 if (!FLAGS_SET(network->link_local, ADDRESS_FAMILY_IPV6)) { in network_adjust_radv()
35 if (network->router_prefix_delegation != RADV_PREFIX_DELEGATION_NONE) in network_adjust_radv()
37 "Disabling IPv6PrefixDelegation=.", network->filename); in network_adjust_radv()
39 network->router_prefix_delegation = RADV_PREFIX_DELEGATION_NONE; in network_adjust_radv()
42 if (network->router_prefix_delegation == RADV_PREFIX_DELEGATION_NONE) { in network_adjust_radv()
43 network->n_router_dns = 0; in network_adjust_radv()
[all …]
Dnetworkd-setlink.c202 if (link->network->active_slave) { in link_configure_fill_message()
208 if (link->network->primary_slave) { in link_configure_fill_message()
232 if (link->network->use_bpdu >= 0) { in link_configure_fill_message()
233 … r = sd_netlink_message_append_u8(req, IFLA_BRPORT_GUARD, link->network->use_bpdu); in link_configure_fill_message()
238 if (link->network->hairpin >= 0) { in link_configure_fill_message()
239 … r = sd_netlink_message_append_u8(req, IFLA_BRPORT_MODE, link->network->hairpin); in link_configure_fill_message()
244 if (link->network->isolated >= 0) { in link_configure_fill_message()
245 … r = sd_netlink_message_append_u8(req, IFLA_BRPORT_ISOLATED, link->network->isolated); in link_configure_fill_message()
250 if (link->network->fast_leave >= 0) { in link_configure_fill_message()
251 … r = sd_netlink_message_append_u8(req, IFLA_BRPORT_FAST_LEAVE, link->network->fast_leave); in link_configure_fill_message()
[all …]
Dnetworkd-sysctl.c32 if (!link->network) in link_set_proxy_arp()
35 if (link->network->proxy_arp < 0) in link_set_proxy_arp()
38 …return sysctl_write_ip_property_boolean(AF_INET, link->ifname, "proxy_arp", link->network->proxy_a… in link_set_proxy_arp()
51 if (!link->network) in link_ip_forward_enabled()
54 …return link->network->ip_forward & (family == AF_INET ? ADDRESS_FAMILY_IPV4 : ADDRESS_FAMILY_IPV6); in link_ip_forward_enabled()
100 if (!link->network) in link_set_ipv6_privacy_extensions()
104 if (link->network->ipv6_privacy_extensions == _IPV6_PRIVACY_EXTENSIONS_INVALID) in link_set_ipv6_privacy_extensions()
107 …rite_ip_property_int(AF_INET6, link->ifname, "use_tempaddr", (int) link->network->ipv6_privacy_ext… in link_set_ipv6_privacy_extensions()
120 if (!link->network) in link_set_ipv6_accept_ra()
136 if (!link->network) in link_set_ipv6_dad_transmits()
[all …]
Dnetworkd-dhcp4.c32 void network_adjust_dhcp4(Network *network) { in network_adjust_dhcp4() argument
33 assert(network); in network_adjust_dhcp4()
35 if (!FLAGS_SET(network->dhcp, ADDRESS_FAMILY_IPV4)) in network_adjust_dhcp4()
38 if (network->dhcp_use_gateway < 0) in network_adjust_dhcp4()
39 network->dhcp_use_gateway = network->dhcp_use_routes; in network_adjust_dhcp4()
45 if (network->dhcp_anonymize && in network_adjust_dhcp4()
46 network->dhcp_client_identifier >= 0 && in network_adjust_dhcp4()
47 network->dhcp_client_identifier != DHCP_CLIENT_ID_MAC) { in network_adjust_dhcp4()
49 network->filename); in network_adjust_dhcp4()
50 network->dhcp_client_identifier = DHCP_CLIENT_ID_MAC; in network_adjust_dhcp4()
[all …]
Dnetworkd-state-file.c138 if (!link->network) in manager_save()
141 if (link->network->required_for_online) { in manager_save()
152 … r = ordered_set_put_dns_servers(&dns, link->ifindex, link->network->dns, link->network->n_dns); in manager_save()
156 r = ordered_set_put_strdupv(&ntp, link->ntp ?: link->network->ntp); in manager_save()
160 …ordered_set_put_string_set(&search_domains, link->search_domains ?: link->network->search_domains); in manager_save()
164 …r = ordered_set_put_string_set(&route_domains, link->route_domains ?: link->network->route_domains… in manager_save()
172 if (link->network->dhcp_use_dns) { in manager_save()
182 if (link->network->dhcp_use_ntp) { in manager_save()
192 if (link->network->dhcp_use_sip) { in manager_save()
202 if (link->network->dhcp_use_domains != DHCP_USE_DOMAINS_NO) { in manager_save()
[all …]
Dnetworkd-dhcp-server-static-lease.c16 if (static_lease->network && static_lease->section) in dhcp_static_lease_free()
17 … hashmap_remove(static_lease->network->dhcp_static_leases_by_section, static_lease->section); in dhcp_static_lease_free()
37 static int lease_new_static(Network *network, const char *filename, unsigned section_line, DHCPStat… in lease_new_static() argument
42 assert(network); in lease_new_static()
51 static_lease = hashmap_get(network->dhcp_static_leases_by_section, n); in lease_new_static()
61 static_lease->network = network; in lease_new_static()
63 …r = hashmap_ensure_put(&network->dhcp_static_leases_by_section, &config_section_hash_ops, static_l… in lease_new_static()
94 void network_drop_invalid_static_leases(Network *network) { in network_drop_invalid_static_leases() argument
97 assert(network); in network_drop_invalid_static_leases()
99 HASHMAP_FOREACH(static_lease, network->dhcp_static_leases_by_section) in network_drop_invalid_static_leases()
[all …]
Dnetworkd-dhcp6.c25 return link->network->dhcp6_use_address; in link_dhcp6_with_address_enabled()
31 if (!link->network) in link_get_dhcp6_client_start_mode()
35 if (link->network->dhcp6_client_start_mode >= 0) in link_get_dhcp6_client_start_mode()
36 return link->network->dhcp6_client_start_mode; in link_get_dhcp6_client_start_mode()
251 assert(link->network); in dhcp6_address_acquired()
254 if (!link->network->dhcp6_use_address) in dhcp6_address_acquired()
280 if (link->network->dhcp6_use_hostname) { in dhcp6_address_acquired()
375 assert(link->network); in dhcp6_handler()
417 assert(link->network); in dhcp6_start_on_ra()
476 assert(link->network); in dhcp6_start()
[all …]
Dnetworkd-bridge-fdb.c30 if (fdb->network) { in bridge_fdb_free()
32 hashmap_remove(fdb->network->bridge_fdb_entries_by_section, fdb->section); in bridge_fdb_free()
45 Network *network, in bridge_fdb_new_static() argument
54 assert(network); in bridge_fdb_new_static()
64 fdb = hashmap_get(network->bridge_fdb_entries_by_section, n); in bridge_fdb_new_static()
70 …if (hashmap_size(network->bridge_fdb_entries_by_section) >= STATIC_BRIDGE_FDB_ENTRIES_PER_NETWORK_… in bridge_fdb_new_static()
80 .network = network, in bridge_fdb_new_static()
86 …r = hashmap_ensure_put(&network->bridge_fdb_entries_by_section, &config_section_hash_ops, fdb->sec… in bridge_fdb_new_static()
233 assert(link->network); in link_request_static_bridge_fdb()
237 HASHMAP_FOREACH(fdb, link->network->bridge_fdb_entries_by_section) { in link_request_static_bridge_fdb()
[all …]
Dnetworkd-ndisc.c47 if (!link->network) in link_ipv6_accept_ra_enabled()
53 assert(link->network->ipv6_accept_ra >= 0); in link_ipv6_accept_ra_enabled()
54 return link->network->ipv6_accept_ra; in link_ipv6_accept_ra_enabled()
57 void network_adjust_ipv6_accept_ra(Network *network) { in network_adjust_ipv6_accept_ra() argument
58 assert(network); in network_adjust_ipv6_accept_ra()
60 if (!FLAGS_SET(network->link_local, ADDRESS_FAMILY_IPV6)) { in network_adjust_ipv6_accept_ra()
61 if (network->ipv6_accept_ra > 0) in network_adjust_ipv6_accept_ra()
63 "Disabling IPv6AcceptRA=.", network->filename); in network_adjust_ipv6_accept_ra()
64 network->ipv6_accept_ra = false; in network_adjust_ipv6_accept_ra()
67 if (network->ipv6_accept_ra < 0) in network_adjust_ipv6_accept_ra()
[all …]
Dnetworkd-bridge-vlan.c142 void network_adjust_bridge_vlan(Network *network) { in network_adjust_bridge_vlan() argument
143 assert(network); in network_adjust_bridge_vlan()
145 if (!network->use_br_vlan) in network_adjust_bridge_vlan()
149 if (network->pvid) in network_adjust_bridge_vlan()
150 set_bit(network->pvid, network->br_vid_bitmap); in network_adjust_bridge_vlan()
165 Network *network = userdata; in config_parse_brvlan_pvid() local
173 network->pvid = pvid; in config_parse_brvlan_pvid()
174 network->use_br_vlan = true; in config_parse_brvlan_pvid()
191 Network *network = userdata; in config_parse_brvlan_vlan() local
208 set_bit(vid, network->br_vid_bitmap); in config_parse_brvlan_vlan()
[all …]
Dnetworkd-ipv6-proxy-ndp.c15 void network_adjust_ipv6_proxy_ndp(Network *network) { in network_adjust_ipv6_proxy_ndp() argument
16 assert(network); in network_adjust_ipv6_proxy_ndp()
18 if (set_isempty(network->ipv6_proxy_ndp_addresses)) in network_adjust_ipv6_proxy_ndp()
24 "Ignoring IPv6 proxy NDP addresses.", network->filename); in network_adjust_ipv6_proxy_ndp()
25network->ipv6_proxy_ndp_addresses = set_free_free(network->ipv6_proxy_ndp_addresses); in network_adjust_ipv6_proxy_ndp()
103 assert(link->network); in link_request_static_ipv6_proxy_ndp_addresses()
107 SET_FOREACH(address, link->network->ipv6_proxy_ndp_addresses) { in link_request_static_ipv6_proxy_ndp_addresses()
144 Network *network = userdata; in config_parse_ipv6_proxy_ndp_address() local
150 assert(network); in config_parse_ipv6_proxy_ndp_address()
153network->ipv6_proxy_ndp_addresses = set_free_free(network->ipv6_proxy_ndp_addresses); in config_parse_ipv6_proxy_ndp_address()
[all …]
Dnetworkd-address-label.c19 if (label->network) { in address_label_free()
21 hashmap_remove(label->network->address_labels_by_section, label->section); in address_label_free()
30 static int address_label_new_static(Network *network, const char *filename, unsigned section_line, … in address_label_new_static() argument
35 assert(network); in address_label_new_static()
44 label = hashmap_get(network->address_labels_by_section, n); in address_label_new_static()
55 .network = network, in address_label_new_static()
60 …r = hashmap_ensure_put(&network->address_labels_by_section, &config_section_hash_ops, label->secti… in address_label_new_static()
149 assert(link->network); in link_request_static_address_labels()
153 HASHMAP_FOREACH(label, link->network->address_labels_by_section) { in link_request_static_address_labels()
196 void network_drop_invalid_address_labels(Network *network) { in network_drop_invalid_address_labels() argument
[all …]
Dnetworkd-bridge-mdb.c22 if (mdb->network) { in bridge_mdb_free()
24 hashmap_remove(mdb->network->bridge_mdb_entries_by_section, mdb->section); in bridge_mdb_free()
36 Network *network, in bridge_mdb_new_static() argument
45 assert(network); in bridge_mdb_new_static()
55 mdb = hashmap_get(network->bridge_mdb_entries_by_section, n); in bridge_mdb_new_static()
61 …if (hashmap_size(network->bridge_mdb_entries_by_section) >= STATIC_BRIDGE_MDB_ENTRIES_PER_NETWORK_… in bridge_mdb_new_static()
71 .network = network, in bridge_mdb_new_static()
75 …r = hashmap_ensure_put(&network->bridge_mdb_entries_by_section, &config_section_hash_ops, mdb->sec… in bridge_mdb_new_static()
223 if (!link->network) in link_request_static_bridge_mdb()
226 if (hashmap_isempty(link->network->bridge_mdb_entries_by_section)) in link_request_static_bridge_mdb()
[all …]
Dnetworkd-ipv6ll.c26 if (!link->network) in link_ipv6ll_enabled()
35 if (link->network->bond) in link_ipv6ll_enabled()
38 return link->network->link_local & ADDRESS_FAMILY_IPV6; in link_ipv6ll_enabled()
62 if (!link->network) in link_may_have_ipv6ll()
65 ORDERED_HASHMAP_FOREACH(a, link->network->addresses_by_section) { in link_may_have_ipv6ll()
84 if (link->network->ipv6ll_address_gen_mode >= 0) in link_get_ipv6ll_addrgen_mode()
85 return link->network->ipv6ll_address_gen_mode; in link_get_ipv6ll_addrgen_mode()
87 if (in6_addr_is_set(&link->network->ipv6ll_stable_secret)) in link_get_ipv6ll_addrgen_mode()
190 assert(link->network); in link_set_ipv6ll_stable_secret()
192 … if (link->network->ipv6ll_address_gen_mode != IPV6_LINK_LOCAL_ADDRESSS_GEN_MODE_STABLE_PRIVACY) in link_set_ipv6ll_stable_secret()
[all …]
Dnetworkd-network-bus.c56 static char *network_bus_path(Network *network) { in network_bus_path() argument
61 assert(network); in network_bus_path()
62 assert(network->filename); in network_bus_path()
64 name = strdup(network->filename); in network_bus_path()
88 Network *network; in network_node_enumerator() local
96 ORDERED_HASHMAP_FOREACH(network, m->networks) { in network_node_enumerator()
99 p = network_bus_path(network); in network_node_enumerator()
115 Network *network; in network_object_find() local
129 r = network_get_by_name(m, name, &network); in network_object_find()
133 *found = network; in network_object_find()
Dnetworkd-link.c77 if (!link->network) in link_ipv4ll_enabled()
101 if (link->network->bond) in link_ipv4ll_enabled()
104 return link->network->link_local & ADDRESS_FAMILY_IPV4; in link_ipv4ll_enabled()
113 if (link->network->bond) in link_ipv6_enabled()
123 if (network_has_static_ipv6_configurations(link->network)) in link_ipv6_enabled()
132 if (!link->network) { in link_is_ready_to_configure()
142 if (!link->network->configure_without_carrier) { in link_is_ready_to_configure()
239 network_unref(link->network); in link_free()
328 link->network && in link_stop_engines()
329 … !link->network->dhcp_send_decline && /* IPv4 ACD for the DHCPv4 address is running. */ in link_stop_engines()
[all …]
Dtest-networkd-conf.c172 _cleanup_(network_unrefp) Network *network = NULL; in test_config_parse_address_one()
175 assert_se(network = new0(Network, 1)); in test_config_parse_address_one()
176 network->n_ref = 1; in test_config_parse_address_one()
177 network->manager = manager; in test_config_parse_address_one()
178 assert_se(network->filename = strdup("hogehoge.network")); in test_config_parse_address_one()
180 …mes("network", "filename", 1, "section", 1, "Name", 0, "*", &network->match.ifname, network) == 0); in test_config_parse_address_one()
181 …arse_address("network", "filename", 1, "section", 1, "Address", 0, rvalue, network, network) == 0); in test_config_parse_address_one()
182 assert_se(ordered_hashmap_size(network->addresses_by_section) == 1); in test_config_parse_address_one()
183 assert_se(network_verify(network) >= 0); in test_config_parse_address_one()
184 assert_se(ordered_hashmap_size(network->addresses_by_section) == n_addresses); in test_config_parse_address_one()
[all …]
/systemd-251/src/network/generator/
Dnetwork-generator.c79 if (address->network) in address_free()
80 LIST_REMOVE(addresses, address->network->addresses, address); in address_free()
85 static int address_new(Network *network, int family, unsigned char prefixlen, in address_new() argument
89 assert(network); in address_new()
102 LIST_PREPEND(addresses, network->addresses, address); in address_new()
104 address->network = network; in address_new()
115 if (route->network) in route_free()
116 LIST_REMOVE(routes, route->network->routes, route); in route_free()
121 static int route_new(Network *network, int family, unsigned char prefixlen, in route_new() argument
125 assert(network); in route_new()
[all …]
/systemd-251/docs/
DNETWORK_ONLINE.md10 systemd provides three target units related to network configuration:
12 ## Network pre-configuration: `network-pre.target`
14 `network-pre.target` is used to order services before any network interfaces
16 that want to establish a firewall *before* any network interface is up.
18 `network-pre.target` is a passive unit: it cannot be started directly and it is
19 not pulled in by the the network management service, but instead a service that
21 should set `After=network-pre.target`, but not `Wants=network-pre.target` or
22 `Requires=network-pre.target`. Services that want to be run before the network
23 is configured should use `Before=network-pre.target` and
24 `Wants=network-pre.target`. This way, unless there's actually a service that
[all …]
/systemd-251/network/
Dmeson.build4 install_data('80-6rd-tunnel.network',
5 '80-container-host0.network',
6 '80-container-ve.network',
7 '80-container-vz.network',
8 '80-ethernet.network.example',
9 '80-vm-vt.network',
10 '80-wifi-adhoc.network',
11 '80-wifi-ap.network.example',
12 '80-wifi-station.network.example',
17 mkdir_p.format(sysconfdir / 'systemd/network'))
/systemd-251/tmpfiles.d/
Dsystemd-network.conf10 d /run/systemd/netif 0755 systemd-network systemd-network -
11 d /run/systemd/netif/links 0755 systemd-network systemd-network -
12 d /run/systemd/netif/leases 0755 systemd-network systemd-network -
13 d /run/systemd/netif/lldp 0755 systemd-network systemd-network -

12345678910