Searched refs:cmsgh (Results 1 – 2 of 2) sorted by relevance
/external/mesa3d/src/gallium/winsys/virgl/vtest/ |
D | virgl_vtest_socket.c | 77 struct cmsghdr *cmsgh; in virgl_vtest_receive_fd() local 99 cmsgh = CMSG_FIRSTHDR(&msgh); in virgl_vtest_receive_fd() 100 if (!cmsgh) { in virgl_vtest_receive_fd() 105 if (cmsgh->cmsg_level != SOL_SOCKET) { in virgl_vtest_receive_fd() 106 fprintf(stderr, "invalid cmsg_level %d\n", cmsgh->cmsg_level); in virgl_vtest_receive_fd() 110 if (cmsgh->cmsg_type != SCM_RIGHTS) { in virgl_vtest_receive_fd() 111 fprintf(stderr, "invalid cmsg_type %d\n", cmsgh->cmsg_type); in virgl_vtest_receive_fd() 115 return *((int *) CMSG_DATA(cmsgh)); in virgl_vtest_receive_fd()
|
/external/python/cpython3/Modules/ |
D | socketmodule.c | 2610 cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space) in cmsg_min_space() argument 2614 sizeof(cmsgh->cmsg_len)); in cmsg_min_space() 2617 if (cmsgh == NULL || msg->msg_control == NULL) in cmsg_min_space() 2642 cmsg_offset = (char *)cmsgh - (char *)msg->msg_control; in cmsg_min_space() 2652 get_cmsg_data_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *space) in get_cmsg_data_space() argument 2657 if ((data_ptr = (char *)CMSG_DATA(cmsgh)) == NULL) in get_cmsg_data_space() 2674 get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len) in get_cmsg_data_len() argument 2678 if (!cmsg_min_space(msg, cmsgh, CMSG_LEN(0)) || in get_cmsg_data_len() 2679 cmsgh->cmsg_len < CMSG_LEN(0)) in get_cmsg_data_len() 2681 cmsg_data_len = cmsgh->cmsg_len - CMSG_LEN(0); in get_cmsg_data_len() [all …]
|