diff --git a/ChangeLog b/ChangeLog
index 97e4a68b54522673ca9834ea8feb7c85c8090db4..56f911e6c166ee12452a609e2116fba89c271282 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,20 @@
 NEXT VERSION
 
+V4.21.6.2 - 2019-12-30
+common:
+- VRX (CURTSYS-2942) [SDL] Use of vulnerable C functions - Against Safe C Pt1/2
+
+V4.21.6.1 - 2019-12-27
+common:
+- VRX (CURTSYS-2779) Replace mechanism to avoid multiple instances of
+  dsl_cpe_control
+- VRX (CURTSYS-2771) Config/status files in tmp
+- VRX (CURTSYS-2695) Add documentation for config and status parameters
+- VRX (CURTSYS-2913) Take care the DSL status JSON file is gathering all
+  parameters
+- VRX (CURTSYS-2791) Bonding functionality is not working on AXEPOINT board
+- VRX (CURTSYS-2670) MEI_VECTOR_FRIENDLY_CTRL_AUTO to MEI_VECTOR_CTRL_AUTO string fix
+
 V4.21.6 - 2019-10-14
 - VRX (CURTSYS-2484) Implement status JSON update for line stats
 - VRX (CURTSYS-2485) Implement status JSON update for channel stats
diff --git a/build_win32/dsl_cpe_control_version.h b/build_win32/dsl_cpe_control_version.h
index cdb4b1266cc484f5eb8cdf5651f3ddd842899c5f..2609871d773bb845ff80bd7d2a97d58cced5ba72 100644
--- a/build_win32/dsl_cpe_control_version.h
+++ b/build_win32/dsl_cpe_control_version.h
@@ -5,7 +5,7 @@
 #define PACKAGE "dsl_cpe_control"
 
 /* Version number of package */
-#define VERSION "4.21.6"
+#define VERSION "4.21.6.2"
 
 /* Define to the version of this package. */
 #define PACKAGE_VERSION VERSION
diff --git a/configure b/configure
index 8ed9699a00dca3402c4e6472b85bd872ecf0ba6c..eab504528374030b5f1ec8e047da95a0556d08f7 100755
--- a/configure
+++ b/configure
@@ -1,7 +1,7 @@
 #! /bin/sh
 # From configure.in Revision: 1.173 .
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for DSL CPE Control application 4.21.6.
+# Generated by GNU Autoconf 2.69 for DSL CPE Control application 4.21.6.2.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -578,8 +578,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='DSL CPE Control application'
 PACKAGE_TARNAME='dsl_cpe_control'
-PACKAGE_VERSION='4.21.6'
-PACKAGE_STRING='DSL CPE Control application 4.21.6'
+PACKAGE_VERSION='4.21.6.2'
+PACKAGE_STRING='DSL CPE Control application 4.21.6.2'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1529,7 +1529,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures DSL CPE Control application 4.21.6 to adapt to many kinds of systems.
+\`configure' configures DSL CPE Control application 4.21.6.2 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1595,7 +1595,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of DSL CPE Control application 4.21.6:";;
+     short | recursive ) echo "Configuration of DSL CPE Control application 4.21.6.2:";;
    esac
   cat <<\_ACEOF
 
@@ -1819,7 +1819,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-DSL CPE Control application configure 4.21.6
+DSL CPE Control application configure 4.21.6.2
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2171,7 +2171,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by DSL CPE Control application $as_me 4.21.6, which was
+It was created by DSL CPE Control application $as_me 4.21.6.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3036,7 +3036,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='dsl_cpe_control'
- VERSION='4.21.6'
+ VERSION='4.21.6.2'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -10754,7 +10754,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by DSL CPE Control application $as_me 4.21.6, which was
+This file was extended by DSL CPE Control application $as_me 4.21.6.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -10820,7 +10820,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-DSL CPE Control application config.status 4.21.6
+DSL CPE Control application config.status 4.21.6.2
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.in b/configure.in
index 824d6b62c57364dbab2d8b825be09237e973f603..dac4e52e421eea830553dfdf72a7228a0a053cf1 100644
--- a/configure.in
+++ b/configure.in
@@ -1,6 +1,6 @@
 AC_REVISION($Revision: 1.173 $)
 
-AC_INIT([DSL CPE Control application],[4.21.6],[],[dsl_cpe_control])
+AC_INIT([DSL CPE Control application],[4.21.6.2],[],[dsl_cpe_control])
 AC_CONFIG_SRCDIR(src/Makefile.am)
 AM_INIT_AUTOMAKE([tar-pax])
 
diff --git a/src/Makefile.am b/src/Makefile.am
index c0ce2e6871e69785925e636a4de2b05c3a4163d9..6c3a07b3554e82dc93bae61bd7f17a27ee755372 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -169,7 +169,8 @@ EXTRA_DIST = \
 if INCLUDE_DSL_JSON_PARSING
 EXTRA_DIST += \
    dsl_cpe_configuration_parser.h \
-   dsl_cpe_status_parser.h
+   dsl_cpe_status_parser.h \
+   dsl_cpe_interface.h 
 endif
 
 if ADD_APPL_CFLAGS_SET
diff --git a/src/Makefile.in b/src/Makefile.in
index f3048b6e8454a2a9ec60f777fe7aca67696b57d8..8e31526bb324b3200f1b4018f0b4723edb1d1959 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -118,7 +118,8 @@ bin_PROGRAMS = dsl_cpe_control$(EXEEXT)
 
 @INCLUDE_DSL_JSON_PARSING_TRUE@am__append_14 = \
 @INCLUDE_DSL_JSON_PARSING_TRUE@   dsl_cpe_configuration_parser.h \
-@INCLUDE_DSL_JSON_PARSING_TRUE@   dsl_cpe_status_parser.h
+@INCLUDE_DSL_JSON_PARSING_TRUE@   dsl_cpe_status_parser.h \
+@INCLUDE_DSL_JSON_PARSING_TRUE@   dsl_cpe_interface.h 
 
 @DSL_CCA_DBG_MAX_LEVEL_SET_TRUE@am__append_15 = -DDSL_CCA_DBG_MAX_LEVEL=$(DSL_CCA_DBG_MAX_LEVEL_PRE)
 subdir = src
diff --git a/src/dsl_cpe_cli_pipe.c b/src/dsl_cpe_cli_pipe.c
index 0951212883428cbf8820b9c5444b7222edeac262..56ba97a75e0ff339ca25bf605174255ab054bf38 100644
--- a/src/dsl_cpe_cli_pipe.c
+++ b/src/dsl_cpe_cli_pipe.c
@@ -46,7 +46,7 @@ struct Pipe_env_s
    /** number of this pipe interface */
    DSL_int_t number;
    /** name of event pipe */
-   DSL_char_t namePipeEvent[32];
+   DSL_char_t namePipeEvent[DSL_CPE_PIPE_NAME_STR_LEN];
    /** command buffer */
    DSL_char_t cmd_buffer[MAX_CLI_PIPE_CMD_LEN];
    DSL_CPE_File_t *pipe_in;
@@ -107,8 +107,8 @@ DSL_Error_t DSL_CPE_Pipe_CreateCliEntry(DSL_CPE_Control_Context_t *pContext,
                                 DSL_int_t                  nPipeNum)
 {
    DSL_Error_t ret = DSL_SUCCESS;
-   DSL_char_t Name[32];
-   
+   DSL_char_t Name[DSL_CPE_PIPE_NAME_STR_LEN];
+
    memset(pPipeEnv, 0, sizeof(Pipe_env_t));
 
    /* remember own number */
@@ -138,7 +138,7 @@ DSL_Error_t DSL_CPE_Pipe_CreateCliEntry(DSL_CPE_Control_Context_t *pContext,
       pipeNameFormat, nPipeNum, "event");
 
    ret = DSL_CPE_PipeCreate(pPipeEnv->namePipeEvent);
-   
+
    if (ret < DSL_SUCCESS)
    {
       DSL_CCA_DEBUG(DSL_CCA_DBG_ERR, (DSL_CPE_PREFIX
diff --git a/src/dsl_cpe_cli_vrx.c b/src/dsl_cpe_cli_vrx.c
index 27c0522a4169a2d916ce142e1214ce73a8630d1f..702a96a42c95c98bc6a8e60ccaa5319417c3266a 100644
--- a/src/dsl_cpe_cli_vrx.c
+++ b/src/dsl_cpe_cli_vrx.c
@@ -1645,7 +1645,7 @@ static const DSL_char_t g_sDsmcg[] =
    "   e_MEI_VECTOR_CTRL_OFF = 0" DSL_CPE_CRLF
    "   e_MEI_VECTOR_CTRL_ON = 1" DSL_CPE_CRLF
    "   e_MEI_VECTOR_FRIENDLY_CTRL_ON = 2" DSL_CPE_CRLF
-   "   e_MEI_VECTOR_FRIENDLY_CTRL_AUTO = 3" DSL_CPE_CRLF
+   "   e_MEI_VECTOR_CTRL_AUTO = 3" DSL_CPE_CRLF
    DSL_CPE_CRLF "";
 #else
    "";
diff --git a/src/dsl_cpe_configuration_parser.c b/src/dsl_cpe_configuration_parser.c
index fc7c4ef4e7205cb33184a65e170f961f39664506..86aa03c96870bda9ac37d339f67adfc0b54dbb59 100644
--- a/src/dsl_cpe_configuration_parser.c
+++ b/src/dsl_cpe_configuration_parser.c
@@ -12,6 +12,7 @@
 #include "json.h"
 #include "dsl_cpe_control.h"
 #include "dsl_cpe_configuration_parser.h"
+#include "dsl_cpe_interface.h"
 
 #include "drv_dsl_cpe_api_ioctl.h"
 #if defined(INCLUDE_DSL_CPE_API_VRX)
@@ -132,7 +133,7 @@ is undefined, if so use currentParam (from DSL_xxxGet function or any other sour
 #define SECTION_PATH_LENGTH 256
 
 /* Configuration file path */
-static const char *g_pJsonConfigPath = "/opt/intel/etc/dsl_cpe_control.conf";
+static const char *g_pJsonConfigPath = "/tmp/dsl/dsl.conf";
 static DSL_Configuration_t g_sConfiguration = { 0 };
 
 /**********************************************/
@@ -229,6 +230,7 @@ static DSL_Error_t DSL_CPE_OperatorSelectCfgValidateAndApply(
 DSL_Error_t DSL_CPE_ConfigInit()
 {
    static DSL_boolean_t bInitDone = DSL_FALSE;
+   DSL_Error_t nRet = DSL_ERROR;
 
    if (bInitDone == DSL_FALSE)
    {
@@ -307,15 +309,20 @@ DSL_Error_t DSL_CPE_ConfigInit()
 
          DSL_CCA_DEBUG(DSL_CCA_DBG_WRN, (DSL_CPE_PREFIX
             "WARNING - Configuration initialized with default values!" DSL_CPE_CRLF));
+
+         nRet = DSL_WRN_CONFIG_PARAM_IGNORED;
       }
+
       bInitDone = DSL_TRUE;
 
-      return DSL_TRUE;
+      nRet = DSL_SUCCESS;
    }
    else
    {
-      return DSL_FALSE;
+      nRet = DSL_ERROR;
    }
+
+   return nRet;
 }
 
 /*
@@ -498,75 +505,75 @@ static DSL_void_t DSL_CPE_JsonParse(
 
          /* Debugging */
          PARSE_SECTION_INT(
-            CONFIG_DEBUGGING_SECTION_PATH, "debug_and_test_interfaces", pDebuggingConfig->nDebugAndTestInterfaces);
+            CONFIG_DEBUGGING_SECTION_PATH, DSL_CFG_DEBUG_AND_TEST_INTERFACES, pDebuggingConfig->nDebugAndTestInterfaces);
 
          /* StartupInit */
          PARSE_SECTION_INT(
-            CONFIG_STARTUPINIT_SECTION_PATH, "next_mode", pStartupInitConfig->nNextMode);
+            CONFIG_STARTUPINIT_SECTION_PATH, DSL_CFG_NEXT_MODE, pStartupInitConfig->nNextMode);
          PARSE_SECTION_INT(
-            CONFIG_STARTUPINIT_SECTION_PATH, "max_device_number", pStartupInitConfig->nMaxDeviceNumber);
+            CONFIG_STARTUPINIT_SECTION_PATH, DSL_CFG_MAX_DEVICE_NUMBER, pStartupInitConfig->nMaxDeviceNumber);
          PARSE_SECTION_INT(
-            CONFIG_STARTUPINIT_SECTION_PATH, "lines_per_device", pStartupInitConfig->nLinesPerDevice);
+            CONFIG_STARTUPINIT_SECTION_PATH, DSL_CFG_LINES_PER_DEVICE, pStartupInitConfig->nLinesPerDevice);
          PARSE_SECTION_INT(
-            CONFIG_STARTUPINIT_SECTION_PATH, "channels_per_line", pStartupInitConfig->nChannelsPerLine);
+            CONFIG_STARTUPINIT_SECTION_PATH, DSL_CFG_CHANNELS_PER_LINE, pStartupInitConfig->nChannelsPerLine);
 
          /* Bitswap */
          PARSE_SECTION_INT(
-            CONFIG_BITSWAP_SECTION_PATH, "vdsl_us", pBitswapConfig->Us_Vdsl);
+            CONFIG_BITSWAP_SECTION_PATH, DSL_CFG_BITSWAP_VDSL_US, pBitswapConfig->Us_Vdsl);
          PARSE_SECTION_INT(
-            CONFIG_BITSWAP_SECTION_PATH, "vdsl_ds", pBitswapConfig->Ds_Vdsl);
+            CONFIG_BITSWAP_SECTION_PATH, DSL_CFG_BITSWAP_VDSL_DS, pBitswapConfig->Ds_Vdsl);
          PARSE_SECTION_INT(
-            CONFIG_BITSWAP_SECTION_PATH, "adsl_us", pBitswapConfig->Us_Adsl);
+            CONFIG_BITSWAP_SECTION_PATH, DSL_CFG_BITSWAP_ADSL_US, pBitswapConfig->Us_Adsl);
          PARSE_SECTION_INT(
-            CONFIG_BITSWAP_SECTION_PATH, "adsl_ds", pBitswapConfig->Ds_Adsl);
+            CONFIG_BITSWAP_SECTION_PATH, DSL_CFG_BITSWAP_ADSL_DS, pBitswapConfig->Ds_Adsl);
 
          /* Retransmission */
          PARSE_SECTION_INT(
-            CONFIG_RETRANSMISSION_SECTION_PATH, "vdsl_us", pRetransmissionConfig->Us_Vdsl);
+            CONFIG_RETRANSMISSION_SECTION_PATH, DSL_CFG_RETX_VDSL_US, pRetransmissionConfig->Us_Vdsl);
          PARSE_SECTION_INT(
-            CONFIG_RETRANSMISSION_SECTION_PATH, "vdsl_ds", pRetransmissionConfig->Ds_Vdsl);
+            CONFIG_RETRANSMISSION_SECTION_PATH, DSL_CFG_RETX_VDSL_DS, pRetransmissionConfig->Ds_Vdsl);
          PARSE_SECTION_INT(
-            CONFIG_RETRANSMISSION_SECTION_PATH, "adsl_us", pRetransmissionConfig->Us_Adsl);
+            CONFIG_RETRANSMISSION_SECTION_PATH, DSL_CFG_RETX_ADSL_US, pRetransmissionConfig->Us_Adsl);
          PARSE_SECTION_INT(
-            CONFIG_RETRANSMISSION_SECTION_PATH, "adsl_ds", pRetransmissionConfig->Ds_Adsl);
+            CONFIG_RETRANSMISSION_SECTION_PATH, DSL_CFG_RETX_ADSL_DS, pRetransmissionConfig->Ds_Adsl);
 
          /* SRA */
          PARSE_SECTION_INT(
-            CONFIG_SRA_SECTION_PATH, "vdsl_us", pSraConfig->Us_Vdsl);
+            CONFIG_SRA_SECTION_PATH, DSL_CFG_SRA_VDSL_US, pSraConfig->Us_Vdsl);
          PARSE_SECTION_INT(
-            CONFIG_SRA_SECTION_PATH, "vdsl_ds", pSraConfig->Ds_Vdsl);
+            CONFIG_SRA_SECTION_PATH, DSL_CFG_SRA_VDSL_DS, pSraConfig->Ds_Vdsl);
          PARSE_SECTION_INT(
-            CONFIG_SRA_SECTION_PATH, "adsl_us", pSraConfig->Us_Adsl);
+            CONFIG_SRA_SECTION_PATH, DSL_CFG_SRA_ADSL_US, pSraConfig->Us_Adsl);
          PARSE_SECTION_INT(
-            CONFIG_SRA_SECTION_PATH, "adsl_ds", pSraConfig->Ds_Adsl);
+            CONFIG_SRA_SECTION_PATH, DSL_CFG_SRA_ADSL_DS, pSraConfig->Ds_Adsl);
 
          /* Virtualnoise */
          PARSE_SECTION_INT(
-            CONFIG_VIRTUALNOISE_SECTION_PATH, "us", pVirtualNoiseConfig->Us);
+            CONFIG_VIRTUALNOISE_SECTION_PATH, DSL_CFG_VN_US, pVirtualNoiseConfig->Us);
          PARSE_SECTION_INT(
-            CONFIG_VIRTUALNOISE_SECTION_PATH, "ds", pVirtualNoiseConfig->Ds);
+            CONFIG_VIRTUALNOISE_SECTION_PATH, DSL_CFG_VN_DS, pVirtualNoiseConfig->Ds);
 
          /* TcLayer */
          PARSE_SECTION_INT(
-            CONFIG_TCLAYER_SECTION_PATH, "adsl", pSystemIfConfig->nTcLayer_Adsl);
+            CONFIG_TCLAYER_SECTION_PATH, DSL_CFG_TC_ADSL, pSystemIfConfig->nTcLayer_Adsl);
          PARSE_SECTION_INT(
-            CONFIG_TCLAYER_SECTION_PATH, "vdsl", pSystemIfConfig->nTcLayer_Vdsl);
+            CONFIG_TCLAYER_SECTION_PATH, DSL_CFG_TC_VDSL, pSystemIfConfig->nTcLayer_Vdsl);
 
          /* Common */
          PARSE_SECTION_INT(
-            CONFIG_COMMON_SECTION_PATH, "operator_select", pCommonConfig->nOperatorSelect);
+            CONFIG_COMMON_SECTION_PATH, DSL_CFG_OPERATOR_SELECT, pCommonConfig->nOperatorSelect);
          PARSE_SECTION_INT(
-            CONFIG_COMMON_SECTION_PATH, "ld_afe_shutdown", pCommonConfig->LdAfeShutdown);
+            CONFIG_COMMON_SECTION_PATH, DSL_CFG_LD_AFE_SHUTDOWN, pCommonConfig->LdAfeShutdown);
          PARSE_SECTION_INT(
-            CONFIG_COMMON_SECTION_PATH, "vectoring_enable", pCommonConfig->VectoringEnable);
+            CONFIG_COMMON_SECTION_PATH, DSL_CFG_VECTORING_ENABLE, pCommonConfig->VectoringEnable);
          PARSE_SECTION_INT(
-            CONFIG_COMMON_SECTION_PATH, "activation_sequence", pCommonConfig->ActSeq);
+            CONFIG_COMMON_SECTION_PATH, DSL_CFG_ACTIVATION_SEQUENCE, pCommonConfig->ActSeq);
          PARSE_SECTION_INT(
-            CONFIG_COMMON_SECTION_PATH, "activation_mode", pCommonConfig->ActMode);
+            CONFIG_COMMON_SECTION_PATH, DSL_CFG_ACTIVATION_MODE, pCommonConfig->ActMode);
          PARSE_SECTION_INT(
-            CONFIG_COMMON_SECTION_PATH, "remember", pCommonConfig->Remember);
+            CONFIG_COMMON_SECTION_PATH, DSL_CFG_REMEMBER, pCommonConfig->Remember);
          PARSE_SECTION_INT(
-            CONFIG_COMMON_SECTION_PATH, "fw_msg_polling_only", pCommonConfig->FWMsgPollingOnly);
+            CONFIG_COMMON_SECTION_PATH, DSL_CFG_FW_MSG_POLLING_ONLY, pCommonConfig->FWMsgPollingOnly);
 
          if (bFound == DSL_FALSE)
          {
@@ -583,17 +590,17 @@ static DSL_void_t DSL_CPE_JsonParse(
 
          /* Reboot criteria */
          PARSE_SECTION_HEX(
-            CONFIG_REBOOTCRITERIA_SECTION_PATH, "adsl", pRebootCriteriaConfig->Adsl);
+            CONFIG_REBOOTCRITERIA_SECTION_PATH, DSL_CFG_REBOOT_ADSL, pRebootCriteriaConfig->Adsl);
          PARSE_SECTION_HEX(
-            CONFIG_REBOOTCRITERIA_SECTION_PATH, "vdsl", pRebootCriteriaConfig->Vdsl);
+            CONFIG_REBOOTCRITERIA_SECTION_PATH, DSL_CFG_REBOOT_VDSL, pRebootCriteriaConfig->Vdsl);
 
          /* Common */
          PARSE_SECTION_HEX(
-            CONFIG_COMMON_SECTION_PATH, "vdsl_profile", pCommonConfig->VdslProfileVal);
+            CONFIG_COMMON_SECTION_PATH, DSL_CFG_VDSL_PROFILE, pCommonConfig->VdslProfileVal);
          PARSE_SECTION_HEX(
-            CONFIG_LOWLEVELHSTONES_SECTION_PATH, "adsl", pCommonConfig->sLowLevelHsTonesConfig.Adsl);
+            CONFIG_LOWLEVELHSTONES_SECTION_PATH, DSL_CFG_LOW_LEVEL_HS_TONES_ADSL, pCommonConfig->sLowLevelHsTonesConfig.Adsl);
          PARSE_SECTION_HEX(
-            CONFIG_LOWLEVELHSTONES_SECTION_PATH, "vdsl", pCommonConfig->sLowLevelHsTonesConfig.Vdsl);
+            CONFIG_LOWLEVELHSTONES_SECTION_PATH, DSL_CFG_LOW_LEVEL_HS_TONES_VDSL, pCommonConfig->sLowLevelHsTonesConfig.Vdsl);
 
          if (bFound == DSL_FALSE)
          {
diff --git a/src/dsl_cpe_configuration_parser.h b/src/dsl_cpe_configuration_parser.h
index a238c7a4039248554a271ae127ac1f07855775a9..66122ea71c09ad65f69061a62ce597fcd9a5cde6 100644
--- a/src/dsl_cpe_configuration_parser.h
+++ b/src/dsl_cpe_configuration_parser.h
@@ -38,16 +38,16 @@ typedef struct
 typedef struct
 {
    /** Bitswap config for US in VDSL */
-   bool Us_Vdsl;
+   DSL_boolean_t Us_Vdsl;
 
    /** Bitswap config for DS in VDSL */
-   bool Ds_Vdsl;
+   DSL_boolean_t Ds_Vdsl;
 
    /** Bitswap config for US in ADSL */
-   bool Us_Adsl;
+   DSL_boolean_t Us_Adsl;
 
    /** Bitswap config for DS in ADSL */
-   bool Ds_Adsl;
+   DSL_boolean_t Ds_Adsl;
 } DSL_CFG_Bitswap_t;
 
 typedef struct
@@ -83,10 +83,10 @@ typedef struct
 typedef struct
 {
    /** Virtual Noise config for US */
-   bool Us;
+   DSL_boolean_t Us;
 
    /** Virtual Noise config for DS */
-   bool Ds;
+   DSL_boolean_t Ds;
 } DSL_CFG_VirtualNoise_t;
 
 typedef struct
@@ -258,7 +258,7 @@ typedef struct
          0: Use autonomous FW message handling (instead of polling)
          1: Use polling mode only - DEFAULT
    */
-   bool FWMsgPollingOnly;
+   DSL_boolean_t FWMsgPollingOnly;
 
    DSL_CFG_LowLevelHsTones_t sLowLevelHsTonesConfig;
 } DSL_CFG_Common_t;
@@ -314,8 +314,9 @@ typedef struct
    \remark Should be called only once and at application startup.
 
    \return  Return values are defined within the \ref DSL_Error_t definition
-   - DSL_SUCCESS in case of success
-   - DSL_ERROR if operation failed
+   - DSL_SUCCESS in case of taken configuration from json file
+   - DSL_WRN_CONFIG_PARAM_IGNORED in case of taken default configuration
+   - DSL_ERROR if operation already performed
 */
 DSL_Error_t DSL_CPE_ConfigInit();
 
diff --git a/src/dsl_cpe_control.c b/src/dsl_cpe_control.c
index 55c19e69a36abbaf7c581ab0023419aa89d7379c..f5422464e0cbd7a9652cbc5fa09a168c39a530b4 100644
--- a/src/dsl_cpe_control.c
+++ b/src/dsl_cpe_control.c
@@ -369,7 +369,6 @@ DSL_uint8_t g_nDevices = 1;
 DSL_uint8_t g_nLines = 1;
 DSL_uint8_t g_nChannels = 1;
 
-
 /*DSL_InitData_t gInitCfgData;*/
 
 
@@ -737,7 +736,7 @@ DSL_void_t DSL_CPE_ArraySPrintF(
 
    if (nFormat == DSL_ARRAY_FORMAT_HEX)
    {
-      ret = snprintf(pDst, counter, "(");
+      ret = cpe_control_snprintf_s(pDst, counter, "(");
       counter -= ret;
       pDst++;
    }
@@ -746,7 +745,7 @@ DSL_void_t DSL_CPE_ArraySPrintF(
    {
       if ((i != 0) && (nFormat == DSL_ARRAY_FORMAT_HEX))
       {
-         ret = snprintf(pDst, counter, ",");
+         ret = cpe_control_snprintf_s(pDst, counter, ",");
          counter -= ret;
          pDst ++;
       }
@@ -756,16 +755,19 @@ DSL_void_t DSL_CPE_ArraySPrintF(
          switch (nSrcElementSize)
          {
          case 1:
-            ret = snprintf(pDst, counter, "%02X", ((DSL_uint8_t*)pSrc)[i]);
+            ret = cpe_control_snprintf_s(pDst, counter, "%02X",
+                                         ((DSL_uint8_t*)pSrc)[i]);
             break;
          case 2:
-            ret = snprintf(pDst, counter, "%04X", ((DSL_uint16_t*)pSrc)[i]);
+            ret = cpe_control_snprintf_s(pDst, counter, "%04X",
+                                         ((DSL_uint16_t*)pSrc)[i]);
             break;
          case 4:
-            ret = snprintf(pDst, counter, "%08X", ((DSL_uint32_t*)pSrc)[i]);
+            ret = cpe_control_snprintf_s(pDst, counter, "%08X",
+                                         ((DSL_uint32_t*)pSrc)[i]);
             break;
          default:
-            ret = snprintf(pDst, counter, "xx");
+            ret = cpe_control_snprintf_s(pDst, counter, "xx");
             break;
          }
 
@@ -798,7 +800,7 @@ DSL_void_t DSL_CPE_ArraySPrintF(
             c = (DSL_char_t)(nVal >> j);
             if (isprint((int)c) != 0)
             {
-               ret = snprintf(pDst, counter, "%c", c);
+               ret = cpe_control_snprintf_s(pDst, counter, "%c", c);
                counter -= ret;
                pDst += ret;
             }
@@ -806,7 +808,7 @@ DSL_void_t DSL_CPE_ArraySPrintF(
             {
                if (nFormat == DSL_ARRAY_FORMAT_PRINT_STRING)
                {
-                  ret = snprintf(pDst, counter, "%c", '.');
+                  ret = cpe_control_snprintf_s(pDst, counter, "%c", '.');
                   counter -= ret;
                   pDst += ret;
                }
@@ -817,7 +819,7 @@ DSL_void_t DSL_CPE_ArraySPrintF(
 
    if (nFormat == DSL_ARRAY_FORMAT_HEX)
    {
-      ret = snprintf(pDst, counter, ")");
+      ret = cpe_control_snprintf_s(pDst, counter, ")");
    }
 }
 
@@ -889,11 +891,16 @@ DSL_Error_t DSL_CPE_GetMacAdrFromString(
    DSL_char_t *token;
    DSL_int_t i = 0;
 
-   cpe_control_strncpy_s(string, sizeof(string)-1, pString, strlen(pString));
+
+   cpe_control_strncpy_s(string, sizeof(string)-1,
+                         pString, cpe_control_strnlen_s(pString, sizeof(string)-1));
    string[sizeof(string)-1] = 0;
 
+   DSL_size_t strmax = sizeof(string);
+   char *pNextToken = DSL_NULL;
+
    /* Get first token */
-   token = strtok (string, seps);
+   token = cpe_control_strtok_s(string, &strmax, seps, &pNextToken);
    if (token != DSL_NULL)
    {
       for (i = 0; i < DSL_MAC_ADDRESS_OCTETS; i++)
@@ -916,7 +923,7 @@ DSL_Error_t DSL_CPE_GetMacAdrFromString(
          }
 
          /* Get next token */
-         token = strtok(DSL_NULL, seps);
+         token = cpe_control_strtok_s(DSL_NULL, &strmax, seps, &pNextToken);
 
          /* Exit scanning if no further information is included */
          if (token == DSL_NULL)
@@ -974,34 +981,37 @@ DSL_CPE_STATIC DSL_int_t DSL_CPE_ArgsExtract(
    DSL_int_t nArgListNum,
    DSL_CPE_ArgElement_t *pArgList)
 {
-   DSL_char_t cString[30] = { 0 };
+   DSL_char_t cString[DSL_CPE_ARGS_EXTRACT_STRING_LEN] = { 0 };
    DSL_char_t *pcToken;
    DSL_int_t i = 0, nRet = 0;
+   DSL_size_t nStrMax = DSL_CPE_ARGS_EXTRACT_STRING_LEN;
+   DSL_char_t *pNextToken = DSL_NULL;
 
    /* Set pointer to beginning of next parameter group */
    if ((**pArg == '_') && (*(*pArg+1) != '\0')) *pArg = *pArg + 1;
 
-   cpe_control_strncpy_s(cString, sizeof(cString)-1, *pArg, strlen(*pArg));
+   cpe_control_strncpy_s(cString, sizeof(cString)-1,
+                         *pArg, cpe_control_strnlen_s(*pArg, sizeof(cString)-1));
    cString[sizeof(cString)-1]=0;
-   pcToken = strtok (cString, pcSeparators);
+   pcToken = cpe_control_strtok_s(cString, &nStrMax, pcSeparators, &pNextToken);
 
    if (pcToken != DSL_NULL)
    {
       nRet++;
-      *pArg = *pArg + (strlen(pcToken) + 1);
+      *pArg = *pArg + (cpe_control_strnlen_s(pcToken, sizeof(cString)-1) + 1);
       pArgList[i].nValue =
          (DSL_int_t)(strtol(pcToken, DSL_NULL, pArgList[i].nBase));
 
       for ( i = nRet ; nRet < nArgListNum; i++)
       {
          /* Get next token */
-         pcToken = strtok(DSL_NULL, pcSeparators);
+         pcToken = cpe_control_strtok_s(DSL_NULL, &nStrMax, pcSeparators, &pNextToken);
          if (pcToken == DSL_NULL)
          {
             break;
          }
          nRet++;
-         *pArg = *pArg + (strlen(pcToken) + 1);
+         *pArg = *pArg + (cpe_control_strnlen_s(pcToken, sizeof(cString)-1) + 1);
          pArgList[i].nValue =
             (DSL_int_t)(strtol(pcToken, DSL_NULL, pArgList[i].nBase));
       }
@@ -1076,6 +1086,8 @@ DSL_CPE_STATIC  DSL_void_t DSL_CPE_ArgParse (
    DSL_char_t seps[]   = "_";
    DSL_char_t *token, *errMask;
    DSL_int_t option_index = 1;
+   DSL_size_t nTokenMaxLen = 0;
+   DSL_char_t *pNextToken = DSL_NULL;
 
    while (1)
    {
@@ -1112,11 +1124,13 @@ DSL_CPE_STATIC  DSL_void_t DSL_CPE_ArgParse (
 
 #if defined(INCLUDE_TCP_SIMULATOR) && defined(DSL_CPE_SIMULATOR_DRIVER) && defined(WIN32)
       case 'r':
-         g_sRemoteTcpServerIp = DSL_CPE_Malloc(strlen (optarg) + 1);
+         DSL_size_t nOptArgSize = cpe_control_strnlen_s(optarg, DSL_CPE_ARG_IP_V4_LEN);
+
+         g_sRemoteTcpServerIp = DSL_CPE_Malloc(nOptArgSize + 1);
          if (g_sRemoteTcpServerIp)
          {
-            memset(g_sRemoteTcpServerIp, 0, strlen (optarg) + 1);
-            cpe_control_strncpy_s(g_sRemoteTcpServerIp, strlen (optarg) + 1, optarg, strlen (optarg));
+            memset(g_sRemoteTcpServerIp, 0, nOptArgSize + 1);
+            cpe_control_strncpy_s(g_sRemoteTcpServerIp, nOptArgSize + 1, optarg, nOptArgSize);
 
             DSL_CCA_DEBUG(DSL_CCA_DBG_MSG, (DSL_CPE_PREFIX
                "using %s as the remote TCP debug server IP address" DSL_CPE_CRLF,
@@ -1130,6 +1144,8 @@ DSL_CPE_STATIC  DSL_void_t DSL_CPE_ArgParse (
          bTcpMessageIntf = 1;
          if (optarg != NULL)
          {
+            DSL_size_t nOptArgSize = cpe_control_strnlen_s(optarg, DSL_CPE_ARG_IP_V4_LEN);
+
             DSL_CCA_DEBUG(DSL_CCA_DBG_MSG, (DSL_CPE_PREFIX
                "(-t) using %s as IP address for tcp messages debug server"
                DSL_CPE_CRLF, optarg));
@@ -1139,11 +1155,11 @@ DSL_CPE_STATIC  DSL_void_t DSL_CPE_ArgParse (
                DSL_CPE_Free(g_sTcpMessagesSocketAddr);
             }
 
-            g_sTcpMessagesSocketAddr = DSL_CPE_Malloc(strlen (optarg) + 1);
+            g_sTcpMessagesSocketAddr = DSL_CPE_Malloc(nOptArgSize + 1);
             if (g_sTcpMessagesSocketAddr)
             {
-               memset(g_sTcpMessagesSocketAddr, 0, strlen (optarg) + 1);
-               cpe_control_strncpy_s(g_sTcpMessagesSocketAddr, strlen (optarg) + 1, optarg, strlen (optarg));
+               memset(g_sTcpMessagesSocketAddr, 0, nOptArgSize + 1);
+               cpe_control_strncpy_s(g_sTcpMessagesSocketAddr, nOptArgSize + 1, optarg, nOptArgSize);
             }
          }
          else
@@ -1177,6 +1193,8 @@ DSL_CPE_STATIC  DSL_void_t DSL_CPE_ArgParse (
          bDTI = 1;
          if (optarg != NULL)
          {
+            DSL_size_t nOptArgSize = cpe_control_strnlen_s(optarg, DSL_CPE_ARG_IP_V4_LEN);
+
             DSL_CCA_DEBUG(DSL_CCA_DBG_MSG, (DSL_CPE_PREFIX
                "(-d) using %s as IP address for DTI Agent" DSL_CPE_CRLF,
                optarg));
@@ -1186,11 +1204,11 @@ DSL_CPE_STATIC  DSL_void_t DSL_CPE_ArgParse (
                DSL_CPE_Free(sDtiSocketAddr);
             }
 
-            sDtiSocketAddr = DSL_CPE_Malloc(strlen (optarg) + 1);
+            sDtiSocketAddr = DSL_CPE_Malloc(nOptArgSize + 1);
             if (sDtiSocketAddr)
             {
-               memset(sDtiSocketAddr, 0, strlen (optarg) + 1);
-               cpe_control_strncpy_s(sDtiSocketAddr, strlen (optarg) + 1, optarg, strlen (optarg));
+               memset(sDtiSocketAddr, 0, nOptArgSize + 1);
+               cpe_control_strncpy_s(sDtiSocketAddr, nOptArgSize + 1, optarg, nOptArgSize);
             }
          }
          else
@@ -1228,10 +1246,13 @@ DSL_CPE_STATIC  DSL_void_t DSL_CPE_ArgParse (
 
          if (optarg != DSL_NULL)
          {
-            cpe_control_strncpy_s(string,sizeof(string)-1, optarg, strlen(optarg));
+            DSL_size_t nOptArgSize = cpe_control_strnlen_s(optarg, DSL_CPE_ARG_G997_XTU_LEN);
+
+            cpe_control_strncpy_s(string,sizeof(string)-1, optarg, nOptArgSize);
             string[sizeof(string)-1]=0;
 
-            token = strtok (string, seps);
+            nTokenMaxLen = sizeof(string)-1;
+            token = cpe_control_strtok_s(string, &nTokenMaxLen, seps, &pNextToken);
             if (token != DSL_NULL)
             {
                for (i = 0; i < DSL_G997_NUM_XTSE_OCTETS; i++)
@@ -1240,7 +1261,7 @@ DSL_CPE_STATIC  DSL_void_t DSL_CPE_ArgParse (
                   g_nXtseInit.XTSE[i] = (DSL_uint8_t) nVal;
 
                   /* Get next token */
-                  token = strtok(DSL_NULL, seps);
+                  token = cpe_control_strtok_s(DSL_NULL, &nTokenMaxLen, seps, &pNextToken);
 
                   /* Exit scanning if no further information is included */
                   if (token == DSL_NULL)
@@ -1277,12 +1298,13 @@ DSL_CPE_STATIC  DSL_void_t DSL_CPE_ArgParse (
          }
          if (optarg)
          {
-            sLowLevCfgName = DSL_CPE_Malloc (strlen (optarg) + 1);
+            DSL_size_t nOptArgSize = cpe_control_strnlen_s(optarg, DSL_CPE_ARG_SYSTEM_FILE_PATH_LEN);
+            sLowLevCfgName = DSL_CPE_Malloc (nOptArgSize + 1);
 
             if (sLowLevCfgName)
             {
-               memset(sLowLevCfgName, 0, strlen (optarg) + 1);
-               cpe_control_strncpy_s(sLowLevCfgName, strlen (optarg) + 1, optarg, strlen (optarg));
+               memset(sLowLevCfgName, 0, nOptArgSize + 1);
+               cpe_control_strncpy_s(sLowLevCfgName, nOptArgSize + 1, optarg, nOptArgSize);
             }
          }
          break;
@@ -1303,20 +1325,24 @@ DSL_CPE_STATIC  DSL_void_t DSL_CPE_ArgParse (
 
          if (optarg != NULL)
          {
-            g_sRcScript = DSL_CPE_Malloc (strlen (optarg) + 1);
+            DSL_size_t nOptArgSize = cpe_control_strnlen_s(optarg, DSL_CPE_ARG_SYSTEM_FILE_PATH_LEN);
+
+            g_sRcScript = DSL_CPE_Malloc (nOptArgSize + 1);
             if (g_sRcScript)
             {
-               memset(g_sRcScript, 0, strlen (optarg) + 1);
-               cpe_control_strncpy_s(g_sRcScript, strlen (optarg) + 1, optarg, strlen (optarg));
+               memset(g_sRcScript, 0, nOptArgSize + 1);
+               cpe_control_strncpy_s(g_sRcScript, nOptArgSize + 1, optarg, nOptArgSize);
             }
          }
          else
          {
-            g_sRcScript = DSL_CPE_Malloc (strlen (sDefaultRcScript) + 1);
+            DSL_size_t nOptArgSize = cpe_control_strnlen_s(sDefaultRcScript, DSL_CPE_ARG_SYSTEM_FILE_PATH_LEN);
+
+            g_sRcScript = DSL_CPE_Malloc (nOptArgSize + 1);
             if (g_sRcScript)
             {
-               memset(g_sRcScript, 0, strlen (sDefaultRcScript) + 1);
-               cpe_control_strncpy_s(g_sRcScript, strlen (sDefaultRcScript) + 1, sDefaultRcScript, strlen (sDefaultRcScript));
+               memset(g_sRcScript, 0, nOptArgSize + 1);
+               cpe_control_strncpy_s(g_sRcScript, nOptArgSize + 1, sDefaultRcScript, nOptArgSize);
             }
          }
          break;
@@ -1331,11 +1357,13 @@ DSL_CPE_STATIC  DSL_void_t DSL_CPE_ArgParse (
          }
          if (optarg)
          {
-            g_sFirmwareName1 = DSL_CPE_Malloc (strlen (optarg) + 1);
+            DSL_size_t nOptArgSize = cpe_control_strnlen_s(optarg, DSL_CPE_ARG_SYSTEM_FILE_PATH_LEN);
+
+            g_sFirmwareName1 = DSL_CPE_Malloc (nOptArgSize + 1);
             if (g_sFirmwareName1)
             {
-               memset(g_sFirmwareName1, 0, strlen (optarg) + 1);
-               cpe_control_strncpy_s(g_sFirmwareName1, strlen (optarg) + 1, optarg, strlen(optarg));
+               memset(g_sFirmwareName1, 0, nOptArgSize + 1);
+               cpe_control_strncpy_s(g_sFirmwareName1, nOptArgSize + 1, optarg, nOptArgSize);
             }
          }
          break;
@@ -1352,11 +1380,13 @@ DSL_CPE_STATIC  DSL_void_t DSL_CPE_ArgParse (
          }
          if (optarg)
          {
-            g_sFirmwareName2 = DSL_CPE_Malloc (strlen (optarg) + 1);
+            DSL_size_t nOptArgSize = cpe_control_strnlen_s(optarg, DSL_CPE_ARG_SYSTEM_FILE_PATH_LEN);
+
+            g_sFirmwareName2 = DSL_CPE_Malloc (nOptArgSize + 1);
             if (g_sFirmwareName2)
             {
-               memset(g_sFirmwareName2, 0, strlen (optarg) + 1);
-               cpe_control_strncpy_s(g_sFirmwareName2, strlen (optarg) + 1, optarg, strlen (optarg));
+               memset(g_sFirmwareName2, 0, nOptArgSize + 1);
+               cpe_control_strncpy_s(g_sFirmwareName2, nOptArgSize + 1, optarg, nOptArgSize);
             }
          }
          break;
@@ -1370,9 +1400,12 @@ DSL_CPE_STATIC  DSL_void_t DSL_CPE_ArgParse (
       case 'e':
          if (optarg != NULL)
          {
-            cpe_control_strncpy_s(string, sizeof(string)-1, optarg, strlen(optarg));
+            cpe_control_strncpy_s(string, sizeof(string)-1,
+                                  optarg, cpe_control_strnlen_s(optarg, sizeof(string)-1));
             string[sizeof(string)-1]=0;
-            token = strtok (string, seps);
+
+            nTokenMaxLen = sizeof(string)-1;
+            token = cpe_control_strtok_s(string, &nTokenMaxLen, seps, &pNextToken);
 
             if (token != DSL_NULL)
             {
@@ -1381,7 +1414,7 @@ DSL_CPE_STATIC  DSL_void_t DSL_CPE_ArgParse (
                bEventActivation = nVal ? DSL_TRUE : DSL_FALSE;
 
                /* Get next token, event mask */
-               token = strtok(DSL_NULL, seps);
+               token = cpe_control_strtok_s(DSL_NULL, &nTokenMaxLen, seps, &pNextToken);
                if (token != DSL_NULL)
                {
                   nResourceActivationMask = (DSL_uint32_t)strtoul (token, &errMask, 16);
@@ -1443,11 +1476,13 @@ DSL_CPE_STATIC  DSL_void_t DSL_CPE_ArgParse (
          }
          if (optarg)
          {
-            g_sAdslScript = DSL_CPE_Malloc (strlen (optarg) + 1);
+            DSL_size_t nOptArgSize = cpe_control_strnlen_s(optarg, DSL_CPE_ARG_SYSTEM_FILE_PATH_LEN);
+
+            g_sAdslScript = DSL_CPE_Malloc (nOptArgSize + 1);
             if (g_sAdslScript)
             {
-               memset(g_sAdslScript, 0, strlen (optarg) + 1);
-               cpe_control_strncpy_s(g_sAdslScript, strlen (optarg) + 1, optarg, strlen (optarg));
+               memset(g_sAdslScript, 0, nOptArgSize + 1);
+               cpe_control_strncpy_s(g_sAdslScript, nOptArgSize + 1, optarg, nOptArgSize);
             }
          }
          break;
@@ -1461,11 +1496,13 @@ DSL_CPE_STATIC  DSL_void_t DSL_CPE_ArgParse (
          }
          if (optarg)
          {
-            g_sVdslScript = DSL_CPE_Malloc (strlen (optarg) + 1);
+            DSL_size_t nOptArgSize = cpe_control_strnlen_s(optarg, DSL_CPE_ARG_SYSTEM_FILE_PATH_LEN);
+
+            g_sVdslScript = DSL_CPE_Malloc (nOptArgSize + 1);
             if (g_sVdslScript)
             {
-               memset(g_sVdslScript, 0, strlen (optarg) + 1);
-               cpe_control_strncpy_s(g_sVdslScript, strlen (optarg) + 1, optarg, strlen (optarg));
+               memset(g_sVdslScript, 0, nOptArgSize + 1);
+               cpe_control_strncpy_s(g_sVdslScript, nOptArgSize + 1, optarg, nOptArgSize);
             }
          }
          break;
@@ -1479,10 +1516,12 @@ DSL_CPE_STATIC  DSL_void_t DSL_CPE_ArgParse (
       case 'M':
          if( optarg != NULL )
          {
-            cpe_control_strncpy_s(string, sizeof(string)-1, optarg, strlen(optarg));
+            cpe_control_strncpy_s(string, sizeof(string)-1,
+                                  optarg, cpe_control_strnlen_s(optarg, sizeof(string)-1));
                string[sizeof(string)-1]=0;
 
-            token = strtok (string, seps);
+            nTokenMaxLen = sizeof(string)-1;
+            token = cpe_control_strtok_s(string, &nTokenMaxLen, seps, &pNextToken);
 
             if (token != DSL_NULL)
             {
@@ -1505,10 +1544,12 @@ DSL_CPE_STATIC  DSL_void_t DSL_CPE_ArgParse (
       case 'R':
          if( optarg != NULL )
          {
-            cpe_control_strncpy_s(string, sizeof(string)-1, optarg, strlen(optarg));
+            cpe_control_strncpy_s(string, sizeof(string)-1,
+                                  optarg, cpe_control_strnlen_s(optarg, sizeof(string)-1));
                string[sizeof(string)-1]=0;
 
-            token = strtok (string, seps);
+            nTokenMaxLen = sizeof(string)-1;
+            token = cpe_control_strtok_s(string, &nTokenMaxLen, seps, &pNextToken);
 
             if (token != DSL_NULL)
             {
@@ -1531,10 +1572,12 @@ DSL_CPE_STATIC  DSL_void_t DSL_CPE_ArgParse (
       case 'S':
          if( optarg != NULL )
          {
-            cpe_control_strncpy_s(string, sizeof(string)-1, optarg, strlen(optarg));
+            cpe_control_strncpy_s(string, sizeof(string)-1,
+                                  optarg, cpe_control_strnlen_s(optarg, sizeof(string)-1));
                string[sizeof(string)-1]=0;
 
-            token = strtok (string, seps);
+            nTokenMaxLen = sizeof(string)-1;
+            token = cpe_control_strtok_s(string, &nTokenMaxLen, seps, &pNextToken);
 
             if (token != DSL_NULL)
             {
@@ -1550,7 +1593,7 @@ DSL_CPE_STATIC  DSL_void_t DSL_CPE_ArgParse (
                }
 
                /* Get next token */
-               token = strtok(DSL_NULL, seps);
+               token = cpe_control_strtok_s(DSL_NULL, &nTokenMaxLen, seps, &pNextToken);
                if (token != DSL_NULL)
                {
                   /* Get Activation mode value */
@@ -1909,7 +1952,7 @@ DSL_CPE_STATIC  DSL_void_t DSL_CPE_Help (
    DSL_CPE_FPrintf (DSL_CPE_STDOUT,
       DSL_CPE_PREFIX"Welcome to DSL CPI API control application" DSL_CPE_CRLF);
 
-   if (strlen(sApplicationName) == 0)
+   if (cpe_control_strnlen_s(sApplicationName, DSL_CPE_ARG_SYSTEM_FILE_PATH_LEN) > 0)
    {
       DSL_CPE_FPrintf (DSL_CPE_STDOUT,
          DSL_CPE_PREFIX"usage: %s [options]"DSL_CPE_CRLF, sApplicationName);
@@ -1994,7 +2037,7 @@ DSL_char_t *DSL_CPE_Fd2DevStr(DSL_int_t fd)
    DSL_char_t *pDevSrt = g_nDevNumStr;
    DSL_CPE_Control_Context_t *pCtx = DSL_NULL;
 
-   snprintf(pDevSrt, sizeof(g_nDevNumStr), "%s", "");
+   cpe_control_snprintf_s(pDevSrt, sizeof(g_nDevNumStr), "%s", "");
 
    /* Get Global Context pointer*/
    pCtx = DSL_CPE_GetGlobalContext();
@@ -2010,7 +2053,8 @@ DSL_char_t *DSL_CPE_Fd2DevStr(DSL_int_t fd)
       {
          if (fd == pCtx->fd[i])
          {
-            snprintf(pDevSrt, sizeof(g_nDevNumStr), " nDevice=%d", i);
+            cpe_control_snprintf_s(pDevSrt, sizeof(g_nDevNumStr),
+                                   " nDevice=%d", i);
             return pDevSrt;
          }
       }
@@ -2301,7 +2345,8 @@ DSL_Error_t DSL_CPE_DownloadFirmware(
    {
       if ( pcFw2 == DSL_NULL )
       {
-         if ((g_bFirmware2 != -1) || (strlen(g_sFirmwareName2) > 0))
+         if ((g_bFirmware2 != -1) ||
+             (cpe_control_strnlen_s(g_sFirmwareName2, DSL_CPE_ARG_SYSTEM_FILE_PATH_LEN) > 0))
          {
             pcFw2 = g_sFirmwareName2;
          }
@@ -2311,7 +2356,8 @@ DSL_Error_t DSL_CPE_DownloadFirmware(
    {
       if ( pcFw == DSL_NULL )
       {
-         if ((g_bFirmware1 != -1) || (strlen(g_sFirmwareName1) > 0))
+         if ((g_bFirmware1 != -1) ||
+             (cpe_control_strnlen_s(g_sFirmwareName1, DSL_CPE_ARG_SYSTEM_FILE_PATH_LEN) > 0))
          {
             pcFw = g_sFirmwareName1;
          }
@@ -2448,12 +2494,15 @@ DSL_Error_t DSL_CPE_DownloadFirmware(
             configuration to be used for next download */
             if (ldFw.data.pFirmware != DSL_NULL)
             {
+               DSL_size_t nTmpLen = cpe_control_strnlen_s(
+                                       pcFw, DSL_CPE_ARG_SYSTEM_FILE_PATH_LEN);
+
                DSL_CPE_Free(g_sFirmwareName1);
-               g_sFirmwareName1 = DSL_CPE_Malloc (strlen (pcFw) + 1);
+               g_sFirmwareName1 = DSL_CPE_Malloc (nTmpLen + 1);
                if (g_sFirmwareName1)
                {
-                  memset(g_sFirmwareName1, 0, strlen (pcFw) + 1);
-                  cpe_control_strncpy_s(g_sFirmwareName1, strlen (pcFw) + 1, pcFw, strlen (pcFw));
+                  memset(g_sFirmwareName1, 0, nTmpLen + 1);
+                  cpe_control_strncpy_s(g_sFirmwareName1, nTmpLen + 1, pcFw, nTmpLen);
                }
             }
          }
@@ -2490,12 +2539,15 @@ DSL_Error_t DSL_CPE_DownloadFirmware(
                            configuration to be used for next download */
                         if (ldFw.data.pFirmware2 != DSL_NULL)
                         {
+                           DSL_size_t nTmpLen = cpe_control_strnlen_s(
+                                                   pcFw2, DSL_CPE_ARG_SYSTEM_FILE_PATH_LEN);
+
                            DSL_CPE_Free(g_sFirmwareName2);
-                           g_sFirmwareName2 = DSL_CPE_Malloc (strlen (pcFw2) + 1);
+                           g_sFirmwareName2 = DSL_CPE_Malloc (nTmpLen + 1);
                            if (g_sFirmwareName2)
                            {
-                              memset(g_sFirmwareName2, 0, strlen (pcFw2) + 1);
-                              cpe_control_strncpy_s(g_sFirmwareName2, strlen (pcFw2) + 1, pcFw2, strlen (pcFw2));
+                              memset(g_sFirmwareName2, 0, nTmpLen + 1);
+                              cpe_control_strncpy_s(g_sFirmwareName2, nTmpLen + 1, pcFw2, nTmpLen);
                            }
                         }
                      }
@@ -2520,12 +2572,15 @@ DSL_Error_t DSL_CPE_DownloadFirmware(
                            configuration to be used for next download */
                         if (ldFw.data.pFirmware != DSL_NULL)
                         {
+                           DSL_size_t nTmpLen = cpe_control_strnlen_s(
+                                                   pcFw, DSL_CPE_ARG_SYSTEM_FILE_PATH_LEN);
+
                            DSL_CPE_Free(g_sFirmwareName1);
-                           g_sFirmwareName1 = DSL_CPE_Malloc (strlen (pcFw) + 1);
+                           g_sFirmwareName1 = DSL_CPE_Malloc (nTmpLen + 1);
                            if (g_sFirmwareName1)
                            {
-                              memset(g_sFirmwareName1, 0, strlen (pcFw) + 1);
-                              cpe_control_strncpy_s(g_sFirmwareName1, strlen (pcFw) + 1, pcFw, strlen (pcFw));
+                              memset(g_sFirmwareName1, 0, nTmpLen + 1);
+                              cpe_control_strncpy_s(g_sFirmwareName1, nTmpLen + 1, pcFw, nTmpLen);
                            }
                         }
                      }
@@ -2813,7 +2868,10 @@ DSL_Error_t DSL_CPE_ScriptExecute (
 {
    DSL_char_t *buf = DSL_NULL;
    DSL_char_t *args = DSL_NULL;
-   DSL_char_t nLineIdentifiers[3][9] = { "nLine=0", "nLine=1", "nLine=-1" };
+   DSL_char_t nLineIdentifiers[DSL_CPE_LINE_IDENTIFIERS_NUM]
+      [DSL_CPE_LINE_IDENTIFIER_LEN] = {
+         "nLine=0", "nLine=1", "nLine=-1"
+      };
    DSL_uint16_t nLineOffset = 0;
    DSL_char_t *pLine = DSL_NULL;
    DSL_char_t *str_command = DSL_NULL;
@@ -2839,6 +2897,7 @@ DSL_Error_t DSL_CPE_ScriptExecute (
 #ifndef INCLUDE_DSL_CPE_FILESYSTEM_SUPPORT
    DSL_char_t *pFile__;
 #endif /* INCLUDE_DSL_CPE_FILESYSTEM_SUPPORT*/
+   DSL_size_t nLine0IdLen = 0, nLine1IdLen = 0, nLinesIdLen = 0;
 
    if (!pFile)
    {
@@ -2863,6 +2922,13 @@ DSL_Error_t DSL_CPE_ScriptExecute (
    buf = script_buf->buffer_tmp;
    str_command = script_buf->buffer_cmd;
 
+   nLine0IdLen = cpe_control_strnlen_s(nLineIdentifiers[0],
+                                       DSL_CPE_LINE_IDENTIFIER_LEN);
+   nLine1IdLen = cpe_control_strnlen_s(nLineIdentifiers[1],
+                                       DSL_CPE_LINE_IDENTIFIER_LEN);
+   nLinesIdLen = cpe_control_strnlen_s(nLineIdentifiers[2],
+                                       DSL_CPE_LINE_IDENTIFIER_LEN);
+
 #ifdef INCLUDE_DSL_CPE_FILESYSTEM_SUPPORT
    while (1)
    {
@@ -2870,7 +2936,7 @@ DSL_Error_t DSL_CPE_ScriptExecute (
       memset (buf, 0, script_buf->nSize);
 
       char nSize[14];
-      snprintf(nSize, sizeof(nSize), "%%%ds", script_buf->nSize);
+      cpe_control_snprintf_s(nSize, sizeof(nSize), "%%%ds", script_buf->nSize);
 
       /* scan one line into buffer */
       if ((DSL_CPE_FGets (buf, script_buf->nSize, pFile)) == DSL_NULL)
@@ -3802,38 +3868,40 @@ DSL_Error_t DSL_CPE_ScriptExecute (
 #ifdef INCLUDE_DSL_CPE_CLI_SUPPORT
          str_command[script_buf->nSize - 1] = '\0';
 
-         args = buf + DSL_MIN(strlen(str_command) + 1, script_buf->nSize - 1);
+         args = buf +
+            DSL_MIN(cpe_control_strnlen_s(str_command, script_buf->nSize) + 1,
+                    script_buf->nSize - 1);
          nLineOffset = 0;
 
          /* for single link remove parameter and it's value */
          if(pContext->bBackwardCompMode)
          {
-            if(strncmp(args, nLineIdentifiers[0], strlen(nLineIdentifiers[0])) == 0)
+            if(strncmp(args, nLineIdentifiers[0], nLine0IdLen) == 0)
             {
-               nLineOffset = strlen(nLineIdentifiers[0]);
+               nLineOffset = nLine0IdLen;
             }
-            else if(strncmp(args, nLineIdentifiers[1], strlen(nLineIdentifiers[1])) == 0)
+            else if(strncmp(args, nLineIdentifiers[1], nLine1IdLen) == 0)
             {
                /* do not process this case
                 * just indicate that required parameter was found */
                nLineOffset = 1;
             }
-            else if(strncmp(args, nLineIdentifiers[2], strlen(nLineIdentifiers[2])) == 0)
+            else if(strncmp(args, nLineIdentifiers[2], nLinesIdLen) == 0)
             {
-               nLineOffset = strlen(nLineIdentifiers[2]);
+               nLineOffset = nLinesIdLen;
             }
          }
          /* for bonding keep just parameter's value */
          else
          {
-            if(strncmp(args, nLineIdentifiers[0], strlen(nLineIdentifiers[0])) == 0 ||
-               strncmp(args, nLineIdentifiers[1], strlen(nLineIdentifiers[1])) == 0)
+            if(strncmp(args, nLineIdentifiers[0], nLine0IdLen) == 0 ||
+               strncmp(args, nLineIdentifiers[1], nLine1IdLen) == 0)
             {
-               nLineOffset = strlen(nLineIdentifiers[0]) - 1;
+               nLineOffset = nLine0IdLen - 1;
             }
-            else if(strncmp(args, nLineIdentifiers[2], strlen(nLineIdentifiers[2])) == 0)
+            else if(strncmp(args, nLineIdentifiers[2], nLinesIdLen) == 0)
             {
-               nLineOffset = strlen(nLineIdentifiers[2]) - 2;
+               nLineOffset = nLinesIdLen - 2;
             }
          }
 
@@ -4144,8 +4212,11 @@ DSL_Error_t DSL_CPE_LowLevelConfigurationCheck(
    }
    else
    {
+      DSL_size_t strmax = MAX_INFO_STRING_LEN;
+      char *pNextToken = DSL_NULL;
+
       /* Get first token */
-      token = strtok (verInf.data.DSL_ChipSetFWVersion, seps);
+      token = cpe_control_strtok_s(verInf.data.DSL_ChipSetFWVersion, &strmax, seps, &pNextToken);
       if (token != DSL_NULL)
       {
          for(i = 0; i < 6; i++)
@@ -4153,7 +4224,7 @@ DSL_Error_t DSL_CPE_LowLevelConfigurationCheck(
             sscanf (token, "%hhu", pVer);
 
             /* Get next token */
-            token = strtok(DSL_NULL, seps);
+            token = cpe_control_strtok_s(DSL_NULL, &strmax, seps, &pNextToken);
 
             /* Exit scanning if no further information is included */
             if (token == DSL_NULL)
@@ -4212,13 +4283,13 @@ DSL_CPE_STATIC  DSL_int_t DSL_CPE_Event_S_InitReadyHandle(
 #ifdef INCLUDE_DSL_CPE_CLI_SUPPORT
    if (pContext->bBackwardCompMode)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText),
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
          "sEventType=%s" DSL_CPE_CRLF ,
          DSL_CPE_Event_Type2String(&(pEvent->data.nEventType)));
    }
    else if (DSL_CPE_DSL_ENTITIES > 1)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText),
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
          "sEventType=%s nDevice=%d" DSL_CPE_CRLF ,
          DSL_CPE_Event_Type2String(&(pEvent->data.nEventType)), nDevice);
    }
@@ -4249,14 +4320,14 @@ DSL_CPE_STATIC DSL_int_t DSL_CPE_Event_S_AutobootStatusHandle(
 #ifdef INCLUDE_DSL_CPE_CLI_SUPPORT
    if (pContext->bBackwardCompMode)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText),
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
          "sEventType=%s nStatus=%d nFirmwareRequestType=%d" DSL_CPE_CRLF,
          DSL_CPE_Event_Type2String(&(pEvent->data.nEventType)),
          pEvent->data.pData->autobootStatus.nStatus, pEvent->data.pData->autobootStatus.nFirmwareRequestType);
    }
    else if (DSL_CPE_DSL_ENTITIES > 1)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText),
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
          "sEventType=%s nDevice%d nStatus=%d nFirmwareRequestType=%d" DSL_CPE_CRLF,
          DSL_CPE_Event_Type2String(&(pEvent->data.nEventType)),
          nDevice,
@@ -4361,7 +4432,7 @@ DSL_CPE_STATIC DSL_int_t DSL_CPE_Event_S_PmSyncHandle(
 #ifdef INCLUDE_DSL_CPE_CLI_SUPPORT
    if (pContext->bBackwardCompMode)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText),
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
          "sEventType=%s b15MinElapsed=%u b1DayElapsed=%u" DSL_CPE_CRLF,
          DSL_CPE_Event_Type2String(&(pEvent->data.nEventType)),
          pEvent->data.pData->sync.b15MinElapsed,
@@ -4369,7 +4440,7 @@ DSL_CPE_STATIC DSL_int_t DSL_CPE_Event_S_PmSyncHandle(
    }
    else if (DSL_CPE_DSL_ENTITIES > 1)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText),
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
          "sEventType=%s nDevice=%d b15MinElapsed=%u b1DayElapsed=%u" DSL_CPE_CRLF,
          DSL_CPE_Event_Type2String(&(pEvent->data.nEventType)),
          nDevice,
@@ -4404,14 +4475,14 @@ DSL_CPE_STATIC DSL_int_t DSL_CPE_Event_S_LineStateHandle(
 #ifdef INCLUDE_DSL_CPE_CLI_SUPPORT
    if (pContext->bBackwardCompMode)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText),
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
          "sEventType=%s " "nLineState=%08X" DSL_CPE_CRLF,
          DSL_CPE_Event_Type2String(&(pEvent->data.nEventType)),
          pEvent->data.pData->lineStateData.nLineState);
    }
    else if (DSL_CPE_DSL_ENTITIES > 1)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText),
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
          "sEventType=%s nDevice=%d nLineState=%08X" DSL_CPE_CRLF,
          DSL_CPE_Event_Type2String(&(pEvent->data.nEventType)),
          nDevice,
@@ -4484,7 +4555,7 @@ DSL_CPE_STATIC DSL_int_t DSL_CPE_Event_S_LineStateHandle(
       }
       if (DSL_CPE_DSL_ENTITIES > 1)
       {
-         snprintf(buff, sizeof(buff), "%u", nDevice);
+         cpe_control_snprintf_s(buff, sizeof(buff), "%u", nDevice);
          if (bExec == DSL_TRUE)
          {
             if (DSL_CPE_SetEnv("DSL_LINE_NUMBER", buff) != DSL_SUCCESS)
@@ -4630,7 +4701,7 @@ DSL_CPE_STATIC  DSL_int_t DSL_CPE_Event_S_SystemInterfaceStatusHandle(
          {
             if (nErrCode == DSL_SUCCESS)
             {
-               snprintf(buff, sizeof(buff), "%u", nDevice);
+               cpe_control_snprintf_s(buff, sizeof(buff), "%u", nDevice);
                nErrCode = DSL_CPE_SetEnv("DSL_LINE_NUMBER", buff);
             }
          }
@@ -4645,7 +4716,7 @@ DSL_CPE_STATIC  DSL_int_t DSL_CPE_Event_S_SystemInterfaceStatusHandle(
 #ifdef INCLUDE_DSL_CPE_CLI_SUPPORT
    if (pContext->bBackwardCompMode)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText),
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
          "sEventType=%s nTcLayer=%d nEfmTcConfigUs=0x%08X nEfmTcConfigDs=0x%08X "
          "nSystemIf=%d" DSL_CPE_CRLF,
          DSL_CPE_Event_Type2String(&(pEvent->data.nEventType)),
@@ -4656,7 +4727,7 @@ DSL_CPE_STATIC  DSL_int_t DSL_CPE_Event_S_SystemInterfaceStatusHandle(
    }
    else if (DSL_CPE_DSL_ENTITIES > 1)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText),
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
          "sEventType=%s nDevice=%d nTcLayer=%d nEfmTcConfigUs=0x%08X nEfmTcConfigDs=0x%08X "
          "nSystemIf=%d" DSL_CPE_CRLF,
          DSL_CPE_Event_Type2String(&(pEvent->data.nEventType)),
@@ -4686,7 +4757,7 @@ DSL_CPE_STATIC  DSL_int_t DSL_CPE_Event_I_DataPathFailuresHandle(
 #ifdef INCLUDE_DSL_CPE_CLI_SUPPORT
    if (pContext->bBackwardCompMode)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText),
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
          "sEventType=%s nChannel=%d nAccessDir=%s nDataPathFailures=%08X" DSL_CPE_CRLF,
          DSL_CPE_Event_Type2String(&(pEvent->data.nEventType)),
          pEvent->data.nChannel,
@@ -4695,7 +4766,7 @@ DSL_CPE_STATIC  DSL_int_t DSL_CPE_Event_I_DataPathFailuresHandle(
    }
    else if (DSL_CPE_DSL_ENTITIES > 1)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText),
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
          "sEventType=%s nDevice=%d nChannel=%d nAccessDir=%s nDataPathFailures=%08X" DSL_CPE_CRLF,
          DSL_CPE_Event_Type2String(&(pEvent->data.nEventType)),
          nDevice,
@@ -4723,7 +4794,7 @@ DSL_CPE_STATIC  DSL_int_t DSL_CPE_Event_I_LineFailuresHandle(
 #ifdef INCLUDE_DSL_CPE_CLI_SUPPORT
    if (pContext->bBackwardCompMode)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText),
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
          "sEventType=%s nChannel=%d nAccessDir=%s nLineFailures=%08X" DSL_CPE_CRLF,
          DSL_CPE_Event_Type2String(&(pEvent->data.nEventType)),
          pEvent->data.nChannel,
@@ -4732,7 +4803,7 @@ DSL_CPE_STATIC  DSL_int_t DSL_CPE_Event_I_LineFailuresHandle(
    }
    else if (DSL_CPE_DSL_ENTITIES > 1)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText),
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
          "sEventType=%s nDevice=%d nChannel=%d nAccessDir=%s nLineFailures=%08X" DSL_CPE_CRLF,
          DSL_CPE_Event_Type2String(&(pEvent->data.nEventType)),
          nDevice,
@@ -4770,13 +4841,14 @@ DSL_CPE_STATIC  DSL_int_t DSL_CPE_Event_S_ChannelDataRateHandle(
       {
          if (DSL_CPE_DSL_ENTITIES > 1)
          {
-            snprintf(buff, sizeof(buff), "%u", nDevice);
+            cpe_control_snprintf_s(buff, sizeof(buff), "%u", nDevice);
             DSL_CPE_SetEnv("DSL_LINE_NUMBER", buff);
          }
-         snprintf(sVarName, sizeof(sVarName), "DSL_DATARATE_%s_BC%d",
+         cpe_control_snprintf_s(sVarName, sizeof(sVarName), "DSL_DATARATE_%s_BC%d",
             pEvent->data.nAccessDir == DSL_DOWNSTREAM ? "DS" : "US",
             pEvent->data.nChannel == 0 ? 0 : pEvent->data.nChannel == 1 ? 1 : 0);
-         snprintf(sVarVal, sizeof(sVarVal), "%lu", (unsigned long)pEvent->data.pData->channelStatusData.ActualDataRate);
+         cpe_control_snprintf_s(sVarVal, sizeof(sVarVal), "%lu",
+            (unsigned long)pEvent->data.pData->channelStatusData.ActualDataRate);
 
          if (DSL_CPE_SetEnv(sVarName, sVarVal) == DSL_SUCCESS)
          {
@@ -4789,7 +4861,7 @@ DSL_CPE_STATIC  DSL_int_t DSL_CPE_Event_S_ChannelDataRateHandle(
 #ifdef INCLUDE_DSL_CPE_CLI_SUPPORT
    if (pContext->bBackwardCompMode)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText),
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
          "sEventType=%s nChannel=%d nAccessDir=%s ActualDataRate=%d PreviousDataRate=%d "
          "ActualInterleaveDelay=%d ActualImpulseNoiseProtection=%d" DSL_CPE_CRLF,
          DSL_CPE_Event_Type2String(&(pEvent->data.nEventType)),
@@ -4802,7 +4874,7 @@ DSL_CPE_STATIC  DSL_int_t DSL_CPE_Event_S_ChannelDataRateHandle(
    }
    else if (DSL_CPE_DSL_ENTITIES > 1)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText),
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
          "sEventType=%s nDevice=%d nChannel=%d nAccessDir=%s ActualDataRate=%d PreviousDataRate=%d "
          "ActualInterleaveDelay=%d ActualImpulseNoiseProtection=%d" DSL_CPE_CRLF,
          DSL_CPE_Event_Type2String(&(pEvent->data.nEventType)),
@@ -4833,7 +4905,7 @@ DSL_CPE_STATIC  DSL_int_t DSL_CPE_Event_S_ChannelDataRateShiftThresholdCrossingH
 #ifdef INCLUDE_DSL_CPE_CLI_SUPPORT
    if (pContext->bBackwardCompMode)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText),
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
          "sEventType=%s nChannel=%d nAccessDir=%s"
          " nDataRateThresholdType=DSL_G997_DATARATE_THRESHOLD_%sSHIFT" DSL_CPE_CRLF,
          DSL_CPE_Event_Type2String(&(pEvent->data.nEventType)),
@@ -4844,7 +4916,7 @@ DSL_CPE_STATIC  DSL_int_t DSL_CPE_Event_S_ChannelDataRateShiftThresholdCrossingH
    }
    else if (DSL_CPE_DSL_ENTITIES > 1)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText),
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
          "sEventType=%s nDevice=%d nChannel=%d nAccessDir=%s"
          " nDataRateThresholdType=DSL_G997_DATARATE_THRESHOLD_%sSHIFT" DSL_CPE_CRLF,
          DSL_CPE_Event_Type2String(&(pEvent->data.nEventType)),
@@ -4962,13 +5034,13 @@ DSL_CPE_STATIC  DSL_int_t DSL_CPE_Event_S_LinitFailureHandle(
 
    if (pContext->bBackwardCompMode)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText),
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
          "sEventType=%s nLineInitStatus=%s nLineInitSubStatus=%s" DSL_CPE_CRLF,
          DSL_CPE_Event_Type2String(&(pEvent->data.nEventType)), pStatus, pSubStatus);
    }
    else if (DSL_CPE_DSL_ENTITIES > 1)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText),
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
          "sEventType=%s nDevice=%d nLineInitStatus=%s nLineInitSubStatus=%s"
          DSL_CPE_CRLF,
          DSL_CPE_Event_Type2String(&(pEvent->data.nEventType)), nDevice, pStatus,
@@ -5025,12 +5097,14 @@ DSL_CPE_STATIC  DSL_int_t DSL_CPE_Event_S_FirmwareRequestHandle(
 
    if (pContext->bBackwardCompMode)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText), "sEventType=%s nFirmwareRequestType=%s nPortMode=%s"DSL_CPE_CRLF,
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
+         "sEventType=%s nFirmwareRequestType=%s nPortMode=%s"DSL_CPE_CRLF,
          DSL_CPE_Event_Type2String(&nEvent), pFwReqType, pPortMode);
    }
    else if (DSL_CPE_DSL_ENTITIES > 1)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText), "sEventType=%s nDevice=%d nFirmwareRequestType=%s nPortMode=%s" DSL_CPE_CRLF,
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
+         "sEventType=%s nDevice=%d nFirmwareRequestType=%s nPortMode=%s" DSL_CPE_CRLF,
          DSL_CPE_Event_Type2String(&nEvent), nDevice, pFwReqType, pPortMode);
    }
 
@@ -5072,14 +5146,16 @@ DSL_CPE_STATIC  DSL_int_t DSL_CPE_Event_S_FirmwareDownloadStatusHandle(
 #ifdef INCLUDE_DSL_CPE_CLI_SUPPORT
    if (pContext->bBackwardCompMode)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText), "sEventType=%s nError=%d nFwType=%d" DSL_CPE_CRLF,
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
+         "sEventType=%s nError=%d nFwType=%d" DSL_CPE_CRLF,
          DSL_CPE_Event_Type2String(&nEvent),
          nFwDwnlStatus.nError,
          nFwDwnlStatus.nFwModeStatus);
    }
    else if (DSL_CPE_DSL_ENTITIES > 1)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText), "sEventType=%s nDevice=%d nError=%d nFwType=%d" DSL_CPE_CRLF,
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
+         "sEventType=%s nDevice=%d nError=%d nFwType=%d" DSL_CPE_CRLF,
          DSL_CPE_Event_Type2String(&nEvent),
          nDevice,
          nFwDwnlStatus.nError,
@@ -5139,12 +5215,14 @@ DSL_CPE_STATIC  DSL_int_t DSL_CPE_Event_S_FeInventoryAvailableHandle(
 #ifdef INCLUDE_DSL_CPE_CLI_SUPPORT
    if (pContext->bBackwardCompMode)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText), "sEventType=%s ",
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
+         "sEventType=%s ",
          DSL_CPE_Event_Type2String(&(pEvent->data.nEventType)));
    }
    else if (DSL_CPE_DSL_ENTITIES > 1)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText), "sEventType=%s nDevice=%d ",
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
+         "sEventType=%s nDevice=%d ",
          DSL_CPE_Event_Type2String(&(pEvent->data.nEventType)), nDevice);
    }
 
@@ -5152,41 +5230,48 @@ DSL_CPE_STATIC  DSL_int_t DSL_CPE_Event_S_FeInventoryAvailableHandle(
       sizeof(lineInventory.data.G994VendorID),
       sizeof(lineInventory.data.G994VendorID[0]),
       DSL_ARRAY_FORMAT_HEX);
-   DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText), "%sG994VendorID=%s ",
+   cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
+      "%sG994VendorID=%s ",
       CLI_EventText, buf);
 
    DSL_CPE_ArraySPrintF(buf, lineInventory.data.SystemVendorID,
       sizeof(lineInventory.data.SystemVendorID),
       sizeof(lineInventory.data.SystemVendorID[0]),
       DSL_ARRAY_FORMAT_HEX);
-   DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText), "%sSystemVendorID=%s ",
+   cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
+      "%sSystemVendorID=%s ",
       CLI_EventText, buf);
 
    DSL_CPE_ArraySPrintF(buf, lineInventory.data.VersionNumber,
       sizeof(lineInventory.data.VersionNumber),
       sizeof(lineInventory.data.VersionNumber[0]),
       DSL_ARRAY_FORMAT_HEX);
-   DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText), "%sVersionNumber=%s ",
+   cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
+      "%sVersionNumber=%s ",
       CLI_EventText, buf);
 
    DSL_CPE_ArraySPrintF(buf, lineInventory.data.SerialNumber,
       sizeof(lineInventory.data.SerialNumber),
       sizeof(lineInventory.data.SerialNumber[0]),
       DSL_ARRAY_FORMAT_HEX);
-   DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText), "%sSerialNumber=%s ",
+   cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
+      "%sSerialNumber=%s ",
       CLI_EventText, buf);
 
-   DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText), "%sSelfTestResult=%u ",
+   cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
+      "%sSelfTestResult=%u ",
       CLI_EventText, lineInventory.data.SelfTestResult);
 
    DSL_CPE_ArraySPrintF(buf, lineInventory.data.XTSECapabilities,
       sizeof(lineInventory.data.XTSECapabilities),
       sizeof(lineInventory.data.XTSECapabilities[0]),
       DSL_ARRAY_FORMAT_HEX);
-   DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText), "%sXTSECapabilities=%s ",
+   cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
+      "%sXTSECapabilities=%s ",
       CLI_EventText, buf);
 
-   DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText), "%s" DSL_CPE_CRLF, CLI_EventText);
+   cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
+      "%s" DSL_CPE_CRLF, CLI_EventText);
 #endif /* INCLUDE_DSL_CPE_CLI_SUPPORT */
 
    return 0;
@@ -5209,13 +5294,13 @@ DSL_CPE_STATIC  DSL_int_t DSL_CPE_Event_S_FeTestParamsAvailableHandle(
 #ifdef INCLUDE_DSL_CPE_CLI_SUPPORT
    if (pContext->bBackwardCompMode)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText),
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
          "sEventType=%s "DSL_CPE_CRLF,
          DSL_CPE_Event_Type2String(&(pEvent->data.nEventType)));
    }
    else if (DSL_CPE_DSL_ENTITIES > 1)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText),
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
          "sEventType=%s nDevice=%d "DSL_CPE_CRLF,
          DSL_CPE_Event_Type2String(&(pEvent->data.nEventType)), nDevice);
    }
@@ -5261,13 +5346,13 @@ DSL_CPE_STATIC  DSL_int_t DSL_CPE_Event_S_LinePowerMgmtStateHandle(
 
    if (pContext->bBackwardCompMode)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText),
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
          "sEventType=%s nPowerManagementStatus=%s" DSL_CPE_CRLF,
          DSL_CPE_Event_Type2String(&(pEvent->data.nEventType)), pStatus);
    }
    else if (DSL_CPE_DSL_ENTITIES > 1)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText),
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
          "sEventType=%s nDevice=%d nPowerManagementStatus=%s" DSL_CPE_CRLF,
          DSL_CPE_Event_Type2String(&(pEvent->data.nEventType)), nDevice, pStatus);
    }
@@ -5290,13 +5375,13 @@ DSL_CPE_STATIC  DSL_int_t DSL_CPE_Event_S_SnmpMessageAvailableHandle(
 #ifdef INCLUDE_DSL_CPE_CLI_SUPPORT
    if (pContext->bBackwardCompMode)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText),
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
          "sEventType=%s",
          DSL_CPE_Event_Type2String(&(pEvent->data.nEventType)));
    }
    else if (DSL_CPE_DSL_ENTITIES > 1)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText),
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
          "sEventType=%s nDevice=%d",
          DSL_CPE_Event_Type2String(&(pEvent->data.nEventType)), nDevice);
    }
@@ -5321,7 +5406,7 @@ DSL_CPE_STATIC  DSL_int_t DSL_CPE_Event_I_ChannelThresholdCrossingHandle(
 #ifdef INCLUDE_DSL_CPE_CLI_SUPPORT
    if (pContext->bBackwardCompMode)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText),
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
          "sEventType=%s "
          "nChannel=%d "
          "nATUDir=%s "
@@ -5339,7 +5424,7 @@ DSL_CPE_STATIC  DSL_int_t DSL_CPE_Event_I_ChannelThresholdCrossingHandle(
    }
    else if (DSL_CPE_DSL_ENTITIES > 1)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText),
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
          "sEventType=%s "
          "nDevice=%d "
          "nChannel=%d "
@@ -5376,7 +5461,7 @@ DSL_CPE_STATIC  DSL_int_t DSL_CPE_Event_I_LineThresholdCrossingHandle(
 #ifdef INCLUDE_DSL_CPE_CLI_SUPPORT
    if (pContext->bBackwardCompMode)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText),
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
          "sEventType=%s "
          "nChannel=%d "
          "nATUDir=%s "
@@ -5394,7 +5479,7 @@ DSL_CPE_STATIC  DSL_int_t DSL_CPE_Event_I_LineThresholdCrossingHandle(
    }
    else if (DSL_CPE_DSL_ENTITIES > 1)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText),
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
          "sEventType=%s "
          "nDevice=%d "
          "nChannel=%d "
@@ -5431,7 +5516,7 @@ DSL_CPE_STATIC  DSL_int_t DSL_CPE_Event_I_DataPathThresholdCrossingHandle(
 #ifdef INCLUDE_DSL_CPE_CLI_SUPPORT
    if (pContext->bBackwardCompMode)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText),
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
          "sEventType=%s "
          "nChannel=%d "
          "nATUDir=%s "
@@ -5449,7 +5534,7 @@ DSL_CPE_STATIC  DSL_int_t DSL_CPE_Event_I_DataPathThresholdCrossingHandle(
    }
    else if (DSL_CPE_DSL_ENTITIES > 1)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText),
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
          "sEventType=%s "
          "nDevice=%d "
          "nChannel=%d "
@@ -5487,7 +5572,7 @@ DSL_CPE_STATIC  DSL_int_t DSL_CPE_Event_I_ReTxThresholdCrossingHandle(
 #ifdef INCLUDE_DSL_CPE_CLI_SUPPORT
    if (pContext->bBackwardCompMode)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText),
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
          "sEventType=%s "
          "nChannel=%d "
          "nATUDir=%s "
@@ -5505,7 +5590,7 @@ DSL_CPE_STATIC  DSL_int_t DSL_CPE_Event_I_ReTxThresholdCrossingHandle(
    }
    else if (DSL_CPE_DSL_ENTITIES > 1)
    {
-      DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText),
+      cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
          "sEventType=%s "
          "nDevice=%d "
          "nChannel=%d "
@@ -5743,13 +5828,13 @@ DSL_int_t DSL_CPE_EventHandler (DSL_CPE_Thread_Params_t *param)
 #ifdef INCLUDE_DSL_CPE_CLI_SUPPORT
             if (pContext->bBackwardCompMode)
             {
-               DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText),
+               cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
                   "sEventType=%s",
                   DSL_CPE_Event_Type2String(&(event.data.nEventType)));
             }
             else if (DSL_CPE_DSL_ENTITIES > 1)
             {
-               DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText),
+               cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
                   "sEventType=%s nDevice=%d",
                   DSL_CPE_Event_Type2String(&(event.data.nEventType)), nDevice);
             }
@@ -5779,20 +5864,24 @@ DSL_int_t DSL_CPE_EventHandler (DSL_CPE_Thread_Params_t *param)
             }
 
 #ifdef INCLUDE_DSL_CPE_CLI_SUPPORT
-            DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText), "%s nData=\"",
+            cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
+               "%s nData=\"",
                CLI_EventText);
 
             for (i = 0; i < (DSL_int_t)(sizeof (showtimeData) / 2); i++)
             {
                if (i % 10 == 0)
                {
-                  DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText), "%s" DSL_CPE_CRLF,
+                  cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
+                     "%s" DSL_CPE_CRLF,
                      CLI_EventText);
                }
-               DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText), "%s0x%04X ",
+               cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
+                  "%s0x%04X ",
                   CLI_EventText, showtimeData[i]);
             }
-            DSL_CPE_snprintf(CLI_EventText, sizeof(CLI_EventText), "%s" DSL_CPE_CRLF "\"",
+            cpe_control_snprintf_s(CLI_EventText, sizeof(CLI_EventText),
+               "%s" DSL_CPE_CRLF "\"",
                CLI_EventText);
 #endif /* INCLUDE_DSL_CPE_CLI_SUPPORT */
 
@@ -6407,7 +6496,8 @@ DSL_Error_t DSL_CPE_FwFeaturesGet(
    }
 
 #if defined (INCLUDE_DSL_CPE_API_VRX)
-   if ((g_bFirmware1 != -1) || (strlen(g_sFirmwareName1) > 0))
+   if ((g_bFirmware1 != -1) ||
+       (cpe_control_strnlen_s(g_sFirmwareName1, DSL_CPE_ARG_SYSTEM_FILE_PATH_LEN) > 0))
    {
       /* Check for the VDSL FW capability */
       if ((FwApplication1 == 5) || (FwApplication2 == 5) ||
@@ -6585,7 +6675,8 @@ DSL_int32_t DSL_CPE_DeviceInit (
    if (bOptimize != 1)
    {
       /* Get Firmware binary 1 */
-      if ((g_bFirmware1 != -1) || (strlen(g_sFirmwareName1) > 0))
+      if ((g_bFirmware1 != -1) ||
+          (cpe_control_strnlen_s(g_sFirmwareName1, DSL_CPE_ARG_SYSTEM_FILE_PATH_LEN) > 0))
       {
          nRet = DSL_CPE_LoadFirmwareFromFile(g_sFirmwareName1, &pFirmware1,
             &nFirmwareSize1);
@@ -6606,7 +6697,8 @@ DSL_int32_t DSL_CPE_DeviceInit (
       if (DSL_CPE_LINES_PER_DEVICE == 2)
       {
          /* Get Firmware binary 2 */
-         if ((g_bFirmware2 != -1) || (strlen(g_sFirmwareName2)))
+         if ((g_bFirmware2 != -1) ||
+             (cpe_control_strnlen_s(g_sFirmwareName2, DSL_CPE_ARG_SYSTEM_FILE_PATH_LEN) > 0))
          {
             nRet = DSL_CPE_LoadFirmwareFromFile(g_sFirmwareName2, &pFirmware2,
                                                 &nFirmwareSize2);
@@ -6628,7 +6720,8 @@ DSL_int32_t DSL_CPE_DeviceInit (
 #endif /* INCLUDE_FW_REQUEST_SUPPORT */
 
    /* Get 1st FW binary Information */
-   if ((g_bFirmware1 != -1) || (strlen(g_sFirmwareName1) > 0))
+   if ((g_bFirmware1 != -1) ||
+       (cpe_control_strnlen_s(g_sFirmwareName1, DSL_CPE_ARG_SYSTEM_FILE_PATH_LEN) > 0))
    {
       DSL_CPE_FwFeaturesGet(g_sFirmwareName1, &fwFeatures1);
    }
@@ -6640,7 +6733,8 @@ DSL_int32_t DSL_CPE_DeviceInit (
    if (DSL_CPE_LINES_PER_DEVICE == 2)
    {
       /* Get 2nd FW binary Information */
-      if ((g_bFirmware2 != -1) || (strlen(g_sFirmwareName2) > 0))
+      if ((g_bFirmware2 != -1) ||
+          (cpe_control_strnlen_s(g_sFirmwareName2, DSL_CPE_ARG_SYSTEM_FILE_PATH_LEN) > 0))
       {
          DSL_CPE_FwFeaturesGet(g_sFirmwareName2, &fwFeatures2);
       }
@@ -6765,7 +6859,8 @@ DSL_int32_t DSL_CPE_DeviceInit (
       {
          if (bOptimize == 1)
          {
-            if ((g_bFirmware1 != -1) || (strlen(g_sFirmwareName1) > 0))
+            if ((g_bFirmware1 != -1) ||
+                (cpe_control_strnlen_s(g_sFirmwareName1, DSL_CPE_ARG_SYSTEM_FILE_PATH_LEN) > 0))
             {
                ret = DSL_CPE_DownloadFirmware(
                         pContext->fd[nDevice], nDevice, DSL_FW_REQUEST_ADSL,
@@ -6850,7 +6945,8 @@ static DSL_boolean_t DSL_CPE_DebugAndTestInterfaceIPGet(
             bAnyFound = DSL_TRUE;
 
             memset(pIPAddress, 0, nIPAddressSize);
-            cpe_control_strncpy_s(pIPAddress, nIPAddressSize, pTmpIP, strlen(pTmpIP));
+            cpe_control_strncpy_s(pIPAddress, nIPAddressSize,
+                                  pTmpIP, cpe_control_strnlen_s(pTmpIP, DSL_CPE_ARG_IP_V4_LEN));
          }
 
          /* search for match
@@ -6862,7 +6958,8 @@ static DSL_boolean_t DSL_CPE_DebugAndTestInterfaceIPGet(
                bFound = DSL_TRUE;
 
                memset(pIPAddress, 0, nIPAddressSize);
-               cpe_control_strncpy_s(pIPAddress, nIPAddressSize, pTmpIP, strlen(pTmpIP));
+               cpe_control_strncpy_s(pIPAddress, nIPAddressSize,
+                                     pTmpIP, cpe_control_strnlen_s(pTmpIP, DSL_CPE_ARG_IP_V4_LEN));
 
                break;
             }
@@ -7058,11 +7155,12 @@ DSL_int_t dsl_cpe_daemon (
 #endif /* INCLUDE_DSL_RESOURCE_STATISTICS*/
 #endif /* INCLUDE_DSL_CPE_CLI_SUPPORT */
 #if defined(INCLUDE_DSL_JSON_PARSING) && (INCLUDE_DSL_JSON_PARSING == 1)
+   DSL_Error_t nRetConfigInit = DSL_FALSE;
    const DSL_Configuration_t *pConfig = DSL_NULL;
 #endif /* defined(INCLUDE_DSL_JSON_PARSING) && (INCLUDE_DSL_JSON_PARSING == 1) */
 
    /* Prevents multiple instances of DSL Control Application */
-   lockFd = open(lockPath, O_CREAT);
+   lockFd = open(lockPath, O_CREAT|O_RDONLY, S_IRUSR);
 
    if (flock(lockFd, LOCK_EX | LOCK_NB) < DSL_SUCCESS)
    {
@@ -7123,19 +7221,25 @@ DSL_int_t dsl_cpe_daemon (
 
    /* Initialize firmware files with its default values (might be overwritten
       by user arguments in folowing DSL_CPE_ArgParse() function) */
-   g_sFirmwareName1 = DSL_CPE_Malloc(strlen(sDefaultFirmwareName1) + 1);
-   g_sFirmwareName2 = DSL_CPE_Malloc(strlen(sDefaultFirmwareName2) + 1);
+   DSL_size_t nTmpLen1 = cpe_control_strnlen_s(
+                           sDefaultFirmwareName1, DSL_CPE_ARG_SYSTEM_FILE_PATH_LEN);
+   DSL_size_t nTmpLen2 = cpe_control_strnlen_s(
+                           sDefaultFirmwareName2, DSL_CPE_ARG_SYSTEM_FILE_PATH_LEN);
+
+   g_sFirmwareName1 = DSL_CPE_Malloc(nTmpLen1 + 1);
+   g_sFirmwareName2 = DSL_CPE_Malloc(nTmpLen2 + 1);
+
    if(g_sFirmwareName1)
    {
-      memset(g_sFirmwareName1, 0, strlen(sDefaultFirmwareName1) + 1);
-      cpe_control_strncpy_s(g_sFirmwareName1, strlen(sDefaultFirmwareName1) + 1,
-         sDefaultFirmwareName1, strlen(sDefaultFirmwareName1));
+      memset(g_sFirmwareName1, 0, nTmpLen1 + 1);
+      cpe_control_strncpy_s(g_sFirmwareName1, nTmpLen1 + 1,
+                            sDefaultFirmwareName1, nTmpLen1);
    }
    if(g_sFirmwareName2)
    {
-      memset(g_sFirmwareName2, 0, strlen(sDefaultFirmwareName2) + 1);
-      cpe_control_strncpy_s(g_sFirmwareName2, strlen(sDefaultFirmwareName2) + 1,
-         sDefaultFirmwareName2, strlen(sDefaultFirmwareName2));
+      memset(g_sFirmwareName2, 0, nTmpLen2 + 1);
+      cpe_control_strncpy_s(g_sFirmwareName2, nTmpLen2 + 1,
+                            sDefaultFirmwareName2, nTmpLen2);
    }
 
    if (DSL_CPE_UpdateLayoutConfiguration() == DSL_FALSE)
@@ -7146,16 +7250,22 @@ DSL_int_t dsl_cpe_daemon (
    DSL_CPE_ArgParse (argc, argv);
 
 #if defined(INCLUDE_DSL_JSON_PARSING) && (INCLUDE_DSL_JSON_PARSING == 1)
-   (DSL_void_t)DSL_CPE_ConfigInit();
+   nRetConfigInit = DSL_CPE_ConfigInit();
    (DSL_void_t)DSL_CPE_ConfigGet(&pConfig);
    /* Take init configuration into use */
    if (pConfig != DSL_NULL)
    {
       g_MultimodeFsmConfig.nNextMode =
          pConfig->data.sStartupInitConfig.nNextMode;
-      g_nDevices = pConfig->data.sStartupInitConfig.nMaxDeviceNumber;
-      g_nLines = pConfig->data.sStartupInitConfig.nLinesPerDevice;
-      g_nChannels = pConfig->data.sStartupInitConfig.nChannelsPerLine;
+
+      /* do not overwrite if config init failed
+         (default configuration was taken) */
+      if (nRetConfigInit == DSL_SUCCESS)
+      {
+         g_nDevices = pConfig->data.sStartupInitConfig.nMaxDeviceNumber;
+         g_nLines = pConfig->data.sStartupInitConfig.nLinesPerDevice;
+         g_nChannels = pConfig->data.sStartupInitConfig.nChannelsPerLine;
+      }
 
       g_ActivationFsmConfig.nActivationSequence =
          pConfig->data.sCommonConfig.ActSeq;
@@ -7359,12 +7469,14 @@ DSL_int_t dsl_cpe_daemon (
    if (bInit == 1)
    {
       /* Print currently used firmware file(s) */
-      if (g_sFirmwareName1 && (strlen(g_sFirmwareName1) > 0))
+      if (g_sFirmwareName1 &&
+          (cpe_control_strnlen_s(g_sFirmwareName1, DSL_CPE_ARG_SYSTEM_FILE_PATH_LEN) > 0))
       {
          DSL_CCA_DEBUG(DSL_CCA_DBG_MSG, (DSL_CPE_PREFIX
             "(-f) using 1st firmware file - %s" DSL_CPE_CRLF , g_sFirmwareName1));
       }
-      if (g_sFirmwareName2 && (strlen(g_sFirmwareName2) > 0))
+      if (g_sFirmwareName2 &&
+          (cpe_control_strnlen_s(g_sFirmwareName2, DSL_CPE_ARG_SYSTEM_FILE_PATH_LEN) > 0))
       {
          DSL_CCA_DEBUG(DSL_CCA_DBG_MSG, (DSL_CPE_PREFIX
             "(-F) using 2nd firmware file - %s" DSL_CPE_CRLF , g_sFirmwareName2));
@@ -7420,9 +7532,11 @@ DSL_int_t dsl_cpe_daemon (
    for (nDevice = 0; nDevice < DSL_CPE_DSL_ENTITIES; nDevice++)
    {
 #if defined(INCLUDE_DSL_CPE_API_VRX)
-      snprintf(device, sizeof(device), "%s/%d", DSL_CPE_DEVICE_NAME, nDevice);
+      cpe_control_snprintf_s(device, sizeof(device),
+                             "%s/%d", DSL_CPE_DEVICE_NAME, nDevice);
 #else
-      snprintf(device, sizeof(device), "%s", DSL_CPE_DEVICE_NAME);
+      cpe_control_snprintf_s(device, sizeof(device),
+                             "%s", DSL_CPE_DEVICE_NAME);
 #endif /* defined(INCLUDE_DSL_CPE_API_VRX)*/
 
       fd = DSL_CPE_Open (device);
diff --git a/src/dsl_cpe_control.h b/src/dsl_cpe_control.h
index 8720d8a0faaf762372b068ffb3a94889a659493f..614d9079b2879765f6faabe404960bb04d0a70e4 100644
--- a/src/dsl_cpe_control.h
+++ b/src/dsl_cpe_control.h
@@ -184,6 +184,14 @@ DSL_void_t DSL_CPE_ScriptRun(DSL_void_t);
 #define _MKSTR(x)      _MKSTR_1(x)
 #endif
 
+#define DSL_CPE_ARGS_EXTRACT_STRING_LEN      30
+/* IPv4 string max len eg. "201.202.203.204" */
+#define DSL_CPE_ARG_IP_V4_LEN                15
+/* G997 XTU octet bits eg. "04_00_04_00_0C_01_00_07" */
+#define DSL_CPE_ARG_G997_XTU_LEN             23
+#define DSL_CPE_ARG_SYSTEM_FILE_PATH_LEN     99
+#define DSL_CPE_LINE_IDENTIFIERS_NUM         3
+#define DSL_CPE_LINE_IDENTIFIER_LEN          9
 
 typedef unsigned int DSL_size_t;
 
diff --git a/src/dsl_cpe_debug.c b/src/dsl_cpe_debug.c
index 24a9901bfbc57348df9b883f778c04ba5f7de273..fe86a69673940a306c47f2f5dac565e5e5529416 100644
--- a/src/dsl_cpe_debug.c
+++ b/src/dsl_cpe_debug.c
@@ -77,6 +77,9 @@ static DSL_CmvGroupEntry_t DSL_CmvGroups[] =
    { "dsl",  DSL_CMV_GROUP_DSL  },
    { "",     0                  }
 };
+
+static DSL_size_t DSL_CmvGroupNameLen = 4;
+
 #endif /* #if defined (INCLUDE_DSL_CPE_API_DANUBE)*/
 
 DSL_Error_t DSL_strlwr(DSL_char_t *psStr)
@@ -146,7 +149,9 @@ DSL_Error_t DSL_CMV_Read (
 
    DSL_strlwr(str_group);
 
-   for (;(pGroups->nGroupId != 0) && (strlen(pGroups->psGroupName) > 0); pGroups++)
+   for (;(pGroups->nGroupId != 0) &&
+        (cpe_control_strnlen_s(
+            pGroups->psGroupName, DSL_CmvGroupNameLen) > 0); pGroups++)
    {
       if (strcmp (str_group, pGroups->psGroupName) == 0)
       {
@@ -204,7 +209,9 @@ DSL_Error_t DSL_CMV_Write (
 
    DSL_strlwr(str_group);
 
-   for (;(pGroups->nGroupId != 0) && (strlen(pGroups->psGroupName) > 0); pGroups++)
+   for (;(pGroups->nGroupId != 0) &&
+        (cpe_control_strnlen_s(
+            pGroups->psGroupName, DSL_CmvGroupNameLen) > 0); pGroups++)
    {
       if (strcmp (str_group, pGroups->psGroupName) == 0)
       {
@@ -622,12 +629,14 @@ DSL_Error_t DSL_CPE_TcpDebugMessageIntfStart (
       {
          DSL_CPE_Free(g_sTcpMessagesSocketAddr);
       }
-      g_sTcpMessagesSocketAddr = DSL_CPE_Malloc(strlen (sTcpServerIp) + 1);
+
+      DSL_size_t nIpSize = cpe_control_strnlen_s(sTcpServerIp, DSL_CPE_ARG_IP_V4_LEN);
+      g_sTcpMessagesSocketAddr = DSL_CPE_Malloc(nIpSize + 1);
       if (g_sTcpMessagesSocketAddr)
       {
-         memset(g_sTcpMessagesSocketAddr, 0, strlen (sTcpServerIp) + 1);
-         cpe_control_strncpy_s(g_sTcpMessagesSocketAddr, strlen (sTcpServerIp) + 1,
-            sTcpServerIp, strlen (sTcpServerIp));
+         memset(g_sTcpMessagesSocketAddr, 0, nIpSize + 1);
+         cpe_control_strncpy_s(g_sTcpMessagesSocketAddr, nIpSize + 1,
+            sTcpServerIp, nIpSize);
       }
    }
 
diff --git a/src/dsl_cpe_debug_vrx.c b/src/dsl_cpe_debug_vrx.c
index 85f7cc458663d0ecd9f6ae507ff4c3a06eedbd72..004a85c0480e4d0586f2708a90f7e02f68aa4689 100644
--- a/src/dsl_cpe_debug_vrx.c
+++ b/src/dsl_cpe_debug_vrx.c
@@ -360,12 +360,14 @@ DSL_int_t DSL_CPE_VRX_Reboot(
 
    DSL_CPE_VRX_ResponseMessage(pCmvMsg);
 
-   if (strlen(g_sFirmwareName1) > 0)
+   if (cpe_control_strnlen_s(
+         g_sFirmwareName1, DSL_CPE_ARG_SYSTEM_FILE_PATH_LEN) > 0)
    {
       pcFw = g_sFirmwareName1;
    }
 
-   if (strlen(g_sFirmwareName2) > 0)
+   if (cpe_control_strnlen_s(
+         g_sFirmwareName2, DSL_CPE_ARG_SYSTEM_FILE_PATH_LEN) > 0)
    {
       pcFw2 = g_sFirmwareName2;
    }
@@ -1461,7 +1463,7 @@ DSL_int_t DSL_CPE_DEV_DeviceOpen(DSL_char_t *pDevName, DSL_uint32_t dev_num)
       return -1;
    }
 
-   snprintf(text, sizeof(text), "%s/%d", pDevName, dev_num);
+   cpe_control_snprintf_s(text, sizeof(text), "%s/%d", pDevName, dev_num);
 
    mei_fd = DSL_CPE_Open(text);
    /*mei_fd = open(text, O_RDWR);*/
diff --git a/src/dsl_cpe_interface.h b/src/dsl_cpe_interface.h
new file mode 100644
index 0000000000000000000000000000000000000000..48a42c17b93d607a2578dfca5a07e8d5e417d3ff
--- /dev/null
+++ b/src/dsl_cpe_interface.h
@@ -0,0 +1,1147 @@
+/******************************************************************************
+
+         Copyright (c) 2019 Intel Corporation
+
+  For licensing information, see the file 'LICENSE' in the root folder of
+  this software module.
+
+*******************************************************************************/
+#define PATH_SEPARATOR "."
+#define DSL_SECTION_PATH "dsl"
+
+/*! \file dsl_cpe_interface.h
+   \brief File contains the structure and function definitions for DSL functionality.
+   The objects definitions are based on TR-181 definitions.
+*/
+
+/*! \defgroup DSL_STATUS_PARSER Intel DSL Status Parser
+ * Lists the entire modules from the DSL CPE Status Parser */
+
+/** \defgroup DSL_STATUS DSL Status
+ * Lists the entire modules from the DSL CPE Status group 
+ * \ingroup DSL_STATUS_PARSER */
+/** @{  */
+
+
+/** The current operational state of the DSL line (see [Section 4.2.2/TR-181i2]).
+    This parameter is based on ifOperStatus from [RFC2863]
+    Enumeration of
+    - Up
+    - Down
+    - Unknown (not used)
+    - Dormant (not used)
+    - NotPresent (not used)
+   - LowerLayerDown (not used)
+   - Error */
+#define DSL_STAT_LINE_STATUS "status"
+
+/**
+   Indicates whether the interface points towards the Internet or towards End Devices.
+   Indicates whether the interface points towards the Internet (true) 
+   or towards End Devices (false).
+   This parameter is always returned as true */
+#define DSL_STAT_UPSTREAM "upstream"
+
+/**
+   A string identifying the version of the modem firmware currently installed.
+   A string identifying the version of the modem firmware currently installed
+   for this interface.
+   This is applicable only when the modem firmware is separable from the overall
+   CPE software */
+#define DSL_STAT_FIRMWARE_VERSION "firmware_version"
+
+/** Status of the DSL physical link. Enumeration of
+    - Up
+    - Initializing
+    - EstablishingLink
+    - NoSignal (not used, upper layer handling)
+    - Disabled
+    - Error */
+#define DSL_STAT_LINK_STATUS "link_status"
+
+/** 
+   List items indicate which DSL standards and recommendations are supported. 
+   List items indicate which DSL standards and recommendations are supported 
+   by the Line instance.
+   Comma-separated list of strings. Each list item is an enumeration of
+    - T1.413
+    - ETSI_101_388
+    - G.992.1_Annex_A
+    - G.992.1_Annex_B
+    - G.992.1_Annex_C (not supported)
+    - G.992.2_Annex_A
+    - G.992.2_Annex_B (not supported)
+    - G.992.2_Annex_C (not supported)
+    - G.992.3_Annex_A
+    - G.992.3_Annex_B
+    - G.992.4_Annex_A
+    - G.992.3_Annex_I
+    - G.992.3_Annex_J
+    - G.992.4_Annex_I (not supported)
+    - G.992.3_Annex_L
+    - G.992.3_Annex_M
+    - G.992.5_Annex_A
+    - G.992.5_Annex_B
+    - G.992.5_Annex_I
+    - G.992.5_Annex_J
+    - G.992.5_Annex_M
+    - G.993.2_Annex_A
+    - G.993.2_Annex_B
+    - G.993.2_Annex_C
+      \note In G.997.1, this parameter is called 
+         "xDSL Transmission system capabilities".
+          See ITU-T Recommendation [G.997.1]*/
+#define DSL_STAT_STANDARDS_SUPPORTED "standards_supported"
+
+/**
+   This configuration parameter defines the transmission system types.
+   This configuration parameter defines the transmission system types 
+   to be allowed by the xTU on this Line instance.
+    Each bit is 0 if not allowed or 1 if allowed, as defined for the xTU 
+    transmission system enabling (XTSE)
+    in ITU-T G.997.1
+    \note This parameter is defined as xDSL Transmission system enabling (XTSE) 
+         in ITU-T G.997.1.
+         For a full definition, see Clause 7.3.1.1.1 of ITU-T 
+         Recommendation [G.997.1]*/
+#define DSL_STAT_XTSE "xtse"
+
+/**
+   The value MUST be a member of the list reported by the \ref standards_supported parameter.
+   Indicates the standard that the Line instance is using for the connection.
+      \note In G.997.1, this parameter is called "xDSL Transmission system".
+          See ITU-T Recommendation [G.997.1] */
+#define DSL_STAT_STANDARD_USED "standard_used"
+
+/**
+   This parameter indicates which DSL standard and recommendation are currently in use.
+   This parameter indicates which DSL standard and recommendation are currently
+   in use by the Line instance.
+   Only one bit is set, as defined for the xTU transmission system enabling
+   (XTSE) in ITU-T G.997.1*/
+#define DSL_STAT_XTSE_USED "xtse_used"
+
+/**
+   The line encoding method used in establishing the Layer 1 DSL connection.
+   The line encoding method used in establishing the Layer 1 DSL connection 
+   between the CPE and the DSLAM.
+   This parameter is always returned as "DMT" */
+#define DSL_STAT_LINE_ENCODING "line_encoding"
+
+/** List items indicate which VDSL2 profiles are allowed on the line.
+    Comma-separated list of strings. Each list item is an enumeration of
+    - 8a
+    - 8b
+    - 8c
+    - 8d
+    - 12a
+    - 12b
+    - 17a
+    - 30a
+    - 35b
+    \note In G.997.1, this parameter is called PROFILES.
+          See ITU-T Recommendation [G.997.1]*/
+#define DSL_STAT_ALLOWED_PROFILES "allowed_profiles"
+
+/**
+   The value MUST be a member of the list reported by the \ref allowed_profiles parameter.
+   Or else be an empty string. Indicates which VDSL2 profile is currently in 
+   use on the line*/
+#define DSL_STAT_CURRENT_PROFILE "current_profile"
+
+/** The power management state of the line.
+   Enumeration of
+    - L0
+    - L1
+    - L2
+    - L3
+    - L4 (not supported)
+      \note See ITU-T Recommendation [G.997.1]. */
+#define DSL_STAT_POWER_MANAGEMENT_STATE "power_management_state"
+
+/**
+   The success failure cause of the initialization.
+   An enumeration of the following integer values
+    - 0: Successful
+    - 1: Configuration error
+         This error occurs with inconsistencies in configuration parameters, 
+         e.g. when the line is initialized in an xDSL Transmission system where
+         an xTU does not support the configured Maximum Delay or the configured
+         Minimum or Maximum Data Rate for one or more bearer channels
+    - 2: Configuration not feasible on the line
+         This error occurs if the Minimum Data Rate cannot be reached on the 
+         line with the Minimum Noise Margin, Maximum PSD level, Maximum Delay
+         and Maximum Bit Error Ratio for one or more bearer channels
+    - 3: Communication problem
+         This error occurs, for example, due to corrupted messages or bad syntax
+         messages or if no common mode can be selected in the G.994.1
+         handshaking procedure or due to a timeout
+    - 4: No peer xTU detected
+         This error occurs if the peer xTU is not powered or not connected or if
+         the line is too long to allow detection of a peer xTU
+    - 5: Any other or unknown Initialization Failure cause
+
+      \note In G.997.1, this parameter is called "Initialization 
+         success/failure cause"
+         See ITU-T Recommendation [G.997.1]*/
+#define DSL_STAT_SUCCESS_FAILURE_CAUSE "success_failure_cause"
+
+/**
+   This parameter represents the last successful transmitted initialization state.
+   This parameter represents the last successful transmitted initialization 
+   state in the last full initialization performed on the line.
+   Initialization states are defined in the individual xDSL Recommendations and
+   are counted from 0 (if G.994.1 is used) or 1 (if G.994.1 is not used) up to
+   Showtime.
+   This parameter needs to be interpreted along with the 
+   xDSL Transmission System.
+   This parameter is available only when, after a failed full initialization, 
+   the line diagnostics procedures
+   are activated on the line.
+
+    - last_state_transmitted.us for upstream direction
+    - last_state_transmitted.ds for downstream direction
+
+    \note See ITU-T Recommendation [G.997.1]*/
+#define DSL_STAT_LAST_STATE_TRANSMITTED "last_state_transmitted"
+
+/**
+   Indicates the allowed VDSL2 US0 PSD masks for Annex A operation
+   Bit mask as specified in ITU-T Recommendation G.997.1
+      \note For a VDSL2-capable multimode device operating in a mode other 
+         than VDSL2, the value of this parameter SHOULD be set to 0.
+      \note See ITU-T Recommendation [G.997.1] */
+#define DSL_STAT_US0_MASK "us0_mask"
+
+/**
+   Reports whether trellis coding is enabled.
+   A value of 1 indicates that trellis coding is in use, and a value of 0 
+   indicates that the trellis is disabled.
+
+   - trellis.us for upstream direction
+   - trellis.ds for downstream direction
+
+      \note For a multimode device operating in a mode in which this parameter
+         does not apply, the value of this parameter SHOULD be set to -1.
+      \note See ITU-T Recommendation [G.997.1] */
+#define DSL_STAT_TRELLIS "trellis"
+
+/** 
+   Reports whether the OPTIONAL virtual noise mechanism is in use.
+      A value of 1 indicates the virtual noise mechanism is not in use, 
+      and a value of 2 indicates the virtual noise mechanism is in use.
+
+       - act_snr_mode.us for upstream direction
+       - act_snr_mode.ds for downstream direction
+
+         \note For a multimode device operating in a mode in which this parameter
+         does not apply, the value of this parameter SHOULD be set to 0.
+         \note See ITU-T Recommendation [G.997.1] */
+#define DSL_STAT_ACT_SNR_MODE "act_snr_mode"
+
+/** Signifies the line pair that the modem is using to connection
+    LineNumber = 1 is the innermost pair */
+#define DSL_STAT_LINE_NUMBER "line_number"
+
+/** The current maximum attainable data rate (expressed in Kbps) 
+   - max_bit_rate.us: The current maximum attainable data rate upstream
+   - max_bit_rate.ds: The current maximum attainable data rate downstream
+    \note This parameter is related to the G.997.1 parameter ATTNDRus,
+    which is measured in bits/s.
+    \note See ITU-T Recommendation [G.997.1] */
+#define DSL_STAT_MAX_BIT_RATE "max_bit_rate"
+
+/** The current signal-to-noise ratio margin (expressed in 0.1dB)
+   - noise_margin.us: The current signal-to-noise ratio margin in the 
+      upstream direction
+   - noise_margin.ds: The current signal-to-noise ratio margin in the 
+      downstream direction
+    \note In G.997.1, this parameter is called SNRMus.
+    \note See ITU-T Recommendation [G.997.1] */
+#define DSL_STAT_NOISE_MARGIN "noise_margin"
+
+/** 
+   Comma-separated list (maximum list length 24) of strings.
+   Indicates the current signal-to-noise ratio margin.
+
+   - snr_mpb.us for upstream band
+   - snr_mpb.ds for downstream band
+
+   \note Interpretation of the values is as defined in ITU-T Rec. G.997.1.
+   \note See ITU-T Recommendation [G.997.1] */
+#define DSL_STAT_SNR_MPB "snr_mpb"
+
+/**
+   The current output or received power at the CPE's DSL line.
+   - power.us: The current output power at the CPE's DSL line 
+      (expressed in 0.1dBmV) 
+   - power.ds: The current received power at the CPE's DSL line 
+      (expressed in 0.1dBmV)*/
+#define DSL_STAT_POWER "power"
+
+/**
+   xTU-R vendor identifier as defined in G.994.1 and T1.413.
+   In the case of G.994.1 this corresponds to the four-octet provider code,
+   which MUST be represented as eight hexadecimal digits.
+      \note This parameter is OPTIONAL at the G and S/T interfaces in G.997.1
+      Amendment 1.
+      \note If the parameter is implemented but no value is available,
+      it MUST have the value "00000000".
+      \note In G.997.1, this parameter is called "xTU-R G.994.1 Vendor ID".
+      \note See ITU-T Recommendation [G.997.1] */
+#define DSL_STAT_XTUR_VENDOR "xtur_vendor"
+
+/**
+   T.35 country code of the xTU-R vendor as defined in G.994.1,
+   where the two-octet value defined in G.994.1 MUST be represented as
+   four hexadecimal digits
+      \note This parameter is OPTIONAL at the G and S/T interfaces in G.997.1
+      Amendment 1.
+      \note If the parameter is implemented but no value is available,
+      it MUST have the value "0000".
+      \note In G.997.1, this parameter is called "xTU-R G.994.1 Vendor ID".
+      \note See ITU-T Recommendation [G.997.1] */
+#define DSL_STAT_XTUR_COUNTRY "xtur_country"
+
+/**
+   xTU-R T1.413 Revision Number as defined in T1.413 Issue 2
+      \note When T1.413 modulation is not in use,
+      the parameter value SHOULD be 0 */
+#define DSL_STAT_XTUR_ANSI_STD "xtur_ansi_std"
+
+/**
+   xTU-R Vendor Revision Number as defined in T1.413 Issue 2.
+      \note When T1.413 modulation is not in use,
+      the parameter value SHOULD be 0 */
+#define DSL_STAT_XTUR_ANSI_REV "xtur_ansi_rev"
+
+/**
+   xTU-C vendor identifier as defined in G.994.1 and T1.413.
+   In the case of G.994.1 this corresponds to the four-octet provider code,
+   which MUST be represented as eight hexadecimal digits
+      \note This parameter is OPTIONAL at the G and S/T interfaces in G.997.1 
+      Amendment 1.
+      \note If the parameter is implemented but no value is available,
+      it MUST have the value "00000000" */
+#define DSL_STAT_XTUC_VENDOR "xtuc_vendor"
+
+/**
+   T.35 country code of the xTU-C vendor as defined in G.994.1,
+   where the two-octet value defined in G.994.1 MUST be represented as 
+   four hexadecimal digits.
+      \note This parameter is OPTIONAL at the G and S/T
+      interfaces in G.997.1 Amendment 1.
+      \note If the parameter is implemented but no value is available,
+      it MUST have the value "0000". */
+#define DSL_STAT_XTUC_COUNTRY "xtuc_country"
+
+/**
+   xTU-C T1.413 Revision Number as defined in T1.413 Issue 2.
+      \note When T1.413 modulation is not in use,
+      the parameter value SHOULD be 0. */
+#define DSL_STAT_XTUC_ANSI_STD "xtuc_ansi_std"
+
+/** 
+   xTU-C Vendor Revision Number as defined in T1.413 Issue 2.
+      \note When T1.413 modulation is not in use,
+      the parameter value SHOULD be 0. */
+#define DSL_STAT_XTUC_ANSI_REV "xtuc_ansi_rev"
+
+
+/**
+   Comma-separated list of unsigned integers (value 0 to 1280, or 2047).
+   VTU-R estimated upstream power back-off electrical length per band.
+   This parameter is a vector of UPBO electrical length per-band estimates for 
+   each supported downstream band, expressed in 0.1 dB at 1 MHz (kl0) calculated
+   by the VTU-R, based on separate measurements in the supported downstream bands. 
+   The value of each list element ranges from 0 to 128 dB in steps of 0.1 dB, 
+   with special value 204.7 which indicates that the estimate is greater than 
+   128 dB.
+   This parameter is required for the alternative electrical length estimation 
+   method (ELE-M1). The value of each list element is coded as an unsigned 
+   16 bit number in the range 0 (coded as 0) to 128 dB (coded as 1280) 
+   in steps of 0.1 dB.
+
+      \note This parameter is defined as UPBOKLE-R-pb in Clause 7.5.1.23.4 of
+         ITU-T Recommendation [G.997.1]. */
+#define DSL_STAT_UPBOKLER_PB "upbokler_pb"
+
+/**
+   UPBO downstream receiver signal level threshold.
+   This parameter reports the downstream received signal level threshold value 
+   used in the alternative electrical length estimation method (ELE-M1). 
+   This parameter represents an offset from -100 dBm/Hz, and ranges from -64 dB
+   to 0 dB in steps of 0.1 dB.
+   The value is coded as a 16 bit number in the range -64 (coded as -640) to 
+   0 dB (coded as 0) in steps of 0.1 dB.
+   
+      \note See ITU-T Recommendation [G.997.1]. */
+#define DSL_STAT_RXTHRSH_DS "rxthrsh_ds"
+
+/**
+   This parameter indicates the actual active rate adaptation mode.
+   - 2: the link is operating in RA-MODE 2 (AT_INIT).
+   - 3: the link is operating in RA-MODE 3 (DYNAMIC).
+   - 4: the link is operating in RA-MODE 4 (DYNAMIC with SOS).
+
+   - act_ra_mode.us for upstream direction
+   - act_ra_mode.ds for downstream direction
+
+      \note This parameter is defined as ACT-RA-MODEds in Clause 7.5.1.33.1 of 
+      ITU-T Recommendation [G.997.1]. */
+#define DSL_STAT_ACT_RA_MODE "act_ra_mode"
+
+/**
+   This parameter reports the actual signal-to-noise margin of the robust overhead channel
+   (ROC)
+   in the upstream direction (expressed in 0.1 dB). The format is identical to 
+   the format of the line
+   status parameter SNRM margin (noise_margin).
+
+      \note This parameter is defined as SNRM-ROC-us in Clause 7.5.1.35.2 ITU-T 
+      Recommendation [G.997.1]. */
+#define DSL_STAT_SNR_MROC "snr_mroc"
+
+/**
+   The current upstream or downstream signal loss (expressed in 0.1dB).
+   - attenuation.us = The current upstream signal loss.
+   - attenuation.ds = The current downstream signal loss.*/
+#define DSL_STAT_ATTENUATION "attenuation"
+
+/** 
+   The current operational state of the DSL channel (see [Section 4.2.2/TR-181i2]).
+   This parameter is based on ifOperStatus from [RFC2863].
+   Enumeration of
+   - Up
+   - Down
+   - Unknown (not used)
+   - Dormant (not used)
+   - NotPresent (not used)
+   - LowerLayerDown (not used)
+   - Error */
+#define DSL_STAT_CHANNEL_STATUS "status"
+
+/**
+   Comma-separated list of strings. List items indicate which link encapsulation
+   standards and recommendations are supported by the Channel instance.
+   Enumeration of:
+   - G.992.3_Annex_K_ATM
+   - G.992.3_Annex_K_PTM
+   - G.993.2_Annex_K_ATM
+   - G.993.2_Annex_K_PTM
+   - G.994.1 (Auto) */
+#define DSL_STAT_LINK_ENCAPSULATION_SUPPORTED "link_encapsulation_supported"
+
+/**
+   Indicates the link encapsulation standard that the Channel instance is using 
+   for the connection.
+   Enumeration of:
+   - G.992.3_Annex_K_ATM
+   - G.992.3_Annex_K_PTM
+   - G.993.2_Annex_K_ATM
+   - G.993.2_Annex_K_PTM */
+#define DSL_STAT_LINK_ENCAPSULATION_USED "link_encapsulation_used"
+
+/**
+   Reports the index of the latency path supporting the bearer channel.
+      \note See ITU-T Recommendation [Section 7.5.2.7/G.997.1]. */
+#define DSL_STAT_LPATH "lpath"
+
+/**
+   Reports the interleaver depth D for the latency path indicated in \ref lpath.
+      \note See ITU-T Recommendation [G.997.1].
+      \note For a multimode device operating in a mode in which this parameter 
+      does not apply,
+      the value of this parameter SHOULD be set to 0. */
+#define DSL_STAT_INTLVDEPTH "intlvdepth"
+
+/** 
+   Reports the interleaver block length in use on the latency path indicated in 
+   \ref lpath.
+      \note See ITU-T Recommendation [G.997.1].
+      \note For a multimode device operating in a mode in which this parameter 
+      does not apply,
+      the value of this parameter SHOULD be set to -1. */
+#define DSL_STAT_INTLVBLOCK "intlvblock"
+
+/**
+   Reports the actual delay, in milliseconds, of the latency path due to interleaving.
+      \note See ITU-T Recommendation [G.997.1]. */
+#define DSL_STAT_ACTUAL_INTERLEAVING_DELAY "actual_interleaving_delay"
+
+/**
+   Reports the actual impulse noise protection (INP) provided by the latency 
+   path indicated in \ref lpath.
+   The value is the actual INP in the L0 (i.e., Showtime) state.
+      \note See ITU-T Recommendation [G.997.1].
+      \note For a multimode device operating in a mode in which this 
+      parameter does not apply,
+      the value of this parameter SHOULD be set to -1. */
+#define DSL_STAT_ACTINP "actinp"
+
+/**
+   Reports whether the value reported in \ref actinp was computed assuming the 
+   receiver does not use erasure decoding.
+   Valid values:
+   - 0 (computed per the formula assuming no erasure decoding)
+   - 1 (computed by taking into account erasure decoding capabilities of receiver).
+
+      \note See ITU-T Recommendation [G.997.1].
+      \note For a multimode device operating in a mode in which this 
+      parameter does not apply,
+      the value of this parameter SHOULD be set to false. */
+#define DSL_STAT_INPREPORT "inpreport"
+
+/**
+   Reports the size, in octets, of the Reed-Solomon codeword in use on the 
+   latency path indicated in \ref lpath.
+      \note See ITU-T Recommendation [G.997.1].
+      \note For a multimode device operating in a mode in which this 
+      parameter does not apply,
+      the value of this parameter SHOULD be set to -1. */
+#define DSL_STAT_NFEC "nfec"
+
+/**
+   Reports the number of redundancy bytes per Reed-Solomon codeword on the 
+   latency path indicated in \ref lpath.
+      \note See ITU-T Recommendation [G.997.1].
+      \note For a multimode device operating in a mode in which this parameter 
+      does not apply,
+      the value of this parameter SHOULD be set to -1. */
+#define DSL_STAT_RFEC "rfec"
+
+/**
+   Reports the number of bits per symbol assigned to the latency path indicated in \ref lpath.
+   This value does not include overhead due to trellis coding.
+      \note See ITU-T Recommendation [G.997.1].
+      \note For a multimode device operating in a mode in which this parameter
+      does not apply, the value of this parameter SHOULD be set to -1. */
+#define DSL_STAT_LSYMB "lsymb"
+
+/** 
+   The current physical layer aggregate data rate (expressed in Kbps).
+   - curr_rate.us = The current physical layer aggregate data rate of the 
+      upstream DSL connection.
+   - curr_rate.ds = The current physical layer aggregate data rate of the 
+      downstream DSL connection. */
+#define DSL_STAT_CURR_RATE "curr_rate"
+
+/**
+   Obsolete actual net data rate 
+   - actndr.us = Actual net data rate expressed in Kbps in upstream direction:
+   In L0 state, this parameter reports the net data rate at which the bearer 
+   channel is operating. 
+   In L2 state, the parameter contains the net data rate in the previous L0 state.
+      \note See [ITU T G.992.3], [ITU T G.992.5], [ITU T G.993.2].
+      \note See ITU-T Recommendation [G.997.1]."
+   - actndr.ds = Actual net data rate expressed in Kbps in downstream direction:
+   In L0 state, this parameter reports the net data rate at which the bearer 
+   channel is operating.
+   In L2 state, the parameter contains the net data rate in the previous L0 state.
+      \note See [ITU T G.992.3], [ITU T G.992.5], [ITU T G.993.2].
+      \note See ITU-T Recommendation [G.997.1]." */
+#define DSL_STAT_ACTNDR "actndr"
+
+/** 
+   Obsolete actual impulse noise protection 
+
+   - actinprein.us = Actual impulse noise protection in downstream direction 
+   against REIN, expressed in 0.1 DMT symbols.
+   If retransmission is used in a given transmit direction, 
+   this parameter reports the actual impulse noise protection (INP) against REIN
+   (under specific conditions detailed in [ITU T G.998.4]) on the bearer 
+   channel in the L0 state. In the L2 state, the parameter contains the INP in
+   the previous L0 state. The value is coded in fractions of DMT symbols with a
+   granularity of 0.1 symbols. The range is from 0 to 25.4. A special value of 
+   25.5 indicates an ACTINP_REIN of 25.5 or higher.
+      \note This parameter is defined as ACTINP_REIN in Clause 7.5.2.9 of ITU-T
+         Recommendation [G.997.1].
+
+   - actinprein.ds = Actual impulse noise protection in upstream direction 
+   against REIN, expressed in 0.1 DMT symbols.
+   If retransmission is used in a given transmit direction, this parameter 
+   reports the actual impulse noiseprotection (INP) against REIN 
+   (under specific conditions detailed in [ITU T G.998.4]) on the bearer channel
+   in the L0 state. In the L2 state, the parameter contains the INP in the 
+   previous L0 state. The value is coded in fractions of DMT symbols with a 
+   granularity of 0.1 symbols. The range is from 0 to 25.4. A special value of 
+   25.5 indicates an ACTINP_REIN of 25.5 or higher.
+      \note This parameter is defined as ACTINP_REIN in Clause 7.5.2.9 of ITU-T 
+         Recommendation [G.997.1].
+*/
+#define DSL_STAT_ACTINPREIN "actinprein"
+
+/** @} */
+
+/** \defgroup DSL_STATS DSL Stats
+ * Lists the entire modules from the DSL CPE Stats group.
+ * \ingroup DSL_STATUS_PARSER */
+/** @{ */
+
+/**
+   Seconds since the start of the period used for collection of Total statistics.
+   Statistics SHOULD continue to be accumulated across CPE reboots, 
+   though this might not always be possible.
+   \note total_start SHOULD NOT be reset when the interface statistics are reset
+   via an interface disable / enable cycle. */
+#define DSL_STAT_TOTAL_START "total_start"
+
+/**
+   The Number of seconds since the most recent DSL Showtime 
+   The beginning of the period used for collection of Showtime statistics.
+   Showtime is defined as successful completion of the DSL link establishment 
+   process. The Showtime statistics are those collected since the most recent
+   establishment of the DSL link.
+   \note showtime_start SHOULD NOT be reset when the interface statistics are 
+   reset via an interface disable / enable cycle. */
+#define DSL_STAT_SHOWTIME_START "showtime_start"
+
+/**
+   The Number of seconds since the second most recent DSL Showtime.
+   The beginning of the period used for collection of LastShowtime statistics.
+   If the CPE has not retained information about the second most recent Showtime
+   (e.g., on reboot), the start of LastShowtime statistics MAY temporarily
+   coincide with the start of Showtime statistics.
+   \note last_showtime_start SHOULD NOT be reset when the interface statistics
+   are reset via an interface disable / enable cycle. */
+#define DSL_STAT_LAST_SHOWTIME_START "last_showtime_start"
+
+/**
+   Seconds since the start of the period used for collection of CurrentDay statistics.
+   Statistics SHOULD continue to be accumulated across CPE reboots, 
+   though this might not always be possible.
+   \note current_day_start SHOULD NOT be reset when the interface statistics are
+   reset via an interface disable / enable cycle. */
+#define DSL_STAT_CURRENT_DAY_START "current_day_start"
+
+/**
+   Seconds since the start of the period used for collection of QuarterHour statistics.
+   Statistics SHOULD continue to be accumulated across CPE reboots, though this 
+   might not always be possible.
+   \note quarter_hour_start SHOULD NOT be reset when the interface statistics 
+   are reset via an interface disable / enable cycle. */
+#define DSL_STAT_QUARTER_HOUR_START "quarter_hour_start"
+
+/**
+   DSL Line object total statistics declaration
+   based on TR-181 definitions.*/
+#define DSL_STAT_TOTAL "total"
+
+/**
+   DSL Line object showtime statistics declaration
+   based on TR-181 definitions. */
+#define DSL_STAT_SHOWTIME "showtime"
+
+/**
+   DSL Line object last showtime statistics declaration
+   based on TR-181 definitions.*/
+#define DSL_STAT_LAST_SHOWTIME "last_showtime"
+
+/**
+   DSL Line object current day statistics declaration
+   based on TR-181 definitions.*/
+#define DSL_STAT_CURRENT_DAY "current_day"
+
+/**
+   DSL Line object quarter hour statistics declaration
+   based on TR-181 definitions. */
+#define DSL_STAT_QUARTER_HOUR "quarter_hour"
+
+
+/**
+   Common data structure for the several objects.
+    - Stats.Total: Total number of errored seconds.
+    - Stats.Showtime: Number of errored seconds since the most recent DSL 
+         Showtime.
+    - Stats.LastShowtime: Number of errored seconds since the second most recent
+         DSL Showtime.
+    - Stats.CurrentDay: Number of errored seconds accumulated during the
+         current day.
+    - Stats.QuarterHour: Number of errored seconds accumulated during the
+         current quarter hour.
+
+      \note ES-L as defined in ITU-T Rec. [G.997.1].
+      \note This parameter is OPTIONAL at the G and S/T interfaces in G.997.1
+      Amendment 1. */
+#define DSL_STAT_ERRORED_SECS "errored_secs"
+
+/** 
+   Common data structure for the several objects.
+    - Stats.Total: Total number of severely errored seconds.
+    - Stats.Showtime: Number of severely errored seconds since the most recent 
+         DSL Showtime.
+    - Stats.LastShowtime: Number of severely errored seconds since the second 
+         most recent DSL Showtime.
+    - Stats.CurrentDay: Number of severely errored seconds accumulated during
+         the current day.
+    - Stats.QuarterHour: Number of severely errored seconds accumulated during
+         the current quarter hour.
+
+      \note SES-L as defined in ITU-T Rec. [G.997.1].
+      \note This parameter is OPTIONAL at the G and S/T interfaces in G.997.1
+         Amendment 1. */
+#define DSL_STAT_SEVERELY_ERRORED_SECS "severely_errored_secs"
+
+
+/**
+   Common data structure for the several objects.
+    - Stats.Total: Total number of FEC errors detected.
+    - Stats.Showtime: Number of FEC errors detected since the most recent DSL
+         Showtime.
+    - Stats.LastShowtime: Number of FEC errors detected since the second most
+         recent DSL Showtime.
+    - Stats.CurrentDay: Number of FEC errors detected during the current day.
+    - Stats.QuarterHour: Number of FEC errors detected during the current
+         quarter hour.
+
+      \note FEC-C as defined in ITU-T Rec. [G.997.1]. */
+#define DSL_STAT_XTUR_FEC_ERRORS "xtur_fec_errors"
+
+/**
+   Common data structure for the several objects.
+    - Stats.Total: Total number of FEC errors detected by the ATU-C.
+    - Stats.Showtime: Number of FEC errors detected by the ATU-C since the most
+         recent DSL Showtime.
+    - Stats.LastShowtime: Number of FEC errors detected by the ATU-C since the
+         second most recent DSL Showtime.
+    - Stats.CurrentDay: Number of FEC errors detected by the ATU-C during the
+         current day.
+    - Stats.QuarterHour: Number of FEC errors detected by the ATU-C during the
+         current quarter hour.
+
+      \note FEC-CFE as defined in ITU-T Rec. [G.997.1]. */
+#define DSL_STAT_XTUC_FEC_ERRORS "xtuc_fec_errors"
+
+/**
+   Common data structure for the several objects.
+    - Stats.Total: Total number of HEC errors detected.
+    - Stats.Showtime: Number of HEC errors detected since the most recent DSL
+         Showtime.
+    - Stats.LastShowtime: Number of HEC errors detected since the second most
+         recent DSL Showtime.
+    - Stats.CurrentDay: Number of HEC errors detected during the current day.
+    - Stats.QuarterHour: Number of HEC errors detected during the current
+         quarter hour.
+
+      \note HEC-P as defined in ITU-T Rec. [G.997.1]. */
+#define DSL_STAT_XTUR_HEC_ERRORS "xtur_hec_errors"
+
+/** Common data structure for the several objects.
+    - Stats.Total: Total number of HEC errors detected by the ATU-C.
+    - Stats.Showtime: Number of HEC errors detected by the ATU-C since the most
+         recent DSL Showtime.
+    - Stats.LastShowtime: Number of HEC errors detected by the ATU-C since the
+         second most recent DSL Showtime.
+    - Stats.CurrentDay: Number of HEC errors detected by the ATU-C during the
+         current day.
+    - Stats.QuarterHour: Number of HEC errors detected by the ATU-C during the
+         current quarter hour.
+
+      \note HEC-PFE as defined in ITU-T Rec. [G.997.1]. */
+#define DSL_STAT_XTUC_HEC_ERRORS "xtuc_hec_errors"
+
+   /** Common data structure for the several objects.
+    - Stats.Total: Total number of CRC errors detected.
+    - Stats.Showtime: Number of CRC errors detected since the most recent DSL
+         Showtime.
+    - Stats.LastShowtime: Number of CRC errors detected since the second most
+         recent DSL Showtime.
+    - Stats.CurrentDay: Number of CRC errors detected during the current day.
+    - Stats.QuarterHour: Number of CRC errors detected during the current 
+         quarter hour.
+
+      \note CV-C as defined in ITU-T Rec. [G.997.1]. */
+#define DSL_STAT_XTUR_CRC_ERRORS "xtur_crc_errors"
+
+/** Common data structure for the several objects.
+    - Stats.Total: Total number of CRC errors detected by the ATU-C.
+    - Stats.Showtime: Number of CRC errors detected by the ATU-C since the most
+         recent DSL Showtime.
+    - Stats.LastShowtime: Number of CRC errors detected by the ATU-C since the
+         second most recent DSL Showtime.
+    - Stats.CurrentDay: Number of CRC errors detected by the ATU-C during the
+         current day.
+    - Stats.QuarterHour: Number of CRC errors detected by the ATU-C during the
+         current quarter hour.
+
+      \note CV-CFE as defined in ITU-T Rec. [G.997.1]. */
+#define DSL_STAT_XTUC_CRC_ERRORS "xtuc_crc_errors"
+
+/** @} */
+#define US "us"
+#define DS "ds"
+
+
+/*! \defgroup DSL_CONFIG Intel Configuration Parser
+ * Lists the entire modules from the DSL CPE Configuration Parser */
+/** @{  */
+
+/** \defgroup Debugging 
+ * \ingroup DSL_CONFIG */
+
+/**  @{  */
+
+/**
+   Configuration of test and debug interface usage
+- 0: Do not use debug and test interfaces.
+     Independent from feature availability.
+- 1: Use debug and test interfaces on LAN interfaces only. - DEFAULT
+     Dependent on feature availability.
+- 2: Use debug and test interfaces on ALL available interfaces.
+     Dependent on feature availability. Former default value.
+
+
+   \note This configuration value will only have an influence if the DSL
+   subsystem has been compiled to include TCP-Messages and/or DTI interface 
+   functionality.*/
+#define DSL_CFG_DEBUG_AND_TEST_INTERFACES "debug_and_test_interfaces"
+/** @} */
+
+/** \defgroup StartupInit 
+    \ingroup DSL_CONFIG */
+
+/**  @{  */
+/**
+   NextMode (DSL) to be used on API startup
+   Only of relevance if xDSL multimode is enabled by using VDSL and ADSL
+   G997 XTU octet bits.
+   DSL:StartupInit:NextMode
+     0: use API-default value (if A+V modes are selected VDSL will be used)
+     1: use ADSL mode as initial one for multimode handling
+     2: use VDSL mode as initial one for multimode handling */
+#define DSL_CFG_NEXT_MODE "next_mode"
+
+/**
+   Defines the number of devices/lines which are used on operating the DSL subsystem.
+   This value must be equal or smaller than the number of devices which are
+   MEI Driver propagates this value via read-only procfs entry as follows
+   detected by the MEI Driver at boot time.
+   "MaxDeviceNumber" from "/proc/driver/mei_cpe/devinfo"
+   The typical configuration will be that the procfs value is used here
+   directly which takes care that all available devices will be used. */
+#define DSL_CFG_MAX_DEVICE_NUMBER "max_device_number"
+
+/**
+   Defines the number of lines which are used on operating the DSL subsystem.
+   It is strictly recommended to use the number which is propagated by the
+   MEI Driver at boot time here directly.
+   MEI Driver propagates this value via read-only procfs entry as follows
+   "LinesPerDevice" from "/proc/driver/mei_cpe/devinfo"
+   The default value for VRX518 will be always "1"
+   \note Values which are bigger than 1 are only allowed for on-chip bonding
+         scenarios which are not supported by VRX518. */
+#define DSL_CFG_LINES_PER_DEVICE "lines_per_device"
+
+/** 
+   Defines the number of (bearer) channels which are used on operating the DSL subsystem.
+   It is strictly recommended to use the number which is propagated by the
+   MEI Driver at boot time here directly.
+   MEI Driver propagates this value via read-only procfs entry as follows
+   "ChannelsPerLine" from "/proc/driver/mei_cpe/devinfo"
+   The default value for VRX518 will be always "1"
+   \note Values which are bigger than 1 would be only valid for non-single
+         bearer channel scenarios which are not supported by VRX518. */
+#define DSL_CFG_CHANNELS_PER_LINE "channels_per_line"
+
+/** @} */
+/** \defgroup Bitswap 
+ * \ingroup DSL_CONFIG
+*/
+/** @{ */
+/**
+   Configuration of bitswap setting for VDSL mode in Upstream direction
+   0: Disable bitswap
+   1: Enable bitswap */
+#define DSL_CFG_BITSWAP_VDSL_US "vdsl_us"
+
+/**
+   Configuration of bitswap setting for VDSL mode in Downstream direction
+   0: Disable bitswap
+   1: Enable bitswap */
+#define DSL_CFG_BITSWAP_VDSL_DS "vdsl_ds"
+
+/**
+   Configuration of bitswap setting for ADSL mode in Upstream direction
+   0: Disable bitswap
+   1: Enable bitswap */
+#define DSL_CFG_BITSWAP_ADSL_US "adsl_us"
+
+/**
+   Configuration of bitswap setting for ADSL mode in Downstream direction
+   0: Disable bitswap
+   1: Enable bitswap */
+#define DSL_CFG_BITSWAP_ADSL_DS "adsl_ds"
+/** @} */
+
+/** \defgroup Retransmission 
+    \ingroup DSL_CONFIG */
+
+/** @{ */
+/**
+   Configuration of retransmission setting for VDSL mode in Upstream direction
+   0: Disable retransmission
+   1: Enable retransmission
+   2: Use API internal default configuration */
+#define DSL_CFG_RETX_VDSL_US "vdsl_us"
+
+/**
+   Configuration of retransmission setting for VDSL mode in Downstream direction
+   0: Disable retransmission
+   1: Enable retransmission
+   2: Use API internal default configuration */
+#define DSL_CFG_RETX_VDSL_DS "vdsl_ds"
+
+/**
+   Configuration of retransmission setting for ADSL mode in Upstream direction
+   0: Disable retransmission
+   1: Enable retransmission
+   2: Use API internal default configuration */
+#define DSL_CFG_RETX_ADSL_US "adsl_us"
+
+/**
+   Configuration of retransmission setting for ADSL mode in Downstream direction
+   0: Disable retransmission
+   1: Enable retransmission
+   2: Use API internal default configuration */
+#define DSL_CFG_RETX_ADSL_DS "adsl_ds"
+/** @} */
+
+/** \defgroup SRA 
+    \ingroup DSL_CONFIG */
+
+/** @{ */
+/** Configuration of seamless rate adaptation (SRA) for VDSL in Upstream direction
+   0: Disable SRA
+   1: Enable SRA
+   2: Use API internal default configuration (enabled) */
+#define DSL_CFG_SRA_VDSL_US "vdsl_us"
+
+/**
+   Configuration of seamless rate adaptation (SRA) for VDSL in Downstream direction
+   0: Disable SRA
+   1: Enable SRA
+   2: Use API internal default configuration (enabled) */
+#define DSL_CFG_SRA_VDSL_DS "vdsl_ds"
+
+/**
+   Configuration of seamless rate adaptation (SRA) for ADSL in Upstream direction
+   0: Disable SRA
+   1: Enable SRA
+   2: Use API internal default configuration (disabled) */
+#define DSL_CFG_SRA_ADSL_US "adsl_us"
+
+/**
+   Configuration of seamless rate adaptation (SRA) for ADSL in Downstream direction
+   0: Disable SRA
+   1: Enable SRA
+   2: Use API internal default configuration (disabled) */
+#define DSL_CFG_SRA_ADSL_DS "adsl_ds"
+/** @} */
+
+/** \defgroup VN Virtual Noise 
+    \ingroup DSL_CONFIG */
+
+/** @{ */
+/**
+   Configuration of virtual noise setting for Upstream direction
+   0: Disable virtual noise
+   1: Enable virtual noise */
+#define DSL_CFG_VN_US "us"
+
+/**
+   Configuration of virtual noise setting for Downstream direction
+   0: Disable virtual noise
+   1: Enable virtual noise */
+#define DSL_CFG_VN_DS "ds"
+/** @} */
+
+/** \defgroup TcLayer 
+    \ingroup DSL_CONFIG */
+
+/** @{ */
+/**
+   Configuration of TC-Layer for ADSL mode
+   TcLayer_ADSL
+     0: Use API internal defaults
+     1: ATM-TC
+     2: EFM/PTM-TC
+     4: Auto-TC */
+#define DSL_CFG_TC_ADSL "adsl"
+
+/**
+   Configuration of TC-Layer for VDSL mode
+   TcLayer_ADSL
+     0: Use API internal defaults
+     1: ATM-TC
+     2: EFM/PTM-TC
+     4: Auto-TC */
+#define DSL_CFG_TC_VDSL "vdsl"
+/** @} */
+
+/** \defgroup RC Reboot Criteria 
+    \ingroup DSL_CONFIG */
+
+/** @{ */
+/**
+   Reboot criteria for ADSL.
+   The value selects the activated reboot criteria's according to the following
+   bitmask definitions.
+        "0": CLEANED (no reboot criteria active)
+        "1": LOM              - default ON
+        "2": LOF              - default ON
+        "4": LOS              - default ON
+        "8": ESE              - default ON
+       "10": ES90             - default OFF
+      "20": SES30            - default OFF
+       "40": NEGATIVE_MARGIN  - default ON
+       "80": OOS_BC0          - default OFF
+      "100": OOS_BC1          - default OFF
+      "200": NCD_BC0          - default OFF
+      "400": NCD_BC1          - default OFF
+      "800": LCD_BC0          - default OFF
+     "1000": LCD_BC1          - default OFF */
+#define DSL_CFG_REBOOT_ADSL "adsl"
+
+/**
+   Reboot criteria for VDSL.
+   The value selects the activated reboot criteria's according to the following
+   bitmask definitions.#        "0": CLEANED (no reboot criteria active)
+        "1": LOM              - default ON
+        "2": LOF              - default ON
+        "4": LOS              - default ON
+        "8": ESE              - default ON
+       "10": ES90             - default OFF
+       "20": SES30            - default OFF
+       "40": NEGATIVE_MARGIN  - default OFF
+       "80": OOS_BC0          - default OFF
+      "100": OOS_BC1          - default OFF
+      "200": NCD_BC0          - default OFF
+      "400": NCD_BC1          - default OFF
+      "800": LCD_BC0          - default OFF
+     "1000": LCD_BC1          - default OFF */
+#define DSL_CFG_REBOOT_VDSL "vdsl"
+/** @} */
+
+/** \defgroup COMMON Common 
+    \ingroup DSL_CONFIG */
+
+/** @{ */
+/**
+   The message selects a DSL operator. 
+   The information is used to configure operator specific settings inside the 
+   DSL firmware. */
+#define DSL_CFG_OPERATOR_SELECT "operator_select"
+
+/** 
+   Defines the handling on termination of the DSL Subsystem 
+   (currently not supported) */
+#define DSL_CFG_LD_AFE_SHUTDOWN "ld_afe_shutdown"
+
+/**
+   Configuration of test and debug specific vectoring setting
+   xDSL_Cfg_VectoringEnable
+     "0": Disable any vectoring operation
+     "1": Enables the G.993.5 full G.Vector for US and DS)
+     "2": Enables the G.993.2 Annex Y (G.Vector friendly)
+     "3": Enables automatic detection for the best fitting configuration
+ Notes:
+   - Vectoring is only supported for VDSL
+   - There are some additional conditions that needs to be fulfilled for
+      successful enabling of the full G.Vector functionality (Annex N)
+   + DSL Firmware needs to support vectoring, means that the last digit of the
+     firmware version has to be "7"
+   + The DSL Subsystem has to be compiled to support vectoring */
+#define DSL_CFG_VECTORING_ENABLE "vectoring_enable"
+
+/**
+   Configuration of Non-standard activation sequence
+    xDSL_Cfg_ActSeq
+     "0": Automatic detection from XTSE configuration (enables Non-standard
+          activation sequence in case of T1.413 is enabled as well)
+     "1": Standard Handshake (G.HS)  - DEFAULT
+     "2": Non-standard activation sequence ("Telefonica switching mode") */
+#define DSL_CFG_ACTIVATION_SEQUENCE "activation_sequence"
+
+/** 
+   Configuration of initial activation mode
+   xDSL_Cfg_ActMode (only used if "xDSL_Cfg_ActSeq" equals "2" or
+   "xDSL_Cfg_ActSeq" equals "0" and T1.413 mode is included within XTSE octets)
+    "1": Start with G.HS activation mode  - DEFAULT
+    "2": Start with ANSI-T1.413 activation mode */
+#define DSL_CFG_ACTIVATION_MODE "activation_mode"
+
+/**
+   Configuration of remember functionality used in case of activated xDSL multimode
+   xDSL_Cfg_Remember
+      "0": disable remember functionality (on link drop it will always re-train
+         with default DSL mode (VDSL if enabled)
+      "1": enable remember functionality (on link drop it will re-train with
+         last successful DSL showtime mode) */
+#define DSL_CFG_REMEMBER "remember"
+
+/** 
+   Test and debug configuration to enable event based (autonomous FW message
+   handling) mode instead of polling (which is default within API and strictly
+   recommended to be used!)
+   xDSL_Dbg_FwMsgPollingOnly
+     "0": Use autonomous FW message handling (instead of polling)
+     "1": Use polling mode only - DEFAULT */
+#define DSL_CFG_FW_MSG_POLLING_ONLY "fw_msg_polling_only"
+
+/**
+   The value selects the activated Vdsl profile according to the
+   following bitmask definitions.
+     0: No specific configuration selected will result in usage of API internal
+      default configuration to enable all possible profiles 
+      (strictly recommended!)
+     1: 8A
+     2: 8B
+     4: 8C
+     8: 8D
+    10: 12A
+    20: 12B
+    40: 17A
+    80: 30A
+   100: 35B */
+#define DSL_CFG_VDSL_PROFILE "vdsl_profile"
+
+/**
+   \defgroup lowlevelhs Low Level HS Tones
+   @{ */
+/**
+   Configuration of low level handshake tones for ADSL
+   The value selects the activated handshake tones according to the following
+   bitmask definitions.
+       "0": No specific configuration selected will result in usage of API 
+            internal default handshake tones (strictly recommended!)
+       "1": VDSL2 B43
+       "2": VDSL2 A43
+       "4": VDSL2 V43
+       "8": VDSL1 V43POTS
+      "10": VDSL1 V43ISDN
+      "20": ADSL1 C43
+      "40": ADSL2 J43
+      "80": ADSL2 B43C
+     "100": ADSL2 A43C 
+     \ingroup lowlevelhs*/
+#define DSL_CFG_LOW_LEVEL_HS_TONES_ADSL "adsl"
+
+/**
+   Configuration of low level handshake tones for VDSL
+   The value selects the activated handshake tones according to the following
+   bitmask definitions.
+       "0": No specific configuration selected will result in usage of API
+       internal default handshake tones (strictly recommended!)
+       "1": VDSL2 B43
+       "2": VDSL2 A43
+       "4": VDSL2 V43
+       "8": VDSL1 V43POTS
+      "10": VDSL1 V43ISDN
+      "20": ADSL1 C43
+      "40": ADSL2 J43
+      "80": ADSL2 B43C
+     "100": ADSL2 A43C 
+     \ingroup lowlevelhs */
+#define DSL_CFG_LOW_LEVEL_HS_TONES_VDSL "vdsl"
+/** @} */ 
+/** @} */
\ No newline at end of file
diff --git a/src/dsl_cpe_linux.c b/src/dsl_cpe_linux.c
index 93f157ad3c090c30a78c7b76eccfef1f28dbc409..3fb55d694bf70ec952386f3e92ee1d06330251ea 100644
--- a/src/dsl_cpe_linux.c
+++ b/src/dsl_cpe_linux.c
@@ -36,6 +36,8 @@
 
 #define SYS_NAME_PREFIX  PRJ_NAME_PREFIX"/tmp"
 #define SYS_PIPE_PREFIX  SYS_NAME_PREFIX"/pipe"
+/* length of "/tmp/pipe" */
+#define DSL_CPE_SYS_PIPE_PREFIX_STR_LEN         9
 
 #endif /* #ifndef INCLUDE_DSL_CPE_IFXOS_SUPPORT*/
 
@@ -247,23 +249,24 @@ DSL_Error_t DSL_CPE_PipeCreate(DSL_char_t *pName)
    /* Used to generate the pipe path */
    DSL_char_t *pipepath = NULL;
    DSL_Error_t ret = DSL_SUCCESS;
+   DSL_size_t nPipepathSize =
+      cpe_control_strnlen_s(SYS_PIPE_PREFIX"/", DSL_CPE_SYS_PIPE_PREFIX_STR_LEN + 1) +
+      cpe_control_strnlen_s(pName, DSL_CPE_PIPE_NAME_STR_LEN) + 1;
 
    DSL_CCA_DEBUG(DSL_CCA_DBG_MSG, (DSL_CPE_PREFIX "create pipe %s" DSL_CPE_CRLF, pName));
 
-   pipepath = DSL_CPE_Malloc(strlen(SYS_PIPE_PREFIX"/") + strlen(pName) + 1);
+   pipepath = DSL_CPE_Malloc(nPipepathSize);
    if ( !pipepath )
    {
       return DSL_ERR_MEMORY;
    }
 
-   memset(pipepath, 0, strlen(SYS_PIPE_PREFIX"/") + strlen(pName) + 1);
-   cpe_control_strncpy_s(pipepath,
-      strlen(SYS_PIPE_PREFIX"/") + strlen(pName) + 1,
-      SYS_PIPE_PREFIX"/",
-      strlen(SYS_PIPE_PREFIX"/"));
+   memset(pipepath, 0, nPipepathSize);
+   cpe_control_strncpy_s(pipepath, nPipepathSize, SYS_PIPE_PREFIX"/",
+      cpe_control_strnlen_s(SYS_PIPE_PREFIX"/", DSL_CPE_SYS_PIPE_PREFIX_STR_LEN + 1));
    /* try to create directory, ignore error designedly */
    mkdir(pipepath, S_IFDIR | 0777);
-   strcat(pipepath, pName);
+   (void)cpe_control_pipe_strcat_s(pipepath, nPipepathSize, pName);
 
    /*create a named pipe and check errors*/
    if ((mkfifo(pipepath, 0777) == -1) && (errno != EEXIST))
@@ -292,7 +295,7 @@ DSL_CPE_File_t *DSL_CPE_PipeOpen(DSL_char_t *pName, DSL_boolean_t reading, DSL_b
 
    DSL_CCA_DEBUG(DSL_CCA_DBG_MSG, (DSL_CPE_PREFIX "open pipe %s" DSL_CPE_CRLF, pName));
 
-   DSL_CPE_snprintf(pipepath, sizeof(pipepath), SYS_PIPE_PREFIX"/%s", pName);
+   cpe_control_snprintf_s(pipepath, sizeof(pipepath), SYS_PIPE_PREFIX"/%s", pName);
    /* only open allows the flag "O_NONBLOCK",
       so first open a fd and change it to a DSL_CPE_File_t* with fdopen() */
    if (reading == DSL_TRUE)
@@ -780,8 +783,8 @@ DSL_int32_t DSL_CPE_ThreadInit(
          memset(pThrCntrl, 0x00, sizeof(DSL_CPE_ThreadCtrl_t));
 
          /* set thread function arguments */
-         cpe_control_strncpy_s(pThrCntrl->thrParams.pName,
-            DSL_CPE_THREAD_NAME_LEN, pName, strlen(pName));
+         cpe_control_strncpy_s(pThrCntrl->thrParams.pName, DSL_CPE_THREAD_NAME_LEN,
+            pName, cpe_control_strnlen_s(pName, DSL_CPE_THREAD_NAME_LEN));
          pThrCntrl->thrParams.pName[DSL_CPE_THREAD_NAME_LEN-1] = 0;
          pThrCntrl->nPriority = nPriority;
          pThrCntrl->thrParams.nArg1 = nArg1;
@@ -1297,8 +1300,11 @@ DSL_Error_t DSL_CPE_SetEnv(const DSL_char_t *sName, const DSL_char_t *sValue)
 #else
    DSL_Error_t nRet = DSL_SUCCESS;
    DSL_CPE_EnvList_t *pEnvList = &g_EnvList, *pEnvListPrev = &g_EnvList;
-   const DSL_uint16_t namelen = strlen (sName);
-   const DSL_uint16_t vallen  = sValue != DSL_NULL ? strlen (sValue) : 0;
+   const DSL_size_t nNameLenMax = 30;
+   const DSL_uint16_t namelen = cpe_control_strnlen_s (sName, nNameLenMax);
+   const DSL_uint16_t vallen  =
+      sValue != DSL_NULL ?
+      cpe_control_strnlen_s (sValue, DSL_CPE_MAX_ENV_VAR_LENGTH) : 0;
 
    DSL_CCA_DEBUG(DSL_CCA_DBG_MSG, (DSL_CPE_PREFIX
       "SNH - Set %s to %s" DSL_CPE_CRLF, sName, sValue));
@@ -1366,7 +1372,8 @@ DSL_Error_t DSL_CPE_SetEnv(const DSL_char_t *sName, const DSL_char_t *sValue)
       }
    }
 
-   snprintf(pEnvList->pEnvEntry, namelen + DSL_CPE_MAX_ENV_VAR_LENGTH + 2, "%s=%s", sName, sValue != DSL_NULL ? sValue : "");
+   cpe_control_snprintf_s(pEnvList->pEnvEntry, namelen + DSL_CPE_MAX_ENV_VAR_LENGTH + 2,
+                          "%s=%s", sName, sValue != DSL_NULL ? sValue : "");
    putenv(pEnvList->pEnvEntry);
 #endif
 
@@ -1483,7 +1490,7 @@ int DSL_CPE_debug_printf(DSL_char_t *fmt, ...)
 
    /* add the debug string itself */
    va_start(ap, fmt);   /* set ap pointer to 1st unnamed arg */
-   nRet = vsnprintf(&debugString[0], DSL_DBG_MAX_DEBUG_PRINT_CHAR, fmt, ap);
+   nRet = cpe_control_vsnprintf_s(&debugString[0], DSL_DBG_MAX_DEBUG_PRINT_CHAR, fmt, ap);
    va_end(ap);
 
    if (DSL_CCA_g_dbgDestination == DSL_CCA_DBG_DST_CONSOLE)
@@ -1518,7 +1525,7 @@ static void DSL_CPE_NlSendMsg(DSL_char_t* pMsg)
    struct iovec iov;
 
    nSockFd = socket(AF_NETLINK, SOCK_RAW, DSL_DBG_MSG_NETLINK_ID);
-   if(nSockFd == -1) 
+   if(nSockFd == -1)
    {
       printf("could not open netlink socket");
       DSL_CCA_DEBUG(DSL_CCA_DBG_MSG, (DSL_CPE_PREFIX
@@ -1553,7 +1560,8 @@ static void DSL_CPE_NlSendMsg(DSL_char_t* pMsg)
    pNlMsgHdr->nlmsg_flags = 1;
    pNlMsgHdr->nlmsg_type = 0;
 
-   cpe_control_strncpy_s(NLMSG_DATA(pNlMsgHdr), NLMSG_SPACE(MAX_MSG_SIZE_BYTES), pMsg, strlen(pMsg));
+   cpe_control_strncpy_s(NLMSG_DATA(pNlMsgHdr), NLMSG_SPACE(MAX_MSG_SIZE_BYTES),
+                         pMsg, cpe_control_strnlen_s(pMsg, MAX_MSG_SIZE_BYTES + 1));
 
    iov.iov_base = (void*) pNlMsgHdr;
    iov.iov_len = pNlMsgHdr->nlmsg_len;
@@ -1609,6 +1617,8 @@ DSL_char_t* DSL_CPE_OwnAddrStringGet(DSL_void_t)
    DSL_int_t nFd,nErrCode;
    struct ifreq ifr;
    DSL_char_t *pString = DSL_NULL;
+   const DSL_size_t nIPv4LenMax = 15;
+   char *pIP = DSL_NULL;
 
    /* obtain ip-address automatically */
    nFd = socket(AF_INET, SOCK_DGRAM, 0);
@@ -1617,28 +1627,26 @@ DSL_char_t* DSL_CPE_OwnAddrStringGet(DSL_void_t)
       memset(&ifr, 0x0, sizeof(struct ifreq));
 
       ifr.ifr_addr.sa_family = AF_INET;
-      cpe_control_strncpy_s(ifr.ifr_name, IFNAMSIZ-1, 
-         DSL_DEBUG_TOOL_INTERFACE_DEFAULT_IFACE, strlen(DSL_DEBUG_TOOL_INTERFACE_DEFAULT_IFACE));
+      cpe_control_strncpy_s(ifr.ifr_name, IFNAMSIZ-1,
+         DSL_DEBUG_TOOL_INTERFACE_DEFAULT_IFACE,
+         cpe_control_strnlen_s(DSL_DEBUG_TOOL_INTERFACE_DEFAULT_IFACE,
+            sizeof DSL_DEBUG_TOOL_INTERFACE_DEFAULT_IFACE));
+
       nErrCode = DSL_CPE_Ioctl(nFd, SIOCGIFADDR, (DSL_int_t) &ifr);
       close(nFd);
       if (nErrCode == 0)
       {
-         pString =
-            DSL_CPE_Malloc( strlen(inet_ntoa(
-            ((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr)) + 1);
+         pIP = inet_ntoa(((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr);
+         pString = DSL_CPE_Malloc(cpe_control_strnlen_s(pIP, nIPv4LenMax) + 1);
       }
    }
 
-
    if (pString != DSL_NULL)
    {
-      memset(pString, 0,
-	     strlen(inet_ntoa(((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr)) + 1);
+      memset(pString, 0, cpe_control_strnlen_s(pIP, nIPv4LenMax) + 1);
 
-      cpe_control_strncpy_s(pString,
-         strlen(inet_ntoa(((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr)) + 1,
-         inet_ntoa(((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr),
-         strlen(inet_ntoa(((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr)));
+      cpe_control_strncpy_s(pString, cpe_control_strnlen_s(pIP, nIPv4LenMax) + 1,
+                            pIP, cpe_control_strnlen_s(pIP, nIPv4LenMax));
    }
 
    return pString;
diff --git a/src/dsl_cpe_linux.h b/src/dsl_cpe_linux.h
index 72d701f4b4da3301750beb29e48e42e539be054f..735bf7c39ba4d1b0c486274630b1a0bb7edb5800 100644
--- a/src/dsl_cpe_linux.h
+++ b/src/dsl_cpe_linux.h
@@ -58,7 +58,6 @@
 #include <stdlib.h>
 #include <getopt.h>
 #include <stdio.h>               /* fdopen */
-#include <string.h>              /* memset, strstr, strlen */
 #include <stdlib.h>              /* strtoul */
 #include <sys/time.h>            /* fd_set */
 #include <ctype.h>
@@ -181,6 +180,8 @@ DSL_int_t DSL_CPE_FPrintf(DSL_CPE_File_t *stream, const DSL_char_t *format, ...)
 #endif
    ;
 
+#define DSL_CPE_PIPE_NAME_STR_LEN      32
+
 /*
     ***************** IFXOS dependent definitions **************************
 */
diff --git a/src/dsl_cpe_os.h b/src/dsl_cpe_os.h
index f14eb503b0898d15a9bea5cc0b9350eb215e3b18..c7191629a64bb499e40d996cc1ad84d9e10d4f3b 100644
--- a/src/dsl_cpe_os.h
+++ b/src/dsl_cpe_os.h
@@ -194,7 +194,7 @@ typedef IFX_ulong_t IFX_addr_t;
 #define DSL_CPE_FGets                    IFXOS_FGets
 /*#define DSL_CPE_FPrintf                  IFXOS_FPrintf*/
 #define DSL_CPE_snprintf                 IFXOS_SNPrintf
-#define DSL_vsnprintf                    IFXOS_VSNPrintf
+#define DSL_CPE_vsnprintf                IFXOS_VSNPrintf
 
 /*
    Function map - Memory Functions.
diff --git a/src/dsl_cpe_safec_wrapper.h b/src/dsl_cpe_safec_wrapper.h
index 0050ae615cb85a1825ab3a3bdf60d648c6a4ac7d..bdb021a23988dffe99483e9a077072b2ae6a7d28 100644
--- a/src/dsl_cpe_safec_wrapper.h
+++ b/src/dsl_cpe_safec_wrapper.h
@@ -17,12 +17,35 @@
 #define cpe_control_memcpy_s memcpy_s
 #define cpe_control_memset_s memset_s
 #define cpe_control_strncpy_s strncpy_s
+#define cpe_control_strnlen_s strnlen_s
+#define cpe_control_strtok_s strtok_s
+#define cpe_control_strcat_s strcat_s
+#define cpe_control_vsnprintf_s vsnprintf_s
+
+/* snprintf_s symbol is not exported in SafeC lib */
+static int cpe_control_snprintf_s(char *dest,
+                                  size_t dmax,
+                                  const char *fmt,
+                                  ...)
+{
+   va_list arg;
+   int retVal;
+
+   va_start(arg, fmt);
+   retVal = vsnprintf_s(dest, dmax, fmt, arg);
+   va_end(arg);
+
+   return retVal;
+}
 
 #else
 
 #warning "Safe C library is not available!"
 
-#include <stddef.h>	/* size_t */
+#include <stddef.h>     /* size_t */
+#include <stdarg.h>     /* va_list */
+#include "drv_dsl_cpe_api_error.h"
+
 static __inline__ size_t safec_wrapper_min(size_t a, size_t b)
 {
    return a > b ? b : a;
@@ -32,6 +55,149 @@ static __inline__ size_t safec_wrapper_min(size_t a, size_t b)
 #define cpe_control_memset_s(dest, destsz, src, srcsz) memset(dest, src, safec_wrapper_min(destsz,srcsz))
 #define cpe_control_strncpy_s(dest, destsz, src, srcsz) strncpy(dest, src, safec_wrapper_min(destsz,srcsz))
 
+static size_t cpe_control_strnlen_s(const char *str,
+                                    size_t smax)
+{
+   /* preconditions */
+   if ((str == NULL) ||
+       (smax == 0))
+   {
+      return 0;
+   }
+
+   /* main algorithm */
+   size_t size = 0;
+
+   for (const char *tmp = str; size < smax && *tmp != '\0'; ++size, ++tmp)
+      ;
+
+   return size;
+}
+
+static char *cpe_control_strtok_s(char *dest,
+                                  size_t *dmax,
+                                  const char *delim,
+                                  char **ptr)
+{
+   /* preconditions */
+   if ((delim == NULL) ||
+      (ptr == NULL) ||
+      (dmax == NULL) ||
+      (*dmax == 0))
+   {
+      return NULL;
+   }
+
+   if ((dest == NULL) &&
+       (*ptr == NULL))
+   {
+      return NULL;
+   }
+
+   /* special handling of function init call */
+   if (dest != NULL)
+   {
+      *ptr = dest;
+   }
+
+   /* checking declared string length */
+   if (cpe_control_strnlen_s(*ptr, (1 + *dmax)) >= *dmax)
+   {
+      return NULL;
+   }
+
+   /* main algorithm */
+   char *pTmp;
+   size_t nTmpSize = 0;
+
+   pTmp = strtok(*ptr, delim);
+   nTmpSize = cpe_control_strnlen_s(pTmp, *dmax);
+
+   /* "+1" constant size of found delimiter */
+   *dmax -= (nTmpSize+1);
+
+   /* move after found delimitier */
+   for (size_t i = 0; i <= nTmpSize; ++i, ++(*ptr))
+      ;
+
+   return pTmp;
+}
+
+static int cpe_control_pipe_strcat_s(char *dest,
+                                     size_t destsz,
+                                     char *src)
+{
+   /* preconditions */
+   if ((dest == NULL) ||
+       (src == NULL) ||
+       (destsz == 0))
+   {
+      return -1;
+   }
+
+   if ((dest < src) &&
+       (dest + destsz > src))
+   {
+      return -1;
+   }
+
+   const char* tmp = dest;
+
+   for (; tmp <= (dest + destsz) && *tmp != '\0'; ++tmp)
+      ;
+
+   if (tmp >= (dest + destsz))
+   {
+      return -1;
+   }
+
+   /* main algorithm */
+   strcat(dest, src);
+
+   return 0;
+}
+
+static int cpe_control_snprintf_s(char *dest,
+                                  size_t dmax,
+                                  const char *fmt,
+                                  ...)
+{
+   /* preconditions */
+   if ((dest == NULL) ||
+       (fmt == NULL) ||
+       (dmax == 0))
+   {
+      return -1;
+   }
+
+   /* main algorithm */
+   va_list arg;
+   int retVal;
+
+   va_start(arg, fmt);
+   retVal = DSL_CPE_vsnprintf(dest, dmax, fmt, arg);
+   va_end(arg);
+
+   return retVal;
+}
+
+static int cpe_control_vsnprintf_s(char *dest,
+                                   size_t dmax,
+                                   const char *fmt,
+                                   va_list vlist)
+{
+   /* preconditions */
+   if ((dest == NULL) ||
+       (fmt == NULL) ||
+       (dmax == 0))
+   {
+      return -1;
+   }
+
+   /* main algorithm */
+   return DSL_CPE_vsnprintf(dest, dmax, fmt, vlist);
+}
+
 #endif /* defined (SAFEC_SUPPORT) && (SAFEC_SUPPORT == 3) */
 
 #endif /* _SAFEC_WRAPPER_H */
diff --git a/src/dsl_cpe_status_parser.c b/src/dsl_cpe_status_parser.c
index 78bc0ebd43e1cccd790b2a1e814c20f257d201f3..de053e045dd5ef2ff6acc65e74c27c8564438a01 100644
--- a/src/dsl_cpe_status_parser.c
+++ b/src/dsl_cpe_status_parser.c
@@ -13,12 +13,17 @@
 #include "dsl_cpe_status_parser.h"
 #include "drv_dsl_cpe_api_ioctl.h"
 #include "drv_dsl_cpe_api.h"
+#include "dsl_cpe_interface.h"
+
+#if defined (INCLUDE_DSL_CPE_API_VRX)
+#include "dsl_cpe_bnd_vrx.h"
+#endif
 
 #undef DSL_CCA_DBG_BLOCK
 #define DSL_CCA_DBG_BLOCK DSL_CCA_DBG_APP
 
-#define STATUS_FILE_PATH_TMP "/tmp/dsl_cpe_control.status.tmp"
-#define STATUS_FILE_PATH "/var/dsl_cpe_control.status"
+#define STATUS_FILE_PATH_TMP "/tmp/status/dsl.tmp"
+#define STATUS_FILE_PATH "/tmp/status/dsl"
 
 #define SECTION_PATH_LENGTH 256
 
@@ -78,318 +83,318 @@ static const DSL_CPE_JsonStatusNode_t jsonStatusNodes[] =
       /* <dsl.status.line.0> section */
       { DSL_STATUS_LINE_0, "dsl.status.line.0",
          json_type_object, DSL_UPDATE_TYPE_NONE },
-      { DSL_STATUS_LINE_0_STATUS, "dsl.status.line.0.status",
+      { DSL_STATUS_LINE_0_STATUS, "dsl.status.line.0."DSL_STAT_LINE_STATUS,
          json_type_string, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_UPSTREAM, "dsl.status.line.0.upstream",
+      { DSL_STATUS_LINE_0_UPSTREAM, "dsl.status.line.0."DSL_STAT_UPSTREAM,
          json_type_boolean, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_FW_VERSION, "dsl.status.line.0.firmware_version",
+      { DSL_STATUS_LINE_0_FW_VERSION, "dsl.status.line.0."DSL_STAT_FIRMWARE_VERSION,
          json_type_string, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_LINK_STATUS, "dsl.status.line.0.link_status",
+      { DSL_STATUS_LINE_0_LINK_STATUS, "dsl.status.line.0."DSL_STAT_LINK_STATUS,
          json_type_string, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_STD_SUPPORTED, "dsl.status.line.0.standards_supported",
+      { DSL_STATUS_LINE_0_STD_SUPPORTED, "dsl.status.line.0."DSL_STAT_STANDARDS_SUPPORTED,
          json_type_string, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_XTSE, "dsl.status.line.0.xtse",
+      { DSL_STATUS_LINE_0_XTSE, "dsl.status.line.0."DSL_STAT_XTSE,
          json_type_array, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_STD_USED, "dsl.status.line.0.standard_used",
+      { DSL_STATUS_LINE_0_STD_USED, "dsl.status.line.0."DSL_STAT_STANDARD_USED,
          json_type_string, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_XTSE_USED, "dsl.status.line.0.xtse_used",
+      { DSL_STATUS_LINE_0_XTSE_USED, "dsl.status.line.0."DSL_STAT_XTSE_USED,
          json_type_array, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_ENCODING, "dsl.status.line.0.line_encoding",
+      { DSL_STATUS_LINE_0_ENCODING, "dsl.status.line.0."DSL_STAT_LINE_ENCODING,
          json_type_string, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_ALLOWED_PROFILES, "dsl.status.line.0.allowed_profiles",
+      { DSL_STATUS_LINE_0_ALLOWED_PROFILES, "dsl.status.line.0."DSL_STAT_ALLOWED_PROFILES,
          json_type_string, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_CURRENT_PROFILE, "dsl.status.line.0.current_profile",
+      { DSL_STATUS_LINE_0_CURRENT_PROFILE, "dsl.status.line.0."DSL_STAT_CURRENT_PROFILE,
          json_type_string, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_PWR_MGMT_STATE, "dsl.status.line.0.power_management_state",
+      { DSL_STATUS_LINE_0_PWR_MGMT_STATE, "dsl.status.line.0."DSL_STAT_POWER_MANAGEMENT_STATE,
          json_type_string, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_SUCC_FAIL_CAUSE, "dsl.status.line.0.success_failure_cause",
+      { DSL_STATUS_LINE_0_SUCC_FAIL_CAUSE, "dsl.status.line.0."DSL_STAT_SUCCESS_FAILURE_CAUSE,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_LAST_STATE_TRANSM, "dsl.status.line.0.last_state_transmitted",
+      { DSL_STATUS_LINE_0_LAST_STATE_TRANSM, "dsl.status.line.0."DSL_STAT_LAST_STATE_TRANSMITTED,
          json_type_object, DSL_UPDATE_TYPE_NONE },
-      { DSL_STATUS_LINE_0_LAST_STATE_TRANSM_US, "dsl.status.line.0.last_state_transmitted.us",
+      { DSL_STATUS_LINE_0_LAST_STATE_TRANSM_US, "dsl.status.line.0."DSL_STAT_LAST_STATE_TRANSMITTED PATH_SEPARATOR US,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_LAST_STATE_TRANSM_DS, "dsl.status.line.0.last_state_transmitted.ds",
+      { DSL_STATUS_LINE_0_LAST_STATE_TRANSM_DS, "dsl.status.line.0."DSL_STAT_LAST_STATE_TRANSMITTED PATH_SEPARATOR DS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_US0_MASK, "dsl.status.line.0.us0_mask",
+      { DSL_STATUS_LINE_0_US0_MASK, "dsl.status.line.0."DSL_STAT_US0_MASK,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_TRELLIS, "dsl.status.line.0.trellis",
+      { DSL_STATUS_LINE_0_TRELLIS, "dsl.status.line.0."DSL_STAT_TRELLIS,
          json_type_object, DSL_UPDATE_TYPE_NONE },
-      { DSL_STATUS_LINE_0_TRELLIS_US, "dsl.status.line.0.trellis.us",
+      { DSL_STATUS_LINE_0_TRELLIS_US, "dsl.status.line.0."DSL_STAT_TRELLIS PATH_SEPARATOR US,
          json_type_boolean, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_TRELLIS_DS, "dsl.status.line.0.trellis.ds",
+      { DSL_STATUS_LINE_0_TRELLIS_DS, "dsl.status.line.0."DSL_STAT_TRELLIS PATH_SEPARATOR DS,
          json_type_boolean, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_ACT_SNR_MODE, "dsl.status.line.0.act_snr_mode",
+      { DSL_STATUS_LINE_0_ACT_SNR_MODE, "dsl.status.line.0."DSL_STAT_ACT_SNR_MODE,
          json_type_object, DSL_UPDATE_TYPE_NONE },
-      { DSL_STATUS_LINE_0_ACT_SNR_MODE_US, "dsl.status.line.0.act_snr_mode.us",
+      { DSL_STATUS_LINE_0_ACT_SNR_MODE_US, "dsl.status.line.0."DSL_STAT_ACT_SNR_MODE PATH_SEPARATOR US,
          json_type_boolean, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_ACT_SNR_MODE_DS, "dsl.status.line.0.act_snr_mode.ds",
+      { DSL_STATUS_LINE_0_ACT_SNR_MODE_DS, "dsl.status.line.0."DSL_STAT_ACT_SNR_MODE PATH_SEPARATOR DS,
          json_type_boolean, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_LINE_NR, "dsl.status.line.0.line_number",
+      { DSL_STATUS_LINE_0_LINE_NR, "dsl.status.line.0."DSL_STAT_LINE_NUMBER,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_MAX_BIT_RATE, "dsl.status.line.0.upstream_max_bit_rate",
+      { DSL_STATUS_LINE_0_MAX_BIT_RATE, "dsl.status.line.0."DSL_STAT_MAX_BIT_RATE,
          json_type_object, DSL_UPDATE_TYPE_NONE },
-      { DSL_STATUS_LINE_0_MAX_BIT_RATE_US, "dsl.status.line.0.upstream_max_bit_rate.us",
+      { DSL_STATUS_LINE_0_MAX_BIT_RATE_US, "dsl.status.line.0."DSL_STAT_MAX_BIT_RATE PATH_SEPARATOR US,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_MAX_BIT_RATE_DS, "dsl.status.line.0.upstream_max_bit_rate.ds",
+      { DSL_STATUS_LINE_0_MAX_BIT_RATE_DS, "dsl.status.line.0."DSL_STAT_MAX_BIT_RATE PATH_SEPARATOR DS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_NOISE_MARGIN, "dsl.status.line.0.upstream_noise_margin",
+      { DSL_STATUS_LINE_0_NOISE_MARGIN, "dsl.status.line.0."DSL_STAT_NOISE_MARGIN,
          json_type_object, DSL_UPDATE_TYPE_NONE },
-      { DSL_STATUS_LINE_0_NOISE_MARGIN_US, "dsl.status.line.0.upstream_noise_margin.us",
+      { DSL_STATUS_LINE_0_NOISE_MARGIN_US, "dsl.status.line.0."DSL_STAT_NOISE_MARGIN PATH_SEPARATOR US,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_NOISE_MARGIN_DS, "dsl.status.line.0.upstream_noise_margin.ds",
+      { DSL_STATUS_LINE_0_NOISE_MARGIN_DS, "dsl.status.line.0."DSL_STAT_NOISE_MARGIN PATH_SEPARATOR DS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_SNR_MPB, "dsl.status.line.0.snr_mpb",
+      { DSL_STATUS_LINE_0_SNR_MPB, "dsl.status.line.0."DSL_STAT_SNR_MPB,
          json_type_object, DSL_UPDATE_TYPE_NONE },
-      { DSL_STATUS_LINE_0_SNR_MPB_US, "dsl.status.line.0.snr_mpb.us",
+      { DSL_STATUS_LINE_0_SNR_MPB_US, "dsl.status.line.0."DSL_STAT_SNR_MPB PATH_SEPARATOR US,
          json_type_string, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_SNR_MPB_DS, "dsl.status.line.0.snr_mpb.ds",
+      { DSL_STATUS_LINE_0_SNR_MPB_DS, "dsl.status.line.0."DSL_STAT_SNR_MPB PATH_SEPARATOR DS,
          json_type_string, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_POWER, "dsl.status.line.0.upstream_power",
+      { DSL_STATUS_LINE_0_POWER, "dsl.status.line.0."DSL_STAT_POWER,
          json_type_object, DSL_UPDATE_TYPE_NONE },
-      { DSL_STATUS_LINE_0_POWER_US, "dsl.status.line.0.upstream_power.us",
+      { DSL_STATUS_LINE_0_POWER_US, "dsl.status.line.0."DSL_STAT_POWER PATH_SEPARATOR US,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_POWER_DS, "dsl.status.line.0.upstream_power.ds",
+      { DSL_STATUS_LINE_0_POWER_DS, "dsl.status.line.0."DSL_STAT_POWER PATH_SEPARATOR DS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_XTUR_VENDOR, "dsl.status.line.0.xtur_vendor",
+      { DSL_STATUS_LINE_0_XTUR_VENDOR, "dsl.status.line.0."DSL_STAT_XTUR_VENDOR,
          json_type_array, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_XTUR_COUNTRY, "dsl.status.line.0.xtur_country",
+      { DSL_STATUS_LINE_0_XTUR_COUNTRY, "dsl.status.line.0."DSL_STAT_XTUR_COUNTRY,
          json_type_array, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_XTUR_ANSI_STD, "dsl.status.line.0.xtur_ansi_std",
+      { DSL_STATUS_LINE_0_XTUR_ANSI_STD, "dsl.status.line.0."DSL_STAT_XTUR_ANSI_STD,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_XTUR_ANSI_REV, "dsl.status.line.0.xtur_ansi_rev",
+      { DSL_STATUS_LINE_0_XTUR_ANSI_REV, "dsl.status.line.0."DSL_STAT_XTUR_ANSI_REV,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_XTUC_VENDOR, "dsl.status.line.0.xtuc_vendor",
+      { DSL_STATUS_LINE_0_XTUC_VENDOR, "dsl.status.line.0."DSL_STAT_XTUC_VENDOR,
          json_type_array, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_XTUC_COUNTRY, "dsl.status.line.0.xtuc_country",
+      { DSL_STATUS_LINE_0_XTUC_COUNTRY, "dsl.status.line.0."DSL_STAT_XTUC_COUNTRY,
          json_type_array, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_XTUC_ANSI_STD, "dsl.status.line.0.xtuc_ansi_std",
+      { DSL_STATUS_LINE_0_XTUC_ANSI_STD, "dsl.status.line.0."DSL_STAT_XTUC_ANSI_STD,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_XTUC_ANSI_REV, "dsl.status.line.0.xtuc_ansi_rev",
+      { DSL_STATUS_LINE_0_XTUC_ANSI_REV, "dsl.status.line.0."DSL_STAT_XTUC_ANSI_REV,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_UPBOKLER_PB, "dsl.status.line.0.upbokler_pb",
+      { DSL_STATUS_LINE_0_UPBOKLER_PB, "dsl.status.line.0."DSL_STAT_UPBOKLER_PB,
          json_type_string, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_RXTHRSH_DS, "dsl.status.line.0.rxthrsh_ds",
+      { DSL_STATUS_LINE_0_RXTHRSH_DS, "dsl.status.line.0."DSL_STAT_RXTHRSH_DS,
          json_type_string, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_ACT_RA_MODE, "dsl.status.line.0.act_ra_mode",
+      { DSL_STATUS_LINE_0_ACT_RA_MODE, "dsl.status.line.0."DSL_STAT_ACT_RA_MODE,
          json_type_object, DSL_UPDATE_TYPE_NONE },
-      { DSL_STATUS_LINE_0_ACT_RA_MODE_US, "dsl.status.line.0.act_ra_mode.us",
+      { DSL_STATUS_LINE_0_ACT_RA_MODE_US, "dsl.status.line.0."DSL_STAT_ACT_RA_MODE PATH_SEPARATOR US,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_ACT_RA_MODE_DS, "dsl.status.line.0.act_ra_mode.ds",
+      { DSL_STATUS_LINE_0_ACT_RA_MODE_DS, "dsl.status.line.0."DSL_STAT_ACT_RA_MODE PATH_SEPARATOR DS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_SNR_MROC, "dsl.status.line.0.snr_mroc",
+      { DSL_STATUS_LINE_0_SNR_MROC, "dsl.status.line.0."DSL_STAT_SNR_MROC,
          json_type_object, DSL_UPDATE_TYPE_NONE },
-      { DSL_STATUS_LINE_0_SNR_MROC_US, "dsl.status.line.0.snr_mroc.us",
+      { DSL_STATUS_LINE_0_SNR_MROC_US, "dsl.status.line.0."DSL_STAT_SNR_MROC PATH_SEPARATOR US,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_SNR_MROC_DS, "dsl.status.line.0.snr_mroc.ds",
+      { DSL_STATUS_LINE_0_SNR_MROC_DS, "dsl.status.line.0."DSL_STAT_SNR_MROC PATH_SEPARATOR DS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_ATTENUATION, "dsl.status.line.0.attenuation",
+      { DSL_STATUS_LINE_0_ATTENUATION, "dsl.status.line.0."DSL_STAT_ATTENUATION,
          json_type_object, DSL_UPDATE_TYPE_NONE },
-      { DSL_STATUS_LINE_0_ATTENUATION_US, "dsl.status.line.0.attenuation.us",
+      { DSL_STATUS_LINE_0_ATTENUATION_US, "dsl.status.line.0."DSL_STAT_ATTENUATION PATH_SEPARATOR US,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_0_ATTENUATION_DS, "dsl.status.line.0.attenuation.ds",
+      { DSL_STATUS_LINE_0_ATTENUATION_DS, "dsl.status.line.0."DSL_STAT_ATTENUATION PATH_SEPARATOR DS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
          /* <dsl.status.line.0.channel> section */
          { DSL_STATUS_LINE_0_CHANNEL, "dsl.status.line.0.channel",
             json_type_object, DSL_UPDATE_TYPE_NONE },
-         { DSL_STATUS_LINE_0_CHANNEL_STATUS, "dsl.status.line.0.channel.status",
+         { DSL_STATUS_LINE_0_CHANNEL_STATUS, "dsl.status.line.0.channel."DSL_STAT_CHANNEL_STATUS,
             json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATUS_LINE_0_CHANNEL_LINKENC_SUPP, "dsl.status.line.0.channel.link_encapsulation_supported",
+         { DSL_STATUS_LINE_0_CHANNEL_LINKENC_SUPP, "dsl.status.line.0.channel."DSL_STAT_LINK_ENCAPSULATION_SUPPORTED,
             json_type_string, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATUS_LINE_0_CHANNEL_LINKENC_USED, "dsl.status.line.0.channel.link_encapsulation_used",
+         { DSL_STATUS_LINE_0_CHANNEL_LINKENC_USED, "dsl.status.line.0.channel."DSL_STAT_LINK_ENCAPSULATION_USED,
             json_type_string, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATUS_LINE_0_CHANNEL_LPATH, "dsl.status.line.0.channel.lpath",
+         { DSL_STATUS_LINE_0_CHANNEL_LPATH, "dsl.status.line.0.channel."DSL_STAT_LPATH,
             json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATUS_LINE_0_CHANNEL_INTLVDEPTH, "dsl.status.line.0.channel.intlvdepth",
+         { DSL_STATUS_LINE_0_CHANNEL_INTLVDEPTH, "dsl.status.line.0.channel."DSL_STAT_INTLVDEPTH,
             json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATUS_LINE_0_CHANNEL_INTLVBLOCK, "dsl.status.line.0.channel.intlvblock",
+         { DSL_STATUS_LINE_0_CHANNEL_INTLVBLOCK, "dsl.status.line.0.channel."DSL_STAT_INTLVBLOCK,
             json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATUS_LINE_0_CHANNEL_ACT_INTERL_DELAY, "dsl.status.line.0.channel.actual_interleaving_delay",
+         { DSL_STATUS_LINE_0_CHANNEL_ACT_INTERL_DELAY, "dsl.status.line.0.channel."DSL_STAT_ACTUAL_INTERLEAVING_DELAY,
             json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATUS_LINE_0_CHANNEL_ACTINP, "dsl.status.line.0.channel.actinp",
+         { DSL_STATUS_LINE_0_CHANNEL_ACTINP, "dsl.status.line.0.channel."DSL_STAT_ACTINP,
             json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATUS_LINE_0_CHANNEL_INPREPORT, "dsl.status.line.0.channel.inpreport",
+         { DSL_STATUS_LINE_0_CHANNEL_INPREPORT, "dsl.status.line.0.channel."DSL_STAT_INPREPORT,
             json_type_boolean, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATUS_LINE_0_CHANNEL_NFEC, "dsl.status.line.0.channel.nfec",
+         { DSL_STATUS_LINE_0_CHANNEL_NFEC, "dsl.status.line.0.channel."DSL_STAT_NFEC,
             json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATUS_LINE_0_CHANNEL_RFEC, "dsl.status.line.0.channel.rfec",
+         { DSL_STATUS_LINE_0_CHANNEL_RFEC, "dsl.status.line.0.channel."DSL_STAT_RFEC,
             json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATUS_LINE_0_CHANNEL_LSYMB, "dsl.status.line.0.channel.lsymb",
+         { DSL_STATUS_LINE_0_CHANNEL_LSYMB, "dsl.status.line.0.channel."DSL_STAT_LSYMB,
             json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATUS_LINE_0_CHANNEL_DATARATE, "dsl.status.line.0.channel.curr_rate",
+         { DSL_STATUS_LINE_0_CHANNEL_DATARATE, "dsl.status.line.0.channel."DSL_STAT_CURR_RATE,
             json_type_object, DSL_UPDATE_TYPE_NONE },
-         { DSL_STATUS_LINE_0_CHANNEL_DATARATE_US, "dsl.status.line.0.channel.curr_rate.us",
+         { DSL_STATUS_LINE_0_CHANNEL_DATARATE_US, "dsl.status.line.0.channel."DSL_STAT_CURR_RATE PATH_SEPARATOR US,
             json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATUS_LINE_0_CHANNEL_DATARATE_DS, "dsl.status.line.0.channel.curr_rate.ds",
+         { DSL_STATUS_LINE_0_CHANNEL_DATARATE_DS, "dsl.status.line.0.channel."DSL_STAT_CURR_RATE PATH_SEPARATOR DS,
             json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATUS_LINE_0_CHANNEL_ACTNDR, "dsl.status.line.0.channel.actndr",
+         { DSL_STATUS_LINE_0_CHANNEL_ACTNDR, "dsl.status.line.0.channel."DSL_STAT_ACTNDR,
             json_type_object, DSL_UPDATE_TYPE_NONE },
-         { DSL_STATUS_LINE_0_CHANNEL_ACTNDR_US, "dsl.status.line.0.channel.actndr.us",
+         { DSL_STATUS_LINE_0_CHANNEL_ACTNDR_US, "dsl.status.line.0.channel."DSL_STAT_ACTNDR PATH_SEPARATOR US,
             json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATUS_LINE_0_CHANNEL_ACTNDR_DS, "dsl.status.line.0.channel.actndr.ds",
+         { DSL_STATUS_LINE_0_CHANNEL_ACTNDR_DS, "dsl.status.line.0.channel."DSL_STAT_ACTNDR PATH_SEPARATOR DS,
             json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATUS_LINE_0_CHANNEL_ACTINPREIN, "dsl.status.line.0.channel.actinprein",
+         { DSL_STATUS_LINE_0_CHANNEL_ACTINPREIN, "dsl.status.line.0.channel."DSL_STAT_ACTINPREIN,
             json_type_object, DSL_UPDATE_TYPE_NONE },
-         { DSL_STATUS_LINE_0_CHANNEL_ACTINPREIN_US, "dsl.status.line.0.channel.actinprein.us",
+         { DSL_STATUS_LINE_0_CHANNEL_ACTINPREIN_US, "dsl.status.line.0.channel."DSL_STAT_ACTINPREIN PATH_SEPARATOR US,
             json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATUS_LINE_0_CHANNEL_ACTINPREIN_DS, "dsl.status.line.0.channel.actinprein.ds",
+         { DSL_STATUS_LINE_0_CHANNEL_ACTINPREIN_DS, "dsl.status.line.0.channel."DSL_STAT_ACTINPREIN PATH_SEPARATOR DS,
             json_type_int, DSL_UPDATE_TYPE_POLL },
       /* <dsl.status.line.1> section */
       { DSL_STATUS_LINE_1, "dsl.status.line.1",
       json_type_object, DSL_UPDATE_TYPE_NONE },
-      { DSL_STATUS_LINE_1_STATUS, "dsl.status.line.1.status",
+      { DSL_STATUS_LINE_1_STATUS, "dsl.status.line.1."DSL_STAT_LINE_STATUS,
       json_type_string, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_UPSTREAM, "dsl.status.line.1.upstream",
+      { DSL_STATUS_LINE_1_UPSTREAM, "dsl.status.line.1."DSL_STAT_UPSTREAM,
       json_type_boolean, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_FW_VERSION, "dsl.status.line.1.firmware_version",
+      { DSL_STATUS_LINE_1_FW_VERSION, "dsl.status.line.1."DSL_STAT_FIRMWARE_VERSION,
       json_type_string, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_LINK_STATUS, "dsl.status.line.1.link_status",
+      { DSL_STATUS_LINE_1_LINK_STATUS, "dsl.status.line.1."DSL_STAT_LINK_STATUS,
       json_type_string, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_STD_SUPPORTED, "dsl.status.line.1.standards_supported",
+      { DSL_STATUS_LINE_1_STD_SUPPORTED, "dsl.status.line.1."DSL_STAT_STANDARDS_SUPPORTED,
       json_type_string, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_XTSE, "dsl.status.line.1.xtse",
+      { DSL_STATUS_LINE_1_XTSE, "dsl.status.line.1."DSL_STAT_XTSE,
       json_type_array, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_STD_USED, "dsl.status.line.1.standard_used",
+      { DSL_STATUS_LINE_1_STD_USED, "dsl.status.line.1."DSL_STAT_STANDARD_USED,
       json_type_string, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_XTSE_USED, "dsl.status.line.1.xtse_used",
+      { DSL_STATUS_LINE_1_XTSE_USED, "dsl.status.line.1."DSL_STAT_XTSE_USED,
       json_type_array, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_ENCODING, "dsl.status.line.1.line_encoding",
+      { DSL_STATUS_LINE_1_ENCODING, "dsl.status.line.1."DSL_STAT_LINE_ENCODING,
       json_type_string, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_ALLOWED_PROFILES, "dsl.status.line.1.allowed_profiles",
+      { DSL_STATUS_LINE_1_ALLOWED_PROFILES, "dsl.status.line.1."DSL_STAT_ALLOWED_PROFILES,
       json_type_string, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_CURRENT_PROFILE, "dsl.status.line.1.current_profile",
+      { DSL_STATUS_LINE_1_CURRENT_PROFILE, "dsl.status.line.1."DSL_STAT_CURRENT_PROFILE,
       json_type_string, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_PWR_MGMT_STATE, "dsl.status.line.1.power_management_state",
+      { DSL_STATUS_LINE_1_PWR_MGMT_STATE, "dsl.status.line.1."DSL_STAT_POWER_MANAGEMENT_STATE,
       json_type_string, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_SUCC_FAIL_CAUSE, "dsl.status.line.1.success_failure_cause",
+      { DSL_STATUS_LINE_1_SUCC_FAIL_CAUSE, "dsl.status.line.1."DSL_STAT_SUCCESS_FAILURE_CAUSE,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_LAST_STATE_TRANSM, "dsl.status.line.1.last_state_transmitted",
+      { DSL_STATUS_LINE_1_LAST_STATE_TRANSM, "dsl.status.line.1."DSL_STAT_LAST_STATE_TRANSMITTED,
       json_type_object, DSL_UPDATE_TYPE_NONE },
-      { DSL_STATUS_LINE_1_LAST_STATE_TRANSM_US, "dsl.status.line.1.last_state_transmitted.us",
+      { DSL_STATUS_LINE_1_LAST_STATE_TRANSM_US, "dsl.status.line.1."DSL_STAT_LAST_STATE_TRANSMITTED PATH_SEPARATOR US,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_LAST_STATE_TRANSM_DS, "dsl.status.line.1.last_state_transmitted.ds",
+      { DSL_STATUS_LINE_1_LAST_STATE_TRANSM_DS, "dsl.status.line.1."DSL_STAT_LAST_STATE_TRANSMITTED PATH_SEPARATOR DS,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_US0_MASK, "dsl.status.line.1.us0_mask",
+      { DSL_STATUS_LINE_1_US0_MASK, "dsl.status.line.1."DSL_STAT_US0_MASK,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_TRELLIS, "dsl.status.line.1.trellis",
+      { DSL_STATUS_LINE_1_TRELLIS, "dsl.status.line.1."DSL_STAT_TRELLIS,
       json_type_object, DSL_UPDATE_TYPE_NONE },
-      { DSL_STATUS_LINE_1_TRELLIS_US, "dsl.status.line.1.trellis.us",
+      { DSL_STATUS_LINE_1_TRELLIS_US, "dsl.status.line.1."DSL_STAT_TRELLIS PATH_SEPARATOR US,
       json_type_boolean, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_TRELLIS_DS, "dsl.status.line.1.trellis.ds",
+      { DSL_STATUS_LINE_1_TRELLIS_DS, "dsl.status.line.1."DSL_STAT_TRELLIS PATH_SEPARATOR DS,
       json_type_boolean, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_ACT_SNR_MODE, "dsl.status.line.1.act_snr_mode",
+      { DSL_STATUS_LINE_1_ACT_SNR_MODE, "dsl.status.line.1."DSL_STAT_ACT_SNR_MODE,
       json_type_object, DSL_UPDATE_TYPE_NONE },
-      { DSL_STATUS_LINE_1_ACT_SNR_MODE_US, "dsl.status.line.1.act_snr_mode.us",
+      { DSL_STATUS_LINE_1_ACT_SNR_MODE_US, "dsl.status.line.1."DSL_STAT_ACT_SNR_MODE PATH_SEPARATOR US,
       json_type_boolean, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_ACT_SNR_MODE_DS, "dsl.status.line.1.act_snr_mode.ds",
+      { DSL_STATUS_LINE_1_ACT_SNR_MODE_DS, "dsl.status.line.1."DSL_STAT_ACT_SNR_MODE PATH_SEPARATOR DS,
       json_type_boolean, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_LINE_NR, "dsl.status.line.1.line_number",
+      { DSL_STATUS_LINE_1_LINE_NR, "dsl.status.line.1."DSL_STAT_LINE_NUMBER,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_MAX_BIT_RATE, "dsl.status.line.1.upstream_max_bit_rate",
+      { DSL_STATUS_LINE_1_MAX_BIT_RATE, "dsl.status.line.1."DSL_STAT_MAX_BIT_RATE,
       json_type_object, DSL_UPDATE_TYPE_NONE },
-      { DSL_STATUS_LINE_1_MAX_BIT_RATE_US, "dsl.status.line.1.upstream_max_bit_rate.us",
+      { DSL_STATUS_LINE_1_MAX_BIT_RATE_US, "dsl.status.line.1."DSL_STAT_MAX_BIT_RATE PATH_SEPARATOR US,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_MAX_BIT_RATE_DS, "dsl.status.line.1.upstream_max_bit_rate.ds",
+      { DSL_STATUS_LINE_1_MAX_BIT_RATE_DS, "dsl.status.line.1."DSL_STAT_MAX_BIT_RATE PATH_SEPARATOR DS,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_NOISE_MARGIN, "dsl.status.line.1.upstream_noise_margin",
+      { DSL_STATUS_LINE_1_NOISE_MARGIN, "dsl.status.line.1."DSL_STAT_NOISE_MARGIN,
       json_type_object, DSL_UPDATE_TYPE_NONE },
-      { DSL_STATUS_LINE_1_NOISE_MARGIN_US, "dsl.status.line.1.upstream_noise_margin.us",
+      { DSL_STATUS_LINE_1_NOISE_MARGIN_US, "dsl.status.line.1."DSL_STAT_NOISE_MARGIN PATH_SEPARATOR US,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_NOISE_MARGIN_DS, "dsl.status.line.1.upstream_noise_margin.ds",
+      { DSL_STATUS_LINE_1_NOISE_MARGIN_DS, "dsl.status.line.1."DSL_STAT_NOISE_MARGIN PATH_SEPARATOR DS,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_SNR_MPB, "dsl.status.line.1.snr_mpb",
+      { DSL_STATUS_LINE_1_SNR_MPB, "dsl.status.line.1."DSL_STAT_SNR_MPB,
       json_type_object, DSL_UPDATE_TYPE_NONE },
-      { DSL_STATUS_LINE_1_SNR_MPB_US, "dsl.status.line.1.snr_mpb.us",
+      { DSL_STATUS_LINE_1_SNR_MPB_US, "dsl.status.line.1."DSL_STAT_SNR_MPB PATH_SEPARATOR US,
       json_type_string, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_SNR_MPB_DS, "dsl.status.line.1.snr_mpb.ds",
+      { DSL_STATUS_LINE_1_SNR_MPB_DS, "dsl.status.line.1."DSL_STAT_SNR_MPB PATH_SEPARATOR DS,
       json_type_string, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_POWER, "dsl.status.line.1.upstream_power",
+      { DSL_STATUS_LINE_1_POWER, "dsl.status.line.1."DSL_STAT_POWER PATH_SEPARATOR,
       json_type_object, DSL_UPDATE_TYPE_NONE },
-      { DSL_STATUS_LINE_1_POWER_US, "dsl.status.line.1.upstream_power.us",
+      { DSL_STATUS_LINE_1_POWER_US, "dsl.status.line.1."DSL_STAT_POWER PATH_SEPARATOR US,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_POWER_DS, "dsl.status.line.1.upstream_power.ds",
+      { DSL_STATUS_LINE_1_POWER_DS, "dsl.status.line.1."DSL_STAT_POWER PATH_SEPARATOR DS,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_XTUR_VENDOR, "dsl.status.line.1.xtur_vendor",
+      { DSL_STATUS_LINE_1_XTUR_VENDOR, "dsl.status.line.1."DSL_STAT_XTUR_VENDOR,
       json_type_array, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_XTUR_COUNTRY, "dsl.status.line.1.xtur_country",
+      { DSL_STATUS_LINE_1_XTUR_COUNTRY, "dsl.status.line.1."DSL_STAT_XTUR_COUNTRY,
       json_type_array, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_XTUR_ANSI_STD, "dsl.status.line.1.xtur_ansi_std",
+      { DSL_STATUS_LINE_1_XTUR_ANSI_STD, "dsl.status.line.1."DSL_STAT_XTUR_ANSI_STD,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_XTUR_ANSI_REV, "dsl.status.line.1.xtur_ansi_rev",
+      { DSL_STATUS_LINE_1_XTUR_ANSI_REV, "dsl.status.line.1."DSL_STAT_XTUR_ANSI_REV,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_XTUC_VENDOR, "dsl.status.line.1.xtuc_vendor",
+      { DSL_STATUS_LINE_1_XTUC_VENDOR, "dsl.status.line.1."DSL_STAT_XTUC_VENDOR,
       json_type_array, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_XTUC_COUNTRY, "dsl.status.line.1.xtuc_country",
+      { DSL_STATUS_LINE_1_XTUC_COUNTRY, "dsl.status.line.1."DSL_STAT_XTUC_COUNTRY,
       json_type_array, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_XTUC_ANSI_STD, "dsl.status.line.1.xtuc_ansi_std",
+      { DSL_STATUS_LINE_1_XTUC_ANSI_STD, "dsl.status.line.1."DSL_STAT_XTUC_ANSI_STD,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_XTUC_ANSI_REV, "dsl.status.line.1.xtuc_ansi_rev",
+      { DSL_STATUS_LINE_1_XTUC_ANSI_REV, "dsl.status.line.1."DSL_STAT_XTUC_ANSI_REV,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_UPBOKLER_PB, "dsl.status.line.1.upbokler_pb",
+      { DSL_STATUS_LINE_1_UPBOKLER_PB, "dsl.status.line.1."DSL_STAT_UPBOKLER_PB,
       json_type_string, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_RXTHRSH_DS, "dsl.status.line.1.rxthrsh_ds",
+      { DSL_STATUS_LINE_1_RXTHRSH_DS, "dsl.status.line.1."DSL_STAT_RXTHRSH_DS,
       json_type_string, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_ACT_RA_MODE, "dsl.status.line.1.act_ra_mode",
+      { DSL_STATUS_LINE_1_ACT_RA_MODE, "dsl.status.line.1."DSL_STAT_ACT_RA_MODE,
       json_type_object, DSL_UPDATE_TYPE_NONE },
-      { DSL_STATUS_LINE_1_ACT_RA_MODE_US, "dsl.status.line.1.act_ra_mode.us",
+      { DSL_STATUS_LINE_1_ACT_RA_MODE_US, "dsl.status.line.1."DSL_STAT_ACT_RA_MODE PATH_SEPARATOR US,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_ACT_RA_MODE_DS, "dsl.status.line.1.act_ra_mode.ds",
+      { DSL_STATUS_LINE_1_ACT_RA_MODE_DS, "dsl.status.line.1."DSL_STAT_ACT_RA_MODE PATH_SEPARATOR DS,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_SNR_MROC, "dsl.status.line.1.snr_mroc",
+      { DSL_STATUS_LINE_1_SNR_MROC, "dsl.status.line.1."DSL_STAT_SNR_MROC,
       json_type_object, DSL_UPDATE_TYPE_NONE },
-      { DSL_STATUS_LINE_1_SNR_MROC_US, "dsl.status.line.1.snr_mroc.us",
+      { DSL_STATUS_LINE_1_SNR_MROC_US, "dsl.status.line.1."DSL_STAT_SNR_MROC PATH_SEPARATOR US,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_SNR_MROC_DS, "dsl.status.line.1.snr_mroc.ds",
+      { DSL_STATUS_LINE_1_SNR_MROC_DS, "dsl.status.line.1."DSL_STAT_SNR_MROC PATH_SEPARATOR DS,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_ATTENUATION, "dsl.status.line.1.attenuation",
+      { DSL_STATUS_LINE_1_ATTENUATION, "dsl.status.line.1."DSL_STAT_ATTENUATION,
       json_type_object, DSL_UPDATE_TYPE_NONE },
-      { DSL_STATUS_LINE_1_ATTENUATION_US, "dsl.status.line.1.attenuation.us",
+      { DSL_STATUS_LINE_1_ATTENUATION_US, "dsl.status.line.1."DSL_STAT_ATTENUATION PATH_SEPARATOR US,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATUS_LINE_1_ATTENUATION_DS, "dsl.status.line.1.attenuation.ds",
+      { DSL_STATUS_LINE_1_ATTENUATION_DS, "dsl.status.line.1."DSL_STAT_ATTENUATION PATH_SEPARATOR DS,
       json_type_int, DSL_UPDATE_TYPE_POLL },
          /* <dsl.status.line.1.channel> section */
          { DSL_STATUS_LINE_1_CHANNEL, "dsl.status.line.1.channel",
          json_type_object, DSL_UPDATE_TYPE_NONE },
-         { DSL_STATUS_LINE_1_CHANNEL_STATUS, "dsl.status.line.1.channel.status",
+         { DSL_STATUS_LINE_1_CHANNEL_STATUS, "dsl.status.line.1.channel."DSL_STAT_CHANNEL_STATUS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATUS_LINE_1_CHANNEL_LINKENC_SUPP, "dsl.status.line.1.channel.link_encapsulation_supported",
+         { DSL_STATUS_LINE_1_CHANNEL_LINKENC_SUPP, "dsl.status.line.1.channel."DSL_STAT_LINK_ENCAPSULATION_SUPPORTED,
          json_type_string, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATUS_LINE_1_CHANNEL_LINKENC_USED, "dsl.status.line.1.channel.link_encapsulation_used",
+         { DSL_STATUS_LINE_1_CHANNEL_LINKENC_USED, "dsl.status.line.1.channel."DSL_STAT_LINK_ENCAPSULATION_USED,
          json_type_string, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATUS_LINE_1_CHANNEL_LPATH, "dsl.status.line.1.channel.lpath",
+         { DSL_STATUS_LINE_1_CHANNEL_LPATH, "dsl.status.line.1.channel."DSL_STAT_LPATH,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATUS_LINE_1_CHANNEL_INTLVDEPTH, "dsl.status.line.1.channel.intlvdepth",
+         { DSL_STATUS_LINE_1_CHANNEL_INTLVDEPTH, "dsl.status.line.1.channel."DSL_STAT_INTLVDEPTH,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATUS_LINE_1_CHANNEL_INTLVBLOCK, "dsl.status.line.1.channel.intlvblock",
+         { DSL_STATUS_LINE_1_CHANNEL_INTLVBLOCK, "dsl.status.line.1.channel."DSL_STAT_INTLVBLOCK,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATUS_LINE_1_CHANNEL_ACT_INTERL_DELAY, "dsl.status.line.1.channel.actual_interleaving_delay",
+         { DSL_STATUS_LINE_1_CHANNEL_ACT_INTERL_DELAY, "dsl.status.line.1.channel."DSL_STAT_ACTUAL_INTERLEAVING_DELAY,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATUS_LINE_1_CHANNEL_ACTINP, "dsl.status.line.1.channel.actinp",
+         { DSL_STATUS_LINE_1_CHANNEL_ACTINP, "dsl.status.line.1.channel."DSL_STAT_ACTINP,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATUS_LINE_1_CHANNEL_INPREPORT, "dsl.status.line.1.channel.inpreport",
+         { DSL_STATUS_LINE_1_CHANNEL_INPREPORT, "dsl.status.line.1.channel."DSL_STAT_INPREPORT,
          json_type_boolean, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATUS_LINE_1_CHANNEL_NFEC, "dsl.status.line.1.channel.nfec",
+         { DSL_STATUS_LINE_1_CHANNEL_NFEC, "dsl.status.line.1.channel."DSL_STAT_NFEC,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATUS_LINE_1_CHANNEL_RFEC, "dsl.status.line.1.channel.rfec",
+         { DSL_STATUS_LINE_1_CHANNEL_RFEC, "dsl.status.line.1.channel."DSL_STAT_RFEC,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATUS_LINE_1_CHANNEL_LSYMB, "dsl.status.line.1.channel.lsymb",
+         { DSL_STATUS_LINE_1_CHANNEL_LSYMB, "dsl.status.line.1.channel."DSL_STAT_LSYMB,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATUS_LINE_1_CHANNEL_DATARATE, "dsl.status.line.1.channel.curr_rate",
+         { DSL_STATUS_LINE_1_CHANNEL_DATARATE, "dsl.status.line.1.channel."DSL_STAT_CURR_RATE,
          json_type_object, DSL_UPDATE_TYPE_NONE },
-         { DSL_STATUS_LINE_1_CHANNEL_DATARATE_US, "dsl.status.line.1.channel.curr_rate.us",
+         { DSL_STATUS_LINE_1_CHANNEL_DATARATE_US, "dsl.status.line.1.channel."DSL_STAT_CURR_RATE PATH_SEPARATOR US,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATUS_LINE_1_CHANNEL_DATARATE_DS, "dsl.status.line.1.channel.curr_rate.ds",
+         { DSL_STATUS_LINE_1_CHANNEL_DATARATE_DS, "dsl.status.line.1.channel."DSL_STAT_CURR_RATE PATH_SEPARATOR DS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATUS_LINE_1_CHANNEL_ACTNDR, "dsl.status.line.1.channel.actndr",
+         { DSL_STATUS_LINE_1_CHANNEL_ACTNDR, "dsl.status.line.1.channel."DSL_STAT_ACTNDR,
          json_type_object, DSL_UPDATE_TYPE_NONE },
-         { DSL_STATUS_LINE_1_CHANNEL_ACTNDR_US, "dsl.status.line.1.channel.actndr.us",
+         { DSL_STATUS_LINE_1_CHANNEL_ACTNDR_US, "dsl.status.line.1.channel."DSL_STAT_ACTNDR PATH_SEPARATOR US,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATUS_LINE_1_CHANNEL_ACTNDR_DS, "dsl.status.line.1.channel.actndr.ds",
+         { DSL_STATUS_LINE_1_CHANNEL_ACTNDR_DS, "dsl.status.line.1.channel."DSL_STAT_ACTNDR PATH_SEPARATOR DS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATUS_LINE_1_CHANNEL_ACTINPREIN, "dsl.status.line.1.channel.actinprein",
+         { DSL_STATUS_LINE_1_CHANNEL_ACTINPREIN, "dsl.status.line.1.channel."DSL_STAT_ACTINPREIN,
          json_type_object, DSL_UPDATE_TYPE_NONE },
-         { DSL_STATUS_LINE_1_CHANNEL_ACTINPREIN_US, "dsl.status.line.1.channel.actinprein.us",
+         { DSL_STATUS_LINE_1_CHANNEL_ACTINPREIN_US, "dsl.status.line.1.channel."DSL_STAT_ACTINPREIN PATH_SEPARATOR US,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATUS_LINE_1_CHANNEL_ACTINPREIN_DS, "dsl.status.line.1.channel.actinprein.ds",
+         { DSL_STATUS_LINE_1_CHANNEL_ACTINPREIN_DS, "dsl.status.line.1.channel."DSL_STAT_ACTINPREIN PATH_SEPARATOR DS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
    { DSL_STATS, "dsl.stats",
    json_type_object, DSL_UPDATE_TYPE_NONE },
@@ -398,254 +403,254 @@ static const DSL_CPE_JsonStatusNode_t jsonStatusNodes[] =
       /* <dsl.stats.line.0> section */
       { DSL_STATS_LINE_0, "dsl.stats.line.0",
       json_type_object, DSL_UPDATE_TYPE_NONE },
-      { DSL_STATS_LINE_0_TOTAL_START, "dsl.stats.line.0.total_start",
+      { DSL_STATS_LINE_0_TOTAL_START, "dsl.stats.line.0."DSL_STAT_TOTAL_START,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATS_LINE_0_SHOWTIME_START, "dsl.stats.line.0.showtime_start",
+      { DSL_STATS_LINE_0_SHOWTIME_START, "dsl.stats.line.0."DSL_STAT_SHOWTIME_START,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATS_LINE_0_LAST_SHOWTIME_START, "dsl.stats.line.0.last_showtime_start",
+      { DSL_STATS_LINE_0_LAST_SHOWTIME_START, "dsl.stats.line.0."DSL_STAT_LAST_SHOWTIME_START,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATS_LINE_0_CURRENT_DAY_START, "dsl.stats.line.0.current_day_start",
+      { DSL_STATS_LINE_0_CURRENT_DAY_START, "dsl.stats.line.0."DSL_STAT_CURRENT_DAY_START,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATS_LINE_0_QUARTER_HOUR_START, "dsl.stats.line.0.quarter_hour_start",
+      { DSL_STATS_LINE_0_QUARTER_HOUR_START, "dsl.stats.line.0."DSL_STAT_QUARTER_HOUR_START,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATS_LINE_0_TOTAL, "dsl.stats.line.0.total",
+      { DSL_STATS_LINE_0_TOTAL, "dsl.stats.line.0."DSL_STAT_TOTAL,
       json_type_object, DSL_UPDATE_TYPE_NONE },
-      { DSL_STATS_LINE_0_TOTAL_ERR_SECS, "dsl.stats.line.0.total.errored_secs",
+      { DSL_STATS_LINE_0_TOTAL_ERR_SECS, "dsl.stats.line.0."DSL_STAT_TOTAL PATH_SEPARATOR DSL_STAT_ERRORED_SECS,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATS_LINE_0_TOTAL_SEV_ERR_SECS, "dsl.stats.line.0.total.severely_errored_secs",
+      { DSL_STATS_LINE_0_TOTAL_SEV_ERR_SECS, "dsl.stats.line.0."DSL_STAT_TOTAL PATH_SEPARATOR DSL_STAT_SEVERELY_ERRORED_SECS,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATS_LINE_0_SHOWTIME, "dsl.stats.line.0.showtime",
+      { DSL_STATS_LINE_0_SHOWTIME, "dsl.stats.line.0."DSL_STAT_SHOWTIME,
       json_type_object, DSL_UPDATE_TYPE_NONE },
-      { DSL_STATS_LINE_0_SHOWTIME_ERR_SECS, "dsl.stats.line.0.showtime.errored_secs",
+      { DSL_STATS_LINE_0_SHOWTIME_ERR_SECS, "dsl.stats.line.0."DSL_STAT_SHOWTIME PATH_SEPARATOR DSL_STAT_ERRORED_SECS,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATS_LINE_0_SHOWTIME_SEV_ERR_SECS, "dsl.stats.line.0.showtime.severely_errored_secs",
+      { DSL_STATS_LINE_0_SHOWTIME_SEV_ERR_SECS, "dsl.stats.line.0."DSL_STAT_SHOWTIME PATH_SEPARATOR DSL_STAT_SEVERELY_ERRORED_SECS,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATS_LINE_0_LAST_SHOWTIME, "dsl.stats.line.0.last_showtime",
+      { DSL_STATS_LINE_0_LAST_SHOWTIME, "dsl.stats.line.0."DSL_STAT_LAST_SHOWTIME,
       json_type_object, DSL_UPDATE_TYPE_NONE },
-      { DSL_STATS_LINE_0_LAST_SHOWTIME_ERR_SECS, "dsl.stats.line.0.last_showtime.errored_secs",
+      { DSL_STATS_LINE_0_LAST_SHOWTIME_ERR_SECS, "dsl.stats.line.0."DSL_STAT_LAST_SHOWTIME PATH_SEPARATOR DSL_STAT_ERRORED_SECS,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATS_LINE_0_LAST_SHOWTIME_SEV_ERR_SECS, "dsl.stats.line.0.last_showtime.severely_errored_secs",
+      { DSL_STATS_LINE_0_LAST_SHOWTIME_SEV_ERR_SECS, "dsl.stats.line.0."DSL_STAT_LAST_SHOWTIME PATH_SEPARATOR DSL_STAT_SEVERELY_ERRORED_SECS,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATS_LINE_0_CURRENT_DAY, "dsl.stats.line.0.current_day",
+      { DSL_STATS_LINE_0_CURRENT_DAY, "dsl.stats.line.0."DSL_STAT_CURRENT_DAY,
       json_type_object, DSL_UPDATE_TYPE_NONE },
-      { DSL_STATS_LINE_0_CURRENT_DAY_ERR_SECS, "dsl.stats.line.0.current_day.errored_secs",
+      { DSL_STATS_LINE_0_CURRENT_DAY_ERR_SECS, "dsl.stats.line.0."DSL_STAT_CURRENT_DAY PATH_SEPARATOR DSL_STAT_ERRORED_SECS,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATS_LINE_0_CURRENT_DAY_SEV_ERR_SECS, "dsl.stats.line.0.current_day.severely_errored_secs",
+      { DSL_STATS_LINE_0_CURRENT_DAY_SEV_ERR_SECS, "dsl.stats.line.0."DSL_STAT_CURRENT_DAY PATH_SEPARATOR DSL_STAT_SEVERELY_ERRORED_SECS,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATS_LINE_0_QUARTER_HOUR, "dsl.stats.line.0.quarter_hour",
+      { DSL_STATS_LINE_0_QUARTER_HOUR, "dsl.stats.line.0."DSL_STAT_QUARTER_HOUR,
       json_type_object, DSL_UPDATE_TYPE_NONE },
-      { DSL_STATS_LINE_0_QUARTER_HOUR_ERR_SECS, "dsl.stats.line.0.quarter_hour.errored_secs",
+      { DSL_STATS_LINE_0_QUARTER_HOUR_ERR_SECS, "dsl.stats.line.0."DSL_STAT_QUARTER_HOUR PATH_SEPARATOR DSL_STAT_ERRORED_SECS,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATS_LINE_0_QUARTER_HOUR_SEV_ERR_SECS, "dsl.stats.line.0.quarter_hour.severely_errored_secs",
+      { DSL_STATS_LINE_0_QUARTER_HOUR_SEV_ERR_SECS, "dsl.stats.line.0."DSL_STAT_QUARTER_HOUR PATH_SEPARATOR DSL_STAT_SEVERELY_ERRORED_SECS,
       json_type_int, DSL_UPDATE_TYPE_POLL },
          /* <dsl.stats.line.0.channel> section */
          { DSL_STATS_LINE_0_CHANNEL, "dsl.stats.line.0.channel",
          json_type_object, DSL_UPDATE_TYPE_NONE },
-         { DSL_STATS_LINE_0_CHANNEL_TOTAL_START, "dsl.stats.line.0.channel.total_start",
+         { DSL_STATS_LINE_0_CHANNEL_TOTAL_START, "dsl.stats.line.0.channel."DSL_STAT_TOTAL_START,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_0_CHANNEL_SHOWTIME_START, "dsl.stats.line.0.channel.showtime_start",
+         { DSL_STATS_LINE_0_CHANNEL_SHOWTIME_START, "dsl.stats.line.0.channel."DSL_STAT_SHOWTIME_START,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_0_CHANNEL_LAST_SHOWTIME_START, "dsl.stats.line.0.channel.last_showtime_start",
+         { DSL_STATS_LINE_0_CHANNEL_LAST_SHOWTIME_START, "dsl.stats.line.0.channel."DSL_STAT_LAST_SHOWTIME_START,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_0_CHANNEL_CURRENT_DAY_START, "dsl.stats.line.0.channel.current_day_start",
+         { DSL_STATS_LINE_0_CHANNEL_CURRENT_DAY_START, "dsl.stats.line.0.channel."DSL_STAT_CURRENT_DAY_START,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_0_CHANNEL_QUARTER_HOUR_START, "dsl.stats.line.0.channel.quarter_hour_start",
+         { DSL_STATS_LINE_0_CHANNEL_QUARTER_HOUR_START, "dsl.stats.line.0.channel."DSL_STAT_QUARTER_HOUR_START,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_0_CHANNEL_TOTAL, "dsl.stats.line.0.channel.total",
+         { DSL_STATS_LINE_0_CHANNEL_TOTAL, "dsl.stats.line.0.channel."DSL_STAT_TOTAL,
          json_type_object, DSL_UPDATE_TYPE_NONE },
-         { DSL_STATS_LINE_0_CHANNEL_TOTAL_XTUR_FEC_ERRORS, "dsl.stats.line.0.channel.total.xtur_fec_errors",
+         { DSL_STATS_LINE_0_CHANNEL_TOTAL_XTUR_FEC_ERRORS, "dsl.stats.line.0.channel."DSL_STAT_TOTAL PATH_SEPARATOR DSL_STAT_XTUR_FEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_0_CHANNEL_TOTAL_XTUR_CRC_ERRORS, "dsl.stats.line.0.channel.total.xtur_crc_errors",
+         { DSL_STATS_LINE_0_CHANNEL_TOTAL_XTUR_CRC_ERRORS, "dsl.stats.line.0.channel."DSL_STAT_TOTAL PATH_SEPARATOR DSL_STAT_XTUR_CRC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_0_CHANNEL_TOTAL_XTUC_FEC_ERRORS, "dsl.stats.line.0.channel.total.xtuc_fec_errors",
+         { DSL_STATS_LINE_0_CHANNEL_TOTAL_XTUC_FEC_ERRORS, "dsl.stats.line.0.channel."DSL_STAT_TOTAL PATH_SEPARATOR DSL_STAT_XTUC_FEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_0_CHANNEL_TOTAL_XTUC_CRC_ERRORS, "dsl.stats.line.0.channel.total.xtuc_crc_errors",
+         { DSL_STATS_LINE_0_CHANNEL_TOTAL_XTUC_CRC_ERRORS, "dsl.stats.line.0.channel."DSL_STAT_TOTAL PATH_SEPARATOR DSL_STAT_XTUC_CRC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_0_CHANNEL_TOTAL_XTUR_HEC_ERRORS, "dsl.stats.line.0.channel.total.xtur_hex_errors",
+         { DSL_STATS_LINE_0_CHANNEL_TOTAL_XTUR_HEC_ERRORS, "dsl.stats.line.0.channel."DSL_STAT_TOTAL PATH_SEPARATOR DSL_STAT_XTUR_HEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_0_CHANNEL_TOTAL_XTUC_HEC_ERRORS, "dsl.stats.line.0.channel.total.xtuc_hex_errors",
+         { DSL_STATS_LINE_0_CHANNEL_TOTAL_XTUC_HEC_ERRORS, "dsl.stats.line.0.channel."DSL_STAT_TOTAL PATH_SEPARATOR DSL_STAT_XTUC_HEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_0_CHANNEL_SHOWTIME, "dsl.stats.line.0.channel.showtime",
+         { DSL_STATS_LINE_0_CHANNEL_SHOWTIME, "dsl.stats.line.0.channel."DSL_STAT_SHOWTIME,
          json_type_object, DSL_UPDATE_TYPE_NONE },
-         { DSL_STATS_LINE_0_CHANNEL_SHOWTIME_XTUR_FEC_ERRORS, "dsl.stats.line.0.channel.showtime.xtur_fec_errors",
+         { DSL_STATS_LINE_0_CHANNEL_SHOWTIME_XTUR_FEC_ERRORS, "dsl.stats.line.0.channel."DSL_STAT_SHOWTIME PATH_SEPARATOR DSL_STAT_XTUR_FEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_0_CHANNEL_SHOWTIME_XTUR_CRC_ERRORS, "dsl.stats.line.0.channel.showtime.xtur_crc_errors",
+         { DSL_STATS_LINE_0_CHANNEL_SHOWTIME_XTUR_CRC_ERRORS, "dsl.stats.line.0.channel."DSL_STAT_SHOWTIME PATH_SEPARATOR DSL_STAT_XTUR_CRC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_0_CHANNEL_SHOWTIME_XTUC_FEC_ERRORS, "dsl.stats.line.0.channel.showtime.xtuc_fec_errors",
+         { DSL_STATS_LINE_0_CHANNEL_SHOWTIME_XTUC_FEC_ERRORS, "dsl.stats.line.0.channel."DSL_STAT_SHOWTIME PATH_SEPARATOR DSL_STAT_XTUC_FEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_0_CHANNEL_SHOWTIME_XTUC_CRC_ERRORS, "dsl.stats.line.0.channel.showtime.xtuc_crc_errors",
+         { DSL_STATS_LINE_0_CHANNEL_SHOWTIME_XTUC_CRC_ERRORS, "dsl.stats.line.0.channel."DSL_STAT_SHOWTIME PATH_SEPARATOR DSL_STAT_XTUC_CRC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_0_CHANNEL_SHOWTIME_XTUR_HEC_ERRORS, "dsl.stats.line.0.channel.showtime.xtur_hec_errors",
+         { DSL_STATS_LINE_0_CHANNEL_SHOWTIME_XTUR_HEC_ERRORS, "dsl.stats.line.0.channel."DSL_STAT_SHOWTIME PATH_SEPARATOR DSL_STAT_XTUR_HEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_0_CHANNEL_SHOWTIME_XTUC_HEC_ERRORS, "dsl.stats.line.0.channel.showtime.xtuc_hec_errors",
+         { DSL_STATS_LINE_0_CHANNEL_SHOWTIME_XTUC_HEC_ERRORS, "dsl.stats.line.0.channel."DSL_STAT_SHOWTIME PATH_SEPARATOR DSL_STAT_XTUC_HEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_0_CHANNEL_LAST_SHOWTIME, "dsl.stats.line.0.channel.last_showtime",
+         { DSL_STATS_LINE_0_CHANNEL_LAST_SHOWTIME, "dsl.stats.line.0.channel."DSL_STAT_LAST_SHOWTIME,
          json_type_object, DSL_UPDATE_TYPE_NONE },
-         { DSL_STATS_LINE_0_CHANNEL_LAST_SHOWTIME_XTUR_FEC_ERRORS, "dsl.stats.line.0.channel.last_showtime.xtur_fec_errors",
+         { DSL_STATS_LINE_0_CHANNEL_LAST_SHOWTIME_XTUR_FEC_ERRORS, "dsl.stats.line.0.channel."DSL_STAT_LAST_SHOWTIME PATH_SEPARATOR DSL_STAT_XTUR_FEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_0_CHANNEL_LAST_SHOWTIME_XTUR_CRC_ERRORS, "dsl.stats.line.0.channel.last_showtime.xtur_crc_errors",
+         { DSL_STATS_LINE_0_CHANNEL_LAST_SHOWTIME_XTUR_CRC_ERRORS, "dsl.stats.line.0.channel."DSL_STAT_LAST_SHOWTIME PATH_SEPARATOR DSL_STAT_XTUR_CRC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_0_CHANNEL_LAST_SHOWTIME_XTUC_FEC_ERRORS, "dsl.stats.line.0.channel.last_showtime.xtuc_fec_errors",
+         { DSL_STATS_LINE_0_CHANNEL_LAST_SHOWTIME_XTUC_FEC_ERRORS, "dsl.stats.line.0.channel."DSL_STAT_LAST_SHOWTIME PATH_SEPARATOR DSL_STAT_XTUC_FEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_0_CHANNEL_LAST_SHOWTIME_XTUC_CRC_ERRORS, "dsl.stats.line.0.channel.last_showtime.xtuc_crc_errors",
+         { DSL_STATS_LINE_0_CHANNEL_LAST_SHOWTIME_XTUC_CRC_ERRORS, "dsl.stats.line.0.channel."DSL_STAT_LAST_SHOWTIME PATH_SEPARATOR DSL_STAT_XTUC_CRC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_0_CHANNEL_LAST_SHOWTIME_XTUR_HEC_ERRORS, "dsl.stats.line.0.channel.last_showtime.xtur_hec_errors",
+         { DSL_STATS_LINE_0_CHANNEL_LAST_SHOWTIME_XTUR_HEC_ERRORS, "dsl.stats.line.0.channel."DSL_STAT_LAST_SHOWTIME PATH_SEPARATOR DSL_STAT_XTUR_HEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_0_CHANNEL_LAST_SHOWTIME_XTUC_HEC_ERRORS, "dsl.stats.line.0.channel.last_showtime.xtuc_hec_errors",
+         { DSL_STATS_LINE_0_CHANNEL_LAST_SHOWTIME_XTUC_HEC_ERRORS, "dsl.stats.line.0.channel."DSL_STAT_LAST_SHOWTIME PATH_SEPARATOR DSL_STAT_XTUC_HEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_0_CHANNEL_CURRENT_DAY, "dsl.stats.line.0.channel.current_day",
+         { DSL_STATS_LINE_0_CHANNEL_CURRENT_DAY, "dsl.stats.line.0.channel."DSL_STAT_CURRENT_DAY,
          json_type_object, DSL_UPDATE_TYPE_NONE },
-         { DSL_STATS_LINE_0_CHANNEL_CURRENT_DAY_XTUR_FEC_ERRORS, "dsl.stats.line.0.channel.current_day.xtur_fec_errors",
+         { DSL_STATS_LINE_0_CHANNEL_CURRENT_DAY_XTUR_FEC_ERRORS, "dsl.stats.line.0.channel."DSL_STAT_CURRENT_DAY PATH_SEPARATOR DSL_STAT_XTUR_FEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_0_CHANNEL_CURRENT_DAY_XTUR_CRC_ERRORS, "dsl.stats.line.0.channel.current_day.xtur_crc_errors",
+         { DSL_STATS_LINE_0_CHANNEL_CURRENT_DAY_XTUR_CRC_ERRORS, "dsl.stats.line.0.channel."DSL_STAT_CURRENT_DAY PATH_SEPARATOR DSL_STAT_XTUR_CRC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_0_CHANNEL_CURRENT_DAY_XTUC_FEC_ERRORS, "dsl.stats.line.0.channel.current_day.xtuc_fec_errors",
+         { DSL_STATS_LINE_0_CHANNEL_CURRENT_DAY_XTUC_FEC_ERRORS, "dsl.stats.line.0.channel."DSL_STAT_CURRENT_DAY PATH_SEPARATOR DSL_STAT_XTUC_FEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_0_CHANNEL_CURRENT_DAY_XTUC_CRC_ERRORS, "dsl.stats.line.0.channel.current_day.xtuc_crc_errors",
+         { DSL_STATS_LINE_0_CHANNEL_CURRENT_DAY_XTUC_CRC_ERRORS, "dsl.stats.line.0.channel."DSL_STAT_CURRENT_DAY PATH_SEPARATOR DSL_STAT_XTUC_CRC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_0_CHANNEL_CURRENT_DAY_XTUR_HEC_ERRORS, "dsl.stats.line.0.channel.current_day.xtur_hec_errors",
+         { DSL_STATS_LINE_0_CHANNEL_CURRENT_DAY_XTUR_HEC_ERRORS, "dsl.stats.line.0.channel."DSL_STAT_CURRENT_DAY PATH_SEPARATOR DSL_STAT_XTUR_HEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_0_CHANNEL_CURRENT_DAY_XTUC_HEC_ERRORS, "dsl.stats.line.0.channel.current_day.xtuc_hec_errors",
+         { DSL_STATS_LINE_0_CHANNEL_CURRENT_DAY_XTUC_HEC_ERRORS, "dsl.stats.line.0.channel."DSL_STAT_CURRENT_DAY PATH_SEPARATOR DSL_STAT_XTUC_HEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_0_CHANNEL_QUARTER_HOUR, "dsl.stats.line.0.channel.quarter_hour",
+         { DSL_STATS_LINE_0_CHANNEL_QUARTER_HOUR, "dsl.stats.line.0.channel."DSL_STAT_QUARTER_HOUR,
          json_type_object, DSL_UPDATE_TYPE_NONE },
-         { DSL_STATS_LINE_0_CHANNEL_QUARTER_HOUR_XTUR_FEC_ERRORS, "dsl.stats.line.0.channel.quarter_hour.xtur_fec_errors",
+         { DSL_STATS_LINE_0_CHANNEL_QUARTER_HOUR_XTUR_FEC_ERRORS, "dsl.stats.line.0.channel."DSL_STAT_QUARTER_HOUR PATH_SEPARATOR DSL_STAT_XTUR_FEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_0_CHANNEL_QUARTER_HOUR_XTUR_CRC_ERRORS, "dsl.stats.line.0.channel.quarter_hour.xtur_crc_errors",
+         { DSL_STATS_LINE_0_CHANNEL_QUARTER_HOUR_XTUR_CRC_ERRORS, "dsl.stats.line.0.channel."DSL_STAT_QUARTER_HOUR PATH_SEPARATOR DSL_STAT_XTUR_CRC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_0_CHANNEL_QUARTER_HOUR_XTUC_FEC_ERRORS, "dsl.stats.line.0.channel.quarter_hour.xtuc_fec_errors",
+         { DSL_STATS_LINE_0_CHANNEL_QUARTER_HOUR_XTUC_FEC_ERRORS, "dsl.stats.line.0.channel."DSL_STAT_QUARTER_HOUR PATH_SEPARATOR DSL_STAT_XTUC_FEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_0_CHANNEL_QUARTER_HOUR_XTUC_CRC_ERRORS, "dsl.stats.line.0.channel.quarter_hour.xtuc_crc_errors",
+         { DSL_STATS_LINE_0_CHANNEL_QUARTER_HOUR_XTUC_CRC_ERRORS, "dsl.stats.line.0.channel."DSL_STAT_QUARTER_HOUR PATH_SEPARATOR DSL_STAT_XTUC_CRC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_0_CHANNEL_QUARTER_HOUR_XTUR_HEC_ERRORS, "dsl.stats.line.0.channel.quarter_hour.xtur_hec_errors",
+         { DSL_STATS_LINE_0_CHANNEL_QUARTER_HOUR_XTUR_HEC_ERRORS, "dsl.stats.line.0.channel."DSL_STAT_QUARTER_HOUR PATH_SEPARATOR DSL_STAT_XTUR_HEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_0_CHANNEL_QUARTER_HOUR_XTUC_HEC_ERRORS, "dsl.stats.line.0.channel.quarter_hour.xtuc_hec_errors",
+         { DSL_STATS_LINE_0_CHANNEL_QUARTER_HOUR_XTUC_HEC_ERRORS, "dsl.stats.line.0.channel."DSL_STAT_QUARTER_HOUR PATH_SEPARATOR DSL_STAT_XTUC_HEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
       /* <dsl.stats.line.1> section */
       { DSL_STATS_LINE_1, "dsl.stats.line.1",
       json_type_object, DSL_UPDATE_TYPE_NONE },
-      { DSL_STATS_LINE_1_TOTAL_START, "dsl.stats.line.1.total_start",
+      { DSL_STATS_LINE_1_TOTAL_START, "dsl.stats.line.1."DSL_STAT_TOTAL_START,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATS_LINE_1_SHOWTIME_START, "dsl.stats.line.1.showtime_start",
+      { DSL_STATS_LINE_1_SHOWTIME_START, "dsl.stats.line.1."DSL_STAT_SHOWTIME_START,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATS_LINE_1_LAST_SHOWTIME_START, "dsl.stats.line.1.last_showtime_start",
+      { DSL_STATS_LINE_1_LAST_SHOWTIME_START, "dsl.stats.line.1."DSL_STAT_LAST_SHOWTIME_START,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATS_LINE_1_CURRENT_DAY_START, "dsl.stats.line.1.current_day_start",
+      { DSL_STATS_LINE_1_CURRENT_DAY_START, "dsl.stats.line.1."DSL_STAT_CURRENT_DAY_START,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATS_LINE_1_QUARTER_HOUR_START, "dsl.stats.line.1.quarter_hour_start",
+      { DSL_STATS_LINE_1_QUARTER_HOUR_START, "dsl.stats.line.1."DSL_STAT_QUARTER_HOUR_START,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATS_LINE_1_TOTAL, "dsl.stats.line.1.total",
+      { DSL_STATS_LINE_1_TOTAL, "dsl.stats.line.1."DSL_STAT_TOTAL,
       json_type_object, DSL_UPDATE_TYPE_NONE },
-      { DSL_STATS_LINE_1_TOTAL_ERR_SECS, "dsl.stats.line.1.total.errored_secs",
+      { DSL_STATS_LINE_1_TOTAL_ERR_SECS, "dsl.stats.line.1."DSL_STAT_TOTAL PATH_SEPARATOR DSL_STAT_ERRORED_SECS,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATS_LINE_1_TOTAL_SEV_ERR_SECS, "dsl.stats.line.1.total.severely_errored_secs",
+      { DSL_STATS_LINE_1_TOTAL_SEV_ERR_SECS, "dsl.stats.line.1."DSL_STAT_TOTAL PATH_SEPARATOR DSL_STAT_SEVERELY_ERRORED_SECS,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATS_LINE_1_SHOWTIME, "dsl.stats.line.1.showtime",
+      { DSL_STATS_LINE_1_SHOWTIME, "dsl.stats.line.1."DSL_STAT_SHOWTIME,
       json_type_object, DSL_UPDATE_TYPE_NONE },
-      { DSL_STATS_LINE_1_SHOWTIME_ERR_SECS, "dsl.stats.line.1.showtime.errored_secs",
+      { DSL_STATS_LINE_1_SHOWTIME_ERR_SECS, "dsl.stats.line.1."DSL_STAT_SHOWTIME PATH_SEPARATOR DSL_STAT_ERRORED_SECS,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATS_LINE_1_SHOWTIME_SEV_ERR_SECS, "dsl.stats.line.1.showtime.severely_errored_secs",
+      { DSL_STATS_LINE_1_SHOWTIME_SEV_ERR_SECS, "dsl.stats.line.1."DSL_STAT_SHOWTIME PATH_SEPARATOR DSL_STAT_SEVERELY_ERRORED_SECS,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATS_LINE_1_LAST_SHOWTIME, "dsl.stats.line.1.last_showtime",
+      { DSL_STATS_LINE_1_LAST_SHOWTIME, "dsl.stats.line.1."DSL_STAT_LAST_SHOWTIME,
       json_type_object, DSL_UPDATE_TYPE_NONE },
-      { DSL_STATS_LINE_1_LAST_SHOWTIME_ERR_SECS, "dsl.stats.line.1.last_showtime.errored_secs",
+      { DSL_STATS_LINE_1_LAST_SHOWTIME_ERR_SECS, "dsl.stats.line.1."DSL_STAT_LAST_SHOWTIME PATH_SEPARATOR DSL_STAT_ERRORED_SECS,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATS_LINE_1_LAST_SHOWTIME_SEV_ERR_SECS, "dsl.stats.line.1.last_showtime.severely_errored_secs",
+      { DSL_STATS_LINE_1_LAST_SHOWTIME_SEV_ERR_SECS, "dsl.stats.line.1."DSL_STAT_LAST_SHOWTIME PATH_SEPARATOR DSL_STAT_SEVERELY_ERRORED_SECS,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATS_LINE_1_CURRENT_DAY, "dsl.stats.line.1.current_day",
+      { DSL_STATS_LINE_1_CURRENT_DAY, "dsl.stats.line.1."DSL_STAT_CURRENT_DAY,
       json_type_object, DSL_UPDATE_TYPE_NONE },
-      { DSL_STATS_LINE_1_CURRENT_DAY_ERR_SECS, "dsl.stats.line.1.current_day.errored_secs",
+      { DSL_STATS_LINE_1_CURRENT_DAY_ERR_SECS, "dsl.stats.line.1."DSL_STAT_CURRENT_DAY PATH_SEPARATOR DSL_STAT_ERRORED_SECS,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATS_LINE_1_CURRENT_DAY_SEV_ERR_SECS, "dsl.stats.line.1.current_day.severely_errored_secs",
+      { DSL_STATS_LINE_1_CURRENT_DAY_SEV_ERR_SECS, "dsl.stats.line.1."DSL_STAT_CURRENT_DAY PATH_SEPARATOR DSL_STAT_SEVERELY_ERRORED_SECS,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATS_LINE_1_QUARTER_HOUR, "dsl.stats.line.1.quarter_hour",
+      { DSL_STATS_LINE_1_QUARTER_HOUR, "dsl.stats.line.1."DSL_STAT_QUARTER_HOUR,
       json_type_object, DSL_UPDATE_TYPE_NONE },
-      { DSL_STATS_LINE_1_QUARTER_HOUR_ERR_SECS, "dsl.stats.line.1.quarter_hour.errored_secs",
+      { DSL_STATS_LINE_1_QUARTER_HOUR_ERR_SECS, "dsl.stats.line.1."DSL_STAT_QUARTER_HOUR PATH_SEPARATOR DSL_STAT_ERRORED_SECS,
       json_type_int, DSL_UPDATE_TYPE_POLL },
-      { DSL_STATS_LINE_1_QUARTER_HOUR_SEV_ERR_SECS, "dsl.stats.line.1.quarter_hour.severely_errored_secs",
+      { DSL_STATS_LINE_1_QUARTER_HOUR_SEV_ERR_SECS, "dsl.stats.line.1."DSL_STAT_QUARTER_HOUR PATH_SEPARATOR DSL_STAT_SEVERELY_ERRORED_SECS,
       json_type_int, DSL_UPDATE_TYPE_POLL },
          /* <dsl.stats.line.1.channel> section */
          { DSL_STATS_LINE_1_CHANNEL, "dsl.stats.line.1.channel",
          json_type_object, DSL_UPDATE_TYPE_NONE },
-         { DSL_STATS_LINE_1_CHANNEL_TOTAL_START, "dsl.stats.line.1.channel.total_start",
+         { DSL_STATS_LINE_1_CHANNEL_TOTAL_START, "dsl.stats.line.1.channel."DSL_STAT_TOTAL_START,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_1_CHANNEL_SHOWTIME_START, "dsl.stats.line.1.channel.showtime_start",
+         { DSL_STATS_LINE_1_CHANNEL_SHOWTIME_START, "dsl.stats.line.1.channel."DSL_STAT_SHOWTIME_START,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_1_CHANNEL_LAST_SHOWTIME_START, "dsl.stats.line.1.channel.last_showtime_start",
+         { DSL_STATS_LINE_1_CHANNEL_LAST_SHOWTIME_START, "dsl.stats.line.1.channel."DSL_STAT_LAST_SHOWTIME_START,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_1_CHANNEL_CURRENT_DAY_START, "dsl.stats.line.1.channel.current_day_start",
+         { DSL_STATS_LINE_1_CHANNEL_CURRENT_DAY_START, "dsl.stats.line.1.channel."DSL_STAT_CURRENT_DAY_START,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_1_CHANNEL_QUARTER_HOUR_START, "dsl.stats.line.1.channel.quarter_hour_start",
+         { DSL_STATS_LINE_1_CHANNEL_QUARTER_HOUR_START, "dsl.stats.line.1.channel."DSL_STAT_QUARTER_HOUR_START,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_1_CHANNEL_TOTAL, "dsl.stats.line.1.channel.total",
+         { DSL_STATS_LINE_1_CHANNEL_TOTAL, "dsl.stats.line.1.channel."DSL_STAT_TOTAL,
          json_type_object, DSL_UPDATE_TYPE_NONE },
-         { DSL_STATS_LINE_1_CHANNEL_TOTAL_XTUR_FEC_ERRORS, "dsl.stats.line.1.channel.total.xtur_fec_errors",
+         { DSL_STATS_LINE_1_CHANNEL_TOTAL_XTUR_FEC_ERRORS, "dsl.stats.line.1.channel."DSL_STAT_TOTAL PATH_SEPARATOR DSL_STAT_XTUR_FEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_1_CHANNEL_TOTAL_XTUR_CRC_ERRORS, "dsl.stats.line.1.channel.total.xtur_crc_errors",
+         { DSL_STATS_LINE_1_CHANNEL_TOTAL_XTUR_CRC_ERRORS, "dsl.stats.line.1.channel."DSL_STAT_TOTAL PATH_SEPARATOR DSL_STAT_XTUR_CRC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_1_CHANNEL_TOTAL_XTUC_FEC_ERRORS, "dsl.stats.line.1.channel.total.xtuc_fec_errors",
+         { DSL_STATS_LINE_1_CHANNEL_TOTAL_XTUC_FEC_ERRORS, "dsl.stats.line.1.channel."DSL_STAT_TOTAL PATH_SEPARATOR DSL_STAT_XTUC_FEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_1_CHANNEL_TOTAL_XTUC_CRC_ERRORS, "dsl.stats.line.1.channel.total.xtuc_crc_errors",
+         { DSL_STATS_LINE_1_CHANNEL_TOTAL_XTUC_CRC_ERRORS, "dsl.stats.line.1.channel."DSL_STAT_TOTAL PATH_SEPARATOR DSL_STAT_XTUC_CRC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_1_CHANNEL_TOTAL_XTUR_HEC_ERRORS, "dsl.stats.line.1.channel.total.xtur_hec_errors",
+         { DSL_STATS_LINE_1_CHANNEL_TOTAL_XTUR_HEC_ERRORS, "dsl.stats.line.1.channel."DSL_STAT_TOTAL PATH_SEPARATOR DSL_STAT_XTUR_HEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_1_CHANNEL_TOTAL_XTUC_HEC_ERRORS, "dsl.stats.line.1.channel.total.xtuc_hec_errors",
+         { DSL_STATS_LINE_1_CHANNEL_TOTAL_XTUC_HEC_ERRORS, "dsl.stats.line.1.channel."DSL_STAT_TOTAL PATH_SEPARATOR DSL_STAT_XTUC_HEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_1_CHANNEL_SHOWTIME, "dsl.stats.line.1.channel.showtime",
+         { DSL_STATS_LINE_1_CHANNEL_SHOWTIME, "dsl.stats.line.1.channel."DSL_STAT_SHOWTIME,
          json_type_object, DSL_UPDATE_TYPE_NONE },
-         { DSL_STATS_LINE_1_CHANNEL_SHOWTIME_XTUR_FEC_ERRORS, "dsl.stats.line.1.channel.showtime.xtur_fec_errors",
+         { DSL_STATS_LINE_1_CHANNEL_SHOWTIME_XTUR_FEC_ERRORS, "dsl.stats.line.1.channel."DSL_STAT_SHOWTIME PATH_SEPARATOR DSL_STAT_XTUR_FEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_1_CHANNEL_SHOWTIME_XTUR_CRC_ERRORS, "dsl.stats.line.1.channel.showtime.xtur_crc_errors",
+         { DSL_STATS_LINE_1_CHANNEL_SHOWTIME_XTUR_CRC_ERRORS, "dsl.stats.line.1.channel."DSL_STAT_SHOWTIME PATH_SEPARATOR DSL_STAT_XTUR_CRC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_1_CHANNEL_SHOWTIME_XTUC_FEC_ERRORS, "dsl.stats.line.1.channel.showtime.xtuc_fec_errors",
+         { DSL_STATS_LINE_1_CHANNEL_SHOWTIME_XTUC_FEC_ERRORS, "dsl.stats.line.1.channel."DSL_STAT_SHOWTIME PATH_SEPARATOR DSL_STAT_XTUC_FEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_1_CHANNEL_SHOWTIME_XTUC_CRC_ERRORS, "dsl.stats.line.1.channel.showtime.xtuc_crc_errors",
+         { DSL_STATS_LINE_1_CHANNEL_SHOWTIME_XTUC_CRC_ERRORS, "dsl.stats.line.1.channel."DSL_STAT_SHOWTIME PATH_SEPARATOR DSL_STAT_XTUC_CRC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_1_CHANNEL_SHOWTIME_XTUR_HEC_ERRORS, "dsl.stats.line.1.channel.showtime.xtur_hec_errors",
+         { DSL_STATS_LINE_1_CHANNEL_SHOWTIME_XTUR_HEC_ERRORS, "dsl.stats.line.1.channel."DSL_STAT_SHOWTIME PATH_SEPARATOR DSL_STAT_XTUR_HEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_1_CHANNEL_SHOWTIME_XTUC_HEC_ERRORS, "dsl.stats.line.1.channel.showtime.xtuc_hec_errors",
+         { DSL_STATS_LINE_1_CHANNEL_SHOWTIME_XTUC_HEC_ERRORS, "dsl.stats.line.1.channel."DSL_STAT_SHOWTIME PATH_SEPARATOR DSL_STAT_XTUC_HEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_1_CHANNEL_LAST_SHOWTIME, "dsl.stats.line.1.channel.last_showtime",
+         { DSL_STATS_LINE_1_CHANNEL_LAST_SHOWTIME, "dsl.stats.line.1.channel."DSL_STAT_LAST_SHOWTIME,
          json_type_object, DSL_UPDATE_TYPE_NONE },
-         { DSL_STATS_LINE_1_CHANNEL_LAST_SHOWTIME_XTUR_FEC_ERRORS, "dsl.stats.line.1.channel.last_showtime.xtur_fec_errors",
+         { DSL_STATS_LINE_1_CHANNEL_LAST_SHOWTIME_XTUR_FEC_ERRORS, "dsl.stats.line.1.channel."DSL_STAT_LAST_SHOWTIME PATH_SEPARATOR DSL_STAT_XTUR_FEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_1_CHANNEL_LAST_SHOWTIME_XTUR_CRC_ERRORS, "dsl.stats.line.1.channel.last_showtime.xtur_crc_errors",
+         { DSL_STATS_LINE_1_CHANNEL_LAST_SHOWTIME_XTUR_CRC_ERRORS, "dsl.stats.line.1.channel."DSL_STAT_LAST_SHOWTIME PATH_SEPARATOR DSL_STAT_XTUR_CRC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_1_CHANNEL_LAST_SHOWTIME_XTUC_FEC_ERRORS, "dsl.stats.line.1.channel.last_showtime.xtuc_fec_errors",
+         { DSL_STATS_LINE_1_CHANNEL_LAST_SHOWTIME_XTUC_FEC_ERRORS, "dsl.stats.line.1.channel."DSL_STAT_LAST_SHOWTIME PATH_SEPARATOR DSL_STAT_XTUC_FEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_1_CHANNEL_LAST_SHOWTIME_XTUC_CRC_ERRORS, "dsl.stats.line.1.channel.last_showtime.xtuc_crc_errors",
+         { DSL_STATS_LINE_1_CHANNEL_LAST_SHOWTIME_XTUC_CRC_ERRORS, "dsl.stats.line.1.channel."DSL_STAT_LAST_SHOWTIME PATH_SEPARATOR DSL_STAT_XTUC_CRC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_1_CHANNEL_LAST_SHOWTIME_XTUR_HEC_ERRORS, "dsl.stats.line.1.channel.last_showtime.xtur_hec_errors",
+         { DSL_STATS_LINE_1_CHANNEL_LAST_SHOWTIME_XTUR_HEC_ERRORS, "dsl.stats.line.1.channel."DSL_STAT_LAST_SHOWTIME PATH_SEPARATOR DSL_STAT_XTUR_HEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_1_CHANNEL_LAST_SHOWTIME_XTUC_HEC_ERRORS, "dsl.stats.line.1.channel.last_showtime.xtuc_hec_errors",
+         { DSL_STATS_LINE_1_CHANNEL_LAST_SHOWTIME_XTUC_HEC_ERRORS, "dsl.stats.line.1.channel."DSL_STAT_LAST_SHOWTIME PATH_SEPARATOR DSL_STAT_XTUC_HEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_1_CHANNEL_CURRENT_DAY, "dsl.stats.line.1.channel.current_day",
+         { DSL_STATS_LINE_1_CHANNEL_CURRENT_DAY, "dsl.stats.line.1.channel."DSL_STAT_CURRENT_DAY,
          json_type_object, DSL_UPDATE_TYPE_NONE },
-         { DSL_STATS_LINE_1_CHANNEL_CURRENT_DAY_XTUR_FEC_ERRORS, "dsl.stats.line.1.channel.current_day.xtur_fec_errors",
+         { DSL_STATS_LINE_1_CHANNEL_CURRENT_DAY_XTUR_FEC_ERRORS, "dsl.stats.line.1.channel."DSL_STAT_CURRENT_DAY PATH_SEPARATOR DSL_STAT_XTUR_FEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_1_CHANNEL_CURRENT_DAY_XTUR_CRC_ERRORS, "dsl.stats.line.1.channel.current_day.xtur_crc_errors",
+         { DSL_STATS_LINE_1_CHANNEL_CURRENT_DAY_XTUR_CRC_ERRORS, "dsl.stats.line.1.channel."DSL_STAT_CURRENT_DAY PATH_SEPARATOR DSL_STAT_XTUR_CRC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_1_CHANNEL_CURRENT_DAY_XTUC_FEC_ERRORS, "dsl.stats.line.1.channel.current_day.xtuc_fec_errors",
+         { DSL_STATS_LINE_1_CHANNEL_CURRENT_DAY_XTUC_FEC_ERRORS, "dsl.stats.line.1.channel."DSL_STAT_CURRENT_DAY PATH_SEPARATOR DSL_STAT_XTUC_FEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_1_CHANNEL_CURRENT_DAY_XTUC_CRC_ERRORS, "dsl.stats.line.1.channel.current_day.xtuc_crc_errors",
+         { DSL_STATS_LINE_1_CHANNEL_CURRENT_DAY_XTUC_CRC_ERRORS, "dsl.stats.line.1.channel."DSL_STAT_CURRENT_DAY PATH_SEPARATOR DSL_STAT_XTUC_CRC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_1_CHANNEL_CURRENT_DAY_XTUR_HEC_ERRORS, "dsl.stats.line.1.channel.current_day.xtur_hec_errors",
+         { DSL_STATS_LINE_1_CHANNEL_CURRENT_DAY_XTUR_HEC_ERRORS, "dsl.stats.line.1.channel."DSL_STAT_CURRENT_DAY PATH_SEPARATOR DSL_STAT_XTUR_HEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_1_CHANNEL_CURRENT_DAY_XTUC_HEC_ERRORS, "dsl.stats.line.1.channel.current_day.xtuc_hec_errors",
+         { DSL_STATS_LINE_1_CHANNEL_CURRENT_DAY_XTUC_HEC_ERRORS, "dsl.stats.line.1.channel."DSL_STAT_CURRENT_DAY PATH_SEPARATOR DSL_STAT_XTUC_HEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_1_CHANNEL_QUARTER_HOUR, "dsl.stats.line.1.channel.quarter_hour",
+         { DSL_STATS_LINE_1_CHANNEL_QUARTER_HOUR, "dsl.stats.line.1.channel."DSL_STAT_QUARTER_HOUR,
          json_type_object, DSL_UPDATE_TYPE_NONE },
-         { DSL_STATS_LINE_1_CHANNEL_QUARTER_HOUR_XTUR_FEC_ERRORS, "dsl.stats.line.1.channel.quarter_hour.xtur_fec_errors",
+         { DSL_STATS_LINE_1_CHANNEL_QUARTER_HOUR_XTUR_FEC_ERRORS, "dsl.stats.line.1.channel."DSL_STAT_QUARTER_HOUR PATH_SEPARATOR DSL_STAT_XTUR_FEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_1_CHANNEL_QUARTER_HOUR_XTUR_CRC_ERRORS, "dsl.stats.line.1.channel.quarter_hour.xtur_crc_errors",
+         { DSL_STATS_LINE_1_CHANNEL_QUARTER_HOUR_XTUR_CRC_ERRORS, "dsl.stats.line.1.channel."DSL_STAT_QUARTER_HOUR PATH_SEPARATOR DSL_STAT_XTUR_CRC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_1_CHANNEL_QUARTER_HOUR_XTUC_FEC_ERRORS, "dsl.stats.line.1.channel.quarter_hour.xtuc_fec_errors",
+         { DSL_STATS_LINE_1_CHANNEL_QUARTER_HOUR_XTUC_FEC_ERRORS, "dsl.stats.line.1.channel."DSL_STAT_QUARTER_HOUR PATH_SEPARATOR DSL_STAT_XTUC_FEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_1_CHANNEL_QUARTER_HOUR_XTUC_CRC_ERRORS, "dsl.stats.line.1.channel.quarter_hour.xtuc_crc_errors",
+         { DSL_STATS_LINE_1_CHANNEL_QUARTER_HOUR_XTUC_CRC_ERRORS, "dsl.stats.line.1.channel."DSL_STAT_QUARTER_HOUR PATH_SEPARATOR DSL_STAT_XTUC_CRC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_1_CHANNEL_QUARTER_HOUR_XTUR_HEC_ERRORS, "dsl.stats.line.1.channel.quarter_hour.xtur_hec_errors",
+         { DSL_STATS_LINE_1_CHANNEL_QUARTER_HOUR_XTUR_HEC_ERRORS, "dsl.stats.line.1.channel."DSL_STAT_QUARTER_HOUR PATH_SEPARATOR DSL_STAT_XTUR_HEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL },
-         { DSL_STATS_LINE_1_CHANNEL_QUARTER_HOUR_XTUC_HEC_ERRORS, "dsl.stats.line.1.channel.quarter_hour.xtuc_hec_errors",
+         { DSL_STATS_LINE_1_CHANNEL_QUARTER_HOUR_XTUC_HEC_ERRORS, "dsl.stats.line.1.channel."DSL_STAT_QUARTER_HOUR PATH_SEPARATOR DSL_STAT_XTUC_HEC_ERRORS,
          json_type_int, DSL_UPDATE_TYPE_POLL }
 };
 static const DSL_uint32_t nNodesNum =
@@ -772,6 +777,11 @@ static const DSL_char_t *profilesTable[] =
 /* Definitions for PM counters */
 #define DSL_PM_HISTORY_INTERVALS_NUM 2
 
+/*
+   Definition for values to be written to status file in hex format
+*/
+#define MAX_HEX_STR_LEN 5
+
 /**********************************************/
 /* start local function declarations          */
 /**********************************************/
@@ -1485,7 +1495,9 @@ static json_object* DSL_CPE_JsonNodeParentGet(
    } DSL_CPE_JsonNode_t;
    DSL_char_t inputPath[SECTION_PATH_LENGTH];
    DSL_CPE_JsonNode_t visitedNode;
-   DSL_char_t *token = DSL_NULL;
+   DSL_char_t *pToken = DSL_NULL;
+   DSL_size_t nStrMax = SECTION_PATH_LENGTH;
+   DSL_char_t *pNextToken = DSL_NULL;
 
    memset(inputPath, 0, sizeof(inputPath));
    cpe_control_strncpy_s(inputPath, sizeof(inputPath),
@@ -1494,10 +1506,10 @@ static json_object* DSL_CPE_JsonNodeParentGet(
    memset(&visitedNode, 0, sizeof(visitedNode));
    visitedNode.pJsonObj = pRoot;
 
-   token = strtok(inputPath, NODES_SEPARATOR);
-   while (token)
+   pToken = cpe_control_strtok_s(inputPath, &nStrMax, NODES_SEPARATOR, &pNextToken);
+   while (pToken)
    {
-      visitedNode.pName = token;
+      visitedNode.pName = pToken;
       json_object_object_foreach(visitedNode.pJsonObj, key, val)
       {
          if (strcmp(key, visitedNode.pName) == 0)
@@ -1509,7 +1521,7 @@ static json_object* DSL_CPE_JsonNodeParentGet(
             break;
          }
       }
-      token = strtok(NULL, NODES_SEPARATOR);
+      pToken = cpe_control_strtok_s(NULL, &nStrMax, NODES_SEPARATOR, &pNextToken);
    }
 
    return visitedNode.pJsonObj;
@@ -1557,7 +1569,8 @@ static DSL_boolean_t DSL_CPE_IsWithinSection(
    DSL_boolean_t bIsWithin = DSL_FALSE;
 
    /* given section path is a substring of the given path */
-   if (strncmp(jsonPath, jsonSectionPath, strlen(jsonSectionPath)) == 0)
+   if (strncmp(jsonPath, jsonSectionPath,
+               cpe_control_strnlen_s(jsonSectionPath, SECTION_PATH_LENGTH)) == 0)
    {
       bIsWithin = DSL_TRUE;
    }
@@ -2096,9 +2109,9 @@ static DSL_Error_t DSL_CPE_JsonParamsUpdate(
                pContext,/*nDevice*/ 1, jsonPath);
             break;
          case DSL_STATUS_LINE_1_CHANNEL_LINKENC_USED:
-               DSL_CPE_JsonChannelLinkEncapUpdate(
-                  pContext,/*nDevice*/ 1, jsonPath);
-               break;
+            DSL_CPE_JsonChannelLinkEncapUpdate(
+               pContext,/*nDevice*/ 1, jsonPath);
+            break;
          case DSL_STATUS_LINE_1_CHANNEL_LPATH:
          case DSL_STATUS_LINE_1_CHANNEL_INTLVDEPTH:
          case DSL_STATUS_LINE_1_CHANNEL_INTLVBLOCK:
@@ -2524,7 +2537,13 @@ static DSL_Error_t DSL_CPE_JsonStatusFileWrite()
          DSL_CPE_CRLF));
       return DSL_ERROR;
    }
-   DSL_CPE_FWrite(pBufferOut, sizeof(DSL_char_t), strlen(pBufferOut), pFile);
+   DSL_CPE_FWrite(pBufferOut,
+                  sizeof(DSL_char_t),
+                  cpe_control_strnlen_s(pBufferOut,
+                     json_object_get_string_len(
+                        json_object_new_string(pBufferOut))
+                  ),
+                  pFile);
    DSL_CPE_FClose(pFile);
 
    /* execute atomic rename operation to store the status file in the final
@@ -2592,16 +2611,20 @@ static const DSL_char_t* DSL_CPE_VersionInfoGet(
       can be available with delay, e.g. hw version is available
       later, after FW DL) */
    if ((eNodeIdx == DSL_API_VERSION && (
-         strlen(sVersionInfo.data.DSL_DriverVersionApi) == 0 ||
+         cpe_control_strnlen_s(sVersionInfo.data.DSL_DriverVersionApi,
+                               MAX_INFO_STRING_LEN) == 0 ||
          strcmp(sVersionInfo.data.DSL_DriverVersionApi, "n/a") == 0)) ||
       (eNodeIdx == DSL_MEI_VERSION && (
-         strlen(sVersionInfo.data.DSL_DriverVersionMeiBsp) == 0 ||
+         cpe_control_strnlen_s(sVersionInfo.data.DSL_DriverVersionMeiBsp,
+                               MAX_INFO_STRING_LEN) == 0 ||
          strcmp(sVersionInfo.data.DSL_DriverVersionMeiBsp, "n/a") == 0)) ||
       (eNodeIdx == DSL_HW_VERSION && (
-         strlen(sVersionInfo.data.DSL_ChipSetHWVersion) == 0 ||
+         cpe_control_strnlen_s(sVersionInfo.data.DSL_ChipSetHWVersion,
+                               MAX_INFO_STRING_LEN) == 0 ||
          strcmp(sVersionInfo.data.DSL_ChipSetHWVersion, "n/a") == 0)) ||
       (eNodeIdx == DSL_CHIPSET_TYPE && (
-         strlen(sVersionInfo.data.DSL_ChipSetType) == 0 ||
+         cpe_control_strnlen_s(sVersionInfo.data.DSL_ChipSetType,
+                               MAX_INFO_STRING_LEN) == 0 ||
          strcmp(sVersionInfo.data.DSL_ChipSetType, "n/a") == 0)) ||
       /* FW version can change in the runtime */
       (eNodeIdx == DSL_STATUS_LINE_0_FW_VERSION ||
@@ -2719,8 +2742,10 @@ static DSL_Error_t DSL_CPE_LineStateGet(
    const DSL_int_t nDevice,
    DSL_LineStateValue_t *pLineState)
 {
-   DSL_Error_t nErrorCode = DSL_SUCCESS, nRet = DSL_SUCCESS;
+   DSL_Error_t nRet = DSL_SUCCESS;
+   DSL_uint32_t nDev = 0;
    static DSL_LineState_t lineData[DSL_CPE_MAX_DSL_ENTITIES] = { 0 };
+   static DSL_Error_t nErrCodes[DSL_CPE_MAX_DSL_ENTITIES] = { 0 };
 
    if (pLineState == DSL_NULL ||
          nDevice >= DSL_CPE_DSL_ENTITIES)
@@ -2730,7 +2755,7 @@ static DSL_Error_t DSL_CPE_LineStateGet(
 
    if (!DSL_CPE_IsIoctlFlagSet(DSL_FIO_LINE_STATE_GET))
    {
-      for (DSL_uint32_t nDev = 0; nDev < DSL_CPE_DSL_ENTITIES; ++nDev)
+      for (nDev = 0; nDev < DSL_CPE_DSL_ENTITIES; ++nDev)
       {
          nRet = DSL_CPE_Ioctl(pContext->fd[nDev],
             DSL_FIO_LINE_STATE_GET, (int)&lineData[nDev]);
@@ -2743,21 +2768,20 @@ static DSL_Error_t DSL_CPE_LineStateGet(
                "(device<%d>, nRet=%d, accessCtrl=%d)!" DSL_CPE_CRLF,
                nDev, nRet, lineData[nDev].accessCtl.nReturn));
 
-            nErrorCode = DSL_ERROR;
+            nErrCodes[nDev] = DSL_ERROR;
          }
-
-         /* set ioctl flag only if all IOCTLs succeeded */
-         if (nErrorCode == DSL_SUCCESS)
+         else
          {
-            DSL_CPE_IoctlFlagSet(DSL_FIO_LINE_STATE_GET);
+            nErrCodes[nDev] = DSL_SUCCESS;
          }
       }
+      DSL_CPE_IoctlFlagSet(DSL_FIO_LINE_STATE_GET);
    }
 
    /* provide data of corresponding IOCtl request */
    *pLineState = lineData[nDevice].data.nLineState;
 
-   return nErrorCode;
+   return nErrCodes[nDevice];
 }
 
 static DSL_void_t DSL_CPE_JsonLineStatusUpdate(
@@ -2890,9 +2914,11 @@ static DSL_Error_t DSL_CPE_SystemEnablingConfigGet(
    const DSL_int_t nDevice,
    DSL_uint8_t *pXTSE)
 {
-   DSL_Error_t nRet = DSL_SUCCESS, nErrorCode = DSL_SUCCESS;
+   DSL_Error_t nRet = DSL_SUCCESS;
    static DSL_G997_XTUSystemEnabling_t
       xtseData[DSL_CPE_MAX_DSL_ENTITIES] = { 0 };
+   static DSL_Error_t
+      nErrCodes[DSL_CPE_MAX_DSL_ENTITIES] = { 0 };
 
    if (pXTSE == DSL_NULL ||
          nDevice >= DSL_CPE_DSL_ENTITIES)
@@ -2916,30 +2942,23 @@ static DSL_Error_t DSL_CPE_SystemEnablingConfigGet(
                "failed (device<%d>, nRet=%d, accessCtrl=%d)!"DSL_CPE_CRLF,
                nDev, nRet, xtseData[nDev].accessCtl.nReturn));
 
-            nErrorCode = DSL_ERROR;
+            nErrCodes[nDev] = DSL_ERROR;
+         }
+         else
+         {
+            nErrCodes[nDev] = DSL_SUCCESS;
          }
       }
 
-      /* set ioctl flag only if all IOCTLs succeeded */
-      if (nErrorCode == DSL_SUCCESS)
-      {
-         DSL_CPE_IoctlFlagSet(DSL_FIO_G997_XTU_SYSTEM_ENABLING_CONFIG_GET);
-      }
+      DSL_CPE_IoctlFlagSet(DSL_FIO_G997_XTU_SYSTEM_ENABLING_CONFIG_GET);
    }
 
-   /* get data for the given device */
-   for (unsigned int nDev = 0; nDev < DSL_CPE_DSL_ENTITIES; ++nDev)
+   for (unsigned int i = 0; i < DSL_G997_NUM_XTSE_OCTETS; ++i)
    {
-      if (nDev == nDevice)
-      {
-         for (unsigned int i = 0; i < DSL_G997_NUM_XTSE_OCTETS; ++i)
-         {
-            pXTSE[i] = xtseData[nDev].data.XTSE[i];
-         }
-      }
+      pXTSE[i] = xtseData[nDevice].data.XTSE[i];
    }
 
-   return nErrorCode;
+   return nErrCodes[nDevice];
 }
 
 static DSL_void_t DSL_CPE_JsonStdSupportedUpdate(
@@ -2970,7 +2989,7 @@ static DSL_void_t DSL_CPE_JsonStdSupportedUpdate(
                sizeof(sStandardsSupported) - nOffset : 0;
             cpe_control_strncpy_s(sStandardsSupported + nOffset, nBufLen,
                sStandardName, nBufLen);
-            nOffset += strlen(sStandardName);
+            nOffset += cpe_control_strnlen_s(sStandardName, nBufLen);
          }
       }
 
@@ -2993,14 +3012,19 @@ static DSL_void_t DSL_CPE_JsonXtseConfigUpdate(
    if (DSL_CPE_SystemEnablingConfigGet(
          pContext, nDevice, XTSE) == DSL_SUCCESS)
    {
+      /* biggest possible value would be "0xFF" */
+      char sHex[MAX_HEX_STR_LEN] = { 0 };
       /* create json array object */
       pNewObj = json_object_new_array();
 
       /* update json object */
-      for (unsigned int i = 0; i < DSL_G997_NUM_XTSE_OCTETS; i++)
+      for (unsigned int i = 0; i < DSL_G997_NUM_XTSE_OCTETS; ++i)
       {
+         cpe_control_snprintf_s(sHex, sizeof(sHex), "0x%02X", XTSE[i]);
+         sHex[MAX_HEX_STR_LEN - 1] = '\0';
+
          json_object_array_add(pNewObj,
-            json_object_new_int(XTSE[i]));
+            json_object_new_string(sHex));
       }
       pParentObj = DSL_CPE_JsonNodeParentGet(pJsonStatusRootObj, jsonPath);
       json_object_object_add(pParentObj,
@@ -3018,9 +3042,11 @@ static DSL_Error_t DSL_CPE_SystemEnablingStatusGet(
    const DSL_int_t nDevice,
    DSL_uint8_t *pXTSE)
 {
-   DSL_Error_t nRet = DSL_SUCCESS, nErrorCode = DSL_SUCCESS;
+   DSL_Error_t nRet = DSL_SUCCESS;
    static DSL_G997_XTUSystemEnabling_t
       xtseData[DSL_CPE_MAX_DSL_ENTITIES] = { 0 };
+   static DSL_Error_t
+      nErrCodes[DSL_CPE_MAX_DSL_ENTITIES] = { 0 };
 
    if (pXTSE == DSL_NULL ||
          nDevice >= DSL_CPE_DSL_ENTITIES)
@@ -3044,30 +3070,23 @@ static DSL_Error_t DSL_CPE_SystemEnablingStatusGet(
                "failed (device<%d>, nRet=%d, accessCtrl=%d)!"DSL_CPE_CRLF,
                nDev, nRet, xtseData[nDev].accessCtl.nReturn));
 
-            nErrorCode = DSL_ERROR;
+            nErrCodes[nDev] = DSL_ERROR;
+         }
+         else
+         {
+            nErrCodes[nDev] = DSL_SUCCESS;
          }
       }
 
-      /* set ioctl flag only if all IOCTLs succeeded */
-      if (nErrorCode == DSL_SUCCESS)
-      {
-         DSL_CPE_IoctlFlagSet(DSL_FIO_G997_XTU_SYSTEM_ENABLING_STATUS_GET);
-      }
+      DSL_CPE_IoctlFlagSet(DSL_FIO_G997_XTU_SYSTEM_ENABLING_STATUS_GET);
    }
 
-   /* get data for the given device */
-   for (unsigned int nDev = 0; nDev < DSL_CPE_DSL_ENTITIES; ++nDev)
+   for (unsigned int i = 0; i < DSL_G997_NUM_XTSE_OCTETS; ++i)
    {
-      if (nDev == nDevice)
-      {
-         for (unsigned int i = 0; i < DSL_G997_NUM_XTSE_OCTETS; ++i)
-         {
-            pXTSE[i] = xtseData[nDev].data.XTSE[i];
-         }
-      }
+      pXTSE[i] = xtseData[nDevice].data.XTSE[i];
    }
 
-   return nErrorCode;
+   return nErrCodes[nDevice];
 }
 
 static DSL_void_t DSL_CPE_JsonStdUsedUpdate(
@@ -3118,14 +3137,19 @@ static DSL_void_t DSL_CPE_JsonXtseStatusUpdate(
    if (DSL_CPE_SystemEnablingStatusGet(
          pContext, nDevice, XTSE) == DSL_SUCCESS)
    {
+      /* biggest possible value would be "0xFF" */
+      char sHex[MAX_HEX_STR_LEN] = { 0 };
       /* create json array object */
       pNewObj = json_object_new_array();
 
       /* update json object */
       for (unsigned int i = 0; i < DSL_G997_NUM_XTSE_OCTETS; ++i)
       {
+         cpe_control_snprintf_s(sHex, sizeof(sHex), "0x%02X", XTSE[i]);
+         sHex[MAX_HEX_STR_LEN - 1] = '\0';
+
          json_object_array_add(pNewObj,
-            json_object_new_int(XTSE[i]));
+            json_object_new_string(sHex));
       }
       pParentObj = DSL_CPE_JsonNodeParentGet(pJsonStatusRootObj, jsonPath);
       json_object_object_add(pParentObj,
@@ -3174,7 +3198,7 @@ static DSL_void_t DSL_CPE_JsonAllowedProfilesUpdate(
                   sizeof(sAllowedProfiles) - nOffset : 0;
                cpe_control_strncpy_s(sAllowedProfiles + nOffset, nBufLen,
                   sProfileName, nBufLen);
-               nOffset += strlen(sProfileName);
+               nOffset += cpe_control_strnlen_s(sProfileName, nBufLen);
 
                break;
             }
@@ -3308,7 +3332,7 @@ static DSL_void_t DSL_CPE_JsonUs0MaskUpdate(
    /* update json object */
    pParentObj = DSL_CPE_JsonNodeParentGet(pJsonStatusRootObj, jsonPath);
    pNewObj =
-      json_object_new_int(0xF3F3); /* all types supported, use fixed value */
+      json_object_new_string("0xF3F3"); /* all types supported, use fixed value */
    json_object_object_add(pParentObj,
       DSL_CPE_JsonNodeNameGet(jsonPath), pNewObj);
 }
@@ -3323,9 +3347,13 @@ static DSL_Error_t DSL_CPE_LineFeatureStatusGet(
    const DSL_CPE_StatusNodeIdx_t eNodeIdx,
    DSL_boolean_t *pData)
 {
-   DSL_Error_t nRet = DSL_SUCCESS, nErrorCode = DSL_SUCCESS;
-   static DSL_LineFeature_t lineFeatureUs[DSL_CPE_MAX_DSL_ENTITIES] = { 0 };
-   static DSL_LineFeature_t lineFeatureDs[DSL_CPE_MAX_DSL_ENTITIES] = { 0 };
+   DSL_Error_t nRet = DSL_SUCCESS;
+   DSL_uint32_t nDev = 0;
+   DSL_AccessDir_t nDir = DSL_UPSTREAM;
+   static DSL_LineFeature_t
+      lineFeature[DSL_CPE_MAX_DSL_ENTITIES][DSL_ACCESSDIR_LAST] = { 0 };
+   static DSL_Error_t
+      nErrCodes[DSL_CPE_MAX_DSL_ENTITIES][DSL_ACCESSDIR_LAST] = { 0 };
 
    if (pData == DSL_NULL)
    {
@@ -3335,78 +3363,83 @@ static DSL_Error_t DSL_CPE_LineFeatureStatusGet(
    /* avoid sending IOCTL many times in one status update iteration */
    if (!DSL_CPE_IsIoctlFlagSet(DSL_FIO_LINE_FEATURE_STATUS_GET))
    {
-      for (unsigned int nDev = 0; nDev < DSL_CPE_DSL_ENTITIES; ++nDev)
+      for (nDev = 0; nDev < DSL_CPE_DSL_ENTITIES; ++nDev)
       {
-         lineFeatureUs[nDev].nDirection = DSL_UPSTREAM;
-         nRet = DSL_CPE_Ioctl(pContext->fd[nDev],
-            DSL_FIO_LINE_FEATURE_STATUS_GET, (int)&lineFeatureUs[nDev]);
-
-         if (nRet < DSL_SUCCESS ||
-            lineFeatureUs[nDev].accessCtl.nReturn < DSL_SUCCESS)
+         for (nDir = DSL_UPSTREAM; nDir < DSL_ACCESSDIR_LAST; ++nDir)
          {
-            DSL_CCA_DEBUG(DSL_CCA_DBG_ERR, (DSL_CPE_PREFIX
-               "ERROR - DSL_FIO_LINE_FEATURE_STATUS_GET(US) ioctl "
-               "failed (device<%d>, nRet=%d, accessCtrl=%d)!"DSL_CPE_CRLF,
-               nDev, nRet, lineFeatureUs[nDev].accessCtl.nReturn));
-
-            nErrorCode = DSL_ERROR;
-         }
+            lineFeature[nDev][nDir].nDirection = nDir;
 
-         lineFeatureDs[nDev].nDirection = DSL_DOWNSTREAM;
-         nRet = DSL_CPE_Ioctl(pContext->fd[nDev],
-            DSL_FIO_LINE_FEATURE_STATUS_GET, (int)&lineFeatureDs[nDev]);
+            nRet = DSL_CPE_Ioctl(pContext->fd[nDev],
+               DSL_FIO_LINE_FEATURE_STATUS_GET, (int)&lineFeature[nDev][nDir]);
 
-         if (nRet < DSL_SUCCESS ||
-            lineFeatureDs[nDev].accessCtl.nReturn < DSL_SUCCESS)
-         {
-            DSL_CCA_DEBUG(DSL_CCA_DBG_ERR, (DSL_CPE_PREFIX
-               "ERROR - DSL_FIO_LINE_FEATURE_STATUS_GET(DS) ioctl "
-               "failed (device<%d>, nRet=%d, accessCtrl=%d)!"DSL_CPE_CRLF,
-               nDev, nRet, lineFeatureDs[nDev].accessCtl.nReturn));
+            if (nRet < DSL_SUCCESS ||
+               lineFeature[nDev][nDir].accessCtl.nReturn < DSL_SUCCESS)
+            {
+               DSL_CCA_DEBUG(DSL_CCA_DBG_ERR, (DSL_CPE_PREFIX
+                  "ERROR - DSL_FIO_LINE_FEATURE_STATUS_GET ioctl "
+                  "failed (device<%d>, dir<%d>, nRet=%d, accessCtrl=%d)!"DSL_CPE_CRLF,
+                  nDev, nDir, nRet, lineFeature[nDev][nDir].accessCtl.nReturn));
 
-            nErrorCode = DSL_ERROR;
+               nErrCodes[nDev][nDir] = DSL_ERROR;
+            }
+            else
+            {
+               nErrCodes[nDev][nDir] = DSL_SUCCESS;
+            }
          }
       }
 
-      /* set ioctl flag only if all IOCTLs succeeded */
-      if (nErrorCode == DSL_SUCCESS)
-      {
-         DSL_CPE_IoctlFlagSet(DSL_FIO_LINE_FEATURE_STATUS_GET);
-      }
+      DSL_CPE_IoctlFlagSet(DSL_FIO_LINE_FEATURE_STATUS_GET);
    }
 
    /* get data for the given node */
    switch (eNodeIdx)
    {
       case DSL_STATUS_LINE_0_TRELLIS_US:
-         *pData = lineFeatureUs[/*nDevice*/0].data.bTrellisEnable;
+         nDev = 0;
+         nDir = DSL_UPSTREAM;
+         *pData = lineFeature[nDev][nDir].data.bTrellisEnable;
          break;
       case DSL_STATUS_LINE_0_TRELLIS_DS:
-         *pData = lineFeatureDs[/*nDevice*/0].data.bTrellisEnable;
+         nDev = 0;
+         nDir = DSL_DOWNSTREAM;
+         *pData = lineFeature[nDev][nDir].data.bTrellisEnable;
          break;
       case DSL_STATUS_LINE_1_TRELLIS_US:
-         *pData = lineFeatureUs[/*nDevice*/1].data.bTrellisEnable;
+         nDev = 1;
+         nDir = DSL_UPSTREAM;
+         *pData = lineFeature[nDev][nDir].data.bTrellisEnable;
          break;
       case DSL_STATUS_LINE_1_TRELLIS_DS:
-         *pData = lineFeatureDs[/*nDevice*/1].data.bTrellisEnable;
+         nDev = 1;
+         nDir = DSL_DOWNSTREAM;
+         *pData = lineFeature[nDev][nDir].data.bTrellisEnable;
          break;
       case DSL_STATUS_LINE_0_ACT_SNR_MODE_US:
-         *pData = lineFeatureUs[/*nDevice*/0].data.bVirtualNoiseSupport;
+         nDev = 0;
+         nDir = DSL_UPSTREAM;
+         *pData = lineFeature[nDev][nDir].data.bVirtualNoiseSupport;
          break;
       case DSL_STATUS_LINE_0_ACT_SNR_MODE_DS:
-         *pData = lineFeatureDs[/*nDevice*/0].data.bVirtualNoiseSupport;
+         nDev = 0;
+         nDir = DSL_DOWNSTREAM;
+         *pData = lineFeature[nDev][nDir].data.bVirtualNoiseSupport;
          break;
       case DSL_STATUS_LINE_1_ACT_SNR_MODE_US:
-         *pData = lineFeatureUs[/*nDevice*/1].data.bVirtualNoiseSupport;
+         nDev = 1;
+         nDir = DSL_UPSTREAM;
+         *pData = lineFeature[nDev][nDir].data.bVirtualNoiseSupport;
          break;
       case DSL_STATUS_LINE_1_ACT_SNR_MODE_DS:
-         *pData = lineFeatureDs[/*nDevice*/1].data.bVirtualNoiseSupport;
+         nDev = 1;
+         nDir = DSL_DOWNSTREAM;
+         *pData = lineFeature[nDev][nDir].data.bVirtualNoiseSupport;
          break;
       default:
-         break;
+         return DSL_ERROR;
    }
 
-   return nErrorCode;
+   return nErrCodes[nDev][nDir];
 }
 
 static DSL_void_t DSL_CPE_JsonTrellisUpdate(
@@ -3471,11 +3504,15 @@ static DSL_Error_t DSL_CPE_G997LineStatusGet(
    const DSL_CPE_StatusNodeIdx_t eNodeIdx,
    DSL_uint32_t *pData)
 {
-   DSL_Error_t nRet = DSL_SUCCESS, nErrorCode = DSL_SUCCESS;
-   static DSL_G997_LineStatus_t
-      g997LineStatusUs[DSL_CPE_MAX_DSL_ENTITIES] = { 0 };
-   static DSL_G997_LineStatus_t
-      g997LineStatusDs[DSL_CPE_MAX_DSL_ENTITIES] = { 0 };
+   DSL_Error_t nRet = DSL_SUCCESS;
+   DSL_uint32_t nDev = 0;
+   DSL_AccessDir_t nDir = DSL_UPSTREAM;
+   static DSL_G997_LineStatus_t g997LineStatus
+      [DSL_CPE_MAX_DSL_ENTITIES]
+      [DSL_ACCESSDIR_LAST] = { 0 };
+   static DSL_Error_t nErrCodes
+      [DSL_CPE_MAX_DSL_ENTITIES]
+      [DSL_ACCESSDIR_LAST] = { 0 };
 
    if (pData == DSL_NULL)
    {
@@ -3485,106 +3522,124 @@ static DSL_Error_t DSL_CPE_G997LineStatusGet(
    /* avoid sending IOCTL many times in one status update iteration */
    if (!DSL_CPE_IsIoctlFlagSet(DSL_FIO_G997_LINE_STATUS_GET))
    {
-      for (unsigned int nDev = 0; nDev < DSL_CPE_DSL_ENTITIES; ++nDev)
+      for (nDev = 0; nDev < DSL_CPE_DSL_ENTITIES; ++nDev)
       {
-         /*showtime, US */
-         g997LineStatusUs[nDev].nDeltDataType = DSL_DELT_DATA_SHOWTIME;
-         g997LineStatusUs[nDev].nDirection = DSL_UPSTREAM;
-         nRet = DSL_CPE_Ioctl(pContext->fd[nDev],
-            DSL_FIO_G997_LINE_STATUS_GET, (int)&g997LineStatusUs[nDev]);
-
-         if (nRet < DSL_SUCCESS ||
-            g997LineStatusUs[nDev].accessCtl.nReturn < DSL_SUCCESS)
+         for (nDir = DSL_UPSTREAM; nDir < DSL_ACCESSDIR_LAST; ++nDir)
          {
-            DSL_CCA_DEBUG(DSL_CCA_DBG_ERR, (DSL_CPE_PREFIX
-               "ERROR - DSL_FIO_G997_LINE_STATUS_GET(US) ioctl "
-               "failed (device<%d>, nRet=%d, accessCtrl=%d)!"DSL_CPE_CRLF,
-               nDev, nRet, g997LineStatusUs[nDev].accessCtl.nReturn));
-
-            nErrorCode = DSL_ERROR;
-         }
+            g997LineStatus[nDev][nDir].nDeltDataType = DSL_DELT_DATA_SHOWTIME;
+            g997LineStatus[nDev][nDir].nDirection = nDir;
 
-         /* showtime, DS */
-         g997LineStatusDs[nDev].nDeltDataType = DSL_DELT_DATA_SHOWTIME;
-         g997LineStatusDs[nDev].nDirection = DSL_DOWNSTREAM;
-         nRet = DSL_CPE_Ioctl(pContext->fd[nDev],
-            DSL_FIO_G997_LINE_STATUS_GET, (int)&g997LineStatusDs[nDev]);
+            nRet = DSL_CPE_Ioctl(pContext->fd[nDev],
+               DSL_FIO_G997_LINE_STATUS_GET, (int)&g997LineStatus[nDev][nDir]);
 
-         if (nRet < DSL_SUCCESS ||
-            g997LineStatusDs[nDev].accessCtl.nReturn < DSL_SUCCESS)
-         {
-            DSL_CCA_DEBUG(DSL_CCA_DBG_ERR, (DSL_CPE_PREFIX
-               "ERROR - DSL_FIO_G997_LINE_STATUS_GET(DS) ioctl "
-               "failed (device<%d>, nRet=%d, accessCtrl=%d)!"DSL_CPE_CRLF,
-               nDev, nRet, g997LineStatusDs[nDev].accessCtl.nReturn));
+            if (nRet < DSL_SUCCESS ||
+               g997LineStatus[nDev][nDir].accessCtl.nReturn < DSL_SUCCESS)
+            {
+               DSL_CCA_DEBUG(DSL_CCA_DBG_ERR, (DSL_CPE_PREFIX
+                  "ERROR - DSL_FIO_G997_LINE_STATUS_GET ioctl "
+                  "failed (device<%d>, dir<%d> nRet=%d, accessCtrl=%d)!"DSL_CPE_CRLF,
+                  nDev, nDir, nRet, g997LineStatus[nDev][nDir].accessCtl.nReturn));
 
-            nErrorCode = DSL_ERROR;
+               nErrCodes[nDev][nDir] = DSL_ERROR;
+            }
+            else
+            {
+               nErrCodes[nDev][nDir] = DSL_SUCCESS;
+            }
          }
       }
 
-      /* set ioctl flag only if all IOCTLs succeeded */
-      if (nErrorCode == DSL_SUCCESS)
-      {
-         DSL_CPE_IoctlFlagSet(DSL_FIO_G997_LINE_STATUS_GET);
-      }
+      DSL_CPE_IoctlFlagSet(DSL_FIO_G997_LINE_STATUS_GET);
    }
 
    /* get data for the given node */
    switch (eNodeIdx)
    {
    case DSL_STATUS_LINE_0_MAX_BIT_RATE_US:
-      *pData = g997LineStatusUs[/*nDevice*/0].data.ATTNDR;
+      nDev = 0;
+      nDir = DSL_UPSTREAM;
+      *pData = g997LineStatus[nDev][nDir].data.ATTNDR;
       break;
    case DSL_STATUS_LINE_0_MAX_BIT_RATE_DS:
-      *pData = g997LineStatusDs[/*nDevice*/0].data.ATTNDR;
+      nDev = 0;
+      nDir = DSL_DOWNSTREAM;
+      *pData = g997LineStatus[nDev][nDir].data.ATTNDR;
       break;
    case DSL_STATUS_LINE_1_MAX_BIT_RATE_US:
-      *pData = g997LineStatusUs[/*nDevice*/1].data.ATTNDR;
+      nDev = 1;
+      nDir = DSL_UPSTREAM;
+      *pData = g997LineStatus[nDev][nDir].data.ATTNDR;
       break;
    case DSL_STATUS_LINE_1_MAX_BIT_RATE_DS:
-      *pData = g997LineStatusDs[/*nDevice*/1].data.ATTNDR;
+      nDev = 1;
+      nDir = DSL_DOWNSTREAM;
+      *pData = g997LineStatus[nDev][nDir].data.ATTNDR;
       break;
    case DSL_STATUS_LINE_0_NOISE_MARGIN_US:
-      *pData = g997LineStatusUs[/*nDevice*/0].data.SNR;
+      nDev = 0;
+      nDir = DSL_UPSTREAM;
+      *pData = g997LineStatus[nDev][nDir].data.SNR;
       break;
    case DSL_STATUS_LINE_0_NOISE_MARGIN_DS:
-      *pData = g997LineStatusDs[/*nDevice*/0].data.SNR;
+      nDev = 0;
+      nDir = DSL_DOWNSTREAM;
+      *pData = g997LineStatus[nDev][nDir].data.SNR;
       break;
    case DSL_STATUS_LINE_1_NOISE_MARGIN_US:
-      *pData = g997LineStatusUs[/*nDevice*/1].data.SNR;
+      nDev = 1;
+      nDir = DSL_UPSTREAM;
+      *pData = g997LineStatus[nDev][nDir].data.SNR;
       break;
    case DSL_STATUS_LINE_1_NOISE_MARGIN_DS:
-      *pData = g997LineStatusDs[/*nDevice*/1].data.SNR;
+      nDev = 1;
+      nDir = DSL_DOWNSTREAM;
+      *pData = g997LineStatus[nDev][nDir].data.SNR;
       break;
    case DSL_STATUS_LINE_0_POWER_US:
-      *pData = g997LineStatusUs[/*nDevice*/0].data.ACTATP;
+      nDev = 0;
+      nDir = DSL_UPSTREAM;
+      *pData = g997LineStatus[nDev][nDir].data.ACTATP;
       break;
    case DSL_STATUS_LINE_0_POWER_DS:
-      *pData = g997LineStatusDs[/*nDevice*/0].data.ACTATP;
+      nDev = 0;
+      nDir = DSL_DOWNSTREAM;
+      *pData = g997LineStatus[nDev][nDir].data.ACTATP;
       break;
    case DSL_STATUS_LINE_1_POWER_US:
-      *pData = g997LineStatusUs[/*nDevice*/1].data.ACTATP;
+      nDev = 1;
+      nDir = DSL_UPSTREAM;
+      *pData = g997LineStatus[nDev][nDir].data.ACTATP;
       break;
    case DSL_STATUS_LINE_1_POWER_DS:
-      *pData = g997LineStatusDs[/*nDevice*/1].data.ACTATP;
+      nDev = 1;
+      nDir = DSL_DOWNSTREAM;
+      *pData = g997LineStatus[nDev][nDir].data.ACTATP;
       break;
    case DSL_STATUS_LINE_0_ATTENUATION_US:
-      *pData = g997LineStatusUs[/*nDevice*/0].data.LATN;
+      nDev = 0;
+      nDir = DSL_UPSTREAM;
+      *pData = g997LineStatus[nDev][nDir].data.LATN;
       break;
    case DSL_STATUS_LINE_0_ATTENUATION_DS:
-      *pData = g997LineStatusDs[/*nDevice*/0].data.LATN;
+      nDev = 0;
+      nDir = DSL_DOWNSTREAM;
+      *pData = g997LineStatus[nDev][nDir].data.LATN;
       break;
    case DSL_STATUS_LINE_1_ATTENUATION_US:
-      *pData = g997LineStatusUs[/*nDevice*/1].data.LATN;
+      nDev = 1;
+      nDir = DSL_UPSTREAM;
+      *pData = g997LineStatus[nDev][nDir].data.LATN;
       break;
    case DSL_STATUS_LINE_1_ATTENUATION_DS:
-      *pData = g997LineStatusDs[/*nDevice*/1].data.LATN;
+      nDev = 1;
+      nDir = DSL_DOWNSTREAM;
+      *pData = g997LineStatus[nDev][nDir].data.LATN;
       break;
    default:
-      break;
+      return DSL_ERROR;
    }
 
-   return nErrorCode;
+   return nErrCodes[nDev][nDir];
 }
 
 static DSL_void_t DSL_CPE_JsonMaxBitRateUpdate(
@@ -3684,7 +3739,7 @@ static DSL_void_t DSL_CPE_JsonSnrMpbUpdate(
       nBufSize = sizeof(sSnrMpbList);
       for (unsigned int i = 0; i < DSL_G997_MAX_NUMBER_OF_BANDS; ++i)
       {
-         DSL_CPE_snprintf(sBuf, sizeof(sBuf), ",%d", bandStatus.data.SNR[i]);
+         cpe_control_snprintf_s(sBuf, sizeof(sBuf), ",%d", bandStatus.data.SNR[i]);
          /* select name from the buf and exclude leading comma */
          sSnrMpbName = sBuf + ((nOffset) ? 0 : 1);
          nBufSize =
@@ -3692,7 +3747,7 @@ static DSL_void_t DSL_CPE_JsonSnrMpbUpdate(
             sizeof(sSnrMpbList) - nOffset : 0;
          cpe_control_strncpy_s(sSnrMpbList + nOffset, nBufSize,
             sSnrMpbName, nBufSize);
-         nOffset += strlen(sSnrMpbName);
+         nOffset += cpe_control_strnlen_s(sSnrMpbName, nBufSize);
       }
 
       /* update json object */
@@ -3713,11 +3768,13 @@ static DSL_Error_t DSL_CPE_G997LineInventoryGet(
    const DSL_CPE_StatusNodeIdx_t eNodeIdx,
    DSL_uint32_t *pData)
 {
-   DSL_Error_t nRet = DSL_SUCCESS, nErrorCode = DSL_SUCCESS;
-   static DSL_G997_LineInventory_t
-      g997LineInventoryNe[DSL_CPE_MAX_DSL_ENTITIES] = { 0 };
+   DSL_Error_t nRet = DSL_SUCCESS;
+   DSL_uint32_t nDev = 0;
+   DSL_XTUDir_t nDir = DSL_NEAR_END;
    static DSL_G997_LineInventory_t
-      g997LineInventoryFe[DSL_CPE_MAX_DSL_ENTITIES] = { 0 };
+      g997LineInventory[DSL_CPE_MAX_DSL_ENTITIES][(DSL_FAR_END+1)] = { 0 };
+   static DSL_Error_t
+      nErrCodes[DSL_CPE_MAX_DSL_ENTITIES][(DSL_FAR_END+1)] = { 0 };
 
    if (pData == DSL_NULL)
    {
@@ -3727,98 +3784,103 @@ static DSL_Error_t DSL_CPE_G997LineInventoryGet(
    /* avoid sending IOCTL many times in one status update iteration */
    if (!DSL_CPE_IsIoctlFlagSet(DSL_FIO_G997_LINE_INVENTORY_GET))
    {
-      for (unsigned int nDev = 0; nDev < DSL_CPE_DSL_ENTITIES; ++nDev)
+      for (nDev = 0; nDev < DSL_CPE_DSL_ENTITIES; ++nDev)
       {
-         g997LineInventoryNe[nDev].nDirection = DSL_NEAR_END;
-         nRet = DSL_CPE_Ioctl(pContext->fd[nDev],
-            DSL_FIO_G997_LINE_INVENTORY_GET, (int)&g997LineInventoryNe[nDev]);
-
-         if (nRet < DSL_SUCCESS ||
-            g997LineInventoryNe[nDev].accessCtl.nReturn < DSL_SUCCESS)
+         for (nDir = DSL_NEAR_END; nDir <= DSL_FAR_END; ++nDir)
          {
-            DSL_CCA_DEBUG(DSL_CCA_DBG_ERR, (DSL_CPE_PREFIX
-               "ERROR - DSL_FIO_G997_LINE_INVENTORY_GET(NE) ioctl "
-               "failed (device<%d>, nRet=%d, accessCtrl=%d)!"DSL_CPE_CRLF,
-               nDev, nRet, g997LineInventoryNe[nDev].accessCtl.nReturn));
-
-            nErrorCode = DSL_ERROR;
-         }
+            g997LineInventory[nDev][nDir].nDirection = nDir;
 
-         g997LineInventoryFe[nDev].nDirection = DSL_FAR_END;
-         nRet = DSL_CPE_Ioctl(pContext->fd[nDev],
-            DSL_FIO_G997_LINE_INVENTORY_GET, (int)&g997LineInventoryFe[nDev]);
+            nRet = DSL_CPE_Ioctl(pContext->fd[nDev],
+               DSL_FIO_G997_LINE_INVENTORY_GET, (int)&g997LineInventory[nDev][nDir]);
 
-         if (nRet < DSL_SUCCESS ||
-            g997LineInventoryFe[nDev].accessCtl.nReturn < DSL_SUCCESS)
-         {
-            DSL_CCA_DEBUG(DSL_CCA_DBG_ERR, (DSL_CPE_PREFIX
-               "ERROR - DSL_FIO_G997_LINE_INVENTORY_GET(FE) ioctl "
-               "failed (device<%d>, nRet=%d, accessCtrl=%d)!"DSL_CPE_CRLF,
-               nDev, nRet, g997LineInventoryFe[nDev].accessCtl.nReturn));
+            if (nRet < DSL_SUCCESS ||
+               g997LineInventory[nDev][nDir].accessCtl.nReturn < DSL_SUCCESS)
+            {
+               DSL_CCA_DEBUG(DSL_CCA_DBG_ERR, (DSL_CPE_PREFIX
+                  "ERROR - DSL_FIO_G997_LINE_INVENTORY_GET ioctl "
+                  "failed (device<%d>, dir<%d>, nRet=%d, accessCtrl=%d)!"DSL_CPE_CRLF,
+                  nDev, nDir, nRet, g997LineInventory[nDev][nDir].accessCtl.nReturn));
 
-            nErrorCode = DSL_ERROR;
+               nErrCodes[nDev][nDir] = DSL_ERROR;
+            }
+            else
+            {
+               nErrCodes[nDev][nDir] = DSL_SUCCESS;
+            }
          }
       }
 
-      /* set ioctl flag only if all IOCTLs succeeded */
-      if (nErrorCode == DSL_SUCCESS)
-      {
-         DSL_CPE_IoctlFlagSet(DSL_FIO_G997_LINE_INVENTORY_GET);
-      }
+      DSL_CPE_IoctlFlagSet(DSL_FIO_G997_LINE_INVENTORY_GET);
    }
 
    /* get data for the given node */
    switch (eNodeIdx)
    {
    case DSL_STATUS_LINE_0_XTUR_VENDOR:
-      pData[0] = g997LineInventoryNe[/*nDevice*/0].data.G994VendorID[2];
-      pData[1] = g997LineInventoryNe[/*nDevice*/0].data.G994VendorID[3];
-      pData[2] = g997LineInventoryNe[/*nDevice*/0].data.G994VendorID[4];
-      pData[3] = g997LineInventoryNe[/*nDevice*/0].data.G994VendorID[5];
+      nDev = 0;
+      nDir = DSL_NEAR_END;
+      pData[0] = g997LineInventory[nDev][nDir].data.G994VendorID[2];
+      pData[1] = g997LineInventory[nDev][nDir].data.G994VendorID[3];
+      pData[2] = g997LineInventory[nDev][nDir].data.G994VendorID[4];
+      pData[3] = g997LineInventory[nDev][nDir].data.G994VendorID[5];
       break;
    case DSL_STATUS_LINE_1_XTUR_VENDOR:
-      pData[0] = g997LineInventoryNe[/*nDevice*/1].data.G994VendorID[2];
-      pData[1] = g997LineInventoryNe[/*nDevice*/1].data.G994VendorID[3];
-      pData[2] = g997LineInventoryNe[/*nDevice*/1].data.G994VendorID[4];
-      pData[3] = g997LineInventoryNe[/*nDevice*/1].data.G994VendorID[5];
+      nDev = 1;
+      nDir = DSL_NEAR_END;
+      pData[0] = g997LineInventory[nDev][nDir].data.G994VendorID[2];
+      pData[1] = g997LineInventory[nDev][nDir].data.G994VendorID[3];
+      pData[2] = g997LineInventory[nDev][nDir].data.G994VendorID[4];
+      pData[3] = g997LineInventory[nDev][nDir].data.G994VendorID[5];
       break;
    case DSL_STATUS_LINE_0_XTUR_COUNTRY:
-      pData[0] = g997LineInventoryNe[/*nDevice*/0].data.G994VendorID[0];
-      pData[1] = g997LineInventoryNe[/*nDevice*/0].data.G994VendorID[1];
+      nDev = 0;
+      nDir = DSL_NEAR_END;
+      pData[0] = g997LineInventory[nDev][nDir].data.G994VendorID[0];
+      pData[1] = g997LineInventory[nDev][nDir].data.G994VendorID[1];
       break;
    case DSL_STATUS_LINE_1_XTUR_COUNTRY:
-      pData[0] = g997LineInventoryNe[/*nDevice*/1].data.G994VendorID[0];
-      pData[1] = g997LineInventoryNe[/*nDevice*/1].data.G994VendorID[1];
+      nDev = 1;
+      nDir = DSL_NEAR_END;
+      pData[0] = g997LineInventory[nDev][nDir].data.G994VendorID[0];
+      pData[1] = g997LineInventory[nDev][nDir].data.G994VendorID[1];
       break;
    case DSL_STATUS_LINE_0_XTUC_VENDOR:
-      pData[0] = g997LineInventoryFe[/*nDevice*/0].data.G994VendorID[2];
-      pData[1] = g997LineInventoryFe[/*nDevice*/0].data.G994VendorID[3];
-      pData[2] = g997LineInventoryFe[/*nDevice*/0].data.G994VendorID[4];
-      pData[3] = g997LineInventoryFe[/*nDevice*/0].data.G994VendorID[5];
+      nDev = 0;
+      nDir = DSL_FAR_END;
+      pData[0] = g997LineInventory[nDev][nDir].data.G994VendorID[2];
+      pData[1] = g997LineInventory[nDev][nDir].data.G994VendorID[3];
+      pData[2] = g997LineInventory[nDev][nDir].data.G994VendorID[4];
+      pData[3] = g997LineInventory[nDev][nDir].data.G994VendorID[5];
       break;
    case DSL_STATUS_LINE_1_XTUC_VENDOR:
-      pData[0] = g997LineInventoryFe[/*nDevice*/1].data.G994VendorID[2];
-      pData[1] = g997LineInventoryFe[/*nDevice*/1].data.G994VendorID[3];
-      pData[2] = g997LineInventoryFe[/*nDevice*/1].data.G994VendorID[4];
-      pData[3] = g997LineInventoryFe[/*nDevice*/1].data.G994VendorID[5];
+      nDev = 1;
+      nDir = DSL_FAR_END;
+      pData[0] = g997LineInventory[nDev][nDir].data.G994VendorID[2];
+      pData[1] = g997LineInventory[nDev][nDir].data.G994VendorID[3];
+      pData[2] = g997LineInventory[nDev][nDir].data.G994VendorID[4];
+      pData[3] = g997LineInventory[nDev][nDir].data.G994VendorID[5];
       break;
    case DSL_STATUS_LINE_0_XTUC_COUNTRY:
-      pData[0] = g997LineInventoryFe[/*nDevice*/0].data.G994VendorID[0];
-      pData[1] = g997LineInventoryFe[/*nDevice*/0].data.G994VendorID[1];
+      nDev = 0;
+      nDir = DSL_FAR_END;
+      pData[0] = g997LineInventory[nDev][nDir].data.G994VendorID[0];
+      pData[1] = g997LineInventory[nDev][nDir].data.G994VendorID[1];
       break;
    case DSL_STATUS_LINE_1_XTUC_COUNTRY:
-      pData[0] = g997LineInventoryFe[/*nDevice*/1].data.G994VendorID[0];
-      pData[1] = g997LineInventoryFe[/*nDevice*/1].data.G994VendorID[1];
+      nDev = 1;
+      nDir = DSL_FAR_END;
+      pData[0] = g997LineInventory[nDev][nDir].data.G994VendorID[0];
+      pData[1] = g997LineInventory[nDev][nDir].data.G994VendorID[1];
       break;
    default:
       DSL_CCA_DEBUG(DSL_CCA_DBG_WRN, (DSL_CPE_PREFIX
          "WARNING - StatusParser, DSL_CPE_G997LineInventoryGet: "
          "unknown node!"
          DSL_CPE_CRLF));
-      break;
+      return DSL_ERROR;
    }
 
-   return nErrorCode;
+   return nErrCodes[nDev][nDir];
 }
 
 static DSL_void_t DSL_CPE_JsonXturVendorUpdate(
@@ -3832,14 +3894,19 @@ static DSL_void_t DSL_CPE_JsonXturVendorUpdate(
    if (DSL_CPE_G997LineInventoryGet(
       pContext, eNodeIdx, nXturVendor) == DSL_SUCCESS)
    {
+      /* biggest possible value would be "0xFF" */
+      char sHex[MAX_HEX_STR_LEN] = { 0 };
       /* create json array object */
       pNewObj = json_object_new_array();
 
       /* update json object */
-      for (unsigned int i = 0; i < MAX_LEN_VENDOR_ID; i++)
+      for (unsigned int i = 0; i < MAX_LEN_VENDOR_ID; ++i)
       {
+         cpe_control_snprintf_s(sHex, sizeof(sHex), "0x%02X", nXturVendor[i]);
+         sHex[MAX_HEX_STR_LEN - 1] = '\0';
+
          json_object_array_add(pNewObj,
-            json_object_new_int(nXturVendor[i]));
+            json_object_new_string(sHex));
       }
 
       /* update json object */
@@ -3860,14 +3927,19 @@ static DSL_void_t DSL_CPE_JsonXturCountryUpdate(
    if (DSL_CPE_G997LineInventoryGet(
       pContext, eNodeIdx, nXturCountry) == DSL_SUCCESS)
    {
+      /* biggest possible value would be "0xFF" */
+      char sHex[MAX_HEX_STR_LEN] = { 0 };
       /* create json array object */
       pNewObj = json_object_new_array();
 
       /* update json object */
-      for (unsigned int i = 0; i < MAX_LEN_COUNTRY_ID; i++)
+      for (unsigned int i = 0; i < MAX_LEN_COUNTRY_ID; ++i)
       {
+         cpe_control_snprintf_s(sHex, sizeof(sHex), "0x%02X", nXturCountry[i]);
+         sHex[MAX_HEX_STR_LEN - 1] = '\0';
+
          json_object_array_add(pNewObj,
-            json_object_new_int(nXturCountry[i]));
+            json_object_new_string(sHex));
       }
 
       /* update json object */
@@ -3888,14 +3960,19 @@ static DSL_void_t DSL_CPE_JsonXtucVendorUpdate(
    if (DSL_CPE_G997LineInventoryGet(
       pContext, eNodeIdx, nXtucVendor) == DSL_SUCCESS)
    {
+      /* biggest possible value would be "0xFF" */
+      char sHex[MAX_HEX_STR_LEN] = { 0 };
       /* create json array object */
       pNewObj = json_object_new_array();
 
       /* update json object */
-      for (unsigned int i = 0; i < MAX_LEN_VENDOR_ID; i++)
+      for (unsigned int i = 0; i < MAX_LEN_VENDOR_ID; ++i)
       {
+         cpe_control_snprintf_s(sHex, sizeof(sHex), "0x%02X", nXtucVendor[i]);
+         sHex[MAX_HEX_STR_LEN - 1] = '\0';
+
          json_object_array_add(pNewObj,
-            json_object_new_int(nXtucVendor[i]));
+            json_object_new_string(sHex));
       }
 
       /* update json object */
@@ -3916,14 +3993,19 @@ static DSL_void_t DSL_CPE_JsonXtucCountryUpdate(
    if (DSL_CPE_G997LineInventoryGet(
       pContext, eNodeIdx, nXtucCountry) == DSL_SUCCESS)
    {
+      /* biggest possible value would be "0xFF" */
+      char sHex[MAX_HEX_STR_LEN] = { 0 };
       /* create json array object */
       pNewObj = json_object_new_array();
 
       /* update json object */
-      for (unsigned int i = 0; i < MAX_LEN_COUNTRY_ID; i++)
+      for (unsigned int i = 0; i < MAX_LEN_COUNTRY_ID; ++i)
       {
+         cpe_control_snprintf_s(sHex, sizeof(sHex), "0x%02X", nXtucCountry[i]);
+         sHex[MAX_HEX_STR_LEN - 1] = '\0';
+
          json_object_array_add(pNewObj,
-            json_object_new_int(nXtucCountry[i]));
+            json_object_new_string(sHex));
       }
 
       /* update json object */
@@ -4038,7 +4120,7 @@ static DSL_void_t DSL_CPE_JsonUpboklerPbUpdate(
       nBufSize = sizeof(sUpboklerPb);
       for (unsigned int i = 0; i < DSL_G997_MAX_NUMBER_OF_BANDS; ++i)
       {
-         DSL_CPE_snprintf(sBuf, sizeof(sBuf), ",%hu",
+         cpe_control_snprintf_s(sBuf, sizeof(sBuf), ",%hu",
             powerBackOffStatus.data.nKl0EstimRPb[i]);
          sBuf[5] = '\0';
          /* select name from the buf and exclude leading comma */
@@ -4048,7 +4130,7 @@ static DSL_void_t DSL_CPE_JsonUpboklerPbUpdate(
             sizeof(sUpboklerPb) - nOffset : 0;
          cpe_control_strncpy_s(sUpboklerPb + nOffset, nBufSize,
             sUpboklerPbName, nBufSize);
-         nOffset += strlen(sUpboklerPbName);
+         nOffset += cpe_control_strnlen_s(sUpboklerPbName, nBufSize);
       }
 
       /* update json object */
@@ -4078,7 +4160,7 @@ static DSL_void_t DSL_CPE_JsonRxthrshDsUpdate(
       nBufSize = sizeof(sRxthrshDs);
       for (unsigned int i = 0; i < DSL_G997_MAX_NUMBER_OF_BANDS; ++i)
       {
-         DSL_CPE_snprintf(sBuf, sizeof(sBuf), ",%hu",
+         cpe_control_snprintf_s(sBuf, sizeof(sBuf), ",%hu",
             powerBackOffStatus.data.nKl0EstimOPb[i]);
          sBuf[5] = '\0';
          /* select name from the buf and exclude leading comma */
@@ -4088,7 +4170,7 @@ static DSL_void_t DSL_CPE_JsonRxthrshDsUpdate(
             sizeof(sRxthrshDs) - nOffset : 0;
          cpe_control_strncpy_s(sRxthrshDs + nOffset, nBufSize,
             sRxthrshDsName, nBufSize);
-         nOffset += strlen(sRxthrshDsName);
+         nOffset += cpe_control_strnlen_s(sRxthrshDsName, nBufSize);
       }
 
       /* update json object */
@@ -4146,11 +4228,13 @@ static DSL_Error_t DSL_CPE_PMCountersTotalGet(
    const DSL_XTUDir_t nDirection,
    DSL_PM_ChannelCountersTotal_t *pData)
 {
-   DSL_Error_t nErrCode = DSL_SUCCESS, nRet = DSL_SUCCESS;
+   DSL_Error_t nRet = DSL_SUCCESS;
    DSL_uint32_t nDev = 0;
    DSL_XTUDir_t nDir = DSL_NEAR_END;
    static DSL_PM_ChannelCountersTotal_t
       sData[DSL_CPE_MAX_DSL_ENTITIES][(DSL_FAR_END + 1)] = { 0 };
+   static DSL_Error_t
+      nErrCodes[DSL_CPE_MAX_DSL_ENTITIES][(DSL_FAR_END+1)] = { 0 };
 
    if (pData == DSL_NULL ||
       nDevice >= DSL_CPE_DSL_ENTITIES ||
@@ -4163,6 +4247,19 @@ static DSL_Error_t DSL_CPE_PMCountersTotalGet(
    {
       for (nDev = 0; nDev < DSL_CPE_DSL_ENTITIES; ++nDev)
       {
+         /* omit PM polling for disabled lines */
+         if (INCLUDE_DSL_BONDING)
+         {
+            DSL_CPE_BND_Context_t *pBndCtx = (DSL_CPE_BND_Context_t*)pContext->pBnd;
+            if (pBndCtx != DSL_NULL &&
+                pBndCtx->lineBondingConfig[nDev].nPafLineDisabled == 1)
+            {
+               nErrCodes[nDev][DSL_NEAR_END] = DSL_ERROR;
+               nErrCodes[nDev][DSL_FAR_END] = DSL_ERROR;
+               continue;
+            }
+         }
+
          for (nDir = DSL_NEAR_END; nDir <= DSL_FAR_END; ++nDir)
          {
             sData[nDev][nDir].nDirection = nDir;
@@ -4179,21 +4276,21 @@ static DSL_Error_t DSL_CPE_PMCountersTotalGet(
                   "(device<%d>, nRet=%d, accessCtrl=%d)!" DSL_CPE_CRLF,
                   nDev, nRet, sData[nDev][nDir].accessCtl.nReturn));
 
-               nErrCode = DSL_ERROR;
+               nErrCodes[nDev][nDir] = DSL_ERROR;
+            }
+            else
+            {
+               nErrCodes[nDev][nDir] = DSL_SUCCESS;
             }
          }
       }
 
-      /* set ioctl flag only if all IOCTLs succeeded */
-      if (nErrCode == DSL_SUCCESS)
-      {
-         DSL_CPE_IoctlFlagSet(DSL_FIO_PM_CHANNEL_COUNTERS_TOTAL_GET);
-      }
+      DSL_CPE_IoctlFlagSet(DSL_FIO_PM_CHANNEL_COUNTERS_TOTAL_GET);
    }
 
    *pData = sData[nDevice][nDirection];
 
-   return nErrCode;
+   return nErrCodes[nDevice][nDirection];
 }
 
 static DSL_void_t DSL_CPE_JsonTotalStartUpdate(
@@ -4227,14 +4324,18 @@ static DSL_Error_t DSL_CPE_PMCountersShowtimeGet(
    const DSL_uint32_t nHistoryInterval,
    DSL_PM_ChannelCounters_t *pData)
 {
-   DSL_Error_t nErrCode = DSL_SUCCESS, nRet = DSL_SUCCESS;
+   DSL_Error_t nRet = DSL_SUCCESS;
    DSL_uint32_t nDev = 0;
    DSL_XTUDir_t nDir = DSL_NEAR_END;
    DSL_uint32_t nHistInt = 0;
-   static DSL_PM_ChannelCounters_t
-      sData[DSL_CPE_MAX_DSL_ENTITIES]
+   static DSL_PM_ChannelCounters_t sData
+      [DSL_CPE_MAX_DSL_ENTITIES]
       [(DSL_FAR_END + 1)]
-   [DSL_PM_HISTORY_INTERVALS_NUM] = { 0 };
+      [DSL_PM_HISTORY_INTERVALS_NUM] = { 0 };
+   static DSL_Error_t nErrCodes
+      [DSL_CPE_MAX_DSL_ENTITIES]
+      [(DSL_FAR_END+1)]
+      [DSL_PM_HISTORY_INTERVALS_NUM] = { 0 };
 
    if (pData == DSL_NULL ||
       nDevice >= DSL_CPE_DSL_ENTITIES ||
@@ -4248,6 +4349,21 @@ static DSL_Error_t DSL_CPE_PMCountersShowtimeGet(
    {
       for (nDev = 0; nDev < DSL_CPE_DSL_ENTITIES; ++nDev)
       {
+         /* omit PM polling for disabled lines */
+         if (INCLUDE_DSL_BONDING)
+         {
+            DSL_CPE_BND_Context_t *pBndCtx = (DSL_CPE_BND_Context_t*)pContext->pBnd;
+            if (pBndCtx != DSL_NULL &&
+                pBndCtx->lineBondingConfig[nDev].nPafLineDisabled == 1)
+            {
+               nErrCodes[nDev][DSL_NEAR_END][/*HistoryInterval*/0] = DSL_ERROR;
+               nErrCodes[nDev][DSL_NEAR_END][/*HistoryInterval*/1] = DSL_ERROR;
+               nErrCodes[nDev][DSL_FAR_END][/*HistoryInterval*/0] = DSL_ERROR;
+               nErrCodes[nDev][DSL_FAR_END][/*HistoryInterval*/1] = DSL_ERROR;
+               continue;
+            }
+         }
+
          for (nDir = DSL_NEAR_END; nDir <= DSL_FAR_END; ++nDir)
          {
             for (nHistInt = 0; nHistInt < DSL_PM_HISTORY_INTERVALS_NUM; ++nHistInt)
@@ -4270,19 +4386,23 @@ static DSL_Error_t DSL_CPE_PMCountersShowtimeGet(
                      nDev, (nDir == DSL_NEAR_END) ? "near end" : "far end",
                      nHistInt, nRet,
                      sData[nDev][nDir][nHistInt].accessCtl.nReturn));
+
+                  nErrCodes[nDev][nDir][nHistInt] = DSL_ERROR;
+               }
+               else
+               {
+                  nErrCodes[nDev][nDir][nHistInt] = DSL_SUCCESS;
                }
             }
          }
       }
 
-      /* no check for IOCTL failure here - it may happen that IOCTL failes
-         due to request for nHistoryInterval that was not yet reached */
       DSL_CPE_IoctlFlagSet(DSL_FIO_PM_CHANNEL_COUNTERS_SHOWTIME_GET);
    }
 
    *pData = sData[nDevice][nDirection][nHistoryInterval];
 
-   return nErrCode;
+   return nErrCodes[nDevice][nDirection][nHistoryInterval];
 }
 
 static DSL_void_t DSL_CPE_JsonShowtimeStartUpdate(
@@ -4334,6 +4454,17 @@ static DSL_void_t DSL_CPE_JsonCurrDayStartUpdate(
    DSL_PM_LineInitCounters_t initCounters = { 0 };
    json_object *pParentObj = DSL_NULL, *pNewObj = DSL_NULL;
 
+    /* omit PM polling for disabled lines */
+   if (INCLUDE_DSL_BONDING)
+   {
+      DSL_CPE_BND_Context_t *pBndCtx = (DSL_CPE_BND_Context_t*)pContext->pBnd;
+      if (pBndCtx != DSL_NULL &&
+          pBndCtx->lineBondingConfig[nDevice].nPafLineDisabled == 1)
+      {
+         return;
+      }
+   }
+
    nRet = DSL_CPE_Ioctl(pContext->fd[nDevice],
       DSL_FIO_PM_LINE_INIT_COUNTERS_1DAY_GET, (int)&initCounters);
    if (nRet == DSL_SUCCESS)
@@ -4357,11 +4488,13 @@ static DSL_Error_t DSL_CPE_PMCounters15MinGet(
    const DSL_XTUDir_t nDirection,
    DSL_PM_ChannelCounters_t *pData)
 {
-   DSL_Error_t nErrCode = DSL_SUCCESS, nRet = DSL_SUCCESS;
+   DSL_Error_t nRet = DSL_SUCCESS;
    DSL_uint32_t nDev = 0;
    DSL_XTUDir_t nDir = DSL_NEAR_END;
    static DSL_PM_ChannelCounters_t
       sData[DSL_CPE_MAX_DSL_ENTITIES][(DSL_FAR_END + 1)] = { 0 };
+   static DSL_Error_t
+      nErrCodes[DSL_CPE_MAX_DSL_ENTITIES][(DSL_FAR_END+1)] = { 0 };
 
    if (pData == DSL_NULL ||
       nDevice >= DSL_CPE_DSL_ENTITIES ||
@@ -4374,6 +4507,19 @@ static DSL_Error_t DSL_CPE_PMCounters15MinGet(
    {
       for (nDev = 0; nDev < DSL_CPE_DSL_ENTITIES; ++nDev)
       {
+         /* omit PM polling for disabled lines */
+         if (INCLUDE_DSL_BONDING)
+         {
+            DSL_CPE_BND_Context_t *pBndCtx = (DSL_CPE_BND_Context_t*)pContext->pBnd;
+            if (pBndCtx != DSL_NULL &&
+                pBndCtx->lineBondingConfig[nDev].nPafLineDisabled == 1)
+            {
+               nErrCodes[nDev][DSL_NEAR_END] = DSL_ERROR;
+               nErrCodes[nDev][DSL_FAR_END] = DSL_ERROR;
+               continue;
+            }
+         }
+
          for (nDir = DSL_NEAR_END; nDir <= DSL_FAR_END; ++nDir)
          {
             sData[nDev][nDir].nHistoryInterval = 0;
@@ -4391,21 +4537,21 @@ static DSL_Error_t DSL_CPE_PMCounters15MinGet(
                   "(device<%d>, nRet=%d, accessCtrl=%d)!" DSL_CPE_CRLF,
                   nDev, nRet, sData[nDev][nDir].accessCtl.nReturn));
 
-               nErrCode = DSL_ERROR;
+               nErrCodes[nDev][nDir] = DSL_ERROR;
+            }
+            else
+            {
+               nErrCodes[nDev][nDir] = DSL_SUCCESS;
             }
          }
       }
 
-      /* set ioctl flag only if all IOCTLs succeeded */
-      if (nErrCode == DSL_SUCCESS)
-      {
-         DSL_CPE_IoctlFlagSet(DSL_FIO_PM_CHANNEL_COUNTERS_15MIN_GET);
-      }
+      DSL_CPE_IoctlFlagSet(DSL_FIO_PM_CHANNEL_COUNTERS_15MIN_GET);
    }
 
    *pData = sData[nDevice][nDirection];
 
-   return nErrCode;
+   return nErrCodes[nDevice][nDirection];
 }
 
 static DSL_void_t DSL_CPE_JsonQuarterHourStartUpdate(
@@ -4438,9 +4584,12 @@ static DSL_Error_t DSL_CPE_LineSecCountersTotalGet(
    const DSL_CPE_StatusNodeIdx_t eNodeIdx,
    DSL_int_t *pData)
 {
-   DSL_Error_t nErrorCode = DSL_SUCCESS, nRet = DSL_SUCCESS;
+   DSL_Error_t nRet = DSL_SUCCESS;
+   DSL_uint32_t nDev = 0;
    static DSL_PM_LineSecCountersTotal_t
       sData[DSL_CPE_MAX_DSL_ENTITIES] = { 0 };
+   static DSL_Error_t
+      nErrCodes[DSL_CPE_MAX_DSL_ENTITIES] = { 0 };
 
    if (pData == DSL_NULL)
    {
@@ -4449,8 +4598,21 @@ static DSL_Error_t DSL_CPE_LineSecCountersTotalGet(
 
    if (!DSL_CPE_IsIoctlFlagSet(DSL_FIO_PM_LINE_SEC_COUNTERS_TOTAL_GET))
    {
-      for (DSL_uint32_t nDev = 0; nDev < DSL_CPE_DSL_ENTITIES; ++nDev)
+      for (nDev = 0; nDev < DSL_CPE_DSL_ENTITIES; ++nDev)
       {
+         /* omit PM polling for disabled lines */
+         if (INCLUDE_DSL_BONDING)
+         {
+            DSL_CPE_BND_Context_t *pBndCtx = (DSL_CPE_BND_Context_t*)pContext->pBnd;
+            if (pBndCtx != DSL_NULL &&
+                pBndCtx->lineBondingConfig[nDev].nPafLineDisabled == 1)
+            {
+               nErrCodes[nDev] = DSL_ERROR;
+               nErrCodes[nDev] = DSL_ERROR;
+               continue;
+            }
+         }
+
          sData[nDev].nDirection = DSL_NEAR_END;
 
          nRet = DSL_CPE_Ioctl(pContext->fd[nDev],
@@ -4465,37 +4627,41 @@ static DSL_Error_t DSL_CPE_LineSecCountersTotalGet(
                "(device<%d>, nRet=%d, accessCtrl=%d)!" DSL_CPE_CRLF,
                nDev, nRet, sData[nDev].accessCtl.nReturn));
 
-            nErrorCode = DSL_ERROR;
+            nErrCodes[nDev] = DSL_ERROR;
+         }
+         else
+         {
+            nErrCodes[nDev] = DSL_SUCCESS;
          }
       }
 
-      /* set ioctl flag only if all IOCTLs succeeded */
-      if (nErrorCode == DSL_SUCCESS)
-      {
-         DSL_CPE_IoctlFlagSet(DSL_FIO_PM_LINE_SEC_COUNTERS_TOTAL_GET);
-      }
+      DSL_CPE_IoctlFlagSet(DSL_FIO_PM_LINE_SEC_COUNTERS_TOTAL_GET);
    }
 
    /* provide data of corresponding IOCtl request */
    switch (eNodeIdx)
    {
    case DSL_STATS_LINE_0_TOTAL_ERR_SECS:
-      *pData = sData[/*nDevice*/0].data.nES;
+      nDev = 0;
+      *pData = sData[nDev].data.nES;
       break;
    case DSL_STATS_LINE_0_TOTAL_SEV_ERR_SECS:
-      *pData = sData[/*nDevice*/0].data.nSES;
+      nDev = 0;
+      *pData = sData[nDev].data.nSES;
       break;
    case DSL_STATS_LINE_1_TOTAL_ERR_SECS:
-      *pData = sData[/*nDevice*/1].data.nES;
+      nDev = 1;
+      *pData = sData[nDev].data.nES;
       break;
    case DSL_STATS_LINE_1_TOTAL_SEV_ERR_SECS:
-      *pData = sData[/*nDevice*/1].data.nSES;
+      nDev = 1;
+      *pData = sData[nDev].data.nSES;
       break;
    default:
-      break;
+      return DSL_ERROR;
    }
 
-   return nErrorCode;
+   return nErrCodes[nDev];
 }
 
 static DSL_void_t DSL_CPE_JsonTotalErrSecsUpdate(
@@ -4546,9 +4712,13 @@ static DSL_Error_t DSL_CPE_LineSecCountersShowtimeGet(
    const DSL_CPE_StatusNodeIdx_t eNodeIdx,
    DSL_int_t *pData)
 {
-   DSL_Error_t nErrorCode = DSL_SUCCESS, nRet = DSL_SUCCESS;
+   DSL_Error_t nRet = DSL_SUCCESS;
+   DSL_uint32_t nDev = 0;
+   DSL_uint32_t nHistInt = 0;
    static DSL_PM_LineSecCounters_t
       sData[DSL_CPE_MAX_DSL_ENTITIES][DSL_PM_HISTORY_INTERVALS_NUM] = { 0 };
+   static DSL_Error_t
+      nErrCodes[DSL_CPE_MAX_DSL_ENTITIES][DSL_PM_HISTORY_INTERVALS_NUM] = { 0 };
 
    if (pData == DSL_NULL)
    {
@@ -4557,10 +4727,22 @@ static DSL_Error_t DSL_CPE_LineSecCountersShowtimeGet(
 
    if (!DSL_CPE_IsIoctlFlagSet(DSL_FIO_PM_LINE_SEC_COUNTERS_SHOWTIME_GET))
    {
-      for (DSL_uint32_t nDev = 0; nDev < DSL_CPE_DSL_ENTITIES; ++nDev)
+      for (nDev = 0; nDev < DSL_CPE_DSL_ENTITIES; ++nDev)
       {
-         for (DSL_uint32_t nHistInt = 0;
-            nHistInt < DSL_PM_HISTORY_INTERVALS_NUM; ++nHistInt)
+         /* omit PM polling for disabled lines */
+         if (INCLUDE_DSL_BONDING)
+         {
+            DSL_CPE_BND_Context_t *pBndCtx = (DSL_CPE_BND_Context_t*)pContext->pBnd;
+            if (pBndCtx != DSL_NULL &&
+                pBndCtx->lineBondingConfig[nDev].nPafLineDisabled == 1)
+            {
+               nErrCodes[nDev][/*HistoryInterval*/0] = DSL_ERROR;
+               nErrCodes[nDev][/*HistoryInterval*/1] = DSL_ERROR;
+               continue;
+            }
+         }
+
+         for (nHistInt = 0; nHistInt < DSL_PM_HISTORY_INTERVALS_NUM; ++nHistInt)
          {
             sData[nDev][nHistInt].nDirection = DSL_NEAR_END;
             sData[nDev][nHistInt].nHistoryInterval = nHistInt;
@@ -4578,12 +4760,16 @@ static DSL_Error_t DSL_CPE_LineSecCountersShowtimeGet(
                   "nRet=%d, accessCtrl=%d)!" DSL_CPE_CRLF,
                   nDev, nHistInt, nRet,
                   sData[nDev][nHistInt].accessCtl.nReturn));
+
+               nErrCodes[nDev][nHistInt] = DSL_ERROR;
+            }
+            else
+            {
+               nErrCodes[nDev][nHistInt] = DSL_SUCCESS;
             }
          }
       }
 
-      /* no check for IOCTL failure here - it may happen that IOCTL failes
-         due to request for nHistoryInterval that was not yet reached */
       DSL_CPE_IoctlFlagSet(DSL_FIO_PM_LINE_SEC_COUNTERS_SHOWTIME_GET);
    }
 
@@ -4591,34 +4777,50 @@ static DSL_Error_t DSL_CPE_LineSecCountersShowtimeGet(
    switch (eNodeIdx)
    {
    case DSL_STATS_LINE_0_SHOWTIME_ERR_SECS:
-      *pData = sData[/*nDevice*/0][/*HistoryInterval*/0].data.nES;
+      nDev = 0;
+      nHistInt = 0;
+      *pData = sData[nDev][nHistInt].data.nES;
       break;
    case DSL_STATS_LINE_0_SHOWTIME_SEV_ERR_SECS:
-      *pData = sData[/*nDevice*/0][/*HistoryInterval*/0].data.nSES;
+      nDev = 0;
+      nHistInt = 0;
+      *pData = sData[nDev][nHistInt].data.nSES;
       break;
    case DSL_STATS_LINE_0_LAST_SHOWTIME_ERR_SECS:
-      *pData = sData[/*nDevice*/0][/*HistoryInterval*/1].data.nES;
+      nDev = 0;
+      nHistInt = 1;
+      *pData = sData[nDev][nHistInt].data.nES;
       break;
    case DSL_STATS_LINE_0_LAST_SHOWTIME_SEV_ERR_SECS:
-      *pData = sData[/*nDevice*/0][/*HistoryInterval*/1].data.nSES;
+      nDev = 0;
+      nHistInt = 1;
+      *pData = sData[nDev][nHistInt].data.nSES;
       break;
    case DSL_STATS_LINE_1_SHOWTIME_ERR_SECS:
-      *pData = sData[/*nDevice*/1][/*HistoryInterval*/0].data.nES;
+      nDev = 1;
+      nHistInt = 0;
+      *pData = sData[nDev][nHistInt].data.nES;
       break;
    case DSL_STATS_LINE_1_SHOWTIME_SEV_ERR_SECS:
-      *pData = sData[/*nDevice*/1][/*HistoryInterval*/0].data.nSES;
+      nDev = 1;
+      nHistInt = 0;
+      *pData = sData[nDev][nHistInt].data.nSES;
       break;
    case DSL_STATS_LINE_1_LAST_SHOWTIME_ERR_SECS:
-      *pData = sData[/*nDevice*/1][/*HistoryInterval*/1].data.nES;
+      nDev = 1;
+      nHistInt = 1;
+      *pData = sData[nDev][nHistInt].data.nES;
       break;
    case DSL_STATS_LINE_1_LAST_SHOWTIME_SEV_ERR_SECS:
-      *pData = sData[/*nDevice*/1][/*HistoryInterval*/1].data.nSES;
+      nDev = 1;
+      nHistInt = 1;
+      *pData = sData[nDev][nHistInt].data.nSES;
       break;
    default:
-      break;
+      return DSL_ERROR;
    }
 
-   return nErrorCode;
+   return nErrCodes[nDev][nHistInt];
 }
 
 static DSL_void_t DSL_CPE_JsonShowtimeErrSecsUpdate(
@@ -4707,9 +4909,12 @@ static DSL_Error_t DSL_CPE_LineSecCounters1DayGet(
    const DSL_CPE_StatusNodeIdx_t eNodeIdx,
    DSL_int_t *pData)
 {
-   DSL_Error_t nErrorCode = DSL_SUCCESS, nRet = DSL_SUCCESS;
+   DSL_Error_t nRet = DSL_SUCCESS;
+   DSL_uint32_t nDev = 0;
    static DSL_PM_LineSecCounters_t
       sData[DSL_CPE_MAX_DSL_ENTITIES] = { 0 };
+   static DSL_Error_t
+      nErrCodes[DSL_CPE_MAX_DSL_ENTITIES] = { 0 };
 
    if (pData == DSL_NULL)
    {
@@ -4718,8 +4923,20 @@ static DSL_Error_t DSL_CPE_LineSecCounters1DayGet(
 
    if (!DSL_CPE_IsIoctlFlagSet(DSL_FIO_PM_LINE_SEC_COUNTERS_1DAY_GET))
    {
-      for (DSL_uint32_t nDev = 0; nDev < DSL_CPE_DSL_ENTITIES; ++nDev)
+      for (nDev = 0; nDev < DSL_CPE_DSL_ENTITIES; ++nDev)
       {
+         /* omit PM polling for disabled lines */
+         if (INCLUDE_DSL_BONDING)
+         {
+            DSL_CPE_BND_Context_t *pBndCtx = (DSL_CPE_BND_Context_t*)pContext->pBnd;
+            if (pBndCtx != DSL_NULL &&
+                pBndCtx->lineBondingConfig[nDev].nPafLineDisabled == 1)
+            {
+               nErrCodes[nDev] = DSL_ERROR;
+               continue;
+            }
+         }
+
          sData[nDev].nDirection = DSL_NEAR_END;
          sData[nDev].nHistoryInterval = 0;
 
@@ -4735,37 +4952,41 @@ static DSL_Error_t DSL_CPE_LineSecCounters1DayGet(
                "(device<%d>, nRet=%d, accessCtrl=%d)!" DSL_CPE_CRLF,
                nDev, nRet, sData[nDev].accessCtl.nReturn));
 
-            nErrorCode = DSL_ERROR;
+            nErrCodes[nDev] = DSL_ERROR;
+         }
+         else
+         {
+            nErrCodes[nDev] = DSL_SUCCESS;
          }
       }
 
-      /* set ioctl flag only if all IOCTLs succeeded */
-      if (nErrorCode == DSL_SUCCESS)
-      {
-         DSL_CPE_IoctlFlagSet(DSL_FIO_PM_LINE_SEC_COUNTERS_1DAY_GET);
-      }
+      DSL_CPE_IoctlFlagSet(DSL_FIO_PM_LINE_SEC_COUNTERS_1DAY_GET);
    }
 
    /* provide data of corresponding IOCtl request */
    switch (eNodeIdx)
    {
    case DSL_STATS_LINE_0_CURRENT_DAY_ERR_SECS:
-      *pData = sData[/*nDevice*/0].data.nES;
+      nDev = 0;
+      *pData = sData[nDev].data.nES;
       break;
    case DSL_STATS_LINE_0_CURRENT_DAY_SEV_ERR_SECS:
-      *pData = sData[/*nDevice*/0].data.nSES;
+      nDev = 0;
+      *pData = sData[nDev].data.nSES;
       break;
    case DSL_STATS_LINE_1_CURRENT_DAY_ERR_SECS:
-      *pData = sData[/*nDevice*/1].data.nES;
+      nDev = 1;
+      *pData = sData[nDev].data.nES;
       break;
    case DSL_STATS_LINE_1_CURRENT_DAY_SEV_ERR_SECS:
-      *pData = sData[/*nDevice*/1].data.nSES;
+      nDev = 1;
+      *pData = sData[nDev].data.nSES;
       break;
    default:
       break;
    }
 
-   return nErrorCode;
+   return nErrCodes[nDev];
 }
 
 static DSL_void_t DSL_CPE_JsonCurrDayErrSecsUpdate(
@@ -4816,9 +5037,12 @@ static DSL_Error_t DSL_CPE_LineSecCounters15MinGet(
    const DSL_CPE_StatusNodeIdx_t eNodeIdx,
    DSL_int_t *pData)
 {
-   DSL_Error_t nErrorCode = DSL_SUCCESS, nRet = DSL_SUCCESS;
+   DSL_Error_t nRet = DSL_SUCCESS;
+   DSL_uint32_t nDev = 0;
    static DSL_PM_LineSecCounters_t
       sData[DSL_CPE_MAX_DSL_ENTITIES] = { 0 };
+   static DSL_Error_t
+      nErrCodes[DSL_CPE_MAX_DSL_ENTITIES] = { 0 };
 
    if (pData == DSL_NULL)
    {
@@ -4827,8 +5051,20 @@ static DSL_Error_t DSL_CPE_LineSecCounters15MinGet(
 
    if (!DSL_CPE_IsIoctlFlagSet(DSL_FIO_PM_LINE_SEC_COUNTERS_15MIN_GET))
    {
-      for (DSL_uint32_t nDev = 0; nDev < DSL_CPE_DSL_ENTITIES; ++nDev)
+      for (nDev = 0; nDev < DSL_CPE_DSL_ENTITIES; ++nDev)
       {
+         /* omit PM polling for disabled lines */
+         if (INCLUDE_DSL_BONDING)
+         {
+            DSL_CPE_BND_Context_t *pBndCtx = (DSL_CPE_BND_Context_t*)pContext->pBnd;
+            if (pBndCtx != DSL_NULL &&
+                pBndCtx->lineBondingConfig[nDev].nPafLineDisabled == 1)
+            {
+               nErrCodes[nDev] = DSL_ERROR;
+               continue;
+            }
+         }
+
          sData[nDev].nDirection = DSL_NEAR_END;
          sData[nDev].nHistoryInterval = 0;
 
@@ -4844,37 +5080,41 @@ static DSL_Error_t DSL_CPE_LineSecCounters15MinGet(
                "(device<%d>, nRet=%d, accessCtrl=%d)!" DSL_CPE_CRLF,
                nDev, nRet, sData[nDev].accessCtl.nReturn));
 
-            nErrorCode = DSL_ERROR;
+            nErrCodes[nDev] = DSL_ERROR;
+         }
+         else
+         {
+            nErrCodes[nDev] = DSL_SUCCESS;
          }
       }
 
-      /* set ioctl flag only if all IOCTLs succeeded */
-      if (nErrorCode == DSL_SUCCESS)
-      {
-         DSL_CPE_IoctlFlagSet(DSL_FIO_PM_LINE_SEC_COUNTERS_15MIN_GET);
-      }
+      DSL_CPE_IoctlFlagSet(DSL_FIO_PM_LINE_SEC_COUNTERS_15MIN_GET);
    }
 
    /* provide data of corresponding IOCtl request */
    switch (eNodeIdx)
    {
    case DSL_STATS_LINE_0_QUARTER_HOUR_ERR_SECS:
-      *pData = sData[/*nDevice*/0].data.nES;
+      nDev = 0;
+      *pData = sData[nDev].data.nES;
       break;
    case DSL_STATS_LINE_0_QUARTER_HOUR_SEV_ERR_SECS:
-      *pData = sData[/*nDevice*/0].data.nSES;
+      nDev = 0;
+      *pData = sData[nDev].data.nSES;
       break;
    case DSL_STATS_LINE_1_QUARTER_HOUR_ERR_SECS:
-      *pData = sData[/*nDevice*/1].data.nES;
+      nDev = 1;
+      *pData = sData[nDev].data.nES;
       break;
    case DSL_STATS_LINE_1_QUARTER_HOUR_SEV_ERR_SECS:
-      *pData = sData[/*nDevice*/1].data.nSES;
+      nDev = 1;
+      *pData = sData[nDev].data.nSES;
       break;
    default:
-      break;
+      return DSL_ERROR;
    }
 
-   return nErrorCode;
+   return nErrCodes[nDev];
 }
 
 static DSL_void_t DSL_CPE_JsonQuarterHourErrSecsUpdate(
@@ -5034,11 +5274,13 @@ static DSL_Error_t DSL_CPE_SystemInterfaceConfigGet(
    const DSL_DslModeSelection_t nDslMode,
    DSL_TcLayerSelection_t *pData)
 {
-   DSL_Error_t nErrCode = DSL_SUCCESS, nRet = DSL_SUCCESS;
+   DSL_Error_t nRet = DSL_SUCCESS;
    DSL_uint32_t nDev = 0;
    DSL_DslModeSelection_t nDsl = DSL_MODE_ADSL;
    static DSL_SystemInterfaceConfig_t
       sData[DSL_CPE_MAX_DSL_ENTITIES][DSL_MODE_LAST] = { 0 };
+   static DSL_Error_t
+      nErrCodes[DSL_CPE_MAX_DSL_ENTITIES][DSL_MODE_LAST] = { 0 };
 
    if (pData == DSL_NULL ||
        nDevice >= DSL_CPE_DSL_ENTITIES ||
@@ -5067,21 +5309,21 @@ static DSL_Error_t DSL_CPE_SystemInterfaceConfigGet(
                   "(device<%d>, nRet=%d, accessCtrl=%d)!" DSL_CPE_CRLF,
                   nDev, nRet, sData[nDev][nDsl].accessCtl.nReturn));
 
-               nErrCode = DSL_ERROR;
+               nErrCodes[nDev][nDsl] = DSL_ERROR;
+            }
+            else
+            {
+               nErrCodes[nDev][nDsl] = DSL_SUCCESS;
             }
          }
       }
 
-      /* set ioctl flag only if all IOCTLs succeeded */
-      if (nErrCode == DSL_SUCCESS)
-      {
-         DSL_CPE_IoctlFlagSet(DSL_FIO_SYSTEM_INTERFACE_CONFIG_GET);
-      }
+      DSL_CPE_IoctlFlagSet(DSL_FIO_SYSTEM_INTERFACE_CONFIG_GET);
    }
 
    *pData = sData[nDevice][nDslMode].data.nTcLayer;
 
-   return nErrCode;
+   return nErrCodes[nDevice][nDslMode];
 }
 
 /*
@@ -5094,10 +5336,12 @@ static DSL_Error_t DSL_CPE_G997FramingParameterStatusGet(
    const DSL_int_t nDevice,
    DSL_G997_FramingParameterStatusData_t *pData)
 {
-   DSL_Error_t nErrCode = DSL_SUCCESS, nRet = DSL_SUCCESS;
+   DSL_Error_t nRet = DSL_SUCCESS;
    DSL_uint32_t nDev = 0;
    static DSL_G997_FramingParameterStatus_t
       sData[DSL_CPE_MAX_DSL_ENTITIES] = { 0 };
+   static DSL_Error_t
+      nErrCodes[DSL_CPE_MAX_DSL_ENTITIES] = { DSL_SUCCESS };
 
    if (pData == DSL_NULL ||
        nDevice >= DSL_CPE_DSL_ENTITIES)
@@ -5124,21 +5368,21 @@ static DSL_Error_t DSL_CPE_G997FramingParameterStatusGet(
                "(device<%d>, nRet=%d, accessCtrl=%d)!" DSL_CPE_CRLF,
                nDev, nRet, sData[nDev].accessCtl.nReturn));
 
-            nErrCode = DSL_ERROR;
+            nErrCodes[nDev] = DSL_ERROR;
+         }
+         else
+         {
+            nErrCodes[nDev] = DSL_SUCCESS;
          }
       }
 
-      /* set ioctl flag only if all IOCTLs succeeded */
-      if (nErrCode == DSL_SUCCESS)
-      {
-         DSL_CPE_IoctlFlagSet(DSL_FIO_G997_FRAMING_PARAMETER_STATUS_GET);
-      }
+      DSL_CPE_IoctlFlagSet(DSL_FIO_G997_FRAMING_PARAMETER_STATUS_GET);
    }
 
    /* provide data of corresponding IOCtl request */
    *pData = sData[nDevice].data;
 
-   return nErrCode;
+   return nErrCodes[nDevice];
 }
 
 /*
@@ -5152,11 +5396,13 @@ static DSL_Error_t DSL_CPE_G997ChannelStatusGet(
    const DSL_AccessDir_t nDirection,
    DSL_G997_ChannelStatusData_t *pData)
 {
-   DSL_Error_t nErrCode = DSL_SUCCESS, nRet = DSL_SUCCESS;
+   DSL_Error_t nRet = DSL_SUCCESS;
    DSL_uint32_t nDev = 0;
    DSL_AccessDir_t nDir = DSL_UPSTREAM;
    static DSL_G997_ChannelStatus_t
       sData[DSL_CPE_MAX_DSL_ENTITIES][DSL_ACCESSDIR_LAST] = { 0 };
+   static DSL_Error_t
+      nErrCodes[DSL_CPE_MAX_DSL_ENTITIES][DSL_ACCESSDIR_LAST] = { 0 };
 
    if (pData == DSL_NULL ||
        nDevice >= DSL_CPE_DSL_ENTITIES ||
@@ -5181,26 +5427,26 @@ static DSL_Error_t DSL_CPE_G997ChannelStatusGet(
             if (nRet < DSL_SUCCESS ||
                   sData[nDev][nDir].accessCtl.nReturn != DSL_SUCCESS)
             {
-               nErrCode = DSL_ERROR;
-
                DSL_CCA_DEBUG(DSL_CCA_DBG_ERR, (DSL_CPE_PREFIX
                   "ERROR - DSL_FIO_G997_CHANNEL_STATUS_GET ioctl failed "
                   "(device<%d>, nRet=%d, accessCtrl=%d)!" DSL_CPE_CRLF,
                   nDev, nRet, sData[nDev][nDir].accessCtl.nReturn));
+
+               nErrCodes[nDev][nDir] = DSL_ERROR;
+            }
+            else
+            {
+               nErrCodes[nDev][nDir] = DSL_SUCCESS;
             }
          }
       }
 
-      /* set ioctl flag only if all IOCTLs succeeded */
-      if (nErrCode == DSL_SUCCESS)
-      {
-         DSL_CPE_IoctlFlagSet(DSL_FIO_G997_CHANNEL_STATUS_GET);
-      }
+      DSL_CPE_IoctlFlagSet(DSL_FIO_G997_CHANNEL_STATUS_GET);
    }
 
    *pData = sData[nDevice][nDirection].data;
 
-   return nErrCode;
+   return nErrCodes[nDevice][nDirection];
 }
 
 static DSL_void_t DSL_CPE_JsonChannelStatusUpdate(
@@ -5281,25 +5527,27 @@ static DSL_void_t DSL_CPE_JsonChannelLinkEncapSupportedUpdate(
    if (DSL_CPE_SystemInterfaceConfigGet(
          pContext, nDevice, DSL_MODE_VDSL, &data) == DSL_SUCCESS)
    {
+      DSL_size_t nBufSupportCurrSize = cpe_control_strnlen_s(
+                                       bufSupported, nBufSupportedSize);
       switch (data)
       {
       case DSL_TC_ATM:
          nRet = DSL_SUCCESS;
-         cpe_control_strncpy_s(bufSupported + strlen(bufSupported),
-            nBufSupportedSize - strlen(bufSupported),
+         cpe_control_strncpy_s(bufSupported + nBufSupportCurrSize,
+            nBufSupportedSize - nBufSupportCurrSize,
             "G.992.2_Annex_K_ATM", sizeof("G.992.2_Annex_K_ATM"));
          break;
       case DSL_TC_EFM:
       case DSL_TC_EFM_FORCED:
          nRet = DSL_SUCCESS;
-         cpe_control_strncpy_s(bufSupported + strlen(bufSupported),
-            nBufSupportedSize - strlen(bufSupported),
+         cpe_control_strncpy_s(bufSupported + nBufSupportCurrSize,
+            nBufSupportedSize - nBufSupportCurrSize,
             "G.992.2_Annex_K_PTM", sizeof("G.992.2_Annex_K_PTM"));
          break;
       case DSL_TC_AUTO:
          nRet = DSL_SUCCESS;
-         cpe_control_strncpy_s(bufSupported + strlen(bufSupported),
-            nBufSupportedSize - strlen(bufSupported),
+         cpe_control_strncpy_s(bufSupported + nBufSupportCurrSize,
+            nBufSupportedSize - nBufSupportCurrSize,
             "G.994.1 (Auto)", sizeof("G.994.1 (Auto)"));
          break;
       default:
@@ -5451,11 +5699,13 @@ static DSL_Error_t DSL_CPE_PMChannelDataPathCountersTotalGet(
    const DSL_XTUDir_t nDirection,
    DSL_uint32_t *pData)
 {
-   DSL_Error_t nErrCode = DSL_SUCCESS, nRet = DSL_SUCCESS;
+   DSL_Error_t nRet = DSL_SUCCESS;
    DSL_uint32_t nDev = 0;
    DSL_XTUDir_t nDir = DSL_NEAR_END;
    static DSL_PM_DataPathCountersTotal_t
       sData[DSL_CPE_MAX_DSL_ENTITIES][(DSL_FAR_END+1)] = { 0 };
+   static DSL_Error_t
+      nErrCodes[DSL_CPE_MAX_DSL_ENTITIES][(DSL_FAR_END+1)] = { 0 };
 
    if (pData == DSL_NULL ||
        nDevice >= DSL_CPE_DSL_ENTITIES ||
@@ -5468,6 +5718,19 @@ static DSL_Error_t DSL_CPE_PMChannelDataPathCountersTotalGet(
    {
       for (nDev = 0; nDev < DSL_CPE_DSL_ENTITIES; ++nDev)
       {
+         /* omit PM polling for disabled lines */
+         if (INCLUDE_DSL_BONDING)
+         {
+            DSL_CPE_BND_Context_t *pBndCtx = (DSL_CPE_BND_Context_t*)pContext->pBnd;
+            if (pBndCtx != DSL_NULL &&
+                pBndCtx->lineBondingConfig[nDev].nPafLineDisabled == 1)
+            {
+               nErrCodes[nDev][DSL_NEAR_END] = DSL_ERROR;
+               nErrCodes[nDev][DSL_FAR_END] = DSL_ERROR;
+               continue;
+            }
+         }
+
          for (nDir = DSL_NEAR_END; nDir <= DSL_FAR_END; ++nDir)
          {
             sData[nDev][nDir].nDirection = nDir;
@@ -5484,21 +5747,21 @@ static DSL_Error_t DSL_CPE_PMChannelDataPathCountersTotalGet(
                   "(device<%d>, nRet=%d, accessCtrl=%d)!" DSL_CPE_CRLF,
                   nDev, nRet, sData[nDev][nDir].accessCtl.nReturn));
 
-               nErrCode = DSL_ERROR;
+               nErrCodes[nDev][nDir] = DSL_ERROR;
+            }
+            else
+            {
+               nErrCodes[nDev][nDir] = DSL_SUCCESS;
             }
          }
       }
 
-      /* set ioctl flag only if all IOCTLs succeeded */
-      if (nErrCode == DSL_SUCCESS)
-      {
-         DSL_CPE_IoctlFlagSet(DSL_FIO_PM_DATA_PATH_COUNTERS_TOTAL_GET);
-      }
+      DSL_CPE_IoctlFlagSet(DSL_FIO_PM_DATA_PATH_COUNTERS_TOTAL_GET);
    }
 
    *pData = sData[nDevice][nDirection].data.nHEC;
 
-   return nErrCode;
+   return nErrCodes[nDevice][nDirection];
 }
 
 /*
@@ -5513,14 +5776,18 @@ static DSL_Error_t DSL_CPE_PMChannelDataPathCountersShowtimeGet(
    const DSL_uint32_t nHistoryInterval,
    DSL_uint32_t *pData)
 {
-   DSL_Error_t nErrCode = DSL_SUCCESS, nRet = DSL_SUCCESS;
+   DSL_Error_t nRet = DSL_SUCCESS;
    DSL_uint32_t nDev = 0;
    DSL_XTUDir_t nDir = DSL_NEAR_END;
    DSL_uint32_t nHistInt = 0;
-   static DSL_PM_DataPathCounters_t
-      sData[DSL_CPE_MAX_DSL_ENTITIES]
-            [(DSL_FAR_END+1)]
-            [DSL_PM_HISTORY_INTERVALS_NUM] = { 0 };
+   static DSL_PM_DataPathCounters_t sData
+      [DSL_CPE_MAX_DSL_ENTITIES]
+      [(DSL_FAR_END+1)]
+      [DSL_PM_HISTORY_INTERVALS_NUM] = { 0 };
+   static DSL_Error_t nErrCodes
+      [DSL_CPE_MAX_DSL_ENTITIES]
+      [(DSL_FAR_END+1)]
+      [DSL_PM_HISTORY_INTERVALS_NUM]= { 0 };
 
    if (pData == DSL_NULL ||
        nDevice >= DSL_CPE_DSL_ENTITIES ||
@@ -5534,6 +5801,21 @@ static DSL_Error_t DSL_CPE_PMChannelDataPathCountersShowtimeGet(
    {
       for (nDev = 0; nDev < DSL_CPE_DSL_ENTITIES; ++nDev)
       {
+         /* omit PM polling for disabled lines */
+         if (INCLUDE_DSL_BONDING)
+         {
+            DSL_CPE_BND_Context_t *pBndCtx = (DSL_CPE_BND_Context_t*)pContext->pBnd;
+            if (pBndCtx != DSL_NULL &&
+                pBndCtx->lineBondingConfig[nDev].nPafLineDisabled == 1)
+            {
+               nErrCodes[nDev][DSL_NEAR_END][/*HistoryInterval*/0] = DSL_ERROR;
+               nErrCodes[nDev][DSL_NEAR_END][/*HistoryInterval*/1] = DSL_ERROR;
+               nErrCodes[nDev][DSL_FAR_END][/*HistoryInterval*/0] = DSL_ERROR;
+               nErrCodes[nDev][DSL_FAR_END][/*HistoryInterval*/1] = DSL_ERROR;
+               continue;
+            }
+         }
+
          for (nDir = DSL_NEAR_END; nDir <= DSL_FAR_END; ++nDir)
          {
             for (nHistInt = 0; nHistInt < DSL_PM_HISTORY_INTERVALS_NUM; ++nHistInt)
@@ -5556,19 +5838,23 @@ static DSL_Error_t DSL_CPE_PMChannelDataPathCountersShowtimeGet(
                      nDev, (nDir == DSL_NEAR_END) ? "near end" : "far end",
                      nHistInt, nRet,
                      sData[nDev][nDir][nHistInt].accessCtl.nReturn));
+
+                  nErrCodes[nDev][nDir][nHistInt] = DSL_ERROR;
+               }
+               else
+               {
+                  nErrCodes[nDev][nDir][nHistInt] = DSL_SUCCESS;
                }
             }
          }
       }
 
-      /* no check for IOCTL failure here - it may happen that IOCTL failes
-         due to request for nHistoryInterval that was not yet reached */
       DSL_CPE_IoctlFlagSet(DSL_FIO_PM_DATA_PATH_COUNTERS_SHOWTIME_GET);
    }
 
    *pData = sData[nDevice][nDirection][nHistoryInterval].data.nHEC;
 
-   return nErrCode;
+   return nErrCodes[nDevice][nDirection][nHistoryInterval];
 }
 
 static DSL_void_t DSL_CPE_JsonChannelCountersTotalUpdate(
@@ -5734,11 +6020,13 @@ static DSL_Error_t DSL_CPE_PMChannelCounters1DayGet(
    const DSL_XTUDir_t nDirection,
    DSL_PM_ChannelCounters_t *pData)
 {
-   DSL_Error_t nErrCode = DSL_SUCCESS, nRet = DSL_SUCCESS;
+   DSL_Error_t nRet = DSL_SUCCESS;
    DSL_uint32_t nDev = 0;
    DSL_XTUDir_t nDir = DSL_NEAR_END;
    static DSL_PM_ChannelCounters_t
       sData[DSL_CPE_MAX_DSL_ENTITIES][(DSL_FAR_END+1)] = { 0 };
+   static DSL_Error_t
+      nErrCodes[DSL_CPE_MAX_DSL_ENTITIES][(DSL_FAR_END+1)] = { 0 };
 
    if (pData == DSL_NULL ||
        nDevice >= DSL_CPE_DSL_ENTITIES ||
@@ -5751,6 +6039,19 @@ static DSL_Error_t DSL_CPE_PMChannelCounters1DayGet(
    {
       for (nDev = 0; nDev < DSL_CPE_DSL_ENTITIES; ++nDev)
       {
+         /* omit PM polling for disabled lines */
+         if (INCLUDE_DSL_BONDING)
+         {
+            DSL_CPE_BND_Context_t *pBndCtx = (DSL_CPE_BND_Context_t*)pContext->pBnd;
+            if (pBndCtx != DSL_NULL &&
+                pBndCtx->lineBondingConfig[nDev].nPafLineDisabled == 1)
+            {
+               nErrCodes[nDev][DSL_NEAR_END] = DSL_ERROR;
+               nErrCodes[nDev][DSL_FAR_END] = DSL_ERROR;
+               continue;
+            }
+         }
+
          for (nDir = DSL_NEAR_END; nDir <= DSL_FAR_END; ++nDir)
          {
             sData[nDev][nDir].nHistoryInterval = 0;
@@ -5768,21 +6069,21 @@ static DSL_Error_t DSL_CPE_PMChannelCounters1DayGet(
                   "(device<%d>, nRet=%d, accessCtrl=%d)!" DSL_CPE_CRLF,
                   nDev, nRet, sData[nDev][nDir].accessCtl.nReturn));
 
-               nErrCode = DSL_ERROR;
+               nErrCodes[nDev][nDir] = DSL_ERROR;
+            }
+            else
+            {
+               nErrCodes[nDev][nDir] = DSL_SUCCESS;
             }
          }
       }
 
-      /* set ioctl flag only if all IOCTLs succeeded */
-      if (nErrCode == DSL_SUCCESS)
-      {
-         DSL_CPE_IoctlFlagSet(DSL_FIO_PM_CHANNEL_COUNTERS_1DAY_GET);
-      }
+      DSL_CPE_IoctlFlagSet(DSL_FIO_PM_CHANNEL_COUNTERS_1DAY_GET);
    }
 
    *pData = sData[nDevice][nDirection];
 
-   return nErrCode;
+   return nErrCodes[nDevice][nDirection];
 }
 
 static DSL_void_t DSL_CPE_JsonChannelCounters1DayUpdate(
@@ -5841,11 +6142,13 @@ static DSL_Error_t DSL_CPE_PMChannelDataPathCounters1DayGet(
    const DSL_XTUDir_t nDirection,
    DSL_uint32_t *pData)
 {
-   DSL_Error_t nErrCode = DSL_SUCCESS, nRet = DSL_SUCCESS;
+   DSL_Error_t nRet = DSL_SUCCESS;
    DSL_uint32_t nDev = 0;
    DSL_XTUDir_t nDir = DSL_NEAR_END;
    static DSL_PM_DataPathCounters_t
       sData[DSL_CPE_MAX_DSL_ENTITIES][(DSL_FAR_END+1)] = { 0 };
+   static DSL_Error_t
+      nErrCodes[DSL_CPE_MAX_DSL_ENTITIES][(DSL_FAR_END+1)] = { 0 };
 
    if (pData == DSL_NULL ||
        nDevice >= DSL_CPE_DSL_ENTITIES ||
@@ -5858,6 +6161,19 @@ static DSL_Error_t DSL_CPE_PMChannelDataPathCounters1DayGet(
    {
       for (nDev = 0; nDev < DSL_CPE_DSL_ENTITIES; ++nDev)
       {
+         /* omit PM polling for disabled lines */
+         if (INCLUDE_DSL_BONDING)
+         {
+            DSL_CPE_BND_Context_t *pBndCtx = (DSL_CPE_BND_Context_t*)pContext->pBnd;
+            if (pBndCtx != DSL_NULL &&
+                pBndCtx->lineBondingConfig[nDev].nPafLineDisabled == 1)
+            {
+               nErrCodes[nDev][DSL_NEAR_END] = DSL_ERROR;
+               nErrCodes[nDev][DSL_FAR_END] = DSL_ERROR;
+               continue;
+            }
+         }
+
          for (nDir = DSL_NEAR_END; nDir <= DSL_FAR_END; ++nDir)
          {
             sData[nDev][nDir].nHistoryInterval = 0;
@@ -5875,21 +6191,21 @@ static DSL_Error_t DSL_CPE_PMChannelDataPathCounters1DayGet(
                   "(device<%d>, nRet=%d, accessCtrl=%d)!" DSL_CPE_CRLF,
                   nDev, nRet, sData[nDev][nDir].accessCtl.nReturn));
 
-               nErrCode = DSL_ERROR;
+               nErrCodes[nDev][nDir] = DSL_ERROR;
+            }
+            else
+            {
+               nErrCodes[nDev][nDir] = DSL_SUCCESS;
             }
          }
       }
 
-      /* set ioctl flag only if all IOCTLs succeeded */
-      if (nErrCode == DSL_SUCCESS)
-      {
-         DSL_CPE_IoctlFlagSet(DSL_FIO_PM_DATA_PATH_COUNTERS_1DAY_GET);
-      }
+      DSL_CPE_IoctlFlagSet(DSL_FIO_PM_DATA_PATH_COUNTERS_1DAY_GET);
    }
 
    *pData = sData[nDevice][nDirection].data.nHEC;
 
-   return nErrCode;
+   return nErrCodes[nDevice][nDirection];
 }
 
 static DSL_void_t DSL_CPE_JsonChannelDataPathCounters1DayUpdate(
@@ -5972,11 +6288,13 @@ static DSL_Error_t DSL_CPE_PMChannelDataPathCounters15MinGet(
    const DSL_XTUDir_t nDirection,
    DSL_uint32_t *pData)
 {
-   DSL_Error_t nErrCode = DSL_SUCCESS, nRet = DSL_SUCCESS;
+   DSL_Error_t nRet = DSL_SUCCESS;
    DSL_uint32_t nDev = 0;
    DSL_XTUDir_t nDir = DSL_NEAR_END;
    static DSL_PM_DataPathCounters_t
       sData[DSL_CPE_MAX_DSL_ENTITIES][(DSL_FAR_END+1)] = { 0 };
+   static DSL_Error_t
+      nErrCodes[DSL_CPE_MAX_DSL_ENTITIES][(DSL_FAR_END+1)] = { 0 };
 
    if (pData == DSL_NULL ||
        nDevice >= DSL_CPE_DSL_ENTITIES ||
@@ -5989,6 +6307,19 @@ static DSL_Error_t DSL_CPE_PMChannelDataPathCounters15MinGet(
    {
       for (nDev = 0; nDev < DSL_CPE_DSL_ENTITIES; ++nDev)
       {
+         /* omit PM polling for disabled lines */
+         if (INCLUDE_DSL_BONDING)
+         {
+            DSL_CPE_BND_Context_t *pBndCtx = (DSL_CPE_BND_Context_t*)pContext->pBnd;
+            if (pBndCtx != DSL_NULL &&
+                pBndCtx->lineBondingConfig[nDev].nPafLineDisabled == 1)
+            {
+               nErrCodes[nDev][DSL_NEAR_END] = DSL_ERROR;
+               nErrCodes[nDev][DSL_FAR_END] = DSL_ERROR;
+               continue;
+            }
+         }
+
          for (nDir = DSL_NEAR_END; nDir <= DSL_FAR_END; ++nDir)
          {
             sData[nDev][nDir].nHistoryInterval = 0;
@@ -6006,21 +6337,21 @@ static DSL_Error_t DSL_CPE_PMChannelDataPathCounters15MinGet(
                   "(device<%d>, nRet=%d, accessCtrl=%d)!" DSL_CPE_CRLF,
                   nDev, nRet, sData[nDev][nDir].accessCtl.nReturn));
 
-               nErrCode = DSL_ERROR;
+               nErrCodes[nDev][nDir] = DSL_ERROR;
+            }
+            else
+            {
+               nErrCodes[nDev][nDir] = DSL_SUCCESS;
             }
          }
       }
 
-      /* set ioctl flag only if all IOCTLs succeeded */
-      if (nErrCode == DSL_SUCCESS)
-      {
-         DSL_CPE_IoctlFlagSet(DSL_FIO_PM_DATA_PATH_COUNTERS_15MIN_GET);
-      }
+      DSL_CPE_IoctlFlagSet(DSL_FIO_PM_DATA_PATH_COUNTERS_15MIN_GET);
    }
 
    *pData = sData[nDevice][nDirection].data.nHEC;
 
-   return nErrCode;
+   return nErrCodes[nDevice][nDirection];
 }
 
 static DSL_void_t DSL_CPE_JsonChannelDataPathCounters15MinUpdate(