/net/mac80211/ |
D | key.c | 70 static void add_todo(struct ieee80211_key *key, u32 flag) in add_todo() argument 72 if (!key) in add_todo() 76 key->flags |= flag; in add_todo() 80 if (!list_empty(&key->todo)) in add_todo() 81 list_del(&key->todo); in add_todo() 82 list_add_tail(&key->todo, &todo_list); in add_todo() 111 static const u8 *get_mac_for_key(struct ieee80211_key *key) in get_mac_for_key() argument 120 if (key->conf.alg != ALG_WEP && in get_mac_for_key() 121 (key->sdata->vif.type == NL80211_IFTYPE_AP || in get_mac_for_key() 122 key->sdata->vif.type == NL80211_IFTYPE_AP_VLAN)) in get_mac_for_key() [all …]
|
D | debugfs_key.c | 23 struct ieee80211_key *key = file->private_data; \ 24 int res = scnprintf(buf, buflen, format_string, key->prop); \ 67 struct ieee80211_key *key = file->private_data; in key_algorithm_read() local 69 switch (key->conf.alg) { in key_algorithm_read() 92 struct ieee80211_key *key = file->private_data; in key_tx_spec_read() local 94 switch (key->conf.alg) { in key_tx_spec_read() 100 key->u.tkip.tx.iv32, in key_tx_spec_read() 101 key->u.tkip.tx.iv16); in key_tx_spec_read() 104 tpn = key->u.ccmp.tx_pn; in key_tx_spec_read() 118 struct ieee80211_key *key = file->private_data; in key_rx_spec_read() local [all …]
|
D | wpa.c | 27 u8 *data, *key, *mic, key_offset; in ieee80211_tx_h_michael_mic_add() local 37 if (!tx->key || tx->key->conf.alg != ALG_TKIP || skb->len < 24 || in ieee80211_tx_h_michael_mic_add() 48 if ((tx->key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE) && in ieee80211_tx_h_michael_mic_add() 50 !(tx->key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIC) && in ieee80211_tx_h_michael_mic_add() 57 if (!(tx->key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE)) in ieee80211_tx_h_michael_mic_add() 72 key = &tx->key->conf.key[key_offset]; in ieee80211_tx_h_michael_mic_add() 74 michael_mic(key, hdr, data, data_len, mic); in ieee80211_tx_h_michael_mic_add() 83 u8 *data, *key = NULL, key_offset; in ieee80211_rx_h_michael_mic_verify() local 96 if (!rx->key || rx->key->conf.alg != ALG_TKIP || in ieee80211_rx_h_michael_mic_verify() 116 key = &rx->key->conf.key[key_offset]; in ieee80211_rx_h_michael_mic_verify() [all …]
|
D | tkip.c | 142 u8 *ieee80211_tkip_add_iv(u8 *pos, struct ieee80211_key *key, u16 iv16) in ieee80211_tkip_add_iv() argument 145 *pos++ = (key->conf.keyidx << 6) | (1 << 5) /* Ext IV */; in ieee80211_tkip_add_iv() 146 put_unaligned_le32(key->u.tkip.tx.iv32, pos); in ieee80211_tkip_add_iv() 154 struct ieee80211_key *key = (struct ieee80211_key *) in ieee80211_get_tkip_key() local 167 tk = &key->conf.key[NL80211_TKIP_DATA_OFFSET_ENCR_KEY]; in ieee80211_get_tkip_key() 168 ctx = &key->u.tkip.tx; in ieee80211_get_tkip_key() 203 struct ieee80211_key *key, in ieee80211_tkip_encrypt_data() argument 207 struct tkip_ctx *ctx = &key->u.tkip.tx; in ieee80211_tkip_encrypt_data() 208 const u8 *tk = &key->conf.key[NL80211_TKIP_DATA_OFFSET_ENCR_KEY]; in ieee80211_tkip_encrypt_data() 216 pos = ieee80211_tkip_add_iv(pos, key, key->u.tkip.tx.iv16); in ieee80211_tkip_encrypt_data() [all …]
|
D | wep.c | 70 struct ieee80211_key *key, u8 *iv) in ieee80211_wep_get_iv() argument 73 if (ieee80211_wep_weak_iv(local->wep_iv, key->conf.keylen)) in ieee80211_wep_get_iv() 82 *iv++ = key->conf.keyidx << 6; in ieee80211_wep_get_iv() 88 struct ieee80211_key *key) in ieee80211_wep_add_iv() argument 103 ieee80211_wep_get_iv(local, key, newhdr + hdrlen); in ieee80211_wep_add_iv() 110 struct ieee80211_key *key) in ieee80211_wep_remove_iv() argument 148 struct ieee80211_key *key) in ieee80211_wep_encrypt() argument 154 if (!key || key->conf.alg != ALG_WEP) in ieee80211_wep_encrypt() 157 klen = 3 + key->conf.keylen; in ieee80211_wep_encrypt() 162 iv = ieee80211_wep_add_iv(local, skb, key); in ieee80211_wep_encrypt() [all …]
|
D | debugfs_key.h | 5 void ieee80211_debugfs_key_add(struct ieee80211_key *key); 6 void ieee80211_debugfs_key_remove(struct ieee80211_key *key); 9 void ieee80211_debugfs_key_sta_del(struct ieee80211_key *key, 12 static inline void ieee80211_debugfs_key_add(struct ieee80211_key *key) in ieee80211_debugfs_key_add() argument 14 static inline void ieee80211_debugfs_key_remove(struct ieee80211_key *key) in ieee80211_debugfs_key_remove() argument 22 static inline void ieee80211_debugfs_key_sta_del(struct ieee80211_key *key, in ieee80211_debugfs_key_sta_del() argument
|
D | cfg.c | 120 struct ieee80211_key *key; in ieee80211_add_key() local 140 key = ieee80211_key_alloc(alg, key_idx, params->key_len, params->key); in ieee80211_add_key() 141 if (!key) in ieee80211_add_key() 149 ieee80211_key_free(key); in ieee80211_add_key() 155 ieee80211_key_link(key, sdata, sta); in ieee80211_add_key() 182 if (sta->key) { in ieee80211_del_key() 183 ieee80211_key_free(sta->key); in ieee80211_del_key() 184 WARN_ON(sta->key); in ieee80211_del_key() 215 struct ieee80211_key *key; in ieee80211_get_key() local 229 key = sta->key; in ieee80211_get_key() [all …]
|
D | michael.c | 30 static void michael_mic_hdr(struct michael_mic_ctx *mctx, const u8 *key, in michael_mic_hdr() argument 42 mctx->l = get_unaligned_le32(key); in michael_mic_hdr() 43 mctx->r = get_unaligned_le32(key + 4); in michael_mic_hdr() 56 void michael_mic(const u8 *key, struct ieee80211_hdr *hdr, in michael_mic() argument 63 michael_mic_hdr(&mctx, key, hdr); in michael_mic()
|
/net/rxrpc/ |
D | ar-key.c | 26 static int rxrpc_instantiate(struct key *, const void *, size_t); 27 static int rxrpc_instantiate_s(struct key *, const void *, size_t); 28 static void rxrpc_destroy(struct key *); 29 static void rxrpc_destroy_s(struct key *); 30 static void rxrpc_describe(const struct key *, struct seq_file *); 71 static int rxrpc_instantiate(struct key *key, const void *data, size_t datalen) in rxrpc_instantiate() argument 79 _enter("{%x},,%zu", key_serial(key), datalen); in rxrpc_instantiate() 128 key->type_data.x[0] = tsec->security_index; in rxrpc_instantiate() 131 ret = key_payload_reserve(key, plen); in rxrpc_instantiate() 144 key->payload.data = upayload; in rxrpc_instantiate() [all …]
|
D | ar-security.c | 126 struct key *key = conn->key; in rxrpc_init_client_conn_security() local 129 _enter("{%d},{%x}", conn->debug_id, key_serial(key)); in rxrpc_init_client_conn_security() 131 if (!key) in rxrpc_init_client_conn_security() 134 ret = key_validate(key); in rxrpc_init_client_conn_security() 138 sec = rxrpc_security_lookup(key->type_data.x[0]); in rxrpc_init_client_conn_security() 162 struct key *key; in rxrpc_init_server_conn_security() local 207 key = key_ref_to_ptr(kref); in rxrpc_init_server_conn_security() 210 conn->server_key = key; in rxrpc_init_server_conn_security() 256 key_put(conn->key); in rxrpc_clear_conn_security()
|
/net/wireless/ |
D | lib80211_crypt_ccmp.c | 43 u8 key[CCMP_TK_LEN]; member 186 struct lib80211_ccmp_data *key = priv; in lib80211_ccmp_hdr() local 194 memcpy(aeskey, key->key, CCMP_TK_LEN); in lib80211_ccmp_hdr() 202 key->tx_pn[i]++; in lib80211_ccmp_hdr() 203 if (key->tx_pn[i] != 0) in lib80211_ccmp_hdr() 208 *pos++ = key->tx_pn[5]; in lib80211_ccmp_hdr() 209 *pos++ = key->tx_pn[4]; in lib80211_ccmp_hdr() 211 *pos++ = (key->key_idx << 6) | (1 << 5) /* Ext IV included */ ; in lib80211_ccmp_hdr() 212 *pos++ = key->tx_pn[3]; in lib80211_ccmp_hdr() 213 *pos++ = key->tx_pn[2]; in lib80211_ccmp_hdr() [all …]
|
D | lib80211_crypt_wep.c | 35 u8 key[WEP_KEY_LEN + 1]; member 96 u8 *key, int keylen, void *priv) in lib80211_wep_build_iv() argument 145 u8 key[WEP_KEY_LEN + 3]; in lib80211_wep_encrypt() local 156 skb_copy_from_linear_data_offset(skb, hdr_len, key, 3); in lib80211_wep_encrypt() 159 memcpy(key + 3, wep->key, wep->key_len); in lib80211_wep_encrypt() 173 crypto_blkcipher_setkey(wep->tx_tfm, key, klen); in lib80211_wep_encrypt() 190 u8 key[WEP_KEY_LEN + 3]; in lib80211_wep_decrypt() local 198 key[0] = *pos++; in lib80211_wep_decrypt() 199 key[1] = *pos++; in lib80211_wep_decrypt() 200 key[2] = *pos++; in lib80211_wep_decrypt() [all …]
|
/net/sctp/ |
D | auth.c | 67 void sctp_auth_key_put(struct sctp_auth_bytes *key) in sctp_auth_key_put() argument 69 if (!key) in sctp_auth_key_put() 72 if (atomic_dec_and_test(&key->refcnt)) { in sctp_auth_key_put() 73 kfree(key); in sctp_auth_key_put() 81 struct sctp_auth_bytes *key; in sctp_auth_create_key() local 88 key = kmalloc(sizeof(struct sctp_auth_bytes) + key_len, gfp); in sctp_auth_create_key() 89 if (!key) in sctp_auth_create_key() 92 key->len = key_len; in sctp_auth_create_key() 93 atomic_set(&key->refcnt, 1); in sctp_auth_create_key() 96 return key; in sctp_auth_create_key() [all …]
|
/net/ipv4/netfilter/ |
D | nf_nat_proto_gre.c | 46 static u_int16_t key; in gre_unique_tuple() local 56 keyptr = &tuple->src.u.gre.key; in gre_unique_tuple() 58 keyptr = &tuple->dst.u.gre.key; in gre_unique_tuple() 65 min = ntohs(range->min.gre.key); in gre_unique_tuple() 66 range_size = ntohs(range->max.gre.key) - min + 1; in gre_unique_tuple() 71 for (i = 0; i < range_size; i++, key++) { in gre_unique_tuple() 72 *keyptr = htons(min + key % range_size); in gre_unique_tuple() 110 pr_debug("call_id -> 0x%04x\n", ntohs(tuple->dst.u.gre.key)); in gre_manip_pkt() 111 pgreh->call_id = tuple->dst.u.gre.key; in gre_manip_pkt()
|
D | nf_nat_pptp.c | 60 t.src.u.gre.key = ct_pptp_info->pac_call_id; in pptp_nat_expected() 62 t.dst.u.gre.key = ct_pptp_info->pns_call_id; in pptp_nat_expected() 69 t.src.u.gre.key = nat_pptp_info->pns_call_id; in pptp_nat_expected() 71 t.dst.u.gre.key = nat_pptp_info->pac_call_id; in pptp_nat_expected() 201 expect_orig->saved_proto.gre.key = ct_pptp_info->pns_call_id; in pptp_exp_gre() 202 expect_orig->tuple.src.u.gre.key = nat_pptp_info->pns_call_id; in pptp_exp_gre() 203 expect_orig->tuple.dst.u.gre.key = ct_pptp_info->pac_call_id; in pptp_exp_gre() 207 expect_reply->saved_proto.gre.key = nat_pptp_info->pns_call_id; in pptp_exp_gre() 208 expect_reply->tuple.src.u.gre.key = nat_pptp_info->pac_call_id; in pptp_exp_gre() 209 expect_reply->tuple.dst.u.gre.key = ct_pptp_info->pns_call_id; in pptp_exp_gre()
|
/net/ipv4/ |
D | fib_trie.c | 99 t_key key; member 104 t_key key; member 118 t_key key; member 408 static struct tnode *tnode_new(t_key key, int pos, int bits) in tnode_new() argument 417 tn->key = key; in tnode_new() 688 tn = tnode_new(oldtnode->key, oldtnode->pos, oldtnode->bits + 1); in inflate() 711 left = tnode_new(inode->key&(~m), inode->pos + 1, in inflate() 716 right = tnode_new(inode->key|m, inode->pos + 1, in inflate() 743 if (tkey_extract_bits(node->key, in inflate() 832 tn = tnode_new(oldtnode->key, oldtnode->pos, oldtnode->bits - 1); in halve() [all …]
|
D | tcp_minisocks.c | 317 struct tcp_md5sig_key *key; in tcp_time_wait() local 320 key = tp->af_specific->md5_lookup(sk, sk); in tcp_time_wait() 321 if (key != NULL) { in tcp_time_wait() 322 memcpy(&tcptw->tw_md5_key, key->key, key->keylen); in tcp_time_wait() 323 tcptw->tw_md5_keylen = key->keylen; in tcp_time_wait() 663 struct tcp_md5sig_key *key; in tcp_check_req() local 665 key = tp->af_specific->md5_lookup(sk, child); in tcp_check_req() 666 if (key != NULL) { in tcp_check_req() 672 char *newkey = kmemdup(key->key, key->keylen, in tcp_check_req() 678 key->keylen); in tcp_check_req()
|
/net/netfilter/ |
D | nf_conntrack_proto_gre.c | 81 __be16 key = 0; in gre_keymap_lookup() local 86 key = km->tuple.src.u.gre.key; in gre_keymap_lookup() 92 pr_debug("lookup src key 0x%x for ", key); in gre_keymap_lookup() 95 return key; in gre_keymap_lookup() 170 tuple->dst.u.gre.key = orig->src.u.gre.key; in gre_invert_tuple() 171 tuple->src.u.gre.key = orig->dst.u.gre.key; in gre_invert_tuple() 205 tuple->dst.u.gre.key = pgrehdr->call_id; in gre_pkt_to_tuple() 207 tuple->src.u.gre.key = srckey; in gre_pkt_to_tuple() 217 ntohs(tuple->src.u.gre.key), in gre_print_tuple() 218 ntohs(tuple->dst.u.gre.key)); in gre_print_tuple()
|
/net/core/ |
D | flow.c | 33 struct flowi key; member 130 static u32 flow_hash_code(struct flowi *key, int cpu) in flow_hash_code() argument 132 u32 *k = (u32 *) key; in flow_hash_code() 134 return (jhash2(k, (sizeof(*key) / sizeof(u32)), flow_hash_rnd(cpu)) & in flow_hash_code() 168 void *flow_cache_lookup(struct net *net, struct flowi *key, u16 family, u8 dir, in flow_cache_lookup() argument 186 hash = flow_hash_code(key, cpu); in flow_cache_lookup() 192 flow_key_compare(key, &fle->key) == 0) { in flow_cache_lookup() 216 memcpy(&fle->key, key, sizeof(*key)); in flow_cache_lookup() 228 err = resolver(net, key, family, dir, &obj, &obj_ref); in flow_cache_lookup()
|
/net/sched/ |
D | em_u32.c | 24 struct tc_u32_key *key = (struct tc_u32_key *) em->data; in em_u32_match() local 30 ptr += (info->nexthdr & key->offmask); in em_u32_match() 33 ptr += key->off; in em_u32_match() 38 return !(((*(__be32*) ptr) ^ key->val) & key->mask); in em_u32_match()
|
/net/decnet/ |
D | dn_table.c | 60 #define dz_key_0(key) ((key).datum = 0) argument 61 #define dz_prefix(key,dz) ((key).datum) argument 75 #define DN_FIB_SCAN_KEY(f, fp, key) \ argument 76 for( ; ((f) = *(fp)) != NULL && dn_key_eq((f)->fn_key, (key)); (fp) = &(f)->fn_next) 86 static inline dn_fib_idx_t dn_hash(dn_fib_key_t key, struct dn_zone *dz) in dn_hash() argument 88 u16 h = le16_to_cpu(key.datum)>>(16 - dz->dz_order); in dn_hash() 102 static inline struct dn_fib_node **dn_chain_p(dn_fib_key_t key, struct dn_zone *dz) in dn_chain_p() argument 104 return &dz->dz_hash[dn_hash(key, dz).datum]; in dn_chain_p() 107 static inline struct dn_fib_node *dz_chain(dn_fib_key_t key, struct dn_zone *dz) in dz_chain() argument 109 return dz->dz_hash[dn_hash(key, dz).datum]; in dz_chain() [all …]
|
/net/tipc/ |
D | name_distr.c | 70 __be32 key; member 91 i->key = htonl(p->key); in publ_to_item() 223 publ->key += 1222345; in node_is_down() 225 publ->node, publ->ref, publ->key); in node_is_down() 231 publ->type, publ->lower, publ->node, publ->ref, publ->key); in node_is_down() 262 ntohl(item->key)); in tipc_named_recv() 277 ntohl(item->key)); in tipc_named_recv() 287 ntohl(item->ref), ntohl(item->key)); in tipc_named_recv()
|
D | name_table.h | 78 u32 key; member 97 u32 scope, u32 port_ref, u32 key); 98 int tipc_nametbl_withdraw(u32 type, u32 lower, u32 ref, u32 key); 100 u32 scope, u32 node, u32 ref, u32 key); 102 u32 node, u32 ref, u32 key);
|
D | name_table.c | 128 u32 key) in publ_create() argument 142 publ->key = key; in publ_create() 250 u32 scope, u32 node, u32 port, u32 key) in tipc_nameseq_insert_publ() argument 324 publ = publ_create(type, lower, upper, scope, node, port, key); in tipc_nameseq_insert_publ() 388 u32 node, u32 ref, u32 key) in tipc_nameseq_remove_publ() argument 402 nseq, sseq, nseq->type, inst, key); in tipc_nameseq_remove_publ() 408 while ((publ->key != key) || (publ->ref != ref) || in tipc_nameseq_remove_publ() 444 publ->ref, publ->key); in tipc_nameseq_remove_publ() 475 publ->ref, publ->key); in tipc_nameseq_remove_publ() 572 u32 scope, u32 node, u32 port, u32 key) in tipc_nametbl_insert_publ() argument [all …]
|
/net/sunrpc/auth_gss/ |
D | gss_krb5_seqnum.c | 44 krb5_make_seq_num(struct crypto_blkcipher *key, in krb5_make_seq_num() argument 61 return krb5_encrypt(key, cksum, plain, buf, 8); in krb5_make_seq_num() 65 krb5_get_seq_num(struct crypto_blkcipher *key, in krb5_get_seq_num() argument 75 if ((code = krb5_decrypt(key, cksum, buf, plain, 8))) in krb5_get_seq_num()
|