Lines Matching refs:cmsg
405 static ossl_inline void afalg_set_op_sk(struct cmsghdr *cmsg, in afalg_set_op_sk() argument
408 cmsg->cmsg_level = SOL_ALG; in afalg_set_op_sk()
409 cmsg->cmsg_type = ALG_SET_OP; in afalg_set_op_sk()
410 cmsg->cmsg_len = CMSG_LEN(ALG_OP_LEN); in afalg_set_op_sk()
411 memcpy(CMSG_DATA(cmsg), &op, ALG_OP_LEN); in afalg_set_op_sk()
414 static void afalg_set_iv_sk(struct cmsghdr *cmsg, const unsigned char *iv, in afalg_set_iv_sk() argument
419 cmsg->cmsg_level = SOL_ALG; in afalg_set_iv_sk()
420 cmsg->cmsg_type = ALG_SET_IV; in afalg_set_iv_sk()
421 cmsg->cmsg_len = CMSG_LEN(ALG_IV_LEN(len)); in afalg_set_iv_sk()
422 aiv = (struct af_alg_iv *)CMSG_DATA(cmsg); in afalg_set_iv_sk()
490 struct cmsghdr *cmsg; in afalg_start_cipher_sk() local
507 cmsg = CMSG_FIRSTHDR(&msg); in afalg_start_cipher_sk()
508 afalg_set_op_sk(cmsg, enc); in afalg_start_cipher_sk()
509 cmsg = CMSG_NXTHDR(&msg, cmsg); in afalg_start_cipher_sk()
510 afalg_set_iv_sk(cmsg, iv, ALG_AES_IV_LEN); in afalg_start_cipher_sk()