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()
98 nft_set_ext_key(&this->ext), set->klen) || in nft_bitmap_elem_find()
115 if (memcmp(nft_set_ext_key(&be->ext), elem->key.val.data, set->klen) || in nft_bitmap_get()
244 static inline u32 nft_bitmap_size(u32 klen) in nft_bitmap_size() argument
246 return ((2 << ((klen * BITS_PER_BYTE) - 1)) / BITS_PER_BYTE) << 1; in nft_bitmap_size()
249 static inline u64 nft_bitmap_total_size(u32 klen) in nft_bitmap_total_size() argument
251 return sizeof(struct nft_bitmap) + nft_bitmap_size(klen); in nft_bitmap_total_size()
257 u32 klen = ntohl(nla_get_be32(nla[NFTA_SET_KEY_LEN])); in nft_bitmap_privsize() local
259 return nft_bitmap_total_size(klen); in nft_bitmap_privsize()
269 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()
410 params.key_len = set->klen; in nft_rhash_init()
492 hash = jhash(key, set->klen, priv->seed); in nft_hash_lookup()
495 if (!memcmp(nft_set_ext_key(&he->ext), key, set->klen) && in nft_hash_lookup()
512 hash = jhash(elem->key.val.data, set->klen, priv->seed); in nft_hash_get()
515 if (!memcmp(nft_set_ext_key(&he->ext), elem->key.val.data, set->klen) && in nft_hash_get()
552 if (set->klen == 4) { in nft_jhash()
556 hash = jhash(key, set->klen, priv->seed); in nft_jhash()
575 nft_set_ext_key(&he->ext), set->klen) && in nft_hash_insert()
614 set->klen) && in nft_hash_deactivate()
[all …]
Dnft_set_rbtree.c46 set->klen); in nft_rbtree_cmp()
72 d = memcmp(nft_set_ext_key(&rbe->ext), key, set->klen); in __nft_rbtree_lookup()
154 d = memcmp(this, key, set->klen); in __nft_rbtree_get()
557 set->klen); in nft_rbtree_deactivate()
Dnft_dynset.c218 set->klen); in nft_dynset_init()
307 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_objref.c147 set->klen); in nft_objref_map_init()
Dnft_lookup.c115 set->klen); in nft_lookup_init()
Dnf_tables_api.c4255 if (nla_put_be32(skb, NFTA_SET_KEY_LEN, htonl(set->klen))) in nf_tables_fill_set()
4549 key_num_regs = DIV_ROUND_UP(desc->klen, sizeof(u32)); in nft_set_desc_concat()
4640 set->klen != desc->klen || in nft_set_is_same()
4695 desc.klen = ntohl(nla_get_be32(nla[NFTA_SET_KEY_LEN])); in nf_tables_newset()
4696 if (desc.klen == 0 || desc.klen > NFT_DATA_VALUE_MAXLEN) in nf_tables_newset()
4904 set->klen = desc.klen; in nf_tables_newset()
5363 NFT_DATA_VALUE, set->klen) < 0) in nf_tables_fill_setelem()
5368 NFT_DATA_VALUE, set->klen) < 0) in nf_tables_fill_setelem()
5644 .len = set->klen, in nft_setelem_parse_key()
5939 nft_set_ext_key(ext), key, set->klen) < 0) in nft_set_elem_init()
[all …]
Dnft_set_pipapo.c2165 int len = desc->field_len[i] ? : set->klen;
/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.c109 size_t klen, u8 *data, size_t data_len) in ieee80211_wep_encrypt_data() argument
116 arc4_setkey(ctx, rc4key, klen); in ieee80211_wep_encrypt_data()
166 size_t klen, u8 *data, size_t data_len) in ieee80211_wep_decrypt_data() argument
170 arc4_setkey(ctx, rc4key, klen); in ieee80211_wep_decrypt_data()
195 u32 klen; in ieee80211_wep_decrypt() local
217 klen = 3 + key->conf.keylen; in ieee80211_wep_decrypt()
225 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/
Dsocket.c271 static int move_addr_to_user(struct sockaddr_storage *kaddr, int klen, in move_addr_to_user() argument
277 BUG_ON(klen > sizeof(struct sockaddr_storage)); in move_addr_to_user()
281 if (len > klen) in move_addr_to_user()
282 len = klen; in move_addr_to_user()
286 if (audit_sockaddr(klen, kaddr)) in move_addr_to_user()
295 return __put_user(klen, ulen); in move_addr_to_user()
/net/xfrm/
Dxfrm_user.c547 unsigned int klen, ulen; in xfrm_alloc_replay_state_esn() local
553 klen = xfrm_replay_state_esn_len(up); in xfrm_alloc_replay_state_esn()
554 ulen = nla_len(rta) >= (int)klen ? klen : sizeof(*up); in xfrm_alloc_replay_state_esn()
556 p = kzalloc(klen, GFP_KERNEL); in xfrm_alloc_replay_state_esn()
560 pp = kzalloc(klen, GFP_KERNEL); in xfrm_alloc_replay_state_esn()