Home
last modified time | relevance | path

Searched refs:klen (Results 1 – 14 of 14) sorted by relevance

/net/netfilter/
Dnft_set_bitmap.c57 if (set->klen == 2) in nft_bitmap_location()
97 nft_set_ext_key(&this->ext), set->klen) || in nft_bitmap_elem_find()
114 if (memcmp(nft_set_ext_key(&be->ext), elem->key.val.data, set->klen) || in nft_bitmap_get()
243 static inline u32 nft_bitmap_size(u32 klen) in nft_bitmap_size() argument
245 return ((2 << ((klen * BITS_PER_BYTE) - 1)) / BITS_PER_BYTE) << 1; in nft_bitmap_size()
248 static inline u64 nft_bitmap_total_size(u32 klen) in nft_bitmap_total_size() argument
250 return sizeof(struct nft_bitmap) + nft_bitmap_size(klen); in nft_bitmap_total_size()
256 u32 klen = ntohl(nla_get_be32(nla[NFTA_SET_KEY_LEN])); in nft_bitmap_privsize() local
258 return nft_bitmap_total_size(klen); in nft_bitmap_privsize()
268 priv->bitmap_size = nft_bitmap_size(set->klen); in nft_bitmap_init()
[all …]
Dnft_set_hash.c60 if (memcmp(nft_set_ext_key(&he->ext), x->key, x->set->klen)) in nft_rhash_cmp()
368 params.key_len = set->klen; in nft_rhash_init()
430 hash = jhash(key, set->klen, priv->seed); in nft_hash_lookup()
433 if (!memcmp(nft_set_ext_key(&he->ext), key, set->klen) && in nft_hash_lookup()
450 hash = jhash(elem->key.val.data, set->klen, priv->seed); in nft_hash_get()
453 if (!memcmp(nft_set_ext_key(&he->ext), elem->key.val.data, set->klen) && in nft_hash_get()
489 if (set->klen == 4) { in nft_jhash()
493 hash = jhash(key, set->klen, priv->seed); in nft_jhash()
512 nft_set_ext_key(&he->ext), set->klen) && in nft_hash_insert()
551 set->klen) && in nft_hash_deactivate()
[all …]
Dnft_set_rbtree.c39 return memcmp(this, nft_set_ext_key(&interval->ext), set->klen) == 0; in nft_rbtree_equal()
61 d = memcmp(this, key, set->klen); in __nft_rbtree_lookup()
137 d = memcmp(this, key, set->klen); in __nft_rbtree_get()
220 set->klen); in __nft_rbtree_insert()
313 set->klen); in nft_rbtree_deactivate()
Dnft_dynset.c188 err = nft_validate_register_load(priv->sreg_key, set->klen); in nft_dynset_init()
227 nft_set_ext_add_length(&priv->tmpl, NFT_SET_EXT_KEY, set->klen); in nft_dynset_init()
Dnf_conncount.c80 static int key_diff(const u32 *a, const u32 *b, unsigned int klen) in key_diff() argument
82 return memcmp(a, b, klen * sizeof(u32)); in key_diff()
Dnft_lookup.c77 err = nft_validate_register_load(priv->sreg, set->klen); in nft_lookup_init()
Dnft_objref.c141 err = nft_validate_register_load(priv->sreg, set->klen); in nft_objref_map_init()
Dnf_tables_api.c3325 if (nla_put_be32(skb, NFTA_SET_KEY_LEN, htonl(set->klen))) in nf_tables_fill_set()
3585 desc.klen = ntohl(nla_get_be32(nla[NFTA_SET_KEY_LEN])); in nf_tables_newset()
3586 if (desc.klen == 0 || desc.klen > NFT_DATA_VALUE_MAXLEN) in nf_tables_newset()
3734 set->klen = desc.klen; in nf_tables_newset()
4014 NFT_DATA_VALUE, set->klen) < 0) in nf_tables_fill_setelem()
4288 if (desc.type != NFT_DATA_VALUE || desc.len != set->klen) { in nft_get_set_elem()
4431 memcpy(nft_set_ext_key(ext), key, set->klen); in nft_set_elem_init()
4568 if (d1.type != NFT_DATA_VALUE || d1.len != set->klen) in nft_add_set_elem()
4840 if (desc.type != NFT_DATA_VALUE || desc.len != set->klen) in nft_del_setelem()
/net/wireless/
Dlib80211_crypt_wep.c67 u32 klen; in lib80211_wep_build_iv() local
77 klen = 3 + wep->key_len; in lib80211_wep_build_iv()
86 if (B >= 3 && B < klen) in lib80211_wep_build_iv()
108 u32 crc, klen, len; in lib80211_wep_encrypt() local
128 klen = 3 + wep->key_len; in lib80211_wep_encrypt()
138 arc4_setkey(&wep->tx_ctx, key, klen); in lib80211_wep_encrypt()
154 u32 crc, klen, plen; in lib80211_wep_decrypt() local
169 klen = 3 + wep->key_len; in lib80211_wep_decrypt()
177 arc4_setkey(&wep->rx_ctx, key, klen); in lib80211_wep_decrypt()
/net/mac80211/
Dwep.c111 size_t klen, u8 *data, size_t data_len) in ieee80211_wep_encrypt_data() argument
118 arc4_setkey(ctx, rc4key, klen); in ieee80211_wep_encrypt_data()
168 size_t klen, u8 *data, size_t data_len) in ieee80211_wep_decrypt_data() argument
172 arc4_setkey(ctx, rc4key, klen); in ieee80211_wep_decrypt_data()
197 u32 klen; in ieee80211_wep_decrypt() local
219 klen = 3 + key->conf.keylen; in ieee80211_wep_decrypt()
227 if (ieee80211_wep_decrypt_data(&local->wep_rx_ctx, rc4key, klen, in ieee80211_wep_decrypt()
Dwep.h18 size_t klen, u8 *data, size_t data_len);
23 size_t klen, u8 *data, size_t data_len);
/net/
Dcompat.c557 int klen, ulen, err; in compat_mc_getsockopt() local
568 klen = ulen + sizeof(*kgf) - sizeof(*gf32); in compat_mc_getsockopt()
570 if (klen < GROUP_FILTER_SIZE(0)) in compat_mc_getsockopt()
574 __put_user(klen, koptlen)) in compat_mc_getsockopt()
578 kgf = compat_alloc_user_space(klen+sizeof(*optlen)); in compat_mc_getsockopt()
595 __get_user(klen, koptlen)) in compat_mc_getsockopt()
598 ulen = klen - (sizeof(*kgf)-sizeof(*gf32)); in compat_mc_getsockopt()
604 if (!access_ok(kgf, klen) || in compat_mc_getsockopt()
616 klen -= GROUP_FILTER_SIZE(0); in compat_mc_getsockopt()
618 if (copylen > klen) in compat_mc_getsockopt()
[all …]
Dsocket.c206 static int move_addr_to_user(struct sockaddr_storage *kaddr, int klen, in move_addr_to_user() argument
212 BUG_ON(klen > sizeof(struct sockaddr_storage)); in move_addr_to_user()
216 if (len > klen) in move_addr_to_user()
217 len = klen; in move_addr_to_user()
221 if (audit_sockaddr(klen, kaddr)) in move_addr_to_user()
230 return __put_user(klen, ulen); in move_addr_to_user()
/net/xfrm/
Dxfrm_user.c454 unsigned int klen, ulen; in xfrm_alloc_replay_state_esn() local
460 klen = xfrm_replay_state_esn_len(up); in xfrm_alloc_replay_state_esn()
461 ulen = nla_len(rta) >= (int)klen ? klen : sizeof(*up); in xfrm_alloc_replay_state_esn()
463 p = kzalloc(klen, GFP_KERNEL); in xfrm_alloc_replay_state_esn()
467 pp = kzalloc(klen, GFP_KERNEL); in xfrm_alloc_replay_state_esn()