summaryrefslogtreecommitdiffstats
path: root/libnetdata/socket/socket.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2018-11-07 12:19:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2018-11-07 12:20:17 +0000
commita64a253794ac64cb40befee54db53bde17dd0d49 (patch)
treec1024acc5f6e508814b944d99f112259bb28b1be /libnetdata/socket/socket.h
parentNew upstream version 1.10.0+dfsg (diff)
downloadnetdata-a64a253794ac64cb40befee54db53bde17dd0d49.tar.xz
netdata-a64a253794ac64cb40befee54db53bde17dd0d49.zip
New upstream version 1.11.0+dfsgupstream/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);