summaryrefslogtreecommitdiffstats
path: root/libnetdata/socket/socket.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2018-11-07 12:22:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2018-11-07 12:22:44 +0000
commit1e6c93250172946eeb38e94a92a1fd12c9d3011e (patch)
tree8ca5e16dfc7ad6b3bf2738ca0a48408a950f8f7e /libnetdata/socket/socket.h
parentUpdate watch file (diff)
downloadnetdata-1e6c93250172946eeb38e94a92a1fd12c9d3011e.tar.xz
netdata-1e6c93250172946eeb38e94a92a1fd12c9d3011e.zip
Merging upstream version 1.11.0+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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);