]>
Commit | Line | Data |
---|---|---|
cc73685d | 1 | /* SPDX-License-Identifier: LGPL-2.1+ */ |
b0a33c1e | 2 | |
f1a4a029 ÇO |
3 | #ifndef __LXC_AF_UNIX_H |
4 | #define __LXC_AF_UNIX_H | |
5 | ||
ae467c54 | 6 | #include <stdio.h> |
86ce1da1 CB |
7 | #include <sys/socket.h> |
8 | #include <sys/un.h> | |
ae467c54 | 9 | |
674c9692 CB |
10 | #include "compiler.h" |
11 | ||
caf3beb0 | 12 | /* does not enforce \0-termination */ |
035db741 CB |
13 | __hidden extern int lxc_abstract_unix_open(const char *path, int type, int flags); |
14 | __hidden extern void lxc_abstract_unix_close(int fd); | |
caf3beb0 | 15 | /* does not enforce \0-termination */ |
035db741 | 16 | __hidden extern int lxc_abstract_unix_connect(const char *path); |
674c9692 | 17 | |
035db741 CB |
18 | __hidden extern int lxc_abstract_unix_send_fds(int fd, int *sendfds, int num_sendfds, void *data, |
19 | size_t size) __access_r(2, 3) __access_r(4, 5); | |
674c9692 | 20 | |
035db741 CB |
21 | __hidden extern int lxc_abstract_unix_send_fds_iov(int fd, int *sendfds, int num_sendfds, |
22 | struct iovec *iov, size_t iovlen) __access_r(2, 3); | |
674c9692 | 23 | |
035db741 CB |
24 | __hidden extern int lxc_abstract_unix_recv_fds(int fd, int *recvfds, int num_recvfds, void *data, |
25 | size_t size) __access_r(2, 3) __access_r(4, 5); | |
674c9692 | 26 | |
035db741 | 27 | __hidden extern int lxc_unix_send_fds(int fd, int *sendfds, int num_sendfds, void *data, size_t size); |
674c9692 | 28 | |
035db741 CB |
29 | __hidden extern int lxc_abstract_unix_send_credential(int fd, void *data, size_t size) |
30 | __access_r(2, 3); | |
674c9692 | 31 | |
035db741 CB |
32 | __hidden extern int lxc_abstract_unix_rcv_credential(int fd, void *data, size_t size) |
33 | __access_w(2, 3); | |
674c9692 | 34 | |
035db741 CB |
35 | __hidden extern int lxc_unix_sockaddr(struct sockaddr_un *ret, const char *path); |
36 | __hidden extern int lxc_unix_connect(struct sockaddr_un *addr); | |
37 | __hidden extern int lxc_unix_connect_type(struct sockaddr_un *addr, int type); | |
38 | __hidden extern int lxc_socket_set_timeout(int fd, int rcv_timeout, int snd_timeout); | |
b0a33c1e | 39 | |
77b0073a | 40 | #endif /* __LXC_AF_UNIX_H */ |