X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fsessiond-comm%2Funix.h;h=7ea05032fb39fa511eb1f761e3e212be0fc7666d;hp=34f156ffd46171298be768abafd1ebca899dcef0;hb=890d8fe47755c3bad936389cf48ffa141cff41c9;hpb=ae9e45b342636e7b42eafc15cd105bccfbbbe373 diff --git a/src/common/sessiond-comm/unix.h b/src/common/sessiond-comm/unix.h index 34f156ffd..7ea05032f 100644 --- a/src/common/sessiond-comm/unix.h +++ b/src/common/sessiond-comm/unix.h @@ -18,34 +18,46 @@ #ifndef _LTTCOMM_UNIX_H #define _LTTCOMM_UNIX_H -#define _GNU_SOURCE #include #include #include +#include #include "sessiond-comm.h" -extern int lttcomm_create_unix_sock(const char *pathname); -extern int lttcomm_connect_unix_sock(const char *pathname); -extern int lttcomm_accept_unix_sock(int sock); -extern int lttcomm_listen_unix_sock(int sock); -extern int lttcomm_close_unix_sock(int sock); +LTTNG_HIDDEN +int lttcomm_create_unix_sock(const char *pathname); +LTTNG_HIDDEN +int lttcomm_create_anon_unix_socketpair(int *fds); +LTTNG_HIDDEN +int lttcomm_connect_unix_sock(const char *pathname); +LTTNG_HIDDEN +int lttcomm_accept_unix_sock(int sock); +LTTNG_HIDDEN +int lttcomm_listen_unix_sock(int sock); +LTTNG_HIDDEN +int lttcomm_close_unix_sock(int sock); /* Send a message accompanied by fd(s) over a unix socket. */ -extern ssize_t lttcomm_send_fds_unix_sock(int sock, int *fds, size_t nb_fd); +LTTNG_HIDDEN +ssize_t lttcomm_send_fds_unix_sock(int sock, int *fds, size_t nb_fd); /* Recv a message accompanied by fd(s) from a unix socket */ -extern ssize_t lttcomm_recv_fds_unix_sock(int sock, int *fds, size_t nb_fd); - -extern ssize_t lttcomm_recv_unix_sock(int sock, void *buf, size_t len); -extern ssize_t lttcomm_send_unix_sock(int sock, void *buf, size_t len); - -extern ssize_t lttcomm_send_creds_unix_sock(int sock, void *buf, size_t len); -extern ssize_t lttcomm_recv_creds_unix_sock(int sock, void *buf, size_t len, +LTTNG_HIDDEN +ssize_t lttcomm_recv_fds_unix_sock(int sock, int *fds, size_t nb_fd); + +LTTNG_HIDDEN +ssize_t lttcomm_recv_unix_sock(int sock, void *buf, size_t len); +LTTNG_HIDDEN +ssize_t lttcomm_send_unix_sock(int sock, void *buf, size_t len); + +LTTNG_HIDDEN +ssize_t lttcomm_send_creds_unix_sock(int sock, void *buf, size_t len); +LTTNG_HIDDEN +ssize_t lttcomm_recv_creds_unix_sock(int sock, void *buf, size_t len, lttng_sock_cred *creds); -extern int lttcomm_setsockopt_creds_unix_sock(int sock); -extern int lttcomm_setsockopt_rcv_timeout(int sock, unsigned int sec); -extern int lttcomm_setsockopt_snd_timeout(int sock, unsigned int sec); +LTTNG_HIDDEN +int lttcomm_setsockopt_creds_unix_sock(int sock); #endif /* _LTTCOMM_UNIX_H */