diff options
Diffstat (limited to '')
-rw-r--r-- | libnetdata/socket/socket.h (renamed from src/socket.h) | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/socket.h b/libnetdata/socket/socket.h index 7b3e726ec..f5412b63d 100644 --- a/src/socket.h +++ b/libnetdata/socket/socket.h @@ -1,14 +1,19 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + #ifndef NETDATA_SOCKET_H #define NETDATA_SOCKET_H +#include "../libnetdata.h" + #ifndef MAX_LISTEN_FDS #define MAX_LISTEN_FDS 50 #endif typedef struct listen_sockets { + struct config *config; // the config file to use const char *config_section; // the netdata configuration section to read settings from const char *default_bind_to; // the default bind to configuration string - int default_port; // the default port to use + uint16_t default_port; // the default port to use int backlog; // the default listen backlog to use size_t opened; // the number of sockets opened @@ -19,7 +24,7 @@ typedef struct listen_sockets { int fds_families[MAX_LISTEN_FDS]; // the family of the open sockets (AF_UNIX, AF_INET, AF_INET6) } LISTEN_SOCKETS; -extern char *strdup_client_description(int family, const char *protocol, const char *ip, int port); +extern char *strdup_client_description(int family, const char *protocol, const char *ip, uint16_t port); extern int listen_sockets_setup(LISTEN_SOCKETS *sockets); extern void listen_sockets_close(LISTEN_SOCKETS *sockets); |