/systemd-251/src/libsystemd-network/ |
D | network-internal.c | 18 const struct in_addr *addresses, in serialize_in_addrs() argument 23 assert(addresses); in serialize_in_addrs() 33 if (predicate && !predicate(&addresses[i])) in serialize_in_addrs() 38 fputs(inet_ntop(AF_INET, &addresses[i], sbuf, sizeof(sbuf)), f); in serialize_in_addrs() 47 _cleanup_free_ struct in_addr *addresses = NULL; in deserialize_in_addrs() local 64 new_addresses = reallocarray(addresses, size + 1, sizeof(struct in_addr)); in deserialize_in_addrs() 68 addresses = new_addresses; in deserialize_in_addrs() 70 r = inet_pton(AF_INET, word, &(addresses[size])); in deserialize_in_addrs() 77 *ret = size > 0 ? TAKE_PTR(addresses) : NULL; in deserialize_in_addrs() 82 void serialize_in6_addrs(FILE *f, const struct in6_addr *addresses, size_t size, bool *with_leading… in serialize_in6_addrs() argument [all …]
|
D | network-internal.h | 10 const struct in_addr *addresses, 14 int deserialize_in_addrs(struct in_addr **addresses, const char *string); 15 void serialize_in6_addrs(FILE *f, const struct in6_addr *addresses, 18 int deserialize_in6_addrs(struct in6_addr **addresses, const char *string);
|
D | sd-dhcp6-lease.c | 52 LIST_FOREACH(addresses, a, lease->ia_na->addresses) in dhcp6_lease_set_lifetime() 60 LIST_FOREACH(addresses, a, lease->ia_pd->addresses) in dhcp6_lease_set_lifetime() 111 LIST_FOREACH(addresses, a, ia->addresses) in dhcp6_ia_clear_addresses() 114 ia->addresses = NULL; in dhcp6_ia_clear_addresses() 243 lease->addr_iter = lease->ia_na ? lease->ia_na->addresses : NULL; in sd_dhcp6_lease_reset_address_iter() 273 lease->prefix_iter = lease->ia_pd ? lease->ia_pd->addresses : NULL; in sd_dhcp6_lease_reset_pd_prefix_iter()
|
D | sd-dhcp-lease.c | 444 struct in_addr *addresses; in lease_parse_in_addrs() local 451 addresses = newdup(struct in_addr, option, n_addresses); in lease_parse_in_addrs() 452 if (!addresses) in lease_parse_in_addrs() 456 *ret = addresses; in lease_parse_in_addrs() 967 const struct in_addr *addresses; in dhcp_lease_save() local 998 r = sd_dhcp_lease_get_router(lease, &addresses); in dhcp_lease_save() 1001 serialize_in_addrs(f, addresses, r, false, NULL); in dhcp_lease_save() 1033 r = sd_dhcp_lease_get_dns(lease, &addresses); in dhcp_lease_save() 1036 serialize_in_addrs(f, addresses, r, false, NULL); in dhcp_lease_save() 1040 r = sd_dhcp_lease_get_ntp(lease, &addresses); in dhcp_lease_save() [all …]
|
D | dhcp6-option.c | 378 LIST_FOREACH(addresses, addr, ia->addresses) { in dhcp6_option_append_ia() 627 LIST_PREPEND(addresses, ia->addresses, TAKE_PTR(a)); in dhcp6_option_parse_ia_address() 670 LIST_PREPEND(addresses, ia->addresses, TAKE_PTR(a)); in dhcp6_option_parse_ia_pdprefix() 792 if (!ia->addresses) in dhcp6_option_parse_ia()
|
D | dhcp6-option.h | 48 LIST_FIELDS(DHCP6Address, addresses); 66 LIST_HEAD(DHCP6Address, addresses);
|
/systemd-251/src/resolve/ |
D | test-resolved-etc-hosts.c | 76 assert_se(MALLOC_ELEMENTSOF(bn->addresses) >= 3); in TEST() 77 assert_se(address_equal_4(bn->addresses[0], inet_addr("1.2.3.4"))); in TEST() 78 assert_se(address_equal_4(bn->addresses[1], inet_addr("1.2.3.5"))); in TEST() 79 … assert_se(address_equal_6(bn->addresses[2], {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5})); in TEST() 83 assert_se(MALLOC_ELEMENTSOF(bn->addresses) >= 1); in TEST() 84 assert_se(address_equal_4(bn->addresses[0], inet_addr("1.2.3.6"))); in TEST() 88 assert_se(MALLOC_ELEMENTSOF(bn->addresses) >= 1); in TEST() 89 assert_se(address_equal_4(bn->addresses[0], inet_addr("1.2.3.6"))); in TEST() 97 assert_se(MALLOC_ELEMENTSOF(bn->addresses) >= 4); in TEST() 98 assert_se(address_equal_4(bn->addresses[0], inet_addr("1.2.3.9"))); in TEST() [all …]
|
D | resolved-dns-synthesize.c | 138 struct local_address *addresses, in answer_add_addresses_rr() argument 154 … r = dns_resource_record_new_address(&rr, addresses[j].family, &addresses[j].address, name); in answer_add_addresses_rr() 158 … r = dns_answer_add(*answer, rr, addresses[j].ifindex, DNS_ANSWER_AUTHENTICATED, NULL); in answer_add_addresses_rr() 169 struct local_address *addresses, in answer_add_addresses_ptr() argument 185 if (addresses[j].family != af) in answer_add_addresses_ptr() 188 if (match && !in_addr_equal(af, match, &addresses[j].address)) in answer_add_addresses_ptr() 196 … r = dns_resource_record_new_reverse(&rr, addresses[j].family, &addresses[j].address, name); in answer_add_addresses_ptr() 200 … r = dns_answer_add(*answer, rr, addresses[j].ifindex, DNS_ANSWER_AUTHENTICATED, NULL); in answer_add_addresses_ptr() 211 _cleanup_free_ struct local_address *addresses = NULL; in synthesize_system_hostname_rr() local 220 n = local_addresses(m->rtnl, ifindex, af, &addresses); in synthesize_system_hostname_rr() [all …]
|
D | resolved-etc-hosts.c | 28 free(item->addresses); in etc_hosts_item_by_name_free() 153 if (!GREEDY_REALLOC(bn->addresses, bn->n_addresses + 1)) in parse_line() 156 bn->addresses[bn->n_addresses++] = &item->address; in parse_line() 226 … if (!in_addr_is_localhost(n->addresses[m]->family, &n->addresses[m]->address)) { in strip_localhost() 453 if ((!found_a && bn->addresses[i]->family == AF_INET) || in manager_etc_hosts_lookup() 454 (!found_aaaa && bn->addresses[i]->family == AF_INET6)) in manager_etc_hosts_lookup() 457 …r = dns_resource_record_new_address(&rr, bn->addresses[i]->family, &bn->addresses[i]->address, bn-… in manager_etc_hosts_lookup()
|
D | resolved-link.c | 87 while (l->addresses) in link_free() 88 (void) link_address_free(l->addresses); in link_free() 191 LIST_FOREACH(addresses, a, l->addresses) in link_add_rrs() 699 LIST_FOREACH(addresses, a, l->addresses) in link_relevant() 715 LIST_FOREACH(addresses, a, l->addresses) in link_find_address() 823 LIST_PREPEND(addresses, l->addresses, a); in link_address_new() 837 LIST_REMOVE(addresses, a->link->addresses, a); in link_address_free()
|
/systemd-251/src/nss-myhostname/ |
D | nss-myhostname.c | 38 _cleanup_free_ struct local_address *addresses = NULL; in _nss_myhostname_gethostbyname4_r() local 63 n_addresses = local_gateways(NULL, 0, AF_UNSPEC, &addresses); in _nss_myhostname_gethostbyname4_r() 71 n_addresses = local_outbounds(NULL, 0, AF_UNSPEC, &addresses); in _nss_myhostname_gethostbyname4_r() 90 n_addresses = local_addresses(NULL, 0, AF_UNSPEC, &addresses); in _nss_myhostname_gethostbyname4_r() 141 struct local_address *a = addresses + i - 1; in _nss_myhostname_gethostbyname4_r() 181 struct local_address *addresses, unsigned n_addresses, in fill_in_hostent() argument 205 for (a = addresses, n = 0, c = 0; n < n_addresses; a++, n++) in fill_in_hostent() 252 for (a = addresses, n = 0; n < n_addresses; a++, n++) { in fill_in_hostent() 323 _cleanup_free_ struct local_address *addresses = NULL; in _nss_myhostname_gethostbyname3_r() local 357 n_addresses = local_gateways(NULL, 0, af, &addresses); in _nss_myhostname_gethostbyname3_r() [all …]
|
/systemd-251/src/network/ |
D | networkd-dhcp-server.c | 133 SET_FOREACH(address, link->addresses) { in link_find_dhcp_server_address() 179 _cleanup_free_ struct in_addr *addresses = NULL; in link_push_uplink_to_dhcp_server() local 210 if (!GREEDY_REALLOC(addresses, n_addresses + 1)) in link_push_uplink_to_dhcp_server() 213 addresses[n_addresses++] = ia; in link_push_uplink_to_dhcp_server() 233 if (!GREEDY_REALLOC(addresses, n_addresses + 1)) in link_push_uplink_to_dhcp_server() 236 addresses[n_addresses++] = ia.in; in link_push_uplink_to_dhcp_server() 265 if (!GREEDY_REALLOC(addresses, n_addresses + n)) in link_push_uplink_to_dhcp_server() 270 addresses[n_addresses++] = da[j]; in link_push_uplink_to_dhcp_server() 277 return sd_dhcp_server_set_servers(s, what, addresses, n_addresses); in link_push_uplink_to_dhcp_server() 282 struct in_addr **addresses, in dhcp4_server_parse_dns_server_string_and_warn() argument [all …]
|
D | networkd-state-file.c | 84 const struct in_addr *addresses, in ordered_set_put_in4_addrv() argument 91 assert(n == 0 || addresses); in ordered_set_put_in4_addrv() 94 if (predicate && !predicate(&addresses[i])) in ordered_set_put_in4_addrv() 96 r = ordered_set_put_in4_addr(s, addresses+i); in ordered_set_put_in4_addrv() 127 const struct in_addr *addresses; in manager_save() local 173 r = sd_dhcp_lease_get_dns(link->dhcp_lease, &addresses); in manager_save() 175 … r = ordered_set_put_in4_addrv(&dns, addresses, r, in4_addr_is_non_local); in manager_save() 183 r = sd_dhcp_lease_get_ntp(link->dhcp_lease, &addresses); in manager_save() 185 … r = ordered_set_put_in4_addrv(&ntp, addresses, r, in4_addr_is_non_local); in manager_save() 193 r = sd_dhcp_lease_get_sip(link->dhcp_lease, &addresses); in manager_save() [all …]
|
D | networkd-ipv4acd.c | 207 SET_FOREACH(address, link->addresses) { in ipv4acd_update_mac() 227 SET_FOREACH(address, link->addresses) { in ipv4acd_start() 248 SET_FOREACH(address, link->addresses) { in ipv4acd_stop() 266 SET_FOREACH(address, link->addresses) { in ipv4acd_set_ifname()
|
D | test-network.c | 21 _cleanup_free_ struct in_addr *addresses = NULL; in test_deserialize_in_addr() local 37 assert_se((size = deserialize_in_addrs(&addresses, addresses_string)) >= 0); in test_deserialize_in_addr() 39 assert_se(in4_addr_equal(&a.in, &addresses[0])); in test_deserialize_in_addr() 40 assert_se(in4_addr_equal(&b.in, &addresses[1])); in test_deserialize_in_addr() 41 assert_se(in4_addr_equal(&c.in, &addresses[2])); in test_deserialize_in_addr()
|
D | networkd-address-generation.c | 181 _cleanup_set_free_ Set *addresses = NULL; in generate_addresses() local 226 r = set_ensure_consume(&addresses, &in6_addr_hash_ops_free, copy); in generate_addresses() 232 if (set_isempty(addresses)) { in generate_addresses() 246 r = set_ensure_consume(&addresses, &in6_addr_hash_ops_free, TAKE_PTR(addr)); in generate_addresses() 251 *ret = TAKE_PTR(addresses); in generate_addresses()
|
D | networkd-address.c | 129 set_remove(address->link->addresses, address); in address_free() 166 SET_FOREACH(a, link->addresses) { in link_mark_addresses() 457 r = set_ensure_put(&link->addresses, &address_hash_ops_free, address); in address_add() 538 existing = set_get(link->addresses, in); in address_get() 587 SET_FOREACH(a, link->addresses) { in link_get_address() 900 SET_FOREACH(address, link->addresses) { in link_drop_foreign_addresses() 934 SET_FOREACH(address, link->addresses) { in link_drop_foreign_addresses() 952 SET_FOREACH(address, link->addresses) { in link_drop_managed_addresses() 976 SET_FOREACH(address, link->addresses) in link_foreignize_addresses() 1102 if (set_size(link->addresses) >= ADDRESSES_PER_LINK_MAX) in address_is_ready_to_configure() [all …]
|
/systemd-251/src/timesync/ |
D | timesyncd-server.c | 40 LIST_FIND_TAIL(addresses, n->addresses, tail); in server_address_new() 41 LIST_INSERT_AFTER(addresses, n->addresses, tail, a); in server_address_new() 54 LIST_REMOVE(addresses, a->name->addresses, a); in server_address_free() 150 while (n->addresses) in server_name_flush_addresses() 151 server_address_free(n->addresses); in server_name_flush_addresses()
|
D | timesyncd-server.h | 27 LIST_FIELDS(ServerAddress, addresses); 38 LIST_HEAD(ServerAddress, addresses);
|
/systemd-251/src/nspawn/ |
D | nspawn-expose-ports.c | 116 _cleanup_free_ struct local_address *addresses = NULL; in expose_port_execute() local 129 r = local_addresses(rtnl, 0, af, &addresses); in expose_port_execute() 134 addresses[0].family == af && in expose_port_execute() 135 addresses[0].scope < RT_SCOPE_LINK; in expose_port_execute() 140 new_exposed = addresses[0].address; in expose_port_execute()
|
/systemd-251/src/test/ |
D | test-nss-hosts.c | 354 static int make_addresses(struct local_address **addresses) { in make_addresses() argument 376 struct local_address *addresses, in test_one_module() argument 390 &addresses[i].address, in test_one_module() 391 FAMILY_ADDRESS_SIZE(addresses[i].family), in test_one_module() 392 addresses[i].family); in test_one_module() 468 _cleanup_free_ struct local_address *addresses = NULL; in run() local 474 r = parse_argv(argc, argv, &modules, &names, &addresses, &n_addresses); in run() 481 r = test_one_module(dir, *module, names, addresses, n_addresses); in run()
|
/systemd-251/src/nss-resolve/ |
D | nss-resolve.c | 133 JsonVariant *addresses; member 141 json_variant_unref(p->addresses); in resolve_hostname_reply_destroy() 146 …VARIANT_ARRAY, json_dispatch_variant, offsetof(ResolveHostnameReply, addresses), JSON_MANDATORY… 278 if (json_variant_is_blank_object(p.addresses)) in _nss_resolve_gethostbyname4_r() 282 JSON_VARIANT_ARRAY_FOREACH(entry, p.addresses) { in _nss_resolve_gethostbyname4_r() 320 JSON_VARIANT_ARRAY_FOREACH(entry, p.addresses) { in _nss_resolve_gethostbyname4_r() 434 if (json_variant_is_blank_object(p.addresses)) in _nss_resolve_gethostbyname3_r() 438 JSON_VARIANT_ARRAY_FOREACH(entry, p.addresses) { in _nss_resolve_gethostbyname3_r() 484 JSON_VARIANT_ARRAY_FOREACH(entry, p.addresses) { in _nss_resolve_gethostbyname3_r()
|
/systemd-251/src/machine/ |
D | machine-dbus.c | 208 _cleanup_free_ struct local_address *addresses = NULL; in bus_machine_method_get_addresses() local 212 n = local_addresses(NULL, 0, AF_UNSPEC, &addresses); in bus_machine_method_get_addresses() 216 for (a = addresses, i = 0; i < n; a++, i++) { in bus_machine_method_get_addresses() 222 r = sd_bus_message_append(reply, "i", addresses[i].family); in bus_machine_method_get_addresses() 226 …r = sd_bus_message_append_array(reply, 'y', &addresses[i].address, FAMILY_ADDRESS_SIZE(addresses[i… in bus_machine_method_get_addresses() 269 _cleanup_free_ struct local_address *addresses = NULL; in bus_machine_method_get_addresses() local 275 n = local_addresses(NULL, 0, AF_UNSPEC, &addresses); in bus_machine_method_get_addresses() 279 for (a = addresses, i = 0; i < n; a++, i++) { in bus_machine_method_get_addresses() 1288 SD_BUS_RESULT("a(iay)", addresses),
|
/systemd-251/src/network/generator/ |
D | network-generator.h | 40 LIST_FIELDS(Address, addresses); 72 LIST_HEAD(Address, addresses);
|
/systemd-251/shell-completion/zsh/ |
D | _resolvectl | 54 query:"Resolve domain names, IPv4 and IPv6 addresses" 73 '-4[Resolve IPv4 addresses]' \ 74 '-6[Resolve IPv6 addresses]' \
|