X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fsessiond-comm%2Finet.h;h=9aec36cf13c4e1b7650147b71ac22f921028e3e0;hb=4bd69c5f1161cd065f487da0f4c1aa03a73c47e4;hp=83209bb719fff759e4719ed48f34cf69bb8fd7a2;hpb=d831c2497e9e8b2360cbe2026fdb2d736fa07641;p=lttng-tools.git diff --git a/src/common/sessiond-comm/inet.h b/src/common/sessiond-comm/inet.h index 83209bb71..9aec36cf1 100644 --- a/src/common/sessiond-comm/inet.h +++ b/src/common/sessiond-comm/inet.h @@ -1,28 +1,21 @@ /* - * Copyright (C) 2012 - David Goulet + * Copyright (C) 2012 David Goulet * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License, version 2 only, as - * published by the Free Software Foundation. + * SPDX-License-Identifier: GPL-2.0-only * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., 51 - * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _LTTCOMM_INET_H #define _LTTCOMM_INET_H -#define _GNU_SOURCE #include #include "sessiond-comm.h" +#ifdef __cplusplus +extern "C" { +#endif + /* See man tcp(7) for more detail about this value. */ #define LTTCOMM_INET_PROC_SYN_RETRIES_PATH "/proc/sys/net/ipv4/tcp_syn_retries" #define LTTCOMM_INET_PROC_FIN_TIMEOUT_PATH "/proc/sys/net/ipv4/tcp_fin_timeout" @@ -41,7 +34,7 @@ * Maximum timeout value in seconds of a TCP connection for both send/recv and * connect operations. */ -extern unsigned long lttcomm_inet_tcp_timeout; +LTTNG_EXPORT extern unsigned long lttcomm_inet_tcp_timeout; /* Stub */ struct lttcomm_sock; @@ -58,10 +51,14 @@ extern int lttcomm_listen_inet_sock(struct lttcomm_sock *sock, int backlog); extern ssize_t lttcomm_recvmsg_inet_sock(struct lttcomm_sock *sock, void *buf, size_t len, int flags); -extern ssize_t lttcomm_sendmsg_inet_sock(struct lttcomm_sock *sock, void *buf, - size_t len, int flags); +extern ssize_t lttcomm_sendmsg_inet_sock(struct lttcomm_sock *sock, + const void *buf, size_t len, int flags); /* Initialize inet communication layer. */ extern void lttcomm_inet_init(void); +#ifdef __cplusplus +} +#endif + #endif /* _LTTCOMM_INET_H */