X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Fcommon%2Fsessiond-comm%2Finet6.c;h=8d883740478f0c0cfca365f2334daed6a7669ba5;hb=6947778efd60badf06cec2bd5c39d7f96f5ba7ad;hp=ddbb50ed43aa96dc94b6f2fe4b8201c4925b8c5c;hpb=7c5aef6226a4752f3a4e60cd0b52c741dced395e;p=lttng-tools.git diff --git a/src/common/sessiond-comm/inet6.c b/src/common/sessiond-comm/inet6.c index ddbb50ed4..8d8837404 100644 --- a/src/common/sessiond-comm/inet6.c +++ b/src/common/sessiond-comm/inet6.c @@ -26,8 +26,7 @@ #include #include -#include -#include +#include #include "inet6.h" @@ -47,7 +46,7 @@ static const struct lttcomm_proto_ops inet6_ops = { /* * Creates an PF_INET socket. */ -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN int lttcomm_create_inet6_sock(struct lttcomm_sock *sock, int type, int proto) { int val = 1, ret; @@ -78,7 +77,7 @@ error: /* * Bind socket and return. */ -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN int lttcomm_bind_inet6_sock(struct lttcomm_sock *sock) { int ret; @@ -95,7 +94,7 @@ int lttcomm_bind_inet6_sock(struct lttcomm_sock *sock) /* * Connect PF_INET socket. */ -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN int lttcomm_connect_inet6_sock(struct lttcomm_sock *sock) { int ret, closeret; @@ -103,10 +102,7 @@ int lttcomm_connect_inet6_sock(struct lttcomm_sock *sock) ret = connect(sock->fd, (struct sockaddr *) &sock->sockaddr.addr.sin6, sizeof(sock->sockaddr.addr.sin6)); if (ret < 0) { - /* - * Don't print message on connect error, because connect is used in - * normal execution to detect if sessiond is alive. - */ + PERROR("connect inet6"); goto error_connect; } @@ -125,7 +121,7 @@ error_connect: * Do an accept(2) on the sock and return the new lttcomm socket. The socket * MUST be bind(2) before. */ -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN struct lttcomm_sock *lttcomm_accept_inet6_sock(struct lttcomm_sock *sock) { int new_fd; @@ -169,7 +165,7 @@ error: /* * Make the socket listen using LTTNG_SESSIOND_COMM_MAX_LISTEN. */ -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN int lttcomm_listen_inet6_sock(struct lttcomm_sock *sock, int backlog) { int ret; @@ -200,7 +196,7 @@ end: * * Return the size of received data. */ -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN ssize_t lttcomm_recvmsg_inet6_sock(struct lttcomm_sock *sock, void *buf, size_t len, int flags) { @@ -243,7 +239,7 @@ ssize_t lttcomm_recvmsg_inet6_sock(struct lttcomm_sock *sock, void *buf, * * Return the size of sent data. */ -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN ssize_t lttcomm_sendmsg_inet6_sock(struct lttcomm_sock *sock, void *buf, size_t len, int flags) { @@ -286,7 +282,7 @@ ssize_t lttcomm_sendmsg_inet6_sock(struct lttcomm_sock *sock, void *buf, /* * Shutdown cleanly and close. */ -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN int lttcomm_close_inet6_sock(struct lttcomm_sock *sock) { int ret;