summaryrefslogtreecommitdiff
path: root/src/daemon
diff options
context:
space:
mode:
authorChristoph Lipka <clipka@jp.adit-jv.com>2016-10-12 12:20:55 +0900
committerChristoph Lipka <clipka@jp.adit-jv.com>2016-10-24 13:39:56 +0900
commit3894a8d101a7be0f67262de8af3746a768433fed (patch)
tree179f8c486d834e3f2e53826b03bcb8fc9e51123e /src/daemon
parentc739c8ce49e9a285de6cf2c5df73c974dd8bab2e (diff)
downloadDLT-daemon-3894a8d101a7be0f67262de8af3746a768433fed.tar.gz
MultiNode: Specify config file location in dlt.conf
Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
Diffstat (limited to 'src/daemon')
-rw-r--r--src/daemon/dlt-daemon.c14
-rw-r--r--src/daemon/dlt-daemon.h1
-rw-r--r--src/daemon/dlt.conf12
3 files changed, 24 insertions, 3 deletions
diff --git a/src/daemon/dlt-daemon.c b/src/daemon/dlt-daemon.c
index d3df90f..9288d33 100644
--- a/src/daemon/dlt-daemon.c
+++ b/src/daemon/dlt-daemon.c
@@ -249,6 +249,9 @@ int option_file_parser(DltDaemonLocal *daemon_local)
DLT_DAEMON_DEFAULT_CTRL_SOCK_PATH,
sizeof(daemon_local->flags.ctrlSockPath) - 1);
daemon_local->flags.gatewayMode = 0;
+ strncpy(daemon_local->flags.gatewayConfigFile,
+ DLT_GATEWAY_CONFIG_PATH,
+ DLT_DAEMON_FLAG_MAX - 1);
daemon_local->flags.autoResponseGetLogInfoOption = 7;
daemon_local->flags.contextLogLevel = DLT_LOG_INFO;
daemon_local->flags.contextTraceStatus = DLT_TRACE_STATUS_OFF;
@@ -503,6 +506,17 @@ int option_file_parser(DltDaemonLocal *daemon_local)
daemon_local->flags.gatewayMode = atoi(value);
//printf("Option: %s=%s\n",token,value);
}
+ else if(strcmp(token,"GatewayConfigFile")==0)
+ {
+ memset(
+ daemon_local->flags.gatewayConfigFile,
+ 0,
+ DLT_DAEMON_FLAG_MAX);
+ strncpy(
+ daemon_local->flags.gatewayConfigFile,
+ value,
+ DLT_DAEMON_FLAG_MAX-1);
+ }
else if(strcmp(token,"ContextLogLevel")==0)
{
int const intval = atoi(value);
diff --git a/src/daemon/dlt-daemon.h b/src/daemon/dlt-daemon.h
index a20af75..03b062e 100644
--- a/src/daemon/dlt-daemon.h
+++ b/src/daemon/dlt-daemon.h
@@ -124,6 +124,7 @@ typedef struct
unsigned int port; /**< port number */
char ctrlSockPath[DLT_DAEMON_FLAG_MAX]; /**< Path to Control socket */
int gatewayMode; /**< (Boolean) Gateway Mode */
+ char gatewayConfigFile[DLT_DAEMON_FLAG_MAX]; /**< Gateway config file path */
int autoResponseGetLogInfoOption; /**< (int) The Option of automatic get log info response during context registration. (Default: 7)*/
int contextLogLevel; /**< (int) log level sent to context if registered with default log-level or if enforced*/
int contextTraceStatus; /**< (int) trace status sent to context if registered with default trace status or if enforced*/
diff --git a/src/daemon/dlt.conf b/src/daemon/dlt.conf
index 383cbab..1e4f566 100644
--- a/src/daemon/dlt.conf
+++ b/src/daemon/dlt.conf
@@ -28,9 +28,6 @@ SendContextRegistration = 1
# Set ECU ID (Default: ECU1)
ECUId = ECU1
-# Enable Gateway mode (Default: 0)
-# GatewayMode = 1
-
# Size of shared memory (Default: 100000)
SharedMemorySize = 100000
@@ -76,6 +73,15 @@ RingbufferStepSize = 500000
# ForceContextLogLevelAndTraceStatus = 1
########################################################################
+# Gateway Configuration #
+########################################################################
+# Enable Gateway mode (Default: 0)
+# GatewayMode = 1
+
+# Read gateway configuration from another location
+# GatewayConfigFile = /etc/dlt_gateway.conf
+
+########################################################################
# Control Application #
########################################################################
ControlSocketPath = /tmp/dlt-ctrl.sock