Lines Matching full:msg
93 /* prepare msg header */ in qcrypto_afalg_cipher_ctx_new()
94 afalg->msg = g_new0(struct msghdr, 1); in qcrypto_afalg_cipher_ctx_new()
95 afalg->msg->msg_controllen += CMSG_SPACE(ALG_OPTYPE_LEN); in qcrypto_afalg_cipher_ctx_new()
98 afalg->msg->msg_controllen += CMSG_SPACE(ALG_MSGIV_LEN(expect_niv)); in qcrypto_afalg_cipher_ctx_new()
100 afalg->msg->msg_control = g_new0(uint8_t, afalg->msg->msg_controllen); in qcrypto_afalg_cipher_ctx_new()
103 afalg->cmsg = CMSG_FIRSTHDR(afalg->msg); in qcrypto_afalg_cipher_ctx_new()
107 afalg->cmsg = CMSG_NXTHDR(afalg->msg, afalg->cmsg); in qcrypto_afalg_cipher_ctx_new()
111 afalg->cmsg = CMSG_FIRSTHDR(afalg->msg); in qcrypto_afalg_cipher_ctx_new()
134 afalg->cmsg = CMSG_NXTHDR(afalg->msg, afalg->cmsg); in qcrypto_afalg_cipher_setiv()
136 /* build setiv msg */ in qcrypto_afalg_cipher_setiv()
156 origin_controllen = afalg->msg->msg_controllen; in qcrypto_afalg_cipher_op()
158 afalg->cmsg = CMSG_FIRSTHDR(afalg->msg); in qcrypto_afalg_cipher_op()
160 /* build encrypt msg */ in qcrypto_afalg_cipher_op()
162 afalg->msg->msg_iov = &iov; in qcrypto_afalg_cipher_op()
163 afalg->msg->msg_iovlen = 1; in qcrypto_afalg_cipher_op()
176 ret = sendmsg(afalg->opfd, afalg->msg, 0); in qcrypto_afalg_cipher_op()
191 afalg->msg->msg_controllen = 0; in qcrypto_afalg_cipher_op()
195 afalg->msg->msg_controllen = origin_controllen; in qcrypto_afalg_cipher_op()