Home
last modified time | relevance | path

Searched refs:cmsg (Results 1 – 2 of 2) sorted by relevance

/samples/seccomp/
Duser-trap.c35 struct cmsghdr *cmsg; in send_fd() local
46 cmsg = CMSG_FIRSTHDR(&msg); in send_fd()
47 cmsg->cmsg_level = SOL_SOCKET; in send_fd()
48 cmsg->cmsg_type = SCM_RIGHTS; in send_fd()
49 cmsg->cmsg_len = CMSG_LEN(sizeof(int)); in send_fd()
50 *((int *)CMSG_DATA(cmsg)) = fd; in send_fd()
51 msg.msg_controllen = cmsg->cmsg_len; in send_fd()
64 struct cmsghdr *cmsg; in recv_fd() local
81 cmsg = CMSG_FIRSTHDR(&msg); in recv_fd()
83 return *((int *)CMSG_DATA(cmsg)); in recv_fd()
/samples/crypto/
Dfips140_lab_util.c444 struct cmsghdr *cmsg; in af_alg_process_msg() local
468 cmsg = CMSG_FIRSTHDR(&hdr); in af_alg_process_msg()
470 cmsg->cmsg_level = SOL_ALG; in af_alg_process_msg()
471 cmsg->cmsg_type = ALG_SET_OP; in af_alg_process_msg()
472 cmsg->cmsg_len = CMSG_LEN(sizeof(uint32_t)); in af_alg_process_msg()
473 *(uint32_t *)CMSG_DATA(cmsg) = t->direction == DECRYPT ? in af_alg_process_msg()
475 cmsg = CMSG_NXTHDR(&hdr, cmsg); in af_alg_process_msg()
480 cmsg->cmsg_level = SOL_ALG; in af_alg_process_msg()
481 cmsg->cmsg_type = ALG_SET_IV; in af_alg_process_msg()
482 cmsg->cmsg_len = CMSG_LEN(sizeof(*alg_iv) + t->iv_size); in af_alg_process_msg()
[all …]