X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fsessiond-comm%2Finet.h;fp=src%2Fcommon%2Fsessiond-comm%2Finet.h;h=0000000000000000000000000000000000000000;hp=fd7cffedef1c11edb6d615e05b30f855365800cf;hb=c9e313bc594f40a86eed237dce222c0fc99c957f;hpb=4878de5c7deb512bbdac4fdfc498907efa06fb7c diff --git a/src/common/sessiond-comm/inet.h b/src/common/sessiond-comm/inet.h deleted file mode 100644 index fd7cffede..000000000 --- a/src/common/sessiond-comm/inet.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (C) 2012 David Goulet - * - * SPDX-License-Identifier: GPL-2.0-only - * - */ - -#ifndef _LTTCOMM_INET_H -#define _LTTCOMM_INET_H - -#include - -#include "sessiond-comm.h" - -/* 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" - -/* - * The timeout value of a connect() is computed with an algorithm inside the - * kernel using the defined TCP SYN retries so the end value in time is - * approximative. According to tcp(7) man page, a value of 5 is roughly 180 - * seconds of timeout. With that information, we've computed a factor of 36 - * (180/5) by considering that it grows linearly. This is of course uncertain - * but this is the best approximation we can do at runtime. - */ -#define LTTCOMM_INET_SYN_TIMEOUT_FACTOR 36 - -/* - * Maximum timeout value in seconds of a TCP connection for both send/recv and - * connect operations. - */ -LTTNG_EXPORT extern unsigned long lttcomm_inet_tcp_timeout; - -/* Stub */ -struct lttcomm_sock; - -/* Net family callback */ -extern int lttcomm_create_inet_sock(struct lttcomm_sock *sock, int type, - int proto); - -extern struct lttcomm_sock *lttcomm_accept_inet_sock(struct lttcomm_sock *sock); -extern int lttcomm_bind_inet_sock(struct lttcomm_sock *sock); -extern int lttcomm_close_inet_sock(struct lttcomm_sock *sock); -extern int lttcomm_connect_inet_sock(struct lttcomm_sock *sock); -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, - const void *buf, size_t len, int flags); - -/* Initialize inet communication layer. */ -extern void lttcomm_inet_init(void); - -#endif /* _LTTCOMM_INET_H */