#include <unistd.h>
#include <errno.h>
-#include <common/defaults.h>
-#include <common/error.h>
+#include <common/common.h>
#include "inet.h"
/*
* Creates an PF_INET socket.
*/
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
int lttcomm_create_inet_sock(struct lttcomm_sock *sock, int type, int proto)
{
int val = 1, ret;
/*
* Bind socket and return.
*/
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
int lttcomm_bind_inet_sock(struct lttcomm_sock *sock)
{
int ret;
/*
* Connect PF_INET socket.
*/
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
int lttcomm_connect_inet_sock(struct lttcomm_sock *sock)
{
int ret, closeret;
* 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_inet_sock(struct lttcomm_sock *sock)
{
int new_fd;
/*
* Make the socket listen using LTTNG_SESSIOND_COMM_MAX_LISTEN.
*/
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
int lttcomm_listen_inet_sock(struct lttcomm_sock *sock, int backlog)
{
int ret;
*
* Return the size of received data.
*/
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
ssize_t lttcomm_recvmsg_inet_sock(struct lttcomm_sock *sock, void *buf,
size_t len, int flags)
{
*
* Return the size of sent data.
*/
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
ssize_t lttcomm_sendmsg_inet_sock(struct lttcomm_sock *sock, void *buf,
size_t len, int flags)
{
/*
* Shutdown cleanly and close.
*/
-__attribute__((visibility("hidden")))
+LTTNG_HIDDEN
int lttcomm_close_inet_sock(struct lttcomm_sock *sock)
{
int ret;