Lines Matching defs:elem
73 hash_netportnet4_do_data_match(const struct hash_netportnet4_elem *elem)
75 return elem->nomatch ? -ENOTEMPTY : 1;
79 hash_netportnet4_data_set_flags(struct hash_netportnet4_elem *elem, u32 flags)
81 elem->nomatch = !!((flags >> 16) & IPSET_FLAG_NOMATCH);
85 hash_netportnet4_data_reset_flags(struct hash_netportnet4_elem *elem, u8 *flags)
87 swap(*flags, elem->nomatch);
91 hash_netportnet4_data_reset_elem(struct hash_netportnet4_elem *elem,
94 elem->ip[1] = orig->ip[1];
98 hash_netportnet4_data_netmask(struct hash_netportnet4_elem *elem,
102 elem->ip[1] &= ip_set_netmask(cidr);
103 elem->cidr[1] = cidr;
105 elem->ip[0] &= ip_set_netmask(cidr);
106 elem->cidr[0] = cidr;
365 hash_netportnet6_do_data_match(const struct hash_netportnet6_elem *elem)
367 return elem->nomatch ? -ENOTEMPTY : 1;
371 hash_netportnet6_data_set_flags(struct hash_netportnet6_elem *elem, u32 flags)
373 elem->nomatch = !!((flags >> 16) & IPSET_FLAG_NOMATCH);
377 hash_netportnet6_data_reset_flags(struct hash_netportnet6_elem *elem, u8 *flags)
379 swap(*flags, elem->nomatch);
383 hash_netportnet6_data_reset_elem(struct hash_netportnet6_elem *elem,
386 elem->ip[1] = orig->ip[1];
390 hash_netportnet6_data_netmask(struct hash_netportnet6_elem *elem,
394 ip6_netmask(&elem->ip[1], cidr);
395 elem->cidr[1] = cidr;
397 ip6_netmask(&elem->ip[0], cidr);
398 elem->cidr[0] = cidr;