X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Funix.h;h=e5c7435e34eb7256047304133d642eeeaf26e178;hb=3afa94aeca5a0daae40fd7b6cc96b7e4c150c7d8;hp=5505a4e70accd7b1449f8299ed9aa900a1e6f99d;hpb=ab5be9fa2eb5ba9600a82cd18fd3cfcbac69169a;p=lttng-tools.git diff --git a/src/common/unix.h b/src/common/unix.h index 5505a4e70..e5c7435e3 100644 --- a/src/common/unix.h +++ b/src/common/unix.h @@ -13,43 +13,50 @@ #include #include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif -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. */ -LTTNG_HIDDEN ssize_t lttcomm_send_fds_unix_sock(int sock, const int *fds, size_t nb_fd); +ssize_t lttcomm_send_payload_view_fds_unix_sock(int sock, + struct lttng_payload_view *view); +ssize_t lttcomm_send_fds_unix_sock_non_block( + int sock, const int *fds, size_t nb_fd); +ssize_t lttcomm_send_payload_view_fds_unix_sock_non_block(int sock, + struct lttng_payload_view *view); + /* Recv a message accompanied by fd(s) from a unix socket */ -LTTNG_HIDDEN ssize_t lttcomm_recv_fds_unix_sock(int sock, int *fds, size_t nb_fd); +ssize_t lttcomm_recv_payload_fds_unix_sock(int sock, size_t nb_fd, + struct lttng_payload *payload); +ssize_t lttcomm_recv_fds_unix_sock_non_block(int sock, int *fds, size_t nb_fd); +ssize_t lttcomm_recv_payload_fds_unix_sock_non_block(int sock, size_t nb_fd, + struct lttng_payload *payload); -LTTNG_HIDDEN ssize_t lttcomm_recv_unix_sock(int sock, void *buf, size_t len); -LTTNG_HIDDEN ssize_t lttcomm_recv_unix_sock_non_block(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_unix_sock_non_block(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_send_creds_unix_sock(int sock, const void *buf, size_t len); ssize_t lttcomm_recv_creds_unix_sock(int sock, void *buf, size_t len, lttng_sock_cred *creds); -LTTNG_HIDDEN int lttcomm_setsockopt_creds_unix_sock(int sock); +#ifdef __cplusplus +} +#endif + #endif /* _LTTCOMM_UNIX_H */