Lines Matching refs:in_addr
124 prefix = be32toh(a->in_addr.in.s_addr) >> (32 - a->prefixlen);
132 siphash24_compress(&a->in_addr, FAMILY_ADDRESS_SIZE(a->family), state);
166 b1 = be32toh(a1->in_addr.in.s_addr) >> (32 - a1->prefixlen);
171 b2 = be32toh(a2->in_addr.in.s_addr) >> (32 - a1->prefixlen);
181 return memcmp(&a1->in_addr, &a2->in_addr, FAMILY_ADDRESS_SIZE(a1->family));
217 union in_addr_union masked = address->in_addr;
232 const union in_addr_union *in_addr,
240 assert(in_addr);
247 address->in_addr = *in_addr;
270 int address_add_foreign(Link *link, int family, const union in_addr_union *in_addr, unsigned char prefixlen, Address **ret) {
271 return address_add_internal(link, &link->addresses_foreign, family, in_addr, prefixlen, ret);
274 int address_add(Link *link, int family, const union in_addr_union *in_addr, unsigned char prefixlen, Address **ret) {
278 r = address_get(link, family, in_addr, prefixlen, &address);
281 r = address_add_internal(link, &link->addresses, family, in_addr, prefixlen, &address);
315 union in_addr_union masked = address->in_addr;
348 in_addr_is_link_local(AF_INET6, &address->in_addr) > 0 &&
350 r = link_ipv6ll_gained(address->link, &address->in_addr.in6);
380 int address_get(Link *link, int family, const union in_addr_union *in_addr, unsigned char prefixlen, Address **ret) {
384 assert(in_addr);
388 address.in_addr = *in_addr;
429 r = sd_netlink_message_append_in_addr(req, IFA_LOCAL, &address->in_addr.in);
431 r = sd_netlink_message_append_in6_addr(req, IFA_LOCAL, &address->in_addr.in6);
445 union in_addr_union in_addr = {};
446 struct in_addr broadcast = {};
455 if (in_addr_is_null(original->family, &original->in_addr) <= 0)
460 r = manager_address_pool_acquire(link->manager, original->family, original->prefixlen, &in_addr);
470 in_addr.in.s_addr = in_addr.in.s_addr | htobe32(1);
473 broadcast.s_addr = in_addr.in.s_addr | htobe32(0xFFFFFFFFUL >> original->prefixlen);
475 in_addr.in6.s6_addr[15] |= 1;
493 na->in_addr = in_addr;
548 r = sd_netlink_message_append_in_addr(req, IFA_LOCAL, &address->in_addr.in);
550 r = sd_netlink_message_append_in6_addr(req, IFA_LOCAL, &address->in_addr.in6);
592 r = address_add(link, address->family, &address->in_addr, address->prefixlen, NULL);
718 n->in_addr = buffer;
723 n->broadcast.s_addr = n->in_addr.in.s_addr | htonl(0xfffffffflu >> n->prefixlen);