Home
last modified time | relevance | path

Searched refs:cmsghdr (Results 1 – 25 of 100) sorted by relevance

1234

/freebsd-14.2/tools/regression/sockets/unix_cmsg/
H A Duc_common.c268 const struct cmsghdr *cmsghdr; in uc_message_send() local
277 if (cmsghdr != NULL) in uc_message_send()
315 const struct cmsghdr *cmsghdr; in uc_message_recv() local
339 if (cmsghdr != NULL) 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()
431 cmsghdr->cmsg_level); in uc_check_cmsghdr()
482 struct cmsghdr *cmsghdr; in uc_msghdr_init_client() local
494 cmsghdr->cmsg_type = type; in uc_msghdr_init_client()
621 uc_check_scm_creds_cmsgcred(struct cmsghdr *cmsghdr) in uc_check_scm_creds_cmsgcred() argument
[all …]
H A Duc_common.h59 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 Dt_cmsg_len.c49 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()
H A Dt_cmsgcred_sockcred.c46 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()
H A Dt_cmsgcred.c80 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()
H A Dt_xxxtime.c.in44 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 Dt_sockcred.c74 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-14.2/sys/netinet6/
H A Din6.h664 struct cmsghdr;
708 struct cmsghdr;
711 extern int inet6_option_init(void *, struct cmsghdr **, int);
712 extern int inet6_option_append(struct cmsghdr *, const uint8_t *,
715 extern int inet6_option_next(const struct cmsghdr *, uint8_t **);
719 extern struct cmsghdr *inet6_rthdr_init(void *, int);
722 extern int inet6_rthdr_lasthop(struct cmsghdr *, unsigned int);
724 extern int inet6_rthdr_reverse(const struct cmsghdr *, struct cmsghdr *);
726 extern int inet6_rthdr_segments(const struct cmsghdr *);
727 extern struct in6_addr *inet6_rthdr_getaddr(struct cmsghdr *, int);
[all …]
/freebsd-14.2/lib/libc/net/
H A Drthdr.c66 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 Dip6opt.c80 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 Dsctp_sys_calls.c534 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()
1040 cmsg = (struct cmsghdr *)((caddr_t)cmsg + CMSG_SPACE(sizeof(struct sctp_prinfo))); in sctp_sendv()
1116 cmsg = (struct cmsghdr *)((caddr_t)cmsg + CMSG_SPACE(sizeof(struct in_addr))); in sctp_sendv()
[all …]
/freebsd-14.2/sys/sys/
H A Dsocket.h487 struct cmsghdr { struct
556 _ALIGN(sizeof(struct cmsghdr)))
562 _ALIGN(sizeof(struct cmsghdr)) > \
564 (struct cmsghdr *)0 : \
565 (struct cmsghdr *)(void *)((char *)(cmsg) + \
566 _ALIGN(((struct cmsghdr *)(cmsg))->cmsg_len)))
573 ((mhdr)->msg_controllen >= sizeof(struct cmsghdr) ? \
574 (struct cmsghdr *)(mhdr)->msg_control : \
575 (struct cmsghdr *)0)
579 #define CMSG_SPACE(l) (_ALIGN(sizeof(struct cmsghdr)) + _ALIGN(l))
[all …]
/freebsd-14.2/tests/sys/kern/
H A Dunix_passfd_test.c140 struct cmsghdr *cm; in putfds()
143 cm = (struct cmsghdr *)buf; in putfds()
212 struct cmsghdr *cmsghdr; in recvfd_payload() local
237 cmsghdr = CMSG_FIRSTHDR(&msghdr); in recvfd_payload()
238 ATF_REQUIRE_MSG(cmsghdr != NULL, in recvfd_payload()
242 for (; cmsghdr != NULL; cmsghdr = CMSG_NXTHDR(&msghdr, cmsghdr)) { in recvfd_payload()
243 if (cmsghdr->cmsg_level == SOL_SOCKET && in recvfd_payload()
244 cmsghdr->cmsg_type == SCM_RIGHTS && in recvfd_payload()
249 cmsghdr->cmsg_type == SCM_CREDS) in recvfd_payload()
867 struct cmsghdr cmsg; in ATF_TC_BODY()
[all …]
/freebsd-14.2/tools/regression/netinet6/inet6_rth/
H A Dinet6_rth-segments.c42 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-14.2/contrib/pf/pflogd/
H A Dprivsep_fdpass.c54 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-14.2/crypto/openssh/
H A Dmonitor_fdpass.c58 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 Ddefines.h605 #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-14.2/crypto/openssl/include/internal/
H A Dktls.h95 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-14.2/contrib/netbsd-tests/net/fdpass/
H A Dfdpass.c51 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-14.2/lib/libnv/
H A Dmsgio.c74 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-14.2/usr.bin/truss/
H A Dsyscalls.c1267 print_gen_cmsg(FILE *fp, struct cmsghdr *cmsghdr) in print_gen_cmsg() argument
1273 q < (u_char *)cmsghdr + cmsghdr->cmsg_len; 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()
1466 struct cmsghdr *cmsghdr; in print_cmsgs() local
1488 cmsghdr != NULL; in print_cmsgs()
1489 cmsghdr = CMSG_NXTHDR(msghdr, cmsghdr)) { in print_cmsgs()
1490 if (cmsghdr->cmsg_len < sizeof(*cmsghdr)) { in print_cmsgs()
1492 cmsghdr->cmsg_len); in print_cmsgs()
[all …]
/freebsd-14.2/tools/test/stress2/misc/
H A Doverflow3.sh49 struct cmsghdr *chdr;
67 chdr = (struct cmsghdr *)hdr.msg_control;
/freebsd-14.2/contrib/mandoc/
H A Dcatman.c75 struct cmsghdr cmsghdr; in sock_fd_write() member
78 struct cmsghdr *cmsg; in sock_fd_write()
/freebsd-14.2/tools/regression/capsicum/syscalls/
H A Dmisc.c57 struct cmsghdr *cmsg; in descriptor_send()
87 struct cmsghdr *cmsg; in descriptor_recv()
/freebsd-14.2/contrib/llvm-project/compiler-rt/lib/sanitizer_common/
H A Dsanitizer_platform_limits_solaris.cpp242 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);

1234