Lines Matching refs:prefixlen
115 siphash24_compress(&a->prefixlen, sizeof(a->prefixlen), state);
118 if (a->prefixlen != 0) {
122 prefix = be32toh(a->in_addr_peer.in.s_addr) >> (32 - a->prefixlen);
124 prefix = be32toh(a->in_addr.in.s_addr) >> (32 - a->prefixlen);
152 if (a1->prefixlen < a2->prefixlen)
154 if (a1->prefixlen > a2->prefixlen)
158 if (a1->prefixlen != 0) {
164 b1 = be32toh(a1->in_addr_peer.in.s_addr) >> (32 - a1->prefixlen);
166 b1 = be32toh(a1->in_addr.in.s_addr) >> (32 - a1->prefixlen);
169 b2 = be32toh(a2->in_addr_peer.in.s_addr) >> (32 - a1->prefixlen);
171 b2 = be32toh(a2->in_addr.in.s_addr) >> (32 - a1->prefixlen);
218 in_addr_mask(address->family, &masked, address->prefixlen);
220 r = fw_add_masquerade(masq, AF_INET, 0, &masked, address->prefixlen, NULL, NULL, 0);
233 unsigned char prefixlen,
248 address->prefixlen = prefixlen;
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);
316 in_addr_mask(address->family, &masked, address->prefixlen);
318 r = fw_add_masquerade(false, AF_INET, 0, &masked, address->prefixlen, NULL, NULL, 0);
380 int address_get(Link *link, int family, const union in_addr_union *in_addr, unsigned char prefixlen, Address **ret) {
389 address.prefixlen = prefixlen;
424 r = sd_rtnl_message_addr_set_prefixlen(req, address->prefixlen);
426 return log_error_errno(r, "Could not set prefixlen: %m");
460 r = manager_address_pool_acquire(link->manager, original->family, original->prefixlen, &in_addr);
473 broadcast.s_addr = in_addr.in.s_addr | htobe32(0xFFFFFFFFUL >> original->prefixlen);
482 na->prefixlen = original->prefixlen;
527 r = sd_rtnl_message_addr_set_prefixlen(req, address->prefixlen);
529 return log_error_errno(r, "Could not set prefixlen: %m");
592 r = address_add(link, address->family, &address->in_addr, address->prefixlen, NULL);
677 /* Address=address/prefixlen */
679 /* prefixlen */
690 n->prefixlen = (unsigned char) i;
703 r = in_addr_default_prefixlen(&buffer.in, &n->prefixlen);
723 n->broadcast.s_addr = n->in_addr.in.s_addr | htonl(0xfffffffflu >> n->prefixlen);