diff options
author | Mattias Andrée <maandree@kth.se> | 2018-08-29 16:51:41 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2018-08-29 16:52:38 +0200 |
commit | 7f397be7159a28d459d8f4ba6b934ab86458d633 (patch) | |
tree | 87be67fa6baf8e5b6d548084b80bf038c9a91912 /sendfd.c | |
parent | Add tests for strtotimespec and strtotimeval (diff) | |
download | libsimple-7f397be7159a28d459d8f4ba6b934ab86458d633.tar.gz libsimple-7f397be7159a28d459d8f4ba6b934ab86458d633.tar.bz2 libsimple-7f397be7159a28d459d8f4ba6b934ab86458d633.tar.xz |
Remove sendfd, recvfd, recvfrom_timestamped, and recv_timestamped for now
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'sendfd.c')
-rw-r--r-- | sendfd.c | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/sendfd.c b/sendfd.c deleted file mode 100644 index 5220761..0000000 --- a/sendfd.c +++ /dev/null @@ -1,44 +0,0 @@ -/* See LICENSE file for copyright and license details. */ -#include "libsimple.h" -#ifndef TEST - - -int -libsimple_sendfd(int sock, int fd) /* TODO test */ -{ - char buf[1]; - struct iovec iov; - struct msghdr msg; - struct cmsghdr *cmsg; - char cms[CMSG_SPACE(sizeof(fd))]; - - buf[0] = 0; - iov.iov_base = buf; - iov.iov_len = 1; - - memset(&msg, 0, sizeof(msg)); - msg.msg_iov = &iov; - msg.msg_iovlen = 1; - msg.msg_control = (caddr_t)cms; - msg.msg_controllen = CMSG_LEN(sizeof(fd)); - - cmsg = CMSG_FIRSTHDR(&msg); - cmsg->cmsg_len = CMSG_LEN(sizeof(fd)); - cmsg->cmsg_level = SOL_SOCKET; - cmsg->cmsg_type = SCM_RIGHTS; - memcpy(CMSG_DATA(cmsg), &fd, sizeof(fd)); - - return -(sendmsg(sock, &msg, 0) != (ssize_t)iov.iov_len); -} - - -#else -#include "test.h" - -int -main(void) -{ - return 0; -} - -#endif |