/freebsd/tools/regression/sockets/unix_cmsg/ |
H A D | 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 …]
|
H A D | 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);
|
H A D | t_cmsg_len.c | 48 struct cmsghdr *cmsghdr; in t_cmsg_len_client() local 67 cmsghdr = CMSG_FIRSTHDR(&msghdr); in t_cmsg_len_client() 75 cmsghdr->cmsg_len = socklen; in t_cmsg_len_client() 80 (u_int)cmsghdr->cmsg_len); in t_cmsg_len_client() 87 (u_int)cmsghdr->cmsg_len, (u_int)CMSG_LEN(0)); in t_cmsg_len_client()
|
H A D | t_cmsgcred_sockcred.c | 45 struct cmsghdr *cmsghdr; in t_cmsgcred_sockcred_server() local 92 if (uc_check_msghdr(&msghdr, sizeof(*cmsghdr)) < 0) in t_cmsgcred_sockcred_server() 95 cmsghdr = CMSG_FIRSTHDR(&msghdr); in t_cmsgcred_sockcred_server() 97 if (uc_check_scm_creds_sockcred(cmsghdr) < 0) in t_cmsgcred_sockcred_server() 100 if (uc_check_scm_creds_cmsgcred(cmsghdr) < 0) in t_cmsgcred_sockcred_server()
|
H A D | t_cmsgcred.c | 79 struct cmsghdr *cmsghdr; in t_cmsgcred_server() local 115 if (uc_check_msghdr(&msghdr, sizeof(*cmsghdr)) < 0) in t_cmsgcred_server() 118 cmsghdr = CMSG_FIRSTHDR(&msghdr); in t_cmsgcred_server() 119 if (uc_check_scm_creds_cmsgcred(cmsghdr) < 0) in t_cmsgcred_server()
|
H A D | 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)
|
H A D | t_sockcred.c | 73 struct cmsghdr *cmsghdr; in t_sockcred_server() local 133 if (uc_check_msghdr(&msghdr, sizeof(*cmsghdr)) < 0) in t_sockcred_server() 136 cmsghdr = CMSG_FIRSTHDR(&msghdr); in t_sockcred_server() 137 if (uc_check_scm_creds_sockcred(cmsghdr) < 0) in t_sockcred_server()
|
/freebsd/sys/netinet6/ |
H A D | in6.h | 662 struct cmsghdr; 707 struct cmsghdr; 710 extern int inet6_option_init(void *, struct cmsghdr **, int); 711 extern int inet6_option_append(struct cmsghdr *, const uint8_t *, 713 extern uint8_t *inet6_option_alloc(struct cmsghdr *, int, int, int); 714 extern int inet6_option_next(const struct cmsghdr *, uint8_t **); 715 extern int inet6_option_find(const struct cmsghdr *, uint8_t **, int); 718 extern struct cmsghdr *inet6_rthdr_init(void *, int); 719 extern int inet6_rthdr_add(struct cmsghdr *, const struct in6_addr *, 721 extern int inet6_rthdr_lasthop(struct cmsghdr *, unsigned int); [all …]
|
/freebsd/lib/libc/net/ |
H A D | rthdr.c | 66 struct cmsghdr * 69 struct cmsghdr *ch = (struct cmsghdr *)bp; in inet6_rthdr_init() 96 inet6_rthdr_add(struct cmsghdr *cmsg, const struct in6_addr *addr, u_int flags) in inet6_rthdr_add() 138 inet6_rthdr_lasthop(struct cmsghdr *cmsg, unsigned int flags) in inet6_rthdr_lasthop() 176 inet6_rthdr_reverse(const struct cmsghdr *in, struct cmsghdr *out) 184 inet6_rthdr_segments(const struct cmsghdr *cmsg) in inet6_rthdr_segments() 207 inet6_rthdr_getaddr(struct cmsghdr *cmsg, int idx) in inet6_rthdr_getaddr() 237 inet6_rthdr_getflags(const struct cmsghdr *cmsg, int idx) in inet6_rthdr_getflags()
|
H A D | ip6opt.c | 80 inet6_option_init(void *bp, struct cmsghdr **cmsgp, int type) in inet6_option_init() 82 struct cmsghdr *ch = (struct cmsghdr *)bp; in inet6_option_init() 107 inet6_option_append(struct cmsghdr *cmsg, const u_int8_t *typep, int multx, in inet6_option_append() 176 inet6_option_alloc(struct cmsghdr *cmsg, int datalen, int multx, int plusy) in inet6_option_alloc() 238 inet6_option_next(const struct cmsghdr *cmsg, u_int8_t **tptrp) in inet6_option_next() 294 inet6_option_find(const struct cmsghdr *cmsg, u_int8_t **tptrp, int type) in inet6_option_find()
|
H A D | sctp_sys_calls.c | 534 struct cmsghdr *cmsg; in sctp_sendmsg() 596 cmsg = (struct cmsghdr *)cmsgbuf; in sctp_sendmsg() 647 struct cmsghdr *cmsg; in sctp_send() 663 cmsg = (struct cmsghdr *)cmsgbuf; in sctp_send() 819 struct cmsghdr *cmsg; in sctp_recvmsg() 886 struct cmsghdr *cmsg; in sctp_recvv() 979 struct cmsghdr *cmsg; in sctp_sendv() 1006 cmsg = (struct cmsghdr *)cmsgbuf; in sctp_sendv() 1026 cmsg = (struct cmsghdr *)((caddr_t)cmsg + CMSG_SPACE(sizeof(struct sctp_sndinfo))); in sctp_sendv() 1040 cmsg = (struct cmsghdr *)((caddr_t)cmsg + CMSG_SPACE(sizeof(struct sctp_prinfo))); in sctp_sendv() [all …]
|
/freebsd/sys/sys/ |
H A D | socket.h | 488 struct cmsghdr { struct 557 _ALIGN(sizeof(struct cmsghdr))) 562 ((char *)(cmsg) + _ALIGN(((struct cmsghdr *)(cmsg))->cmsg_len) + \ 563 _ALIGN(sizeof(struct cmsghdr)) > \ 565 (struct cmsghdr *)0 : \ 566 (struct cmsghdr *)(void *)((char *)(cmsg) + \ 567 _ALIGN(((struct cmsghdr *)(cmsg))->cmsg_len))) 574 ((mhdr)->msg_controllen >= sizeof(struct cmsghdr) ? \ 575 (struct cmsghdr *)(mhdr)->msg_control : \ 576 (struct cmsghdr *)0) [all …]
|
/freebsd/tests/sys/kern/ |
H A D | unix_passfd_test.c | 139 struct cmsghdr *cm; in putfds() 142 cm = (struct cmsghdr *)buf; in putfds() 211 struct cmsghdr *cmsghdr; in recvfd_payload() local 234 cmsghdr = CMSG_FIRSTHDR(&msghdr); in recvfd_payload() 235 ATF_REQUIRE_MSG(cmsghdr != NULL, in recvfd_payload() 239 for (; cmsghdr != NULL; cmsghdr = CMSG_NXTHDR(&msghdr, cmsghdr)) { in recvfd_payload() 240 if (cmsghdr->cmsg_level == SOL_SOCKET && in recvfd_payload() 241 cmsghdr->cmsg_type == SCM_RIGHTS && in recvfd_payload() 242 cmsghdr->cmsg_len == CMSG_LEN(sizeof(int))) { in recvfd_payload() 243 memcpy(recv_fd, CMSG_DATA(cmsghdr), sizeof(int)); in recvfd_payload() [all …]
|
/freebsd/tools/regression/netinet6/inet6_rth/ |
H A D | inet6_rth-segments.c | 41 static void init_hdrs(struct msghdr *, struct cmsghdr *, char *, size_t); 224 struct cmsghdr cmh; in test_cmsg_nexthdr() 225 struct cmsghdr *cmhp, *cmhnextp; in test_cmsg_nexthdr() 282 struct cmsghdr cmh; in test_cmsg_firsthdr() 283 struct cmsghdr *cmhp; in test_cmsg_firsthdr() 325 init_hdrs(struct msghdr *mhp, struct cmsghdr *cmhp, char *bufp, size_t bufsize) in init_hdrs() 330 memset((void *)cmhp, 0, sizeof(struct cmsghdr)); in init_hdrs()
|
/freebsd/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/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 | 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/crypto/openssl/include/internal/ |
H A D | ktls.h | 95 struct cmsghdr *cmsg; in ktls_send_ctrl_message() 137 struct cmsghdr *cmsg; in ktls_read_record() 308 struct cmsghdr *cmsg; in ktls_send_ctrl_message() 310 struct cmsghdr hdr; in ktls_send_ctrl_message() 361 struct cmsghdr *cmsg; in ktls_read_record() 363 struct cmsghdr hdr; in ktls_read_record()
|
/freebsd/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/usr.bin/truss/ |
H A D | syscalls.c | 1267 print_gen_cmsg(FILE *fp, struct cmsghdr *cmsghdr) in print_gen_cmsg() argument 1272 for (q = CMSG_DATA(cmsghdr); in print_gen_cmsg() 1273 q < (u_char *)cmsghdr + cmsghdr->cmsg_len; q++) { in print_gen_cmsg() 1274 fprintf(fp, "%s0x%02x", q == CMSG_DATA(cmsghdr) ? "" : ",", *q); in print_gen_cmsg() 1386 print_sctp_cmsg(FILE *fp, bool receive, struct cmsghdr *cmsghdr) in print_sctp_cmsg() argument 1391 len = cmsghdr->cmsg_len; in print_sctp_cmsg() 1392 data = CMSG_DATA(cmsghdr); in print_sctp_cmsg() 1393 switch (cmsghdr->cmsg_type) { in print_sctp_cmsg() 1398 print_gen_cmsg(fp, cmsghdr); in print_sctp_cmsg() 1405 print_gen_cmsg(fp, cmsghdr); in print_sctp_cmsg() [all …]
|
/freebsd/lib/libnv/ |
H A D | msgio.c | 73 msghdr_add_fd(struct cmsghdr *cmsg, int fd) in msghdr_add_fd() 150 struct cmsghdr *cmsg; in cred_send() 190 struct cmsghdr *cmsg; in cred_recv() 226 struct cmsghdr *cmsg; in fd_package_send() 275 struct cmsghdr *cmsg; in fd_package_recv()
|
/freebsd/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/tools/test/stress2/misc/ |
H A D | overflow3.sh | 49 struct cmsghdr *chdr; 67 chdr = (struct cmsghdr *)hdr.msg_control;
|
/freebsd/tools/regression/capsicum/syscalls/ |
H A D | misc.c | 56 struct cmsghdr *cmsg; in descriptor_send() 86 struct cmsghdr *cmsg; in descriptor_recv()
|
/freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/ |
H A D | 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);
|