| /freebsd-13.1/tools/regression/sockets/unix_cmsg/ |
| H A D | uc_common.c | 270 const struct cmsghdr *cmsghdr; in uc_message_send() local 279 if (cmsghdr != NULL) in uc_message_send() 317 const struct cmsghdr *cmsghdr; in uc_message_recv() local 341 if (cmsghdr != NULL) in uc_message_recv() 425 uc_check_cmsghdr(const struct cmsghdr *cmsghdr, int type, size_t size) in uc_check_cmsghdr() argument 427 if (cmsghdr == NULL) { in uc_check_cmsghdr() 433 cmsghdr->cmsg_level); in uc_check_cmsghdr() 484 struct cmsghdr *cmsghdr; in uc_msghdr_init_client() local 496 cmsghdr->cmsg_type = type; in uc_msghdr_init_client() 623 uc_check_scm_creds_cmsgcred(struct cmsghdr *cmsghdr) in uc_check_scm_creds_cmsgcred() argument [all …]
|
| H A D | uc_common.h | 61 int uc_check_cmsghdr(const struct cmsghdr *cmsghdr, int type, size_t size); 85 int uc_check_scm_creds_cmsgcred(struct cmsghdr *cmsghdr); 86 int uc_check_scm_creds_sockcred(struct cmsghdr *cmsghdr);
|
| H A D | t_cmsg_len.c | 51 struct cmsghdr *cmsghdr; in t_cmsg_len_client() local 70 cmsghdr = CMSG_FIRSTHDR(&msghdr); in t_cmsg_len_client() 78 cmsghdr->cmsg_len = socklen; in t_cmsg_len_client() 83 (u_int)cmsghdr->cmsg_len); in t_cmsg_len_client() 90 (u_int)cmsghdr->cmsg_len, (u_int)CMSG_LEN(0)); in t_cmsg_len_client()
|
| H A D | t_cmsgcred_sockcred.c | 48 struct cmsghdr *cmsghdr; in t_cmsgcred_sockcred_server() local 95 if (uc_check_msghdr(&msghdr, sizeof(*cmsghdr)) < 0) in t_cmsgcred_sockcred_server() 98 cmsghdr = CMSG_FIRSTHDR(&msghdr); in t_cmsgcred_sockcred_server() 100 if (uc_check_scm_creds_sockcred(cmsghdr) < 0) in t_cmsgcred_sockcred_server() 103 if (uc_check_scm_creds_cmsgcred(cmsghdr) < 0) in t_cmsgcred_sockcred_server()
|
| H A D | t_cmsgcred.c | 82 struct cmsghdr *cmsghdr; in t_cmsgcred_server() local 118 if (uc_check_msghdr(&msghdr, sizeof(*cmsghdr)) < 0) in t_cmsgcred_server() 121 cmsghdr = CMSG_FIRSTHDR(&msghdr); in t_cmsgcred_server() 122 if (uc_check_scm_creds_cmsgcred(cmsghdr) < 0) in t_cmsgcred_server()
|
| H A D | t_xxxtime.c.in | 46 check_scm_%%TTYPE%%(struct cmsghdr *cmsghdr) 50 if (uc_check_cmsghdr(cmsghdr, %%SCM_TTYPE%%, sizeof(struct %%DTYPE%%)) < 0) 53 bt = (struct %%DTYPE%% *)CMSG_DATA(cmsghdr); 104 struct cmsghdr *cmsghdr; variable 140 if (uc_check_msghdr(&msghdr, sizeof(*cmsghdr)) < 0) 143 cmsghdr = CMSG_FIRSTHDR(&msghdr); 144 if (check_scm_%%TTYPE%%(cmsghdr) < 0)
|
| H A D | t_sockcred.c | 76 struct cmsghdr *cmsghdr; in t_sockcred_server() local 136 if (uc_check_msghdr(&msghdr, sizeof(*cmsghdr)) < 0) in t_sockcred_server() 139 cmsghdr = CMSG_FIRSTHDR(&msghdr); in t_sockcred_server() 140 if (uc_check_scm_creds_sockcred(cmsghdr) < 0) in t_sockcred_server()
|
| /freebsd-13.1/sys/netinet6/ |
| H A D | in6.h | 668 struct cmsghdr; 712 struct cmsghdr; 715 extern int inet6_option_init(void *, struct cmsghdr **, int); 716 extern int inet6_option_append(struct cmsghdr *, const uint8_t *, 719 extern int inet6_option_next(const struct cmsghdr *, uint8_t **); 723 extern struct cmsghdr *inet6_rthdr_init(void *, int); 726 extern int inet6_rthdr_lasthop(struct cmsghdr *, unsigned int); 728 extern int inet6_rthdr_reverse(const struct cmsghdr *, struct cmsghdr *); 730 extern int inet6_rthdr_segments(const struct cmsghdr *); 731 extern struct in6_addr *inet6_rthdr_getaddr(struct cmsghdr *, int); [all …]
|
| /freebsd-13.1/lib/libc/net/ |
| H A D | rthdr.c | 69 struct cmsghdr * 72 struct cmsghdr *ch = (struct cmsghdr *)bp; in inet6_rthdr_init() 99 inet6_rthdr_add(struct cmsghdr *cmsg, const struct in6_addr *addr, u_int flags) in inet6_rthdr_add() 141 inet6_rthdr_lasthop(struct cmsghdr *cmsg, unsigned int flags) in inet6_rthdr_lasthop() 179 inet6_rthdr_reverse(const struct cmsghdr *in, struct cmsghdr *out) 187 inet6_rthdr_segments(const struct cmsghdr *cmsg) in inet6_rthdr_segments() 210 inet6_rthdr_getaddr(struct cmsghdr *cmsg, int idx) in inet6_rthdr_getaddr() 240 inet6_rthdr_getflags(const struct cmsghdr *cmsg, int idx) in inet6_rthdr_getflags()
|
| H A D | ip6opt.c | 83 inet6_option_init(void *bp, struct cmsghdr **cmsgp, int type) in inet6_option_init() 85 struct cmsghdr *ch = (struct cmsghdr *)bp; in inet6_option_init() 110 inet6_option_append(struct cmsghdr *cmsg, const u_int8_t *typep, int multx, in inet6_option_append() 179 inet6_option_alloc(struct cmsghdr *cmsg, int datalen, int multx, int plusy) in inet6_option_alloc() 241 inet6_option_next(const struct cmsghdr *cmsg, u_int8_t **tptrp) in inet6_option_next() 297 inet6_option_find(const struct cmsghdr *cmsg, u_int8_t **tptrp, int type) in inet6_option_find()
|
| H A D | sctp_sys_calls.c | 537 struct cmsghdr *cmsg; in sctp_sendmsg() 599 cmsg = (struct cmsghdr *)cmsgbuf; in sctp_sendmsg() 650 struct cmsghdr *cmsg; in sctp_send() 666 cmsg = (struct cmsghdr *)cmsgbuf; in sctp_send() 822 struct cmsghdr *cmsg; in sctp_recvmsg() 889 struct cmsghdr *cmsg; in sctp_recvv() 982 struct cmsghdr *cmsg; in sctp_sendv() 1009 cmsg = (struct cmsghdr *)cmsgbuf; in sctp_sendv() 1043 cmsg = (struct cmsghdr *)((caddr_t)cmsg + CMSG_SPACE(sizeof(struct sctp_prinfo))); in sctp_sendv() 1119 cmsg = (struct cmsghdr *)((caddr_t)cmsg + CMSG_SPACE(sizeof(struct in_addr))); in sctp_sendv() [all …]
|
| /freebsd-13.1/sys/sys/ |
| H A D | socket.h | 482 struct cmsghdr { struct 551 _ALIGN(sizeof(struct cmsghdr))) 557 _ALIGN(sizeof(struct cmsghdr)) > \ 559 (struct cmsghdr *)0 : \ 560 (struct cmsghdr *)(void *)((char *)(cmsg) + \ 561 _ALIGN(((struct cmsghdr *)(cmsg))->cmsg_len))) 568 ((mhdr)->msg_controllen >= sizeof(struct cmsghdr) ? \ 569 (struct cmsghdr *)(mhdr)->msg_control : \ 570 (struct cmsghdr *)0) 574 #define CMSG_SPACE(l) (_ALIGN(sizeof(struct cmsghdr)) + _ALIGN(l)) [all …]
|
| /freebsd-13.1/tools/regression/netinet6/inet6_rth/ |
| H A D | inet6_rth-segments.c | 44 static void init_hdrs(struct msghdr *, struct cmsghdr *, char *, size_t); 227 struct cmsghdr cmh; in test_cmsg_nexthdr() 228 struct cmsghdr *cmhp, *cmhnextp; in test_cmsg_nexthdr() 285 struct cmsghdr cmh; in test_cmsg_firsthdr() 286 struct cmsghdr *cmhp; in test_cmsg_firsthdr() 328 init_hdrs(struct msghdr *mhp, struct cmsghdr *cmhp, char *bufp, size_t bufsize) in init_hdrs() 333 memset((void *)cmhp, 0, sizeof(struct cmsghdr)); in init_hdrs()
|
| /freebsd-13.1/contrib/pf/pflogd/ |
| H A D | privsep_fdpass.c | 54 struct cmsghdr hdr; in send_fd() 57 struct cmsghdr *cmsg; in send_fd() 93 struct cmsghdr hdr; in receive_fd() 96 struct cmsghdr *cmsg; in receive_fd()
|
| /freebsd-13.1/tests/sys/kern/ |
| H A D | unix_passfd_test.c | 124 struct cmsghdr *cm; in putfds() 127 cm = (struct cmsghdr *)buf; in putfds() 199 struct cmsghdr *cmsghdr; in recvfd_payload() local 224 cmsghdr = CMSG_FIRSTHDR(&msghdr); in recvfd_payload() 225 ATF_REQUIRE_MSG(cmsghdr != NULL, in recvfd_payload() 229 for (; cmsghdr != NULL; cmsghdr = CMSG_NXTHDR(&msghdr, cmsghdr)) { in recvfd_payload() 230 if (cmsghdr->cmsg_level == SOL_SOCKET && in recvfd_payload() 231 cmsghdr->cmsg_type == SCM_RIGHTS && in recvfd_payload() 232 cmsghdr->cmsg_len == CMSG_LEN(sizeof(int))) { in recvfd_payload() 235 } else if (cmsghdr->cmsg_level == SOL_SOCKET && in recvfd_payload() [all …]
|
| /freebsd-13.1/crypto/openssh/ |
| H A D | monitor_fdpass.c | 58 struct cmsghdr hdr; in mm_send_fd() 61 struct cmsghdr *cmsg; in mm_send_fd() 118 struct cmsghdr hdr; in mm_receive_fd() 121 struct cmsghdr *cmsg; in mm_receive_fd()
|
| H A D | defines.h | 570 #define CMSG_LEN(len) (__CMSG_ALIGN(sizeof(struct cmsghdr)) + (len)) 575 #define CMSG_SPACE(len) (__CMSG_ALIGN(sizeof(struct cmsghdr)) + __CMSG_ALIGN(len)) 580 #define CMSG_DATA(cmsg) ((u_char *)(cmsg) + __CMSG_ALIGN(sizeof(struct cmsghdr))) 589 ((mhdr)->msg_controllen >= sizeof(struct cmsghdr) ? \ 590 (struct cmsghdr *)(mhdr)->msg_control : \ 591 (struct cmsghdr *)NULL)
|
| /freebsd-13.1/crypto/openssl/include/internal/ |
| H A D | ktls.h | 93 struct cmsghdr *cmsg; in ktls_send_ctrl_message() 135 struct cmsghdr *cmsg; in ktls_read_record() 306 struct cmsghdr *cmsg; in ktls_send_ctrl_message() 308 struct cmsghdr hdr; in ktls_send_ctrl_message() 359 struct cmsghdr *cmsg; in ktls_read_record() 361 struct cmsghdr hdr; in ktls_read_record()
|
| /freebsd-13.1/contrib/netbsd-tests/net/fdpass/ |
| H A D | fdpass.c | 51 struct cmsghdr hdr; in send_fd() 54 struct cmsghdr *cmsg; in send_fd() 103 struct cmsghdr hdr; in recv_fd() 106 struct cmsghdr *cmsg; in recv_fd()
|
| /freebsd-13.1/lib/libnv/ |
| H A D | msgio.c | 76 msghdr_add_fd(struct cmsghdr *cmsg, int fd) in msghdr_add_fd() 153 struct cmsghdr *cmsg; in cred_send() 193 struct cmsghdr *cmsg; in cred_recv() 229 struct cmsghdr *cmsg; in fd_package_send() 278 struct cmsghdr *cmsg; in fd_package_recv()
|
| /freebsd-13.1/sys/compat/cloudabi/ |
| H A D | cloudabi_sock.c | 109 struct cmsghdr *chdr; in cloudabi_sock_recv() 161 struct cmsghdr *chdr; in cloudabi_sock_send() 167 chdr = mtod(control, struct cmsghdr *); in cloudabi_sock_send()
|
| /freebsd-13.1/contrib/mandoc/ |
| H A D | catman.c | 75 struct cmsghdr cmsghdr; in sock_fd_write() member 78 struct cmsghdr *cmsg; in sock_fd_write()
|
| /freebsd-13.1/tools/regression/capsicum/syscalls/ |
| H A D | misc.c | 60 struct cmsghdr *cmsg; in descriptor_send() 90 struct cmsghdr *cmsg; in descriptor_recv()
|
| /freebsd-13.1/contrib/llvm-project/compiler-rt/lib/sanitizer_common/ |
| H A D | sanitizer_platform_limits_solaris.cpp | 241 CHECK_TYPE_SIZE(cmsghdr); 242 CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_len); 243 CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_level); 244 CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_type);
|
| /freebsd-13.1/usr.bin/truss/ |
| H A D | syscalls.c | 1440 print_gen_cmsg(FILE *fp, struct cmsghdr *cmsghdr) in print_gen_cmsg() argument 1445 for (q = CMSG_DATA(cmsghdr); in print_gen_cmsg() 1446 q < (u_char *)cmsghdr + cmsghdr->cmsg_len; q++) { in print_gen_cmsg() 1559 print_sctp_cmsg(FILE *fp, bool receive, struct cmsghdr *cmsghdr) in print_sctp_cmsg() argument 1564 len = cmsghdr->cmsg_len; in print_sctp_cmsg() 1565 data = CMSG_DATA(cmsghdr); in print_sctp_cmsg() 1639 struct cmsghdr *cmsghdr; in print_cmsgs() local 1661 cmsghdr != NULL; in print_cmsgs() 1662 cmsghdr = CMSG_NXTHDR(msghdr, cmsghdr)) { in print_cmsgs() 1664 type = cmsghdr->cmsg_type; in print_cmsgs() [all …]
|