| /freebsd-13-stable/tools/regression/sockets/unix_cmsg/ |
| HD | uc_common.c | 268 const struct cmsghdr *cmsghdr; in uc_message_send() local 276 cmsghdr = CMSG_FIRSTHDR(msghdr); in uc_message_send() 277 if (cmsghdr != NULL) in uc_message_send() 279 (u_int)cmsghdr->cmsg_len); in uc_message_send() 315 const struct cmsghdr *cmsghdr; in uc_message_recv() local 338 cmsghdr = CMSG_FIRSTHDR(msghdr); in uc_message_recv() 339 if (cmsghdr != NULL) in uc_message_recv() 341 (u_int)cmsghdr->cmsg_len); in uc_message_recv() 423 uc_check_cmsghdr(const struct cmsghdr *cmsghdr, int type, size_t size) in uc_check_cmsghdr() argument 425 if (cmsghdr == NULL) { in uc_check_cmsghdr() [all …]
|
| HD | uc_common.h | 59 int uc_check_cmsghdr(const struct cmsghdr *cmsghdr, int type, size_t size); 83 int uc_check_scm_creds_cmsgcred(struct cmsghdr *cmsghdr); 84 int uc_check_scm_creds_sockcred(struct cmsghdr *cmsghdr);
|
| HD | t_cmsgcred_sockcred.c | 46 struct cmsghdr *cmsghdr; in t_cmsgcred_sockcred_server() local 93 if (uc_check_msghdr(&msghdr, sizeof(*cmsghdr)) < 0) in t_cmsgcred_sockcred_server() 96 cmsghdr = CMSG_FIRSTHDR(&msghdr); in t_cmsgcred_sockcred_server() 98 if (uc_check_scm_creds_sockcred(cmsghdr) < 0) in t_cmsgcred_sockcred_server() 101 if (uc_check_scm_creds_cmsgcred(cmsghdr) < 0) in t_cmsgcred_sockcred_server()
|
| HD | t_cmsg_len.c | 49 struct cmsghdr *cmsghdr; in t_cmsg_len_client() local 68 cmsghdr = CMSG_FIRSTHDR(&msghdr); in t_cmsg_len_client() 76 cmsghdr->cmsg_len = socklen; in t_cmsg_len_client() 81 (u_int)cmsghdr->cmsg_len); in t_cmsg_len_client() 88 (u_int)cmsghdr->cmsg_len, (u_int)CMSG_LEN(0)); in t_cmsg_len_client()
|
| HD | t_cmsgcred.c | 80 struct cmsghdr *cmsghdr; in t_cmsgcred_server() local 116 if (uc_check_msghdr(&msghdr, sizeof(*cmsghdr)) < 0) in t_cmsgcred_server() 119 cmsghdr = CMSG_FIRSTHDR(&msghdr); in t_cmsgcred_server() 120 if (uc_check_scm_creds_cmsgcred(cmsghdr) < 0) in t_cmsgcred_server()
|
| HD | t_xxxtime.c.in | 44 check_scm_%%TTYPE%%(struct cmsghdr *cmsghdr) 48 if (uc_check_cmsghdr(cmsghdr, %%SCM_TTYPE%%, sizeof(struct %%DTYPE%%)) < 0) 51 bt = (struct %%DTYPE%% *)CMSG_DATA(cmsghdr); 102 struct cmsghdr *cmsghdr; variable 138 if (uc_check_msghdr(&msghdr, sizeof(*cmsghdr)) < 0) 141 cmsghdr = CMSG_FIRSTHDR(&msghdr); 142 if (check_scm_%%TTYPE%%(cmsghdr) < 0)
|
| HD | t_sockcred.c | 74 struct cmsghdr *cmsghdr; in t_sockcred_server() local 134 if (uc_check_msghdr(&msghdr, sizeof(*cmsghdr)) < 0) in t_sockcred_server() 137 cmsghdr = CMSG_FIRSTHDR(&msghdr); in t_sockcred_server() 138 if (uc_check_scm_creds_sockcred(cmsghdr) < 0) in t_sockcred_server()
|
| /freebsd-13-stable/sys/netinet6/ |
| HD | in6.h | 659 struct cmsghdr; 703 struct cmsghdr; 706 extern int inet6_option_init(void *, struct cmsghdr **, int); 707 extern int inet6_option_append(struct cmsghdr *, const uint8_t *, 709 extern uint8_t *inet6_option_alloc(struct cmsghdr *, int, int, int); 710 extern int inet6_option_next(const struct cmsghdr *, uint8_t **); 711 extern int inet6_option_find(const struct cmsghdr *, uint8_t **, int); 714 extern struct cmsghdr *inet6_rthdr_init(void *, int); 715 extern int inet6_rthdr_add(struct cmsghdr *, const struct in6_addr *, 717 extern int inet6_rthdr_lasthop(struct cmsghdr *, unsigned int); [all …]
|
| /freebsd-13-stable/lib/libc/net/ |
| HD | rthdr.c | 67 struct cmsghdr * 70 struct cmsghdr *ch = (struct cmsghdr *)bp; in inet6_rthdr_init() 97 inet6_rthdr_add(struct cmsghdr *cmsg, const struct in6_addr *addr, u_int flags) in inet6_rthdr_add() 139 inet6_rthdr_lasthop(struct cmsghdr *cmsg, unsigned int flags) in inet6_rthdr_lasthop() 177 inet6_rthdr_reverse(const struct cmsghdr *in, struct cmsghdr *out) 185 inet6_rthdr_segments(const struct cmsghdr *cmsg) in inet6_rthdr_segments() 208 inet6_rthdr_getaddr(struct cmsghdr *cmsg, int idx) in inet6_rthdr_getaddr() 238 inet6_rthdr_getflags(const struct cmsghdr *cmsg, int idx) in inet6_rthdr_getflags()
|
| HD | ip6opt.c | 81 inet6_option_init(void *bp, struct cmsghdr **cmsgp, int type) in inet6_option_init() 83 struct cmsghdr *ch = (struct cmsghdr *)bp; in inet6_option_init() 108 inet6_option_append(struct cmsghdr *cmsg, const u_int8_t *typep, int multx, in inet6_option_append() 177 inet6_option_alloc(struct cmsghdr *cmsg, int datalen, int multx, int plusy) in inet6_option_alloc() 239 inet6_option_next(const struct cmsghdr *cmsg, u_int8_t **tptrp) in inet6_option_next() 295 inet6_option_find(const struct cmsghdr *cmsg, u_int8_t **tptrp, int type) in inet6_option_find()
|
| HD | sctp_sys_calls.c | 535 struct cmsghdr *cmsg; in sctp_sendmsg() 597 cmsg = (struct cmsghdr *)cmsgbuf; in sctp_sendmsg() 648 struct cmsghdr *cmsg; in sctp_send() 664 cmsg = (struct cmsghdr *)cmsgbuf; in sctp_send() 820 struct cmsghdr *cmsg; in sctp_recvmsg() 887 struct cmsghdr *cmsg; in sctp_recvv() 980 struct cmsghdr *cmsg; in sctp_sendv() 1007 cmsg = (struct cmsghdr *)cmsgbuf; in sctp_sendv() 1027 cmsg = (struct cmsghdr *)((caddr_t)cmsg + CMSG_SPACE(sizeof(struct sctp_sndinfo))); in sctp_sendv() 1041 cmsg = (struct cmsghdr *)((caddr_t)cmsg + CMSG_SPACE(sizeof(struct sctp_prinfo))); in sctp_sendv() [all …]
|
| /freebsd-13-stable/sys/sys/ |
| HD | socket.h | 483 struct cmsghdr { struct 552 _ALIGN(sizeof(struct cmsghdr))) 557 ((char *)(cmsg) + _ALIGN(((struct cmsghdr *)(cmsg))->cmsg_len) + \ 558 _ALIGN(sizeof(struct cmsghdr)) > \ 560 (struct cmsghdr *)0 : \ 561 (struct cmsghdr *)(void *)((char *)(cmsg) + \ 562 _ALIGN(((struct cmsghdr *)(cmsg))->cmsg_len))) 569 ((mhdr)->msg_controllen >= sizeof(struct cmsghdr) ? \ 570 (struct cmsghdr *)(mhdr)->msg_control : \ 571 (struct cmsghdr *)0) [all …]
|
| /freebsd-13-stable/tools/regression/netinet6/inet6_rth/ |
| HD | inet6_rth-segments.c | 42 static void init_hdrs(struct msghdr *, struct cmsghdr *, char *, size_t); 225 struct cmsghdr cmh; in test_cmsg_nexthdr() 226 struct cmsghdr *cmhp, *cmhnextp; in test_cmsg_nexthdr() 283 struct cmsghdr cmh; in test_cmsg_firsthdr() 284 struct cmsghdr *cmhp; in test_cmsg_firsthdr() 326 init_hdrs(struct msghdr *mhp, struct cmsghdr *cmhp, char *bufp, size_t bufsize) in init_hdrs() 331 memset((void *)cmhp, 0, sizeof(struct cmsghdr)); in init_hdrs()
|
| /freebsd-13-stable/tests/sys/kern/ |
| HD | unix_passfd_test.c | 122 struct cmsghdr *cm; in putfds() 125 cm = (struct cmsghdr *)buf; in putfds() 197 struct cmsghdr *cmsghdr; in recvfd_payload() local 222 cmsghdr = CMSG_FIRSTHDR(&msghdr); in recvfd_payload() 223 ATF_REQUIRE_MSG(cmsghdr != NULL, in recvfd_payload() 227 for (; cmsghdr != NULL; cmsghdr = CMSG_NXTHDR(&msghdr, cmsghdr)) { in recvfd_payload() 228 if (cmsghdr->cmsg_level == SOL_SOCKET && in recvfd_payload() 229 cmsghdr->cmsg_type == SCM_RIGHTS && in recvfd_payload() 230 cmsghdr->cmsg_len == CMSG_LEN(sizeof(int))) { in recvfd_payload() 231 memcpy(recv_fd, CMSG_DATA(cmsghdr), sizeof(int)); in recvfd_payload() [all …]
|
| /freebsd-13-stable/contrib/pf/pflogd/ |
| HD | 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-stable/crypto/openssh/ |
| HD | 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()
|
| HD | defines.h | 605 #define CMSG_LEN(len) (__CMSG_ALIGN(sizeof(struct cmsghdr)) + (len)) 610 #define CMSG_SPACE(len) (__CMSG_ALIGN(sizeof(struct cmsghdr)) + __CMSG_ALIGN(len)) 615 #define CMSG_DATA(cmsg) ((u_char *)(cmsg) + __CMSG_ALIGN(sizeof(struct cmsghdr))) 624 ((mhdr)->msg_controllen >= sizeof(struct cmsghdr) ? \ 625 (struct cmsghdr *)(mhdr)->msg_control : \ 626 (struct cmsghdr *)NULL)
|
| /freebsd-13-stable/crypto/openssl/include/internal/ |
| HD | 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-stable/contrib/netbsd-tests/net/fdpass/ |
| HD | 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-stable/lib/libnv/ |
| HD | msgio.c | 74 msghdr_add_fd(struct cmsghdr *cmsg, int fd) in msghdr_add_fd() 151 struct cmsghdr *cmsg; in cred_send() 191 struct cmsghdr *cmsg; in cred_recv() 227 struct cmsghdr *cmsg; in fd_package_send() 276 struct cmsghdr *cmsg; in fd_package_recv()
|
| /freebsd-13-stable/sys/compat/cloudabi/ |
| HD | cloudabi_sock.c | 107 struct cmsghdr *chdr; in cloudabi_sock_recv() 159 struct cmsghdr *chdr; in cloudabi_sock_send() 165 chdr = mtod(control, struct cmsghdr *); in cloudabi_sock_send()
|
| /freebsd-13-stable/usr.bin/truss/ |
| HD | syscalls.c | 1449 print_gen_cmsg(FILE *fp, struct cmsghdr *cmsghdr) in print_gen_cmsg() argument 1454 for (q = CMSG_DATA(cmsghdr); in print_gen_cmsg() 1455 q < (u_char *)cmsghdr + cmsghdr->cmsg_len; q++) { in print_gen_cmsg() 1456 fprintf(fp, "%s0x%02x", q == CMSG_DATA(cmsghdr) ? "" : ",", *q); in print_gen_cmsg() 1568 print_sctp_cmsg(FILE *fp, bool receive, struct cmsghdr *cmsghdr) in print_sctp_cmsg() argument 1573 len = cmsghdr->cmsg_len; in print_sctp_cmsg() 1574 data = CMSG_DATA(cmsghdr); in print_sctp_cmsg() 1575 switch (cmsghdr->cmsg_type) { in print_sctp_cmsg() 1580 print_gen_cmsg(fp, cmsghdr); in print_sctp_cmsg() 1587 print_gen_cmsg(fp, cmsghdr); in print_sctp_cmsg() [all …]
|
| /freebsd-13-stable/contrib/mandoc/ |
| HD | catman.c | 75 struct cmsghdr cmsghdr; in sock_fd_write() member 78 struct cmsghdr *cmsg; in sock_fd_write()
|
| /freebsd-13-stable/tools/regression/capsicum/syscalls/ |
| HD | misc.c | 57 struct cmsghdr *cmsg; in descriptor_send() 87 struct cmsghdr *cmsg; in descriptor_recv()
|
| /freebsd-13-stable/contrib/llvm-project/compiler-rt/lib/sanitizer_common/ |
| HD | sanitizer_platform_limits_solaris.cpp | 242 CHECK_TYPE_SIZE(cmsghdr); 243 CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_len); 244 CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_level); 245 CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_type);
|