Lines Matching refs:kad
74 plen = sizeof(*token) + sizeof(*token->kad) + tktlen; in rxrpc_preparse_xdr_rxkad()
82 token->kad = kzalloc(plen, GFP_KERNEL); in rxrpc_preparse_xdr_rxkad()
83 if (!token->kad) { in rxrpc_preparse_xdr_rxkad()
89 token->kad->ticket_len = tktlen; in rxrpc_preparse_xdr_rxkad()
90 token->kad->vice_id = ntohl(xdr[0]); in rxrpc_preparse_xdr_rxkad()
91 token->kad->kvno = ntohl(xdr[1]); in rxrpc_preparse_xdr_rxkad()
92 token->kad->start = ntohl(xdr[4]); in rxrpc_preparse_xdr_rxkad()
93 token->kad->expiry = ntohl(xdr[5]); in rxrpc_preparse_xdr_rxkad()
94 token->kad->primary_flag = ntohl(xdr[6]); in rxrpc_preparse_xdr_rxkad()
95 memcpy(&token->kad->session_key, &xdr[2], 8); in rxrpc_preparse_xdr_rxkad()
96 memcpy(&token->kad->ticket, &xdr[8], tktlen); in rxrpc_preparse_xdr_rxkad()
99 _debug("TLEN: %u", token->kad->ticket_len); in rxrpc_preparse_xdr_rxkad()
100 _debug("EXPY: %x", token->kad->expiry); in rxrpc_preparse_xdr_rxkad()
101 _debug("KVNO: %u", token->kad->kvno); in rxrpc_preparse_xdr_rxkad()
102 _debug("PRIM: %u", token->kad->primary_flag); in rxrpc_preparse_xdr_rxkad()
104 token->kad->session_key[0], token->kad->session_key[1], in rxrpc_preparse_xdr_rxkad()
105 token->kad->session_key[2], token->kad->session_key[3], in rxrpc_preparse_xdr_rxkad()
106 token->kad->session_key[4], token->kad->session_key[5], in rxrpc_preparse_xdr_rxkad()
107 token->kad->session_key[6], token->kad->session_key[7]); in rxrpc_preparse_xdr_rxkad()
108 if (token->kad->ticket_len >= 8) in rxrpc_preparse_xdr_rxkad()
110 token->kad->ticket[0], token->kad->ticket[1], in rxrpc_preparse_xdr_rxkad()
111 token->kad->ticket[2], token->kad->ticket[3], in rxrpc_preparse_xdr_rxkad()
112 token->kad->ticket[4], token->kad->ticket[5], in rxrpc_preparse_xdr_rxkad()
113 token->kad->ticket[6], token->kad->ticket[7]); in rxrpc_preparse_xdr_rxkad()
124 expiry = rxrpc_u32_to_time64(token->kad->expiry); in rxrpc_preparse_xdr_rxkad()
342 plen = sizeof(*token->kad) + v1->ticket_length; in rxrpc_preparse()
349 token->kad = kzalloc(plen, GFP_KERNEL); in rxrpc_preparse()
350 if (!token->kad) in rxrpc_preparse()
354 token->kad->ticket_len = v1->ticket_length; in rxrpc_preparse()
355 token->kad->expiry = v1->expiry; in rxrpc_preparse()
356 token->kad->kvno = v1->kvno; in rxrpc_preparse()
357 memcpy(&token->kad->session_key, &v1->session_key, 8); in rxrpc_preparse()
358 memcpy(&token->kad->ticket, v1->ticket, v1->ticket_length); in rxrpc_preparse()
368 expiry = rxrpc_u32_to_time64(token->kad->expiry); in rxrpc_preparse()
391 kfree(token->kad); in rxrpc_free_token_list()
595 toksize += RND(token->kad->ticket_len); in rxrpc_read()
665 ENCODE(token->kad->vice_id); in rxrpc_read()
666 ENCODE(token->kad->kvno); in rxrpc_read()
667 ENCODE_BYTES(8, token->kad->session_key); in rxrpc_read()
668 ENCODE(token->kad->start); in rxrpc_read()
669 ENCODE(token->kad->expiry); in rxrpc_read()
670 ENCODE(token->kad->primary_flag); in rxrpc_read()
674 ENCODE_DATA(token->kad->ticket_len, token->kad->ticket); in rxrpc_read()