Searched refs:cmsg (Results 1 - 25 of 58) sorted by relevance

123

/freebsd-head/tools/regression/capsicum/syscalls/
H A Dmisc.c60 struct cmsghdr *cmsg; local
73 cmsg = CMSG_FIRSTHDR(&msg);
74 cmsg->cmsg_level = SOL_SOCKET;
75 cmsg->cmsg_type = SCM_RIGHTS;
76 cmsg->cmsg_len = CMSG_LEN(sizeof(fd));
77 bcopy(&fd, CMSG_DATA(cmsg), sizeof(fd));
90 struct cmsghdr *cmsg; local
120 cmsg = CMSG_FIRSTHDR(&msg);
121 if (cmsg == NULL || cmsg
[all...]
/freebsd-head/lib/libc/rpc/
H A Drpc_callmsg.c59 xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg) argument
66 assert(cmsg != NULL);
69 if (cmsg->rm_call.cb_cred.oa_length > MAX_AUTH_BYTES) {
72 if (cmsg->rm_call.cb_verf.oa_length > MAX_AUTH_BYTES) {
76 + RNDUP(cmsg->rm_call.cb_cred.oa_length)
78 + RNDUP(cmsg->rm_call.cb_verf.oa_length));
80 IXDR_PUT_INT32(buf, cmsg->rm_xid);
81 IXDR_PUT_ENUM(buf, cmsg->rm_direction);
82 if (cmsg->rm_direction != CALL) {
85 IXDR_PUT_INT32(buf, cmsg
[all...]
H A Drpc_prot.c207 xdr_callhdr(XDR *xdrs, struct rpc_msg *cmsg) argument
212 assert(cmsg != NULL);
214 prm_direction = &cmsg->rm_direction;
216 cmsg->rm_direction = CALL;
217 cmsg->rm_call.cb_rpcvers = RPC_MSG_VERSION;
220 xdr_u_int32_t(xdrs, &(cmsg->rm_xid)) &&
222 xdr_rpcvers(xdrs, &(cmsg->rm_call.cb_rpcvers)) &&
223 xdr_rpcprog(xdrs, &(cmsg->rm_call.cb_prog)) )
224 return (xdr_u_int32_t(xdrs, &(cmsg->rm_call.cb_vers)));
/freebsd-head/sys/rpc/
H A Drpc_callmsg.c57 xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg) argument
64 if (cmsg->rm_call.cb_cred.oa_length > MAX_AUTH_BYTES) {
67 if (cmsg->rm_call.cb_verf.oa_length > MAX_AUTH_BYTES) {
71 + RNDUP(cmsg->rm_call.cb_cred.oa_length)
73 + RNDUP(cmsg->rm_call.cb_verf.oa_length));
75 IXDR_PUT_INT32(buf, cmsg->rm_xid);
76 IXDR_PUT_ENUM(buf, cmsg->rm_direction);
77 if (cmsg->rm_direction != CALL) {
80 IXDR_PUT_INT32(buf, cmsg->rm_call.cb_rpcvers);
81 if (cmsg
[all...]
H A Drpc_prot.c225 xdr_callhdr(XDR *xdrs, struct rpc_msg *cmsg) argument
230 assert(cmsg != NULL);
232 prm_direction = &cmsg->rm_direction;
234 cmsg->rm_direction = CALL;
235 cmsg->rm_call.cb_rpcvers = RPC_MSG_VERSION;
238 xdr_uint32_t(xdrs, &(cmsg->rm_xid)) &&
240 xdr_uint32_t(xdrs, &(cmsg->rm_call.cb_rpcvers)) &&
241 xdr_uint32_t(xdrs, &(cmsg->rm_call.cb_prog)) )
242 return (xdr_uint32_t(xdrs, &(cmsg->rm_call.cb_vers)));
/freebsd-head/contrib/pf/pflogd/
H A Dprivsep_fdpass.c57 struct cmsghdr *cmsg; local
67 cmsg = CMSG_FIRSTHDR(&msg);
68 cmsg->cmsg_len = CMSG_LEN(sizeof(int));
69 cmsg->cmsg_level = SOL_SOCKET;
70 cmsg->cmsg_type = SCM_RIGHTS;
71 *(int *)CMSG_DATA(cmsg) = fd;
96 struct cmsghdr *cmsg; local
116 cmsg = CMSG_FIRSTHDR(&msg);
117 if (cmsg == NULL) {
121 if (cmsg
[all...]
/freebsd-head/lib/libnv/
H A Dmsgio.c76 msghdr_add_fd(struct cmsghdr *cmsg, int fd) argument
81 cmsg->cmsg_level = SOL_SOCKET;
82 cmsg->cmsg_type = SCM_RIGHTS;
83 cmsg->cmsg_len = CMSG_LEN(sizeof(fd));
84 bcopy(&fd, CMSG_DATA(cmsg), sizeof(fd));
153 struct cmsghdr *cmsg; local
177 cmsg = CMSG_FIRSTHDR(&msg);
178 cmsg->cmsg_len = CMSG_LEN(sizeof(struct cmsgcred));
179 cmsg->cmsg_level = SOL_SOCKET;
180 cmsg
193 struct cmsghdr *cmsg; local
229 struct cmsghdr *cmsg; local
278 struct cmsghdr *cmsg; local
[all...]
/freebsd-head/lib/libc/net/
H A Dip6opt.c110 inet6_option_append(struct cmsghdr *cmsg, const u_int8_t *typep, int multx, argument
114 u_char *bp = (u_char *)cmsg + cmsg->cmsg_len;
115 struct ip6_ext *eh = (struct ip6_ext *)CMSG_DATA(cmsg);
130 cmsg->cmsg_len += 2;
140 cmsg->cmsg_len += padlen;
150 cmsg->cmsg_len += optlen;
157 cmsg->cmsg_len += padlen;
179 inet6_option_alloc(struct cmsghdr *cmsg, int datalen, int multx, int plusy) argument
182 u_int8_t *bp = (u_char *)cmsg
241 inet6_option_next(const struct cmsghdr *cmsg, u_int8_t **tptrp) argument
297 inet6_option_find(const struct cmsghdr *cmsg, u_int8_t **tptrp, int type) argument
[all...]
H A Dsctp_sys_calls.c535 struct cmsghdr *cmsg;
597 cmsg = (struct cmsghdr *)cmsgbuf;
598 cmsg->cmsg_level = IPPROTO_SCTP;
599 cmsg->cmsg_type = SCTP_SNDRCV;
600 cmsg->cmsg_len = CMSG_LEN(sizeof(struct sctp_sndrcvinfo));
601 sinfo = (struct sctp_sndrcvinfo *)CMSG_DATA(cmsg);
648 struct cmsghdr *cmsg;
664 cmsg = (struct cmsghdr *)cmsgbuf;
665 cmsg->cmsg_level = IPPROTO_SCTP;
666 cmsg
887 struct cmsghdr *cmsg; local
980 struct cmsghdr *cmsg; local
[all...]
H A Drthdr.c99 inet6_rthdr_add(struct cmsghdr *cmsg, const struct in6_addr *addr, u_int flags) argument
103 rthdr = (struct ip6_rthdr *)CMSG_DATA(cmsg);
129 cmsg->cmsg_len = CMSG_LEN((rt0->ip6r0_len + 1) << 3);
141 inet6_rthdr_lasthop(struct cmsghdr *cmsg, unsigned int flags) argument
145 rthdr = (struct ip6_rthdr *)CMSG_DATA(cmsg);
187 inet6_rthdr_segments(const struct cmsghdr *cmsg) argument
191 rthdr = (struct ip6_rthdr *)CMSG_DATA(cmsg);
210 inet6_rthdr_getaddr(struct cmsghdr *cmsg, int idx) argument
214 rthdr = (struct ip6_rthdr *)CMSG_DATA(cmsg);
240 inet6_rthdr_getflags(const struct cmsghdr *cmsg, in argument
[all...]
/freebsd-head/contrib/netbsd-tests/net/fdpass/
H A Dfdpass.c54 struct cmsghdr *cmsg; local
67 cmsg = CMSG_FIRSTHDR(&msg);
68 cmsg->cmsg_len = CMSG_LEN(sizeof(int));
69 cmsg->cmsg_level = SOL_SOCKET;
70 cmsg->cmsg_type = SCM_RIGHTS;
71 *(int *)CMSG_DATA(cmsg) = fd;
72 msg.msg_controllen = cmsg->cmsg_len;
106 struct cmsghdr *cmsg; local
141 cmsg = CMSG_FIRSTHDR(&msg);
142 if (cmsg
[all...]
/freebsd-head/crypto/openssh/
H A Dmonitor_fdpass.c61 struct cmsghdr *cmsg; local
76 cmsg = CMSG_FIRSTHDR(&msg);
77 cmsg->cmsg_len = CMSG_LEN(sizeof(int));
78 cmsg->cmsg_level = SOL_SOCKET;
79 cmsg->cmsg_type = SCM_RIGHTS;
80 *(int *)CMSG_DATA(cmsg) = fd;
122 struct cmsghdr *cmsg; local
167 cmsg = CMSG_FIRSTHDR(&msg);
168 if (cmsg == NULL) {
174 if (cmsg
[all...]
/freebsd-head/sbin/hastd/
H A Dproto_common.c69 struct cmsghdr *cmsg; local
82 cmsg = CMSG_FIRSTHDR(&msg);
83 cmsg->cmsg_level = SOL_SOCKET;
84 cmsg->cmsg_type = SCM_RIGHTS;
85 cmsg->cmsg_len = CMSG_LEN(sizeof(fd));
86 bcopy(&fd, CMSG_DATA(cmsg), sizeof(fd));
169 struct cmsghdr *cmsg; local
185 cmsg = CMSG_FIRSTHDR(&msg);
186 if (cmsg == NULL || cmsg
[all...]
/freebsd-head/contrib/openbsm/bin/auditdistd/
H A Dproto_common.c66 struct cmsghdr *cmsg; local
79 cmsg = CMSG_FIRSTHDR(&msg);
80 cmsg->cmsg_level = SOL_SOCKET;
81 cmsg->cmsg_type = SCM_RIGHTS;
82 cmsg->cmsg_len = CMSG_LEN(sizeof(fd));
83 bcopy(&fd, CMSG_DATA(cmsg), sizeof(fd));
166 struct cmsghdr *cmsg; local
182 cmsg = CMSG_FIRSTHDR(&msg);
183 if (cmsg->cmsg_level != SOL_SOCKET ||
184 cmsg
[all...]
/freebsd-head/contrib/netbsd-tests/net/net/
H A Dt_pktinfo.c102 struct cmsghdr *cmsg; local
123 for (cmsg = CMSG_FIRSTHDR(&msg); cmsg != NULL;
124 cmsg = CMSG_NXTHDR(&msg, cmsg)) {
125 if (cmsg->cmsg_level != IPPROTO_IP)
126 ERRX("bad level %d", cmsg->cmsg_level);
128 switch (cmsg->cmsg_type) {
137 ERRX("bad type %d", cmsg->cmsg_type);
139 ipi = (void *)CMSG_DATA(cmsg);
[all...]
/freebsd-head/sys/compat/linux/
H A Dlinux_socket.h87 #define LINUX_CMSG_DATA(cmsg) ((void *)((char *)(cmsg) + \
99 #define LINUX_CMSG_NXTHDR(msg, cmsg) \
100 ((((char *)(cmsg) + \
101 LINUX_CMSG_ALIGN((cmsg)->cmsg_len) + \
102 sizeof(*(cmsg))) > \
106 (struct l_cmsghdr *)((char *)(cmsg) + \
107 LINUX_CMSG_ALIGN((cmsg)->cmsg_len)))
/freebsd-head/lib/libopenbsd/
H A Dimsg.c52 struct cmsghdr *cmsg; local
92 for (cmsg = CMSG_FIRSTHDR(&msg); cmsg != NULL;
93 cmsg = CMSG_NXTHDR(&msg, cmsg)) {
94 if (cmsg->cmsg_level == SOL_SOCKET &&
95 cmsg->cmsg_type == SCM_RIGHTS) {
104 j = ((char *)cmsg + cmsg->cmsg_len -
105 (char *)CMSG_DATA(cmsg)) / sizeo
[all...]
/freebsd-head/contrib/blacklist/lib/
H A Dbl.c366 struct cmsghdr *cmsg; local
400 cmsg = CMSG_FIRSTHDR(&msg);
401 cmsg->cmsg_len = CMSG_LEN(sizeof(int));
402 cmsg->cmsg_level = SOL_SOCKET;
403 cmsg->cmsg_type = SCM_RIGHTS;
405 memcpy(CMSG_DATA(cmsg), &pfd, sizeof(pfd));
429 struct cmsghdr *cmsg; local
461 for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; cmsg
[all...]
/freebsd-head/contrib/bsnmp/snmpd/
H A Dtrans_udp.c224 struct cmsghdr *cmsg; local
242 cmsg = CMSG_FIRSTHDR(&msg);
243 cmsg->cmsg_level = IPPROTO_IP;
244 cmsg->cmsg_type = IP_SENDSRCADDR;
245 cmsg->cmsg_len = CMSG_LEN(sizeof(struct in_addr));
246 memcpy(CMSG_DATA(cmsg), &p->dstaddr, sizeof(struct in_addr));
280 struct cmsghdr *cmsg; local
324 for (cmsg = CMSG_FIRSTHDR(&msg); cmsg != NULL;
325 cmsg
[all...]
H A Dtrans_inet.c613 for (struct cmsghdr *cmsg = CMSG_FIRSTHDR(msg); cmsg != NULL;
614 cmsg = CMSG_NXTHDR(msg, cmsg)) {
616 if (cmsg->cmsg_level == IPPROTO_IP &&
617 cmsg->cmsg_type == IP_RECVDSTADDR) {
618 memcpy(&sock->ret_source.a4, CMSG_DATA(cmsg),
621 } else if (cmsg->cmsg_level == SOL_SOCKET &&
622 cmsg->cmsg_type == SCM_CREDS) {
623 cred = (struct sockcred *)(void *)CMSG_DATA(cmsg);
642 struct cmsghdr *cmsg; local
884 struct cmsghdr *cmsg; local
[all...]
/freebsd-head/contrib/mandoc/
H A Dcatman.c78 struct cmsghdr *cmsg; local
94 cmsg = CMSG_FIRSTHDR(&msg);
95 cmsg->cmsg_len = CMSG_LEN(3 * sizeof(int));
96 cmsg->cmsg_level = SOL_SOCKET;
97 cmsg->cmsg_type = SCM_RIGHTS;
99 walk = (int *)CMSG_DATA(cmsg);
H A Dmandocd.c63 struct cmsghdr *cmsg; local
97 if ((cmsg = CMSG_FIRSTHDR(&msg)) == NULL) {
102 if (cmsg->cmsg_level != SOL_SOCKET ||
103 cmsg->cmsg_type != SCM_RIGHTS ||
104 cmsg->cmsg_len != CMSG_LEN(NUM_FDS * sizeof(int))) {
109 walk = (int *)CMSG_DATA(cmsg);
/freebsd-head/contrib/libpcap/
H A Dpcap-bt-monitor-linux.c88 struct cmsghdr *cmsg; local
130 for (cmsg = CMSG_FIRSTHDR(&msg); cmsg != NULL; cmsg = CMSG_NXTHDR(&msg, cmsg)) {
131 if (cmsg->cmsg_level != SOL_SOCKET) continue;
133 if (cmsg->cmsg_type == SCM_TIMESTAMP) {
134 memcpy(&pkth.ts, CMSG_DATA(cmsg), sizeof(pkth.ts));
/freebsd-head/usr.sbin/nscd/
H A Dnscdcli.c136 } cmsg; local
145 memset(&cmsg, 0, sizeof(cmsg));
146 cmsg.hdr.cmsg_len = CMSG_LEN(sizeof(struct cmsgcred));
147 cmsg.hdr.cmsg_level = SOL_SOCKET;
148 cmsg.hdr.cmsg_type = SCM_CREDS;
153 mhdr.msg_control = &cmsg;
/freebsd-head/crypto/openssl/engines/
H A De_afalg.c326 static ossl_inline void afalg_set_op_sk(struct cmsghdr *cmsg, argument
329 cmsg->cmsg_level = SOL_ALG;
330 cmsg->cmsg_type = ALG_SET_OP;
331 cmsg->cmsg_len = CMSG_LEN(ALG_OP_LEN);
332 memcpy(CMSG_DATA(cmsg), &op, ALG_OP_LEN);
335 static void afalg_set_iv_sk(struct cmsghdr *cmsg, const unsigned char *iv, argument
340 cmsg->cmsg_level = SOL_ALG;
341 cmsg->cmsg_type = ALG_SET_IV;
342 cmsg->cmsg_len = CMSG_LEN(ALG_IV_LEN(len));
343 aiv = (struct af_alg_iv *)CMSG_DATA(cmsg);
411 struct cmsghdr *cmsg; local
[all...]

Completed in 135 milliseconds

123