Lines Matching refs:addr
76 static bool stable_private_address_is_valid(const struct in6_addr *addr) { in stable_private_address_is_valid() argument
77 assert(addr); in stable_private_address_is_valid()
81 … if (in6_addr_prefix_covers(&SUBNET_ROUTER_ANYCAST_ADDRESS, SUBNET_ROUTER_ANYCAST_PREFIXLEN, addr)) in stable_private_address_is_valid()
84 …ix_covers(&RESERVED_INTERFACE_IDENTIFIERS_ADDRESS, RESERVED_INTERFACE_IDENTIFIERS_PREFIXLEN, addr)) in stable_private_address_is_valid()
87 …n6_addr_prefix_covers(&RESERVED_SUBNET_ANYCAST_ADDRESSES, RESERVED_SUBNET_ANYCAST_PREFIXLEN, addr)) in stable_private_address_is_valid()
136 struct in6_addr addr; in generate_stable_private_address() local
159 generate_stable_private_address_one(link, secret_key, prefix, i, &addr); in generate_stable_private_address()
161 if (stable_private_address_is_valid(&addr)) in generate_stable_private_address()
169 *ret = addr; in generate_stable_private_address()
196 struct in6_addr addr, *copy; in generate_addresses() local
200 if (generate_eui64_address(link, &masked, &addr) < 0) in generate_addresses()
205 memcpy(addr.s6_addr, masked.s6_addr, 8); in generate_addresses()
206 memcpy(addr.s6_addr + 8, j->address.s6_addr + 8, 8); in generate_addresses()
213 … if (generate_stable_private_address(link, app_id, &j->secret_key, &masked, &addr) < 0) in generate_addresses()
222 copy = newdup(struct in6_addr, &addr, 1); in generate_addresses()
233 _cleanup_free_ struct in6_addr *addr = NULL; in generate_addresses() local
235 addr = new(struct in6_addr, 1); in generate_addresses()
236 if (!addr) in generate_addresses()
240 r = generate_eui64_address(link, &masked, addr); in generate_addresses()
242 … r = generate_stable_private_address(link, app_id, &SD_ID128_NULL, &masked, addr); in generate_addresses()
246 r = set_ensure_consume(&addresses, &in6_addr_hash_ops_free, TAKE_PTR(addr)); in generate_addresses()
294 static int ipv6_token_add(Set **tokens, AddressGenerationType type, const struct in6_addr *addr, co… in ipv6_token_add() argument
299 assert(addr); in ipv6_token_add()
308 .address = *addr, in ipv6_token_add()
332 const char *addr; in config_parse_address_generation_type() local
345 if ((addr = startswith(rvalue, "prefixstable"))) { in config_parse_address_generation_type()
350 if (*addr == ':') { in config_parse_address_generation_type()
351 addr++; in config_parse_address_generation_type()
353 comma = strchr(addr, ','); in config_parse_address_generation_type()
355 addr_alloc = strndup(addr, comma - addr); in config_parse_address_generation_type()
359 addr = addr_alloc; in config_parse_address_generation_type()
361 } else if (*addr == ',') in config_parse_address_generation_type()
362 comma = TAKE_PTR(addr); in config_parse_address_generation_type()
363 else if (*addr == '\0') { in config_parse_address_generation_type()
365 addr = NULL; in config_parse_address_generation_type()
391 addr = NULL; in config_parse_address_generation_type()
395 addr = startswith(rvalue, "static:"); in config_parse_address_generation_type()
396 if (!addr) in config_parse_address_generation_type()
397 addr = rvalue; in config_parse_address_generation_type()
400 if (addr) { in config_parse_address_generation_type()
401 r = in_addr_from_string(AF_INET6, addr, &buffer); in config_parse_address_generation_type()