Home
last modified time | relevance | path

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

12345

/freebsd/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.c48 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 Dt_cmsgcred_sockcred.c45 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 Dt_cmsgcred.c79 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 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.c73 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 Din6.h662 struct cmsghdr;
705 struct cmsghdr;
708 extern int inet6_option_init(void *, struct cmsghdr **, int);
709 extern int inet6_option_append(struct cmsghdr *, const uint8_t *,
712 extern int inet6_option_next(const struct cmsghdr *, uint8_t **);
716 extern struct cmsghdr *inet6_rthdr_init(void *, int);
719 extern int inet6_rthdr_lasthop(struct cmsghdr *, unsigned int);
721 extern int inet6_rthdr_reverse(const struct cmsghdr *, struct cmsghdr *);
723 extern int inet6_rthdr_segments(const struct cmsghdr *);
724 extern struct in6_addr *inet6_rthdr_getaddr(struct cmsghdr *, int);
[all …]
/freebsd/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/sys/sys/
H A Dsocket.h483 struct cmsghdr { struct
552 _ALIGN(sizeof(struct cmsghdr)))
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)
575 #define CMSG_SPACE(l) (_ALIGN(sizeof(struct cmsghdr)) + _ALIGN(l))
[all …]
/freebsd/tests/sys/kern/
H A Dunix_passfd_test.c139 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()
246 cmsghdr->cmsg_type == SCM_CREDS) in recvfd_payload()
877 struct cmsghdr cmsg; in ATF_TC_BODY()
[all …]
/freebsd/tools/regression/netinet6/inet6_rth/
H A Dinet6_rth-segments.c41 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 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/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/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/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/lib/libnv/
H A Dmsgio.c73 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/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/tools/test/stress2/misc/
H A Doverflow3.sh49 struct cmsghdr *chdr;
67 chdr = (struct cmsghdr *)hdr.msg_control;
/freebsd/contrib/mandoc/
H A Dcatman.c75 struct cmsghdr cmsghdr; in sock_fd_write() member
78 struct cmsghdr *cmsg; in sock_fd_write()
/freebsd/tools/regression/capsicum/syscalls/
H A Dmisc.c57 struct cmsghdr *cmsg; in descriptor_send()
87 struct cmsghdr *cmsg; in descriptor_recv()
/freebsd/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);

12345