Lines Matching refs:cidr

52 		u8 cidr[2];  member
94 hash_netnet4_data_netmask(struct hash_netnet4_elem *elem, u8 cidr, bool inner) in hash_netnet4_data_netmask() argument
97 elem->ip[1] &= ip_set_netmask(cidr); in hash_netnet4_data_netmask()
98 elem->cidr[1] = cidr; in hash_netnet4_data_netmask()
100 elem->ip[0] &= ip_set_netmask(cidr); in hash_netnet4_data_netmask()
101 elem->cidr[0] = cidr; in hash_netnet4_data_netmask()
113 nla_put_u8(skb, IPSET_ATTR_CIDR, data->cidr[0]) || in hash_netnet4_data_list()
114 nla_put_u8(skb, IPSET_ATTR_CIDR2, data->cidr[1]) || in hash_netnet4_data_list()
138 e->cidr[0] = HOST_MASK; in hash_netnet4_init()
139 e->cidr[1] = HOST_MASK; in hash_netnet4_init()
152 e.cidr[0] = INIT_CIDR(h->nets[0].cidr[0], HOST_MASK); in hash_netnet4_kadt()
153 e.cidr[1] = INIT_CIDR(h->nets[0].cidr[1], HOST_MASK); in hash_netnet4_kadt()
155 e.ccmp = (HOST_MASK << (sizeof(e.cidr[0]) * 8)) | HOST_MASK; in hash_netnet4_kadt()
159 e.ip[0] &= (ip_set_netmask(e.cidr[0]) & h->bitmask.ip); in hash_netnet4_kadt()
160 e.ip[1] &= (ip_set_netmask(e.cidr[1]) & h->bitmask.ip); in hash_netnet4_kadt()
198 e.cidr[0] = nla_get_u8(tb[IPSET_ATTR_CIDR]); in hash_netnet4_uadt()
199 if (!e.cidr[0] || e.cidr[0] > HOST_MASK) in hash_netnet4_uadt()
204 e.cidr[1] = nla_get_u8(tb[IPSET_ATTR_CIDR2]); in hash_netnet4_uadt()
205 if (!e.cidr[1] || e.cidr[1] > HOST_MASK) in hash_netnet4_uadt()
218 e.ip[0] = htonl(ip & ntohl(h->bitmask.ip) & ip_set_hostmask(e.cidr[0])); in hash_netnet4_uadt()
219 e.ip[1] = htonl(ip2_from & ntohl(h->bitmask.ip) & ip_set_hostmask(e.cidr[1])); in hash_netnet4_uadt()
235 ip_set_mask_from_to(ip, ip_to, e.cidr[0]); in hash_netnet4_uadt()
248 ip_set_mask_from_to(ip2_from, ip2_to, e.cidr[1]); in hash_netnet4_uadt()
260 ip = ip_set_range_to_cidr(ip, ip_to, &e.cidr[0]); in hash_netnet4_uadt()
268 ip2 = ip_set_range_to_cidr(ip2, ip2_to, &e.cidr[1]); in hash_netnet4_uadt()
287 u8 cidr[2]; member
330 hash_netnet6_data_netmask(struct hash_netnet6_elem *elem, u8 cidr, bool inner) in hash_netnet6_data_netmask() argument
333 ip6_netmask(&elem->ip[1], cidr); in hash_netnet6_data_netmask()
334 elem->cidr[1] = cidr; in hash_netnet6_data_netmask()
336 ip6_netmask(&elem->ip[0], cidr); in hash_netnet6_data_netmask()
337 elem->cidr[0] = cidr; in hash_netnet6_data_netmask()
349 nla_put_u8(skb, IPSET_ATTR_CIDR, data->cidr[0]) || in hash_netnet6_data_list()
350 nla_put_u8(skb, IPSET_ATTR_CIDR2, data->cidr[1]) || in hash_netnet6_data_list()
377 e->cidr[0] = HOST_MASK; in hash_netnet6_init()
378 e->cidr[1] = HOST_MASK; in hash_netnet6_init()
391 e.cidr[0] = INIT_CIDR(h->nets[0].cidr[0], HOST_MASK); in hash_netnet6_kadt()
392 e.cidr[1] = INIT_CIDR(h->nets[0].cidr[1], HOST_MASK); in hash_netnet6_kadt()
398 ip6_netmask(&e.ip[0], e.cidr[0]); in hash_netnet6_kadt()
399 ip6_netmask(&e.ip[1], e.cidr[1]); in hash_netnet6_kadt()
403 if (e.cidr[0] == HOST_MASK && ipv6_addr_any(&e.ip[0].in6)) in hash_netnet6_kadt()
442 e.cidr[0] = nla_get_u8(tb[IPSET_ATTR_CIDR]); in hash_netnet6_uadt()
443 if (!e.cidr[0] || e.cidr[0] > HOST_MASK) in hash_netnet6_uadt()
448 e.cidr[1] = nla_get_u8(tb[IPSET_ATTR_CIDR2]); in hash_netnet6_uadt()
449 if (!e.cidr[1] || e.cidr[1] > HOST_MASK) in hash_netnet6_uadt()
453 ip6_netmask(&e.ip[0], e.cidr[0]); in hash_netnet6_uadt()
454 ip6_netmask(&e.ip[1], e.cidr[1]); in hash_netnet6_uadt()
458 if (e.cidr[0] == HOST_MASK && ipv6_addr_any(&e.ip[0].in6)) in hash_netnet6_uadt()