/systemd/src/network/ |
H A D | test-network.c | 26 _cleanup_free_ struct in_addr *addresses = NULL; local 43 assert_se((size = deserialize_in_addrs(&addresses, addresses_string)) >= 0); 45 assert_se(!memcmp(&a, &addresses[0], sizeof(struct in_addr))); 46 assert_se(!memcmp(&b, &addresses[1], sizeof(struct in_addr))); 47 assert_se(!memcmp(&c, &addresses[2], sizeof(struct in_addr)));
|
H A D | networkd-address.c | 72 LIST_APPEND(addresses, network->static_addresses, address); 91 LIST_REMOVE(addresses, address->network->static_addresses, address); 99 set_remove(address->link->addresses, address); 230 static int address_add_internal(Link *link, Set **addresses, argument 239 assert(addresses); 252 r = set_ensure_allocated(addresses, &address_hash_ops); 256 r = set_put(*addresses, address); 281 r = address_add_internal(link, &link->addresses, family, in_addr, prefixlen, &address); 286 r = set_ensure_allocated(&link->addresses, &address_hash_ops); 290 r = set_put(link->addresses, addres [all...] |
H A D | networkd-link.h | 85 Set *addresses; member in struct:Link
|
H A D | networkd-manager.c | 34 #include "local-addresses.h" 796 static int ordered_set_put_in_addrv(OrderedSet *s, const struct in_addr *addresses, int n) { argument 800 assert(n <= 0 || addresses); 803 r = ordered_set_put_in_addr(s, addresses+i); 891 const struct in_addr *addresses; local 893 r = sd_dhcp_lease_get_dns(link->dhcp_lease, &addresses); 895 r = ordered_set_put_in_addrv(dns, addresses, r); 903 const struct in_addr *addresses; local 905 r = sd_dhcp_lease_get_ntp(link->dhcp_lease, &addresses); 907 r = ordered_set_put_in_addrv(ntp, addresses, [all...] |
H A D | networkd-link.c | 181 /* if we have carrier, check what addresses we have */ 182 SET_FOREACH(address, link->addresses, i) { 190 /* for operstate we also take foreign addresses into account */ 200 /* universally accessible addresses found */ 203 /* only link or site local addresses found */ 206 /* no useful addresses found */ 383 while (!set_isempty(link->addresses)) 384 address_free(set_first(link->addresses)); 389 link->addresses = set_free(link->addresses); 746 _cleanup_free_ struct in_addr *addresses = NULL; local 791 _cleanup_free_ struct in_addr *addresses = NULL; local 2241 *addresses = NULL, local 2749 const struct in_addr *addresses; local 2779 const struct in_addr *addresses; local [all...] |
/systemd/src/nspawn/ |
H A D | nspawn-expose-ports.c | 26 #include "local-addresses.h" 134 _cleanup_free_ struct local_address *addresses = NULL; local 149 r = local_addresses(rtnl, 0, af, &addresses); 151 return log_error_errno(r, "Failed to enumerate local addresses: %m"); 154 addresses[0].family == af && 155 addresses[0].scope < RT_SCOPE_LINK; 160 new_exposed = addresses[0].address;
|
/systemd/src/resolve/ |
H A D | resolved-dns-synthesize.c | 22 #include "local-addresses.h" 154 struct local_address *addresses, 170 r = dns_resource_record_new_address(&rr, addresses[j].family, &addresses[j].address, name); 174 r = dns_answer_add(*answer, rr, addresses[j].ifindex, DNS_ANSWER_AUTHENTICATED); 185 struct local_address *addresses, 200 if (addresses[j].family != af) 203 if (match && !in_addr_equal(af, match, &addresses[j].address)) 211 r = dns_resource_record_new_reverse(&rr, addresses[j].family, &addresses[ 151 answer_add_addresses_rr( DnsAnswer **answer, const char *name, struct local_address *addresses, unsigned n_addresses) argument 182 answer_add_addresses_ptr( DnsAnswer **answer, const char *name, struct local_address *addresses, unsigned n_addresses, int af, const union in_addr_union *match) argument 224 _cleanup_free_ struct local_address *addresses = NULL; local 265 _cleanup_free_ struct local_address *addresses = NULL; local 308 _cleanup_free_ struct local_address *addresses = NULL; local 326 _cleanup_free_ struct local_address *addresses = NULL; local [all...] |
/systemd/src/nss-myhostname/ |
H A D | nss-myhostname.c | 29 #include "local-addresses.h" 55 _cleanup_free_ struct local_address *addresses = NULL; local 82 n_addresses = local_gateways(NULL, 0, AF_UNSPEC, &addresses); 106 n_addresses = local_addresses(NULL, 0, AF_UNSPEC, &addresses); 154 /* Fourth, fill actual addresses in, but in backwards order */ 155 for (a = addresses + n_addresses - 1, n = 0; (int) n < n_addresses; n++, a--) { 190 struct local_address *addresses, unsigned n_addresses, 211 for (a = addresses, n = 0, c = 0; n < n_addresses; a++, n++) 252 /* Third, add addresses */ 257 for (a = addresses, 187 fill_in_hostent( const char *canonical, const char *additional, int af, struct local_address *addresses, unsigned n_addresses, uint32_t local_address_ipv4, struct hostent *result, char *buffer, size_t buflen, int *errnop, int *h_errnop, int32_t *ttlp, char **canonp) argument 325 _cleanup_free_ struct local_address *addresses = NULL; local 408 _cleanup_free_ struct local_address *addresses = NULL; local [all...] |
/systemd/src/libsystemd-network/ |
H A D | network-internal.c | 338 void serialize_in_addrs(FILE *f, const struct in_addr *addresses, size_t size) { argument 342 assert(addresses); 346 fprintf(f, "%s%s", inet_ntoa(addresses[i]), 351 _cleanup_free_ struct in_addr *addresses = NULL; local 364 new_addresses = realloc(addresses, (size + 1) * sizeof(struct in_addr)); 368 addresses = new_addresses; 374 r = inet_pton(AF_INET, addr_str, &(addresses[size])); 381 *ret = addresses; 382 addresses = NULL; 387 void serialize_in6_addrs(FILE *f, const struct in6_addr *addresses, argument 402 _cleanup_free_ struct in6_addr *addresses = NULL; local [all...] |
H A D | sd-dhcp-lease.c | 398 struct in_addr *addresses; local 405 addresses = newdup(struct in_addr, option, n_addresses); 406 if (!addresses) 410 *ret = addresses; 731 const struct in_addr *addresses; local 792 r = sd_dhcp_lease_get_dns(lease, &addresses); 795 serialize_in_addrs(f, addresses, r); 799 r = sd_dhcp_lease_get_ntp(lease, &addresses); 802 serialize_in_addrs(f, addresses, r);
|
/systemd/src/machine/ |
H A D | machine-dbus.c | 42 #include "local-addresses.h" 211 _cleanup_free_ struct local_address *addresses = NULL; local 215 n = local_addresses(NULL, 0, AF_UNSPEC, &addresses); 219 for (a = addresses, i = 0; i < n; a++, i++) { 225 r = sd_bus_message_append(reply, "i", addresses[i].family); 229 r = sd_bus_message_append_array(reply, 'y', &addresses[i].address, FAMILY_ADDRESS_SIZE(addresses[i].family)); 273 _cleanup_free_ struct local_address *addresses = NULL; local 283 n = local_addresses(NULL, 0, AF_UNSPEC, &addresses); 287 for (a = addresses, [all...] |