summaryrefslogtreecommitdiff
path: root/src/daemon/dlt_daemon_socket.h
diff options
context:
space:
mode:
authorAdrianStoenescu <51166009+AdrianStoenescu@users.noreply.github.com>2019-07-25 13:36:49 +0300
committerSaya Sugiura <39760799+ssugiura@users.noreply.github.com>2019-07-25 19:36:49 +0900
commite8716cc5c950e50411b23a7a6cafa3c063c59e90 (patch)
tree98bffcc8f95e8cee9e77e80625e4b0e94c7525cd /src/daemon/dlt_daemon_socket.h
parent923ba7d4ab9c73300a9ef54e0ac4d1d7c02e2ba7 (diff)
downloadDLT-daemon-e8716cc5c950e50411b23a7a6cafa3c063c59e90.tar.gz
Add option in dlt.conf for bindAddress to specific IPs (#130)
Add the possibility to have in dlt.conf an option that specifies a set of IP addresses. The daemon will do a socket bind only for this list, therefore external connections will be limited to this set of IP addresses. If this option is not given, the default INADDR_ANY is used ("0.0.0.0") as before. The option in dlt.conf can look like this: BindAddress = 160.48.199.98;160.48.199.97;160.48.199.226,160.48.199.186;160.48.199.139;172.16.222.99 There can be as many addresses but only specified on one single line. They have to be delimited by ',' or ';'. ' ' (space) delimiter does not work. IPv6 addresses are supported as well. For instance: BindAddress = fe80::255:7bff:feb5:7df7 IPv6 addresses are acceptable only if DLT_USE_IPv6 flag is ON at compile time. IPv4 addresses are acceptable only if DLT_USE_IPv6 flag is OFF at compile time. One cannot have both IPv4 and IPv6 format in the same time. Signed-off-by: Adrian Stoenescu Adrian.Stoenescu@harman.com
Diffstat (limited to 'src/daemon/dlt_daemon_socket.h')
-rw-r--r--src/daemon/dlt_daemon_socket.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/daemon/dlt_daemon_socket.h b/src/daemon/dlt_daemon_socket.h
index cca8306..a180529 100644
--- a/src/daemon/dlt_daemon_socket.h
+++ b/src/daemon/dlt_daemon_socket.h
@@ -60,7 +60,7 @@
#include "dlt_common.h"
#include "dlt_user.h"
-int dlt_daemon_socket_open(int *sock, unsigned int servPort);
+int dlt_daemon_socket_open(int *sock, unsigned int servPort, char *ip);
int dlt_daemon_socket_close(int sock);
int dlt_daemon_socket_get_send_qeue_max_size(int sock);