Home
last modified time | relevance | path

Searched refs:cmsg (Results 1 – 17 of 17) sorted by relevance

/external/valgrind/main/none/tests/
Dfdleak_cmsg.c58 struct cmsghdr *cmsg; in server() local
67 cmsg = CMSG_FIRSTHDR(&msg); in server()
68 cmsg->cmsg_level = SOL_SOCKET; in server()
69 cmsg->cmsg_type = SCM_RIGHTS; in server()
70 cmsg->cmsg_len = CMSG_LEN(sizeof(int) * 2); in server()
71 ((int *)CMSG_DATA(cmsg))[0] = fd1; in server()
72 ((int *)CMSG_DATA(cmsg))[1] = fd2; in server()
95 struct cmsghdr *cmsg = &control_un.cm; in client() local
130 cmsg = CMSG_FIRSTHDR(&msg); in client()
131 while (cmsg) { in client()
[all …]
/external/bluetooth/bluez/audio/
Dipc.c88 struct cmsghdr *cmsg; in bt_audio_service_get_data_fd() local
106 for (cmsg = CMSG_FIRSTHDR(&msgh); cmsg != NULL; in bt_audio_service_get_data_fd()
107 cmsg = CMSG_NXTHDR(&msgh, cmsg)) { in bt_audio_service_get_data_fd()
108 if (cmsg->cmsg_level == SOL_SOCKET in bt_audio_service_get_data_fd()
109 && cmsg->cmsg_type == SCM_RIGHTS) { in bt_audio_service_get_data_fd()
110 memcpy(&ret, CMSG_DATA(cmsg), sizeof(int)); in bt_audio_service_get_data_fd()
Dunix.c145 struct cmsghdr *cmsg; in unix_sendmsg_fd() local
155 cmsg = CMSG_FIRSTHDR(&msgh); in unix_sendmsg_fd()
156 cmsg->cmsg_level = SOL_SOCKET; in unix_sendmsg_fd()
157 cmsg->cmsg_type = SCM_RIGHTS; in unix_sendmsg_fd()
158 cmsg->cmsg_len = CMSG_LEN(sizeof(int)); in unix_sendmsg_fd()
160 memcpy(CMSG_DATA(cmsg), &fd, sizeof(int)); in unix_sendmsg_fd()
/external/kernel-headers/original/linux/
Dsocket.h84 #define __CMSG_NXTHDR(ctl, len, cmsg) __cmsg_nxthdr((ctl),(len),(cmsg)) argument
85 #define CMSG_NXTHDR(mhdr, cmsg) cmsg_nxthdr((mhdr), (cmsg)) argument
89 #define CMSG_DATA(cmsg) ((void *)((char *)(cmsg) + CMSG_ALIGN(sizeof(struct cmsghdr)))) argument
97 #define CMSG_OK(mhdr, cmsg) ((cmsg)->cmsg_len >= sizeof(struct cmsghdr) && \ argument
98 (cmsg)->cmsg_len <= (unsigned long) \
100 ((char *)(cmsg) - (char *)(mhdr)->msg_control)))
/external/strace/
Dnet.c1085 struct cmsghdr *cmsg = len < sizeof(struct cmsghdr) ? local
1087 if (cmsg == NULL || umoven(tcp, addr, len, (char *) cmsg) < 0) {
1089 free(cmsg);
1093 tprintf(", {cmsg_len=%zu, cmsg_level=", cmsg->cmsg_len);
1094 printxval(socketlayers, cmsg->cmsg_level, "SOL_???");
1097 if (cmsg->cmsg_level == SOL_SOCKET) {
1100 printxval(scmvals, cmsg->cmsg_type, "SCM_???");
1101 cmsg_len = (len < cmsg->cmsg_len) ? len : cmsg->cmsg_len;
1103 if (cmsg->cmsg_type == SCM_RIGHTS
1105 int *fds = (int *) CMSG_DATA (cmsg);
[all …]
DChangeLog92 trust cmsg.cmsg_len to avoid read beyond the end of allocated
/external/webkit/Source/WebKit2/Platform/CoreIPC/unix/
DConnectionUnix.cpp360 struct cmsghdr* cmsg = CMSG_FIRSTHDR(&message); in sendOutgoingMessage() local
361 cmsg->cmsg_level = SOL_SOCKET; in sendOutgoingMessage()
362 cmsg->cmsg_type = SCM_RIGHTS; in sendOutgoingMessage()
363 cmsg->cmsg_len = CMSG_LEN(sizeof(int) * attachments.size()); in sendOutgoingMessage()
365 int* fdptr = reinterpret_cast<int*>(CMSG_DATA(cmsg)); in sendOutgoingMessage()
371 message.msg_controllen = cmsg->cmsg_len; in sendOutgoingMessage()
/external/bluetooth/hcidump/src/
Dhcidump.c151 struct cmsghdr *cmsg; in process_frames() local
282 cmsg = CMSG_FIRSTHDR(&msg); in process_frames()
283 while (cmsg) { in process_frames()
285 switch (cmsg->cmsg_type) { in process_frames()
287 memcpy(&dir, CMSG_DATA(cmsg), sizeof(int)); in process_frames()
291 memcpy(&frm.ts, CMSG_DATA(cmsg), in process_frames()
295 cmsg = CMSG_NXTHDR(&msg, cmsg); in process_frames()
/external/ping/
Dping.c959 } cmsg = { {sizeof(struct cmsghdr) + sizeof(struct in_pktinfo), SOL_IP, IP_PKTINFO}, variable
973 struct cmsghdr *cmsg; in receive_error_msg() local
996 for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) { in receive_error_msg()
997 if (cmsg->cmsg_level == SOL_IP) { in receive_error_msg()
998 if (cmsg->cmsg_type == IP_RECVERR) in receive_error_msg()
999 e = (struct sock_extended_err *)CMSG_DATA(cmsg); in receive_error_msg()
1113 &iov, 1, &cmsg, 0, 0 }; in send_probe()
1947 cmsg.ipi.ipi_ifindex = ifr.ifr_ifindex; in main()
1948 cmsg_len = sizeof(cmsg); in main()
/external/dbus/dbus/
Ddbus-sysdeps-unix.c1506 } cmsg; in write_credentials_byte() local
1516 msg.msg_control = (caddr_t) &cmsg; in write_credentials_byte()
1518 _DBUS_ZERO(cmsg); in write_credentials_byte()
1519 cmsg.hdr.cmsg_len = CMSG_LEN (sizeof (struct cmsgcred)); in write_credentials_byte()
1520 cmsg.hdr.cmsg_level = SOL_SOCKET; in write_credentials_byte()
1521 cmsg.hdr.cmsg_type = SCM_CREDS; in write_credentials_byte()
1595 } cmsg; in _dbus_read_credentials_socket() local
1601 } cmsg; in _dbus_read_credentials_socket() local
1633 _DBUS_ZERO(cmsg); in _dbus_read_credentials_socket()
1634 msg.msg_control = (caddr_t) &cmsg; in _dbus_read_credentials_socket()
[all …]
/external/ipsec-tools/src/racoon/
Dprivsep.c1546 struct cmsghdr *cmsg; local
1572 cmsg = CMSG_FIRSTHDR(&msg);
1573 fdptr = (int *) CMSG_DATA(cmsg);
1584 struct cmsghdr *cmsg; local
1606 cmsg = CMSG_FIRSTHDR(&msg);
1607 cmsg->cmsg_level = SOL_SOCKET;
1608 cmsg->cmsg_type = SCM_RIGHTS;
1609 cmsg->cmsg_len = CMSG_LEN(sizeof(fd));
1610 fdptr = (int *)CMSG_DATA(cmsg);
1612 msg.msg_controllen = cmsg->cmsg_len;
/external/valgrind/main/include/vki/
Dvki-darwin.h195 #define VKI_CMSG_DATA(cmsg) CMSG_DATA(cmsg) argument
197 #define VKI_CMSG_NXTHDR(mhdr, cmsg) CMSG_NXTHDR(mhdr, cmsg) argument
Dvki-linux.h605 #define __VKI_CMSG_NXTHDR(ctl, len, cmsg) __vki_cmsg_nxthdr((ctl),(len),(cmsg)) argument
606 #define VKI_CMSG_NXTHDR(mhdr, cmsg) vki_cmsg_nxthdr((mhdr), (cmsg)) argument
610 #define VKI_CMSG_DATA(cmsg) ((void *)((char *)(cmsg) + VKI_CMSG_ALIGN(sizeof(struct vki_cmsghdr)))) argument
/external/qemu/
Dqemu-char.c2072 struct cmsghdr *cmsg; in unix_process_msgfd() local
2074 for (cmsg = CMSG_FIRSTHDR(msg); cmsg; cmsg = CMSG_NXTHDR(msg, cmsg)) { in unix_process_msgfd()
2077 if (cmsg->cmsg_len != CMSG_LEN(sizeof(int)) || in unix_process_msgfd()
2078 cmsg->cmsg_level != SOL_SOCKET || in unix_process_msgfd()
2079 cmsg->cmsg_type != SCM_RIGHTS) in unix_process_msgfd()
2082 fd = *((int *)CMSG_DATA(cmsg)); in unix_process_msgfd()
2098 struct cmsghdr cmsg; in tcp_chr_recv() member
/external/quake/quake/src/QW/client/
Dmenu.c1057 char *cmsg[] = { in M_Quit_Draw() local
1095 for (p = cmsg; *p; p++, y += 8) { in M_Quit_Draw()
/external/webkit/LayoutTests/http/conf/
Dmime.types119 application/vnd.contact.cmsg
/external/dbus/
DChangeLog.pre-1-04472 Define cmsg struct, output it.
4474 Use cmsg struct.