2 * Copyright (C) 2012 David Goulet <dgoulet@efficios.com>
4 * SPDX-License-Identifier: GPL-2.0-only
8 #ifndef _LTTCOMM_UNIX_H
9 #define _LTTCOMM_UNIX_H
14 #include <common/compat/socket.h>
15 #include <common/macros.h>
18 int lttcomm_create_unix_sock(const char *pathname
);
20 int lttcomm_create_anon_unix_socketpair(int *fds
);
22 int lttcomm_connect_unix_sock(const char *pathname
);
24 int lttcomm_accept_unix_sock(int sock
);
26 int lttcomm_listen_unix_sock(int sock
);
28 int lttcomm_close_unix_sock(int sock
);
30 /* Send a message accompanied by fd(s) over a unix socket. */
32 ssize_t
lttcomm_send_fds_unix_sock(int sock
, const int *fds
, size_t nb_fd
);
34 ssize_t
lttcomm_send_fds_unix_sock_non_block(
35 int sock
, const int *fds
, size_t nb_fd
);
36 /* Recv a message accompanied by fd(s) from a unix socket */
38 ssize_t
lttcomm_recv_fds_unix_sock(int sock
, int *fds
, size_t nb_fd
);
40 ssize_t
lttcomm_recv_fds_unix_sock_non_block(int sock
, int *fds
, size_t nb_fd
);
43 ssize_t
lttcomm_recv_unix_sock(int sock
, void *buf
, size_t len
);
45 ssize_t
lttcomm_recv_unix_sock_non_block(int sock
, void *buf
, size_t len
);
47 ssize_t
lttcomm_send_unix_sock(int sock
, const void *buf
, size_t len
);
49 ssize_t
lttcomm_send_unix_sock_non_block(int sock
, const void *buf
, size_t len
);
52 ssize_t
lttcomm_send_creds_unix_sock(int sock
, const void *buf
, size_t len
);
54 ssize_t
lttcomm_recv_creds_unix_sock(int sock
, void *buf
, size_t len
,
55 lttng_sock_cred
*creds
);
58 int lttcomm_setsockopt_creds_unix_sock(int sock
);
60 #endif /* _LTTCOMM_UNIX_H */
This page took 0.033711 seconds and 6 git commands to generate.