Home
last modified time | relevance | path

Searched refs:elem (Results 1 – 25 of 25) sorted by relevance

/net/netfilter/ipset/
Dip_set_hash_netiface.c52 u8 elem; member
61 u8 elem; member
83 hash_netiface4_do_data_match(const struct hash_netiface4_elem *elem) in hash_netiface4_do_data_match() argument
85 return elem->nomatch ? -ENOTEMPTY : 1; in hash_netiface4_do_data_match()
89 hash_netiface4_data_set_flags(struct hash_netiface4_elem *elem, u32 flags) in hash_netiface4_data_set_flags() argument
91 elem->nomatch = (flags >> 16) & IPSET_FLAG_NOMATCH; in hash_netiface4_data_set_flags()
95 hash_netiface4_data_reset_flags(struct hash_netiface4_elem *elem, u8 *flags) in hash_netiface4_data_reset_flags() argument
97 swap(*flags, elem->nomatch); in hash_netiface4_data_reset_flags()
101 hash_netiface4_data_netmask(struct hash_netiface4_elem *elem, u8 cidr) in hash_netiface4_data_netmask() argument
103 elem->ip &= ip_set_netmask(cidr); in hash_netiface4_data_netmask()
[all …]
Dip_set_hash_netnet.c66 hash_netnet4_do_data_match(const struct hash_netnet4_elem *elem) in hash_netnet4_do_data_match() argument
68 return elem->nomatch ? -ENOTEMPTY : 1; in hash_netnet4_do_data_match()
72 hash_netnet4_data_set_flags(struct hash_netnet4_elem *elem, u32 flags) in hash_netnet4_data_set_flags() argument
74 elem->nomatch = (flags >> 16) & IPSET_FLAG_NOMATCH; in hash_netnet4_data_set_flags()
78 hash_netnet4_data_reset_flags(struct hash_netnet4_elem *elem, u8 *flags) in hash_netnet4_data_reset_flags() argument
80 swap(*flags, elem->nomatch); in hash_netnet4_data_reset_flags()
84 hash_netnet4_data_reset_elem(struct hash_netnet4_elem *elem, in hash_netnet4_data_reset_elem() argument
87 elem->ip[1] = orig->ip[1]; in hash_netnet4_data_reset_elem()
91 hash_netnet4_data_netmask(struct hash_netnet4_elem *elem, u8 cidr, bool inner) in hash_netnet4_data_netmask() argument
94 elem->ip[1] &= ip_set_netmask(cidr); in hash_netnet4_data_netmask()
[all …]
Dip_set_bitmap_ipmac.c86 const struct bitmap_ipmac_elem *elem; in bitmap_ipmac_do_test() local
90 elem = get_const_elem(map->extensions, e->id, dsize); in bitmap_ipmac_do_test()
91 if (e->add_mac && elem->filled == MAC_FILLED) in bitmap_ipmac_do_test()
92 return ether_addr_equal(e->ether, elem->ether); in bitmap_ipmac_do_test()
100 const struct bitmap_ipmac_elem *elem; in bitmap_ipmac_gc_test() local
104 elem = get_const_elem(map->extensions, id, dsize); in bitmap_ipmac_gc_test()
106 return elem->filled == MAC_FILLED; in bitmap_ipmac_gc_test()
110 bitmap_ipmac_is_filled(const struct bitmap_ipmac_elem *elem) in bitmap_ipmac_is_filled() argument
112 return elem->filled == MAC_FILLED; in bitmap_ipmac_is_filled()
146 struct bitmap_ipmac_elem *elem; in bitmap_ipmac_do_add() local
[all …]
Dip_set_hash_net.c61 hash_net4_do_data_match(const struct hash_net4_elem *elem) in hash_net4_do_data_match() argument
63 return elem->nomatch ? -ENOTEMPTY : 1; in hash_net4_do_data_match()
67 hash_net4_data_set_flags(struct hash_net4_elem *elem, u32 flags) in hash_net4_data_set_flags() argument
69 elem->nomatch = (flags >> 16) & IPSET_FLAG_NOMATCH; in hash_net4_data_set_flags()
73 hash_net4_data_reset_flags(struct hash_net4_elem *elem, u8 *flags) in hash_net4_data_reset_flags() argument
75 swap(*flags, elem->nomatch); in hash_net4_data_reset_flags()
79 hash_net4_data_netmask(struct hash_net4_elem *elem, u8 cidr) in hash_net4_data_netmask() argument
81 elem->ip &= ip_set_netmask(cidr); in hash_net4_data_netmask()
82 elem->cidr = cidr; in hash_net4_data_netmask()
232 hash_net6_do_data_match(const struct hash_net6_elem *elem) in hash_net6_do_data_match() argument
[all …]
Dip_set_hash_netportnet.c73 hash_netportnet4_do_data_match(const struct hash_netportnet4_elem *elem) in hash_netportnet4_do_data_match() argument
75 return elem->nomatch ? -ENOTEMPTY : 1; in hash_netportnet4_do_data_match()
79 hash_netportnet4_data_set_flags(struct hash_netportnet4_elem *elem, u32 flags) in hash_netportnet4_data_set_flags() argument
81 elem->nomatch = !!((flags >> 16) & IPSET_FLAG_NOMATCH); in hash_netportnet4_data_set_flags()
85 hash_netportnet4_data_reset_flags(struct hash_netportnet4_elem *elem, u8 *flags) in hash_netportnet4_data_reset_flags() argument
87 swap(*flags, elem->nomatch); in hash_netportnet4_data_reset_flags()
91 hash_netportnet4_data_reset_elem(struct hash_netportnet4_elem *elem, in hash_netportnet4_data_reset_elem() argument
94 elem->ip[1] = orig->ip[1]; in hash_netportnet4_data_reset_elem()
98 hash_netportnet4_data_netmask(struct hash_netportnet4_elem *elem, in hash_netportnet4_data_netmask() argument
102 elem->ip[1] &= ip_set_netmask(cidr); in hash_netportnet4_data_netmask()
[all …]
Dip_set_hash_netport.c73 hash_netport4_do_data_match(const struct hash_netport4_elem *elem) in hash_netport4_do_data_match() argument
75 return elem->nomatch ? -ENOTEMPTY : 1; in hash_netport4_do_data_match()
79 hash_netport4_data_set_flags(struct hash_netport4_elem *elem, u32 flags) in hash_netport4_data_set_flags() argument
81 elem->nomatch = !!((flags >> 16) & IPSET_FLAG_NOMATCH); in hash_netport4_data_set_flags()
85 hash_netport4_data_reset_flags(struct hash_netport4_elem *elem, u8 *flags) in hash_netport4_data_reset_flags() argument
87 swap(*flags, elem->nomatch); in hash_netport4_data_reset_flags()
91 hash_netport4_data_netmask(struct hash_netport4_elem *elem, u8 cidr) in hash_netport4_data_netmask() argument
93 elem->ip &= ip_set_netmask(cidr); in hash_netport4_data_netmask()
94 elem->cidr = cidr - 1; in hash_netport4_data_netmask()
290 hash_netport6_do_data_match(const struct hash_netport6_elem *elem) in hash_netport6_do_data_match() argument
[all …]
Dip_set_hash_ipportnet.c76 hash_ipportnet4_do_data_match(const struct hash_ipportnet4_elem *elem) in hash_ipportnet4_do_data_match() argument
78 return elem->nomatch ? -ENOTEMPTY : 1; in hash_ipportnet4_do_data_match()
82 hash_ipportnet4_data_set_flags(struct hash_ipportnet4_elem *elem, u32 flags) in hash_ipportnet4_data_set_flags() argument
84 elem->nomatch = !!((flags >> 16) & IPSET_FLAG_NOMATCH); in hash_ipportnet4_data_set_flags()
88 hash_ipportnet4_data_reset_flags(struct hash_ipportnet4_elem *elem, u8 *flags) in hash_ipportnet4_data_reset_flags() argument
90 swap(*flags, elem->nomatch); in hash_ipportnet4_data_reset_flags()
94 hash_ipportnet4_data_netmask(struct hash_ipportnet4_elem *elem, u8 cidr) in hash_ipportnet4_data_netmask() argument
96 elem->ip2 &= ip_set_netmask(cidr); in hash_ipportnet4_data_netmask()
97 elem->cidr = cidr - 1; in hash_ipportnet4_data_netmask()
331 hash_ipportnet6_do_data_match(const struct hash_ipportnet6_elem *elem) in hash_ipportnet6_do_data_match() argument
[all …]
/net/core/
Dsock_map.c868 struct bpf_shtab_elem *elem; in sock_hash_lookup_elem_raw() local
870 hlist_for_each_entry_rcu(elem, head, node) { in sock_hash_lookup_elem_raw()
871 if (elem->hash == hash && in sock_hash_lookup_elem_raw()
872 !memcmp(&elem->key, key, key_size)) in sock_hash_lookup_elem_raw()
873 return elem; in sock_hash_lookup_elem_raw()
884 struct bpf_shtab_elem *elem; in __sock_hash_lookup_elem() local
890 elem = sock_hash_lookup_elem_raw(&bucket->head, hash, key, key_size); in __sock_hash_lookup_elem()
892 return elem ? elem->sk : NULL; in __sock_hash_lookup_elem()
896 struct bpf_shtab_elem *elem) in sock_hash_free_elem() argument
899 kfree_rcu(elem, rcu); in sock_hash_free_elem()
[all …]
Ddev.c630 struct packet_offload *elem; in dev_add_offload() local
633 list_for_each_entry(elem, &offload_base, list) { in dev_add_offload()
634 if (po->priority < elem->priority) in dev_add_offload()
637 list_add_rcu(&po->list, elem->list.prev); in dev_add_offload()
/net/netfilter/
Dnft_set_hash.c99 const struct nft_set_elem *elem, unsigned int flags) in nft_rhash_get() argument
106 .key = elem->key.val.data, in nft_rhash_get()
164 const struct nft_set_elem *elem, in nft_rhash_insert() argument
168 struct nft_rhash_elem *he = elem->priv; in nft_rhash_insert()
172 .key = elem->key.val.data, in nft_rhash_insert()
188 const struct nft_set_elem *elem) in nft_rhash_activate() argument
190 struct nft_rhash_elem *he = elem->priv; in nft_rhash_activate()
207 const struct nft_set_elem *elem) in nft_rhash_deactivate() argument
214 .key = elem->key.val.data, in nft_rhash_deactivate()
229 const struct nft_set_elem *elem) in nft_rhash_remove() argument
[all …]
Dnft_set_bitmap.c108 const struct nft_set_elem *elem, unsigned int flags) in nft_bitmap_get() argument
115 if (memcmp(nft_set_ext_key(&be->ext), elem->key.val.data, set->klen) || in nft_bitmap_get()
125 const struct nft_set_elem *elem, in nft_bitmap_insert() argument
129 struct nft_bitmap_elem *new = elem->priv, *be; in nft_bitmap_insert()
149 const struct nft_set_elem *elem) in nft_bitmap_remove() argument
152 struct nft_bitmap_elem *be = elem->priv; in nft_bitmap_remove()
164 const struct nft_set_elem *elem) in nft_bitmap_activate() argument
167 struct nft_bitmap_elem *be = elem->priv; in nft_bitmap_activate()
195 const struct nft_set_elem *elem) in nft_bitmap_deactivate() argument
198 struct nft_bitmap_elem *this = elem->priv, *be; in nft_bitmap_deactivate()
[all …]
Dnft_set_rbtree.c137 const u32 *key, struct nft_rbtree_elem **elem, in __nft_rbtree_get() argument
175 *elem = rbe; in __nft_rbtree_get()
193 *elem = interval; in __nft_rbtree_get()
201 const struct nft_set_elem *elem, unsigned int flags) in nft_rbtree_get() argument
206 const u32 *key = (const u32 *)&elem->key.val; in nft_rbtree_get()
228 struct nft_set_elem elem = { in nft_rbtree_gc_remove() local
232 nft_setelem_data_deactivate(net, set, &elem); in nft_rbtree_gc_remove()
487 const struct nft_set_elem *elem, in nft_rbtree_insert() argument
491 struct nft_rbtree_elem *rbe = elem->priv; in nft_rbtree_insert()
512 const struct nft_set_elem *elem) in nft_rbtree_remove() argument
[all …]
Dnf_tables_api.c595 struct nft_set_elem *elem) in nft_mapelem_deactivate() argument
597 nft_setelem_data_deactivate(ctx->net, set, elem); in nft_mapelem_deactivate()
605 void *elem; member
613 struct nft_set_elem elem; in nft_map_catchall_deactivate() local
617 ext = nft_set_elem_ext(set, catchall->elem); in nft_map_catchall_deactivate()
621 elem.priv = catchall->elem; in nft_map_catchall_deactivate()
622 nft_setelem_data_deactivate(ctx->net, set, &elem); in nft_map_catchall_deactivate()
3478 struct nft_set_elem *elem) in nft_setelem_validate() argument
3480 const struct nft_set_ext *ext = nft_set_elem_ext(set, elem->priv); in nft_setelem_validate()
3510 struct nft_set_elem elem; in nft_set_catchall_validate() local
[all …]
Dnft_set_pipapo.c603 const struct nft_set_elem *elem, unsigned int flags) in nft_pipapo_get() argument
605 return pipapo_get(net, set, (const u8 *)elem->key.val.data, in nft_pipapo_get()
1190 const struct nft_set_elem *elem, argument
1193 const struct nft_set_ext *ext = nft_set_elem_ext(set, elem->priv);
1195 const u8 *start = (const u8 *)elem->key.val.data, *end;
1196 struct nft_pipapo_elem *e = elem->priv, *dup;
1567 struct nft_set_elem elem = { local
1571 nft_setelem_data_deactivate(net, set, &elem);
1764 const struct nft_set_elem *elem) argument
1766 struct nft_pipapo_elem *e = elem->priv;
[all …]
Dnft_dynset.c53 void *elem; in nft_dynset_new() local
59 elem = nft_set_elem_init(set, &priv->tmpl, in nft_dynset_new()
63 if (elem == NULL) in nft_dynset_new()
66 ext = nft_set_elem_ext(set, elem); in nft_dynset_new()
70 return elem; in nft_dynset_new()
73 nft_set_elem_destroy(set, elem, false); in nft_dynset_new()
/net/wireless/
Dscan.c215 bool cfg80211_is_element_inherited(const struct element *elem, in cfg80211_is_element_inherited() argument
221 if (elem->id == WLAN_EID_MULTIPLE_BSSID) in cfg80211_is_element_inherited()
242 if (elem->id == WLAN_EID_EXTENSION) { in cfg80211_is_element_inherited()
247 id = elem->data[0]; in cfg80211_is_element_inherited()
253 id = elem->id; in cfg80211_is_element_inherited()
265 static size_t cfg80211_copy_elem_with_frags(const struct element *elem, in cfg80211_copy_elem_with_frags() argument
269 if (WARN_ON((u8 *)elem < ie || elem->data > ie + ie_len || in cfg80211_copy_elem_with_frags()
270 elem->data + elem->datalen > ie + ie_len)) in cfg80211_copy_elem_with_frags()
273 if (elem->datalen + 2 > buf + buf_len - *pos) in cfg80211_copy_elem_with_frags()
276 memcpy(*pos, elem, elem->datalen + 2); in cfg80211_copy_elem_with_frags()
[all …]
Dnl80211.c230 const struct element *elem; in validate_beacon_head() local
258 for_each_element(elem, data, len) { in validate_beacon_head()
262 if (for_each_element_completed(elem, data, len)) in validate_beacon_head()
275 const struct element *elem; in validate_ie_attr() local
277 for_each_element(elem, data, len) { in validate_ie_attr()
281 if (for_each_element_completed(elem, data, len)) in validate_ie_attr()
5408 elems = kzalloc(struct_size(elems, elem, num_elems), GFP_KERNEL); in nl80211_parse_mbssid_elems()
5413 elems->elem[i].data = nla_data(nl_elems); in nl80211_parse_mbssid_elems()
5414 elems->elem[i].len = nla_len(nl_elems); in nl80211_parse_mbssid_elems()
/net/sunrpc/
Dxdr.c1806 char *elem = NULL, *c; in xdr_xcode_array2() local
1843 if (!elem) { in xdr_xcode_array2()
1844 elem = kmalloc(desc->elem_size, GFP_KERNEL); in xdr_xcode_array2()
1846 if (!elem) in xdr_xcode_array2()
1850 err = desc->xcode(desc, elem); in xdr_xcode_array2()
1853 memcpy(c, elem, avail_here); in xdr_xcode_array2()
1855 memcpy(elem, c, avail_here); in xdr_xcode_array2()
1881 if (!elem) { in xdr_xcode_array2()
1882 elem = kmalloc(desc->elem_size, in xdr_xcode_array2()
1885 if (!elem) in xdr_xcode_array2()
[all …]
/net/mac80211/
Dutil.c942 const struct element *elem, in ieee80211_parse_extension_element() argument
945 const void *data = elem->data + 1; in ieee80211_parse_extension_element()
948 if (!elem->datalen) in ieee80211_parse_extension_element()
951 len = elem->datalen - 1; in ieee80211_parse_extension_element()
953 switch (elem->data[0]) { in ieee80211_parse_extension_element()
958 *crc = crc32_be(*crc, (void *)elem, in ieee80211_parse_extension_element()
959 elem->datalen + 2); in ieee80211_parse_extension_element()
970 *crc = crc32_be(*crc, (void *)elem, in ieee80211_parse_extension_element()
971 elem->datalen + 2); in ieee80211_parse_extension_element()
1005 const struct element *elem; in _ieee802_11_parse_elems_crc() local
[all …]
Dcfg.c971 memcpy(pos + offset, src->elem[i].data, src->elem[i].len); in ieee80211_copy_mbssid_beacon()
972 dst->elem[i].len = src->elem[i].len; in ieee80211_copy_mbssid_beacon()
973 dst->elem[i].data = pos + offset; in ieee80211_copy_mbssid_beacon()
974 offset += dst->elem[i].len; in ieee80211_copy_mbssid_beacon()
1017 size += struct_size(new->mbssid_ies, elem, mbssid->cnt); in ieee80211_assign_beacon()
1021 size += struct_size(new->mbssid_ies, elem, mbssid->cnt); in ieee80211_assign_beacon()
1044 pos += struct_size(new->mbssid_ies, elem, mbssid->cnt); in ieee80211_assign_beacon()
3148 elem, beacon->mbssid_ies->cnt), in cfg80211_beacon_dup()
Dmlme.c5838 const struct element *elem; in ieee80211_mgd_assoc() local
5855 elem = cfg80211_find_ext_elem(WLAN_EID_EXT_MULTIPLE_BSSID_CONFIGURATION, in ieee80211_mgd_assoc()
5857 if (elem && elem->datalen >= 3) in ieee80211_mgd_assoc()
5858 sdata->vif.bss_conf.profile_periodicity = elem->data[2]; in ieee80211_mgd_assoc()
5862 elem = cfg80211_find_elem(WLAN_EID_EXT_CAPABILITY, in ieee80211_mgd_assoc()
5864 if (elem && elem->datalen >= 11 && in ieee80211_mgd_assoc()
5865 (elem->data[10] & WLAN_EXT_CAPA11_EMA_SUPPORT)) in ieee80211_mgd_assoc()
Dieee80211_i.h1091 len += elems->elem[i].len; in ieee80211_get_mbssid_beacon_len()
Dtx.c5056 skb_put_data(skb, beacon->mbssid_ies->elem[i].data, in ieee80211_beacon_add_mbssid()
5057 beacon->mbssid_ies->elem[i].len); in ieee80211_beacon_add_mbssid()
/net/vmw_vsock/
Dvmci_transport.h114 struct list_head elem; member
Dvmci_transport.c1592 INIT_LIST_HEAD(&vmci_trans(vsk)->elem); in vmci_transport_socket_init()
1604 elem); in vmci_transport_free_resources()
1605 list_del(&transport->elem); in vmci_transport_free_resources()
1650 list_add(&vmci_trans(vsk)->elem, &vmci_transport_cleanup_list); in vmci_transport_destruct()