Fix: Hide sessiond-comm functions
[lttng-tools.git] / src / common / sessiond-comm / unix.h
CommitLineData
0d37f2bc
DG
1/*
2 * Copyright (C) 2012 - David Goulet <dgoulet@efficios.com>
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License, version 2 only, as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License along with
14 * this program; if not, write to the Free Software Foundation, Inc., 51
15 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 */
17
18#ifndef _LTTCOMM_UNIX_H
19#define _LTTCOMM_UNIX_H
20
21#define _GNU_SOURCE
22#include <limits.h>
23#include <sys/un.h>
24
25#include <common/compat/socket.h>
8d9eb6d8 26#include <common/macros.h>
0d37f2bc
DG
27
28#include "sessiond-comm.h"
29
8d9eb6d8
JG
30LTTNG_HIDDEN
31int lttcomm_create_unix_sock(const char *pathname);
32LTTNG_HIDDEN
33int lttcomm_create_anon_unix_socketpair(int *fds);
34LTTNG_HIDDEN
35int lttcomm_connect_unix_sock(const char *pathname);
36LTTNG_HIDDEN
37int lttcomm_accept_unix_sock(int sock);
38LTTNG_HIDDEN
39int lttcomm_listen_unix_sock(int sock);
40LTTNG_HIDDEN
41int lttcomm_close_unix_sock(int sock);
0d37f2bc
DG
42
43/* Send a message accompanied by fd(s) over a unix socket. */
8d9eb6d8
JG
44LTTNG_HIDDEN
45ssize_t lttcomm_send_fds_unix_sock(int sock, int *fds, size_t nb_fd);
0d37f2bc 46/* Recv a message accompanied by fd(s) from a unix socket */
8d9eb6d8
JG
47LTTNG_HIDDEN
48ssize_t lttcomm_recv_fds_unix_sock(int sock, int *fds, size_t nb_fd);
0d37f2bc 49
8d9eb6d8
JG
50LTTNG_HIDDEN
51ssize_t lttcomm_recv_unix_sock(int sock, void *buf, size_t len);
52LTTNG_HIDDEN
53ssize_t lttcomm_send_unix_sock(int sock, void *buf, size_t len);
0d37f2bc 54
8d9eb6d8
JG
55LTTNG_HIDDEN
56ssize_t lttcomm_send_creds_unix_sock(int sock, void *buf, size_t len);
57LTTNG_HIDDEN
58ssize_t lttcomm_recv_creds_unix_sock(int sock, void *buf, size_t len,
0d37f2bc
DG
59 lttng_sock_cred *creds);
60
8d9eb6d8
JG
61LTTNG_HIDDEN
62int lttcomm_setsockopt_creds_unix_sock(int sock);
0d37f2bc
DG
63
64#endif /* _LTTCOMM_UNIX_H */
This page took 0.035842 seconds and 4 git commands to generate.