2 * Copyright (C) 2012 - David Goulet <dgoulet@efficios.com>
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.
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
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.
18 #ifndef _LTTCOMM_UNIX_H
19 #define _LTTCOMM_UNIX_H
25 #include <common/compat/socket.h>
27 #include "sessiond-comm.h"
29 extern int lttcomm_create_unix_sock(const char *pathname
);
30 extern int lttcomm_connect_unix_sock(const char *pathname
);
31 extern int lttcomm_accept_unix_sock(int sock
);
32 extern int lttcomm_listen_unix_sock(int sock
);
33 extern int lttcomm_close_unix_sock(int sock
);
35 /* Send a message accompanied by fd(s) over a unix socket. */
36 extern ssize_t
lttcomm_send_fds_unix_sock(int sock
, int *fds
, size_t nb_fd
);
37 /* Recv a message accompanied by fd(s) from a unix socket */
38 extern ssize_t
lttcomm_recv_fds_unix_sock(int sock
, int *fds
, size_t nb_fd
);
40 extern ssize_t
lttcomm_recv_unix_sock(int sock
, void *buf
, size_t len
);
41 extern ssize_t
lttcomm_send_unix_sock(int sock
, void *buf
, size_t len
);
43 extern ssize_t
lttcomm_send_creds_unix_sock(int sock
, void *buf
, size_t len
);
44 extern ssize_t
lttcomm_recv_creds_unix_sock(int sock
, void *buf
, size_t len
,
45 lttng_sock_cred
*creds
);
47 extern int lttcomm_setsockopt_creds_unix_sock(int sock
);
48 extern int lttcomm_setsockopt_rcv_timeout(int sock
, unsigned int sec
);
49 extern int lttcomm_setsockopt_snd_timeout(int sock
, unsigned int sec
);
51 #endif /* _LTTCOMM_UNIX_H */
This page took 0.034237 seconds and 4 git commands to generate.