X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcommon%2Fsessiond-comm%2Funix.h;h=24786b8fecbf2c2c805f4cb77d8cc7029ddad6f8;hb=c2d6932774987366baf42a93461cd73c38f1113a;hp=34f156ffd46171298be768abafd1ebca899dcef0;hpb=ae9e45b342636e7b42eafc15cd105bccfbbbe373;p=lttng-tools.git diff --git a/src/common/sessiond-comm/unix.h b/src/common/sessiond-comm/unix.h index 34f156ffd..24786b8fe 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, const 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 */