8.5.2 UGW Release

This commit is contained in:
Release Engineer 2021-09-30 09:10:58 +03:00
parent eb3681ac8a
commit 42c32b6a4e
41 changed files with 27661 additions and 724 deletions

View file

@ -1,14 +1,75 @@
NEXT VERSION
V4.21.6.2 - 2019-12-30
V4.23.1 - 2021-01-18
common:
- VRX (CURTSYS-2942) [SDL] Use of vulnerable C functions - Against Safe C Pt1/2
- (CURTSYS-4940) [VRX518] Memory leak within dsl_cpe_control leads to OOM
killer activity
- VRX (CURTSYS-4680) [VRX518] License updates
V4.21.6.1 - 2019-12-27
V4.22.8 - 2020-12-01
common:
- VRX (CURTSYS-4221) [VRX518] Rework bonding related CLI command "bndgsg"
(device number should be not an input value)
V4.22.7 - 2020-11-03
common:
- VRX (CURTSYS-4622) MgmtIF Unification: remove local header copy
- VRX (CURTSYS-4008) [VRX518] Firmware version information only
reflects version from current operated FW
- VRX (CURTSYS-4540) [VRX518] Disabled line state set, exception and restart
added
- VRX (CURTSYS-4009) [VRX518] Provide scalar value for UPBOKLER
V4.22.6 - 2020-10-20
common:
- VRX (CURTSYS-4357) Implement and test orderly shutdown of dsl_manger
- VRX (CURTSYS-4353) Create ubus module to work with core functionality
- VRX (CURTSYS-4354) Provide and test ubus subscription mode
- VRX (CURTSYS-4202) Create prototype implementation of DSL Manager
- VRX (CURTSYS-4201) Refactor status parser to separate core from the JSON
V4.22.5 - 2020-09-18
common:
- VRX (CURTSYS-3717) [VRX518] Rework of "bonding" and "remote bonding enable"
status and TC-Driver callback handling
- VRX (CURTSYS-4085) [VRX518] dsl_cpe_control needs to provide data rates to
the Bonding Driver
- VRX (CURTSYS-4220) [VRX518] Unique storage for accumulated bonding group rate
- VRX (CURTSYS-3719) Extend status interface with accumulated data rate values
- VRX (CURTSYS-3718) Extend ATM bonding enable (config and status) handling
V4.22.4 - 2020-09-14
common:
- VRX (CURTSYS-4103) [VRX518] Improve shutdown handling within dsl_cpe_control
to avoid potential hang situation
- VRX (CURTSYS-4010) Extend DSL PHY Subsystem to provide INPREPORT parameter of TR-181
V4.22.3 - 2020-06-10
common:
- VRX (CURTSYS-3462) Status parser optimization (resource usage)
- VRX (CURTSYS-2664) Status parser optimization (scalability)
- VRX (CURTSYS-2976) [VRX518] Crash on performing forced reboot command (reboot -f)
- VRX (CURTSYS-3734) [VRX518] Hang on performing reboot command
- VRX (CURTSYS-3745) Automatically apply new (JSON) configuration
- VRX (CURTSYS-3463) Unify the sources of status parser (518/618)
- VRX (CURTSYS-3545) [VRX518] Hardening - Mask out validation of JSON config parameters
which are not handled within dsl_cpe_control
- VRX (CURTSYS-3205) [VRX518] Process errors and warnings and update status file
- VRX (CURTSYS-3204) [VRX518] Pause the autoboot during re-configuration phase
- VRX (CURTSYS-3199) [VRX518] Extend configuration backup handling
V4.22.2 - 2020-03-30
common:
- VRX (CURTSYS-3399) [VRX518] Support for Basic Micro Filter Detection handling
- VRX (CURTSYS-1152) Use shared code repo for Config/Status file documentation interface
- VRX (CURTSYS-3325) Include fix on potential memory leak (JSON status file handling)
V4.22.1 - 2019-12-30
common:
- VRX (CURTSYS-2779) Replace mechanism to avoid multiple instances of
dsl_cpe_control
- VRX (CURTSYS-2771) Config/status files in tmp
- VRX (CURTSYS-2942) [SDL] Use of vulnerable C functions - Against Safe C Pt1/2
- VRX (CURTSYS-2695) Add documentation for config and status parameters
- VRX (CURTSYS-2913) Take care the DSL status JSON file is gathering all
parameters
@ -16,6 +77,7 @@ common:
- VRX (CURTSYS-2670) MEI_VECTOR_FRIENDLY_CTRL_AUTO to MEI_VECTOR_CTRL_AUTO string fix
V4.21.6 - 2019-10-14
common:
- VRX (CURTSYS-2484) Implement status JSON update for line stats
- VRX (CURTSYS-2485) Implement status JSON update for channel stats
(dsl.stats.line.channel) parameters
@ -25,6 +87,7 @@ V4.21.6 - 2019-10-14
- VRX (CURTSYS-2481) [Status] Create infrastructure to handle dsl status JSON file
V4.21.5 - 2019-10-08
common:
- VRX (CURTSYS-2646) Refactoring configuration interface between dsl_cpe_control
and DSL API Driver

View file

@ -3,8 +3,7 @@ Please choose the appropriate license for your intended usage.
1. BSD license (2-clause BSD license)
Copyright (c) 2009-2015, LANTIQ BETEILIGUNGS-GMBH & CO. KG
All rights reserved.
Copyright (c) 2020, MaxLinear, Inc.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

View file

@ -2,7 +2,7 @@
AUTOMAKE_OPTIONS = foreign 1.9 nostdinc
SUBDIRS = src tools/pipe
SUBDIRS = src tools/pipe tools/manager
DISTCHECK_CONFIGURE_FLAGS=@CONFIGURE_OPTIONS@
@ -10,7 +10,7 @@ dsl_cpe_control_docdir = ${prefix}/doc/dsl_cpe_control
dsl_cpe_control_doc_DATA = \
ChangeLog
EXTRA_DIST = $(dsl_cpe_control_doc_DATA) \
build_vxworks/control_dsl_cpe_api.wpj \
build_win32/dsl_cpe_control_version.h \

View file

@ -270,6 +270,8 @@ EXTRA_APP_CFLAGS = @EXTRA_APP_CFLAGS@
GREP = @GREP@
IFXOS_INCLUDE_PATH = @IFXOS_INCLUDE_PATH@
IFXOS_LIBRARY_PATH = @IFXOS_LIBRARY_PATH@
IMA_BONDING_DRV_INCL_PATH = @IMA_BONDING_DRV_INCL_PATH@
IMA_BONDING_DRV_SUPPORT = @IMA_BONDING_DRV_SUPPORT@
INCLUDE_DEPRECATED = @INCLUDE_DEPRECATED@
INCLUDE_DEVICE_EXCEPTION_CODES = @INCLUDE_DEVICE_EXCEPTION_CODES@
INCLUDE_DSL_ADSL_MIB = @INCLUDE_DSL_ADSL_MIB@
@ -313,6 +315,7 @@ INCLUDE_DSL_G997_STATUS = @INCLUDE_DSL_G997_STATUS@
INCLUDE_DSL_JSON_PARSING = @INCLUDE_DSL_JSON_PARSING@
INCLUDE_DSL_PM = @INCLUDE_DSL_PM@
INCLUDE_DSL_RESOURCE_STATISTICS = @INCLUDE_DSL_RESOURCE_STATISTICS@
INCLUDE_DSL_STATUS_UBUS_SUPPORT = @INCLUDE_DSL_STATUS_UBUS_SUPPORT@
INCLUDE_DSL_SYSTEM_INTERFACE = @INCLUDE_DSL_SYSTEM_INTERFACE@
INCLUDE_DTI_AGENT_STANDALONE_SUPPORT = @INCLUDE_DTI_AGENT_STANDALONE_SUPPORT@
INCLUDE_FW_REQUEST_SUPPORT = @INCLUDE_FW_REQUEST_SUPPORT@
@ -329,6 +332,7 @@ LIBJSON_C_INCL_PATH = @LIBJSON_C_INCL_PATH@
LIBJSON_C_LIBRARY_PATH = @LIBJSON_C_LIBRARY_PATH@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBUBOX_INCL_PATH = @LIBUBOX_INCL_PATH@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
@ -348,6 +352,8 @@ SAFEC_SUPPORT = @SAFEC_SUPPORT@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
UBUS_LIBJSON_C_INCL_PATH = @UBUS_LIBJSON_C_INCL_PATH@
UBUS_LIBS_PATH = @UBUS_LIBS_PATH@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
@ -392,7 +398,7 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign 1.9 nostdinc
SUBDIRS = src tools/pipe
SUBDIRS = src tools/pipe tools/manager
DISTCHECK_CONFIGURE_FLAGS = @CONFIGURE_OPTIONS@
dsl_cpe_control_docdir = ${prefix}/doc/dsl_cpe_control
dsl_cpe_control_doc_DATA = \

21
README
View file

@ -40,6 +40,15 @@ b) the usage of "<device>" indicates that a device specific file will be
Currently there are deliveries as follows
- "danube": Danube Family (includes Danube, Amazon-SE and ARX100)
- "vrx": VRX200 Family
c) there is a dsl_mgmt_if subrepo included - please remember that in order to
have up-to-date implementation in place, these following operations need to
be executed in addition:
- "git submodule update --init" (this step has to be executed especially in
a clean clone of drv_dsl_cpe_api when the dsl_mgmt_if directory is empty)
- commit of dsl_mgmt_if directory (diff will only show new commit hash if
it was changed in a meantime - this step should be executed after each
update in the dsl_mgmt_if repo in order to have most recent dsl_mgmt_if
commit always linked to the drv_dsl_cpe_api repo)
dsl_cpe_control\
M:.
@ -86,7 +95,19 @@ M:.
¦ ¦ dsl_cpe_cli_mib.c
¦ ¦ LLCfg.txt
¦ ¦ Makefile.in
¦
+---dsl_mgmt_if // Shared repo
¦ ¦ readme.txt
¦ ¦
¦ +---include
¦ ¦ dsl_mgmt_interface.h
¦ ¦ dsl_mgmt_interface_fullpaths.h
¦ ¦ dsl_mgmt_interface_json_trees.h
¦ ¦
¦ +---status
¦ ¦ dsl_mgmt_status_parser.c
¦ ¦ dsl_mgmt_status_parser.h
¦
+---build_win32
¦ ¦ dsl_cpe_control_version.h
¦ ¦ drv_danube_api_intern.h

View file

@ -5,7 +5,7 @@
#define PACKAGE "dsl_cpe_control"
/* Version number of package */
#define VERSION "4.21.6.2"
#define VERSION "4.23.1"
/* Define to the version of this package. */
#define PACKAGE_VERSION VERSION

331
configure vendored
View file

@ -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.2.
# Generated by GNU Autoconf 2.69 for DSL CPE Control application 4.23.1.
#
#
# 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.2'
PACKAGE_STRING='DSL CPE Control application 4.21.6.2'
PACKAGE_VERSION='4.23.1'
PACKAGE_STRING='DSL CPE Control application 4.23.1'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@ -625,6 +625,16 @@ am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
DISTCHECK_CONFIGURE_PARAMS
UBUS_LIBS_PATH
LIBUBOX_INCL_PATH
UBUS_LIBJSON_C_INCL_PATH
INCLUDE_DSL_STATUS_UBUS_SUPPORT
INCLUDE_DSL_STATUS_UBUS_SUPPORT_FALSE
INCLUDE_DSL_STATUS_UBUS_SUPPORT_TRUE
IMA_BONDING_DRV_INCL_PATH
IMA_BONDING_DRV_SUPPORT
IMA_BONDING_DRV_SUPPORT_FALSE
IMA_BONDING_DRV_SUPPORT_TRUE
SAFEC_LIB_PATH
SAFEC_INCL_PATH
SAFEC_LIB_NAME
@ -810,6 +820,8 @@ EXTRA_APP_CFLAGS
DSL_CONFIG_MODEL_TYPE
DSL_VRX_DEVICE_NAME
DSL_DEVICE_NAME
INCLUDE_DSL_STATUS_PARSER_FALSE
INCLUDE_DSL_STATUS_PARSER_TRUE
DEVICE_VRX_LAYER_FALSE
DEVICE_VRX_LAYER_TRUE
DEVICE_VRX_FALSE
@ -979,6 +991,12 @@ enable_dti_agent_st_alone_support
enable_safec_support
enable_safec_include
enable_safec_library
enable_ima_bonding_drv_support
enable_ima_bonding_drv_include
enable_ubus_support
enable_ubus_libjson_c_include
enable_libubox_include
enable_ubus_libraries_path
'
ac_precious_vars='build_alias
host_alias
@ -1529,7 +1547,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.2 to adapt to many kinds of systems.
\`configure' configures DSL CPE Control application 4.23.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1595,7 +1613,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.2:";;
short | recursive ) echo "Configuration of DSL CPE Control application 4.23.1:";;
esac
cat <<\_ACEOF
@ -1736,6 +1754,17 @@ Optional Features:
Set the SAFE C include path
--enable-safec-library= -L./STAGING_DIR/usr/lib
Set the SAFE C library path
--enable-ima-bonding-drv-support=x
Enable IMA Bonding Drv support.
--enable-ima-bonding-drv-include= -I/path/to/your/IMA-Bonding-Drv/include
Set the IMA Bonding Drv include path
--enable-ubus-support=x Enable UBUS support
--enable-ubus-libjson-c-include= -I/path/to/your/libjson-c/include
Set the JSON C include path for UBUS Module
--enable-libubox-include= -I./STAGING_DIR/usr/include/libubox
Set the libubox include path
--enable-ubus-libraries-path= -L./STAGING_DIR/usr/lib
Set system UBUS libraries common path
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@ -1819,7 +1848,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.2
DSL CPE Control application configure 4.23.1
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@ -2171,7 +2200,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.2, which was
It was created by DSL CPE Control application $as_me 4.23.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@ -3036,7 +3065,7 @@ fi
# Define the identity of the package.
PACKAGE='dsl_cpe_control'
VERSION='4.21.6.2'
VERSION='4.23.1'
cat >>confdefs.h <<_ACEOF
@ -5006,6 +5035,14 @@ else
DEVICE_VRX_LAYER_FALSE=
fi
if false; then
INCLUDE_DSL_STATUS_PARSER_TRUE=
INCLUDE_DSL_STATUS_PARSER_FALSE='#'
else
INCLUDE_DSL_STATUS_PARSER_TRUE='#'
INCLUDE_DSL_STATUS_PARSER_FALSE=
fi
PREDEFINED_CONF_EXTRA_APP_CFLAGS="-Os"
@ -6132,6 +6169,17 @@ done
if test "x$libjson_c_path" = "xyes"; then
$as_echo "#define INCLUDE_DSL_STATUS_PARSER 1" >>confdefs.h
if true; then
INCLUDE_DSL_STATUS_PARSER_TRUE=
INCLUDE_DSL_STATUS_PARSER_FALSE='#'
else
INCLUDE_DSL_STATUS_PARSER_TRUE='#'
INCLUDE_DSL_STATUS_PARSER_FALSE=
fi
$as_echo "#define INCLUDE_DSL_JSON_PARSING 1" >>confdefs.h
if true; then
@ -9262,6 +9310,232 @@ else
fi
if false; then
IMA_BONDING_DRV_SUPPORT_TRUE=
IMA_BONDING_DRV_SUPPORT_FALSE='#'
else
IMA_BONDING_DRV_SUPPORT_TRUE='#'
IMA_BONDING_DRV_SUPPORT_FALSE=
fi
IMA_BONDING_DRV_SUPPORT=no
# Check whether --enable-ima-bonding-drv-support was given.
if test "${enable_ima_bonding_drv_support+set}" = set; then :
enableval=$enable_ima_bonding_drv_support;
if test "$enableval" = yes; then
$as_echo "#define IMA_BONDING_DRV_SUPPORT 1" >>confdefs.h
if true; then
IMA_BONDING_DRV_SUPPORT_TRUE=
IMA_BONDING_DRV_SUPPORT_FALSE='#'
else
IMA_BONDING_DRV_SUPPORT_TRUE='#'
IMA_BONDING_DRV_SUPPORT_FALSE=
fi
IMA_BONDING_DRV_SUPPORT=yes
fi
fi
DEFAULT_IMA_BONDING_DRV_INCL_PATH=''
# Check whether --enable-ima-bonding-drv-include was given.
if test "${enable_ima_bonding_drv_include+set}" = set; then :
enableval=$enable_ima_bonding_drv_include;
if test -n "$enableval"; then
echo Set the IMA Bonding Drv include path to $enableval
IMA_BONDING_DRV_INCL_PATH=$enableval
else
echo Set the IMA Bonding Drv include path to $DEFAULT_IMA_BONDING_DRV_INCL_PATH
IMA_BONDING_DRV_INCL_PATH=$DEFAULT_IMA_BONDING_DRV_INCL_PATH
fi
else
echo Set the IMA Bonding Drv include path to $DEFAULT_IMA_BONDING_DRV_INCL_PATH
IMA_BONDING_DRV_INCL_PATH=$DEFAULT_IMA_BONDING_DRV_INCL_PATH
fi
if false; then
INCLUDE_DSL_STATUS_UBUS_SUPPORT_TRUE=
INCLUDE_DSL_STATUS_UBUS_SUPPORT_FALSE='#'
else
INCLUDE_DSL_STATUS_UBUS_SUPPORT_TRUE='#'
INCLUDE_DSL_STATUS_UBUS_SUPPORT_FALSE=
fi
INCLUDE_DSL_STATUS_UBUS_SUPPORT=no
# Check whether --enable-ubus-support was given.
if test "${enable_ubus_support+set}" = set; then :
enableval=$enable_ubus_support;
if test "$enableval" = yes; then
for ac_header in libubus.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "libubus.h" "ac_cv_header_libubus_h" "$ac_includes_default"
if test "x$ac_cv_header_libubus_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBUBUS_H 1
_ACEOF
ubus_header_test=yes; break;
fi
done
if test "x$ubus_header_test" = "xyes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ubus_subscribe in -lubus" >&5
$as_echo_n "checking for ubus_subscribe in -lubus... " >&6; }
if ${ac_cv_lib_ubus_ubus_subscribe+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lubus $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char ubus_subscribe ();
int
main ()
{
return ubus_subscribe ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_ubus_ubus_subscribe=yes
else
ac_cv_lib_ubus_ubus_subscribe=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ubus_ubus_subscribe" >&5
$as_echo "$ac_cv_lib_ubus_ubus_subscribe" >&6; }
if test "x$ac_cv_lib_ubus_ubus_subscribe" = xyes; then :
ubus_lib_test=yes; break;
fi
if test "x$ubus_lib_test" = "xyes"; then
$as_echo "#define INCLUDE_DSL_STATUS_PARSER 1" >>confdefs.h
if true; then
INCLUDE_DSL_STATUS_PARSER_TRUE=
INCLUDE_DSL_STATUS_PARSER_FALSE='#'
else
INCLUDE_DSL_STATUS_PARSER_TRUE='#'
INCLUDE_DSL_STATUS_PARSER_FALSE=
fi
$as_echo "#define INCLUDE_DSL_STATUS_UBUS_SUPPORT 1" >>confdefs.h
if true; then
INCLUDE_DSL_STATUS_UBUS_SUPPORT_TRUE=
INCLUDE_DSL_STATUS_UBUS_SUPPORT_FALSE='#'
else
INCLUDE_DSL_STATUS_UBUS_SUPPORT_TRUE='#'
INCLUDE_DSL_STATUS_UBUS_SUPPORT_FALSE=
fi
INCLUDE_DSL_STATUS_UBUS_SUPPORT=yes
fi
fi
fi
fi
DEFAULT_UBUS_LIBJSON_C_INCL_PATH=''
# Check whether --enable-ubus-libjson-c-include was given.
if test "${enable_ubus_libjson_c_include+set}" = set; then :
enableval=$enable_ubus_libjson_c_include;
if test -n "$enableval"; then
echo Set the JSON C include path to $enableval
UBUS_LIBJSON_C_INCL_PATH=$enableval
else
echo Set the JSON C include path to $DEFAULT_UBUS_LIBJSON_C_INCL_PATH
UBUS_LIBJSON_C_INCL_PATH=$DEFAULT_UBUS_LIBJSON_C_INCL_PATH
fi
else
echo Set the JSON C include path to $DEFAULT_UBUS_LIBJSON_C_INCL_PATH
UBUS_LIBJSON_C_INCL_PATH=$DEFAULT_UBUS_LIBJSON_C_INCL_PATH
fi
DEFAULT_LIBUBOX_INCL_PATH=''
# Check whether --enable-libubox-include was given.
if test "${enable_libubox_include+set}" = set; then :
enableval=$enable_libubox_include;
if test -n "$enableval"; then
echo Set the libubox include path to $enableval
LIBUBOX_INCL_PATH=$enableval
else
LIBUBOX_INCL_PATH=$DEFAULT_LIBUBOX_INCL_PATH
fi
else
LIBUBOX_INCL_PATH=$DEFAULT_LIBUBOX_INCL_PATH
fi
DEFAULT_UBUS_LIBS_PATH=''
# Check whether --enable-ubus-libraries-path was given.
if test "${enable_ubus_libraries_path+set}" = set; then :
enableval=$enable_ubus_libraries_path;
if test -n "$enableval"; then
echo Set the system UBUS libraries common path to $enableval
UBUS_LIBS_PATH=$enableval
else
UBUS_LIBS_PATH=$DEFAULT_UBUS_LIBS_PATH
fi
else
UBUS_LIBS_PATH=$DEFAULT_UBUS_LIBS_PATH
fi
DISTCHECK_CONFIGURE_PARAMS=$CONFIGURE_OPTIONS
@ -9269,7 +9543,7 @@ DISTCHECK_CONFIGURE_PARAMS=$CONFIGURE_OPTIONS
ac_config_files="$ac_config_files Makefile src/Makefile tools/pipe/Makefile"
ac_config_files="$ac_config_files Makefile src/Makefile tools/pipe/Makefile tools/manager/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@ -9416,6 +9690,10 @@ if test -z "${DEVICE_VRX_LAYER_TRUE}" && test -z "${DEVICE_VRX_LAYER_FALSE}"; th
as_fn_error $? "conditional \"DEVICE_VRX_LAYER\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${INCLUDE_DSL_STATUS_PARSER_TRUE}" && test -z "${INCLUDE_DSL_STATUS_PARSER_FALSE}"; then
as_fn_error $? "conditional \"INCLUDE_DSL_STATUS_PARSER\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${DEVICE_DANUBE_TRUE}" && test -z "${DEVICE_DANUBE_FALSE}"; then
as_fn_error $? "conditional \"DEVICE_DANUBE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@ -9548,6 +9826,10 @@ if test -z "${INCLUDE_DSL_JSON_PARSING_TRUE}" && test -z "${INCLUDE_DSL_JSON_PAR
as_fn_error $? "conditional \"INCLUDE_DSL_JSON_PARSING\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${INCLUDE_DSL_STATUS_PARSER_TRUE}" && test -z "${INCLUDE_DSL_STATUS_PARSER_FALSE}"; then
as_fn_error $? "conditional \"INCLUDE_DSL_STATUS_PARSER\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${INCLUDE_DSL_JSON_PARSING_TRUE}" && test -z "${INCLUDE_DSL_JSON_PARSING_FALSE}"; then
as_fn_error $? "conditional \"INCLUDE_DSL_JSON_PARSING\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@ -10268,6 +10550,26 @@ if test -z "${SAFEC_SUPPORT_TRUE}" && test -z "${SAFEC_SUPPORT_FALSE}"; then
as_fn_error $? "conditional \"SAFEC_SUPPORT\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${IMA_BONDING_DRV_SUPPORT_TRUE}" && test -z "${IMA_BONDING_DRV_SUPPORT_FALSE}"; then
as_fn_error $? "conditional \"IMA_BONDING_DRV_SUPPORT\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${IMA_BONDING_DRV_SUPPORT_TRUE}" && test -z "${IMA_BONDING_DRV_SUPPORT_FALSE}"; then
as_fn_error $? "conditional \"IMA_BONDING_DRV_SUPPORT\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${INCLUDE_DSL_STATUS_UBUS_SUPPORT_TRUE}" && test -z "${INCLUDE_DSL_STATUS_UBUS_SUPPORT_FALSE}"; then
as_fn_error $? "conditional \"INCLUDE_DSL_STATUS_UBUS_SUPPORT\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${INCLUDE_DSL_STATUS_PARSER_TRUE}" && test -z "${INCLUDE_DSL_STATUS_PARSER_FALSE}"; then
as_fn_error $? "conditional \"INCLUDE_DSL_STATUS_PARSER\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${INCLUDE_DSL_STATUS_UBUS_SUPPORT_TRUE}" && test -z "${INCLUDE_DSL_STATUS_UBUS_SUPPORT_FALSE}"; then
as_fn_error $? "conditional \"INCLUDE_DSL_STATUS_UBUS_SUPPORT\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
echo -e "------------------------------------------------------------------------"
echo -e " Configuration for dsl_cpe_control:"
@ -10350,6 +10652,12 @@ echo -e " Safe-C library: $SAFEC_LIB_NAME"
echo -e " Include JSON parser: $INCLUDE_DSL_JSON_PARSING"
echo -e " JSON C include path: $LIBJSON_C_INCL_PATH"
echo -e " JSON C library path: $LIBJSON_C_LIBRARY_PATH"
echo -e " IMA Bonding Drv support: $IMA_BONDING_DRV_SUPPORT"
echo -e " IMA Bonding Drv include path: $IMA_BONDING_DRV_INCL_PATH"
echo -e " UBUS support: $INCLUDE_DSL_STATUS_UBUS_SUPPORT"
echo -e " JSON include path: $UBUS_LIBJSON_C_INCL_PATH"
echo -e " UBOX include path: $LIBUBOX_INCL_PATH"
echo -e " UBUS libs path: $UBUS_LIBS_PATH"
echo -e "----------------------- deprectated ! ----------------------------------"
echo -e " currently no such functions"
echo -e "------------------------------------------------------------------------"
@ -10754,7 +11062,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.2, which was
This file was extended by DSL CPE Control application $as_me 4.23.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -10820,7 +11128,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.2
DSL CPE Control application config.status 4.23.1
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
@ -10954,6 +11262,7 @@ do
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
"tools/pipe/Makefile") CONFIG_FILES="$CONFIG_FILES tools/pipe/Makefile" ;;
"tools/manager/Makefile") CONFIG_FILES="$CONFIG_FILES tools/manager/Makefile" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac

View file

@ -1,6 +1,6 @@
AC_REVISION($Revision: 1.173 $)
AC_INIT([DSL CPE Control application],[4.21.6.2],[],[dsl_cpe_control])
AC_INIT([DSL CPE Control application],[4.23.1],[],[dsl_cpe_control])
AC_CONFIG_SRCDIR(src/Makefile.am)
AM_INIT_AUTOMAKE([tar-pax])
@ -46,6 +46,7 @@ AC_SUBST(CONFIGURE_OPTIONS)
AM_CONDITIONAL(DEVICE_DANUBE, false)
AM_CONDITIONAL(DEVICE_VRX, false)
AM_CONDITIONAL(DEVICE_VRX_LAYER, false)
AM_CONDITIONAL(INCLUDE_DSL_STATUS_PARSER, false)
PREDEFINED_CONF_EXTRA_APP_CFLAGS="-Os"
@ -723,6 +724,8 @@ AC_ARG_ENABLE(libjson-c-support,
AC_CHECK_HEADERS([json-c/json.h],[libjson_c_path=yes; break;],,)
if test "x$libjson_c_path" = "xyes"; then
AC_DEFINE([INCLUDE_DSL_STATUS_PARSER], [1], [DSL Status Core])
AM_CONDITIONAL(INCLUDE_DSL_STATUS_PARSER, true)
AC_DEFINE([INCLUDE_DSL_JSON_PARSING],[1], [Include JSON parsing])
AM_CONDITIONAL([INCLUDE_DSL_JSON_PARSING], true)
AC_SUBST([INCLUDE_DSL_JSON_PARSING],[yes])
@ -2129,6 +2132,129 @@ AC_ARG_ENABLE(safec-library,
]
)
dnl Enable IMA Bonding Drv support
AM_CONDITIONAL(IMA_BONDING_DRV_SUPPORT, false)
AC_SUBST([IMA_BONDING_DRV_SUPPORT],[no])
AC_ARG_ENABLE(ima-bonding-drv-support,
AS_HELP_STRING([--enable-ima-bonding-drv-support=x],[Enable IMA Bonding Drv support.]),
[
if test "$enableval" = yes; then
AC_DEFINE([IMA_BONDING_DRV_SUPPORT],[1], [IMA Bonding Drv support])
AM_CONDITIONAL([IMA_BONDING_DRV_SUPPORT], true)
AC_SUBST([IMA_BONDING_DRV_SUPPORT],[yes])
fi
],
)
dnl set system IMA Bonding Drv include path
DEFAULT_IMA_BONDING_DRV_INCL_PATH=''
AC_ARG_ENABLE(ima-bonding-drv-include,
AS_HELP_STRING([--enable-ima-bonding-drv-include= -I/path/to/your/IMA-Bonding-Drv/include],[Set the IMA Bonding Drv include path]),
[
if test -n "$enableval"; then
echo Set the IMA Bonding Drv include path to $enableval
AC_SUBST([IMA_BONDING_DRV_INCL_PATH],[$enableval])
else
echo Set the IMA Bonding Drv include path to $DEFAULT_IMA_BONDING_DRV_INCL_PATH
AC_SUBST([IMA_BONDING_DRV_INCL_PATH],[$DEFAULT_IMA_BONDING_DRV_INCL_PATH])
fi
],
[
echo Set the IMA Bonding Drv include path to $DEFAULT_IMA_BONDING_DRV_INCL_PATH
AC_SUBST([IMA_BONDING_DRV_INCL_PATH],[$DEFAULT_IMA_BONDING_DRV_INCL_PATH])
]
)
dnl enable UBUS support
AM_CONDITIONAL(INCLUDE_DSL_STATUS_UBUS_SUPPORT, false)
AC_SUBST([INCLUDE_DSL_STATUS_UBUS_SUPPORT],[no])
AC_ARG_ENABLE(ubus-support,
AS_HELP_STRING(
[--enable-ubus-support=x],
[Enable UBUS support]
),
[
if test "$enableval" = yes; then
AC_CHECK_HEADERS([libubus.h],[ubus_header_test=yes; break;],,)
if test "x$ubus_header_test" = "xyes"; then
AC_CHECK_LIB([ubus], [ubus_subscribe], [ubus_lib_test=yes; break;],,)
if test "x$ubus_lib_test" = "xyes"; then
AC_DEFINE([INCLUDE_DSL_STATUS_PARSER], [1], [DSL Status Core])
AM_CONDITIONAL(INCLUDE_DSL_STATUS_PARSER, true)
AC_DEFINE([INCLUDE_DSL_STATUS_UBUS_SUPPORT], [1], [DSL Status UBUS support])
AM_CONDITIONAL(INCLUDE_DSL_STATUS_UBUS_SUPPORT, true)
AC_SUBST([INCLUDE_DSL_STATUS_UBUS_SUPPORT], [yes])
fi
fi
fi
],
)
dnl set system JSON C include path for UBUS Module
DEFAULT_UBUS_LIBJSON_C_INCL_PATH=''
AC_ARG_ENABLE(ubus-libjson-c-include,
AS_HELP_STRING(
[--enable-ubus-libjson-c-include= -I/path/to/your/libjson-c/include],
[Set the JSON C include path for UBUS Module]
),
[
if test -n "$enableval"; then
echo Set the JSON C include path to $enableval
AC_SUBST([UBUS_LIBJSON_C_INCL_PATH],[$enableval])
else
echo Set the JSON C include path to $DEFAULT_UBUS_LIBJSON_C_INCL_PATH
AC_SUBST([UBUS_LIBJSON_C_INCL_PATH],[$DEFAULT_UBUS_LIBJSON_C_INCL_PATH])
fi
],
[
echo Set the JSON C include path to $DEFAULT_UBUS_LIBJSON_C_INCL_PATH
AC_SUBST([UBUS_LIBJSON_C_INCL_PATH],[$DEFAULT_UBUS_LIBJSON_C_INCL_PATH])
]
)
dnl set system libubox include path
DEFAULT_LIBUBOX_INCL_PATH=''
AC_ARG_ENABLE(libubox-include,
AS_HELP_STRING(
[--enable-libubox-include= -I./STAGING_DIR/usr/include/libubox],
[Set the libubox include path]
),
[
if test -n "$enableval"; then
echo Set the libubox include path to $enableval
AC_SUBST([LIBUBOX_INCL_PATH],[$enableval])
else
AC_SUBST([LIBUBOX_INCL_PATH],[$DEFAULT_LIBUBOX_INCL_PATH])
fi
],
[
AC_SUBST([LIBUBOX_INCL_PATH],[$DEFAULT_LIBUBOX_INCL_PATH])
]
)
dnl set system UBUS libraries common path
DEFAULT_UBUS_LIBS_PATH=''
AC_ARG_ENABLE(ubus-libraries-path,
AS_HELP_STRING(
[--enable-ubus-libraries-path= -L./STAGING_DIR/usr/lib],
[Set system UBUS libraries common path]
),
[
if test -n "$enableval"; then
echo Set the system UBUS libraries common path to $enableval
AC_SUBST([UBUS_LIBS_PATH],[$enableval])
else
AC_SUBST([UBUS_LIBS_PATH],[$DEFAULT_UBUS_LIBS_PATH])
fi
],
[
AC_SUBST([UBUS_LIBS_PATH],[$DEFAULT_UBUS_LIBS_PATH])
]
)
dnl Set the configure params for dist check
@ -2216,6 +2342,12 @@ echo -e " Safe-C library: $SAFEC_LIB_NAME"
echo -e " Include JSON parser: $INCLUDE_DSL_JSON_PARSING"
echo -e " JSON C include path: $LIBJSON_C_INCL_PATH"
echo -e " JSON C library path: $LIBJSON_C_LIBRARY_PATH"
echo -e " IMA Bonding Drv support: $IMA_BONDING_DRV_SUPPORT"
echo -e " IMA Bonding Drv include path: $IMA_BONDING_DRV_INCL_PATH"
echo -e " UBUS support: $INCLUDE_DSL_STATUS_UBUS_SUPPORT"
echo -e " JSON include path: $UBUS_LIBJSON_C_INCL_PATH"
echo -e " UBOX include path: $LIBUBOX_INCL_PATH"
echo -e " UBUS libs path: $UBUS_LIBS_PATH"
echo -e "----------------------- deprectated ! ----------------------------------"
echo -e " currently no such functions"
echo -e "------------------------------------------------------------------------"
@ -2224,5 +2356,5 @@ echo -e " Configure options: $CONFIGURE_OPTIONS"
echo -e "------------------------------------------------------------------------"
])
AC_CONFIG_FILES([Makefile src/Makefile tools/pipe/Makefile])
AC_CONFIG_FILES([Makefile src/Makefile tools/pipe/Makefile tools/manager/Makefile])
AC_OUTPUT

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,33 @@
/******************************************************************************
Copyright (c) 2020 Intel Corporation
For licensing information, see the file 'LICENSE' in the root folder of
this software module.
*******************************************************************************/
#ifndef _DSL_MGMT_MANAGER_INTERFACE_H_
#define _DSL_MGMT_MANAGER_INTERFACE_H_
/**
Runs core functionality of DSL Manager.
\param pUbusSocket Ubus socket path in system [I]
\return 0 on success,
-1 on any error including not supported Ubus framework.
*/
int DSL_MNGR_Main(
const char *pUbusSocket
);
/**
Orderly shutdown DSL Manager.
\return 0 on success,
-1 on any error including not supported Ubus framework.
*/
int DSL_MNGR_Stop(void);
#endif /* _DSL_MGMT_MANAGER_INTERFACE_H_ */

View file

@ -0,0 +1,27 @@
/******************************************************************************
Copyright (c) 2020 Intel Corporation
For licensing information, see the file 'LICENSE' in the root folder of
this software module.
*******************************************************************************/
#ifndef _DSL_MGMT_MANAGER_TESTCLIENT_INTERFACE_H_
#define _DSL_MGMT_MANAGER_TESTCLIENT_INTERFACE_H_
/**
Runs core functionality of DSL Manager TestClient.
\param pUbusSocket Ubus socket path in system [I]
\param pUbusObject Ubus object to be watched [I]
\return 0 on success,
-1 on any error including not supported Ubus framework.
*/
int DSL_MNGR_TestClient(
const char *pUbusSocket,
const char *pUbusObject
);
#endif /* _DSL_MGMT_MANAGER_TESTCLIENT_INTERFACE_H_ */

View file

@ -0,0 +1,68 @@
/******************************************************************************
Copyright (c) 2020 Intel Corporation
For licensing information, see the file 'LICENSE' in the root folder of
this software module.
*******************************************************************************/
#ifndef _DSL_MGMT_UBUS_INTERFACE_H_
#define _DSL_MGMT_UBUS_INTERFACE_H_
#include <libubox/blobmsg.h>
/* Get supported objects names.
\param pObjectsNames Pointer to array of strings [O],
\param pUbusObject Pointer to number of objects [O].
\return 0 on success,
-1 on any error including not supported Ubus framework.
*/
int DSL_ST_UbusObjectsGet(
char ***pObjectsNames,
unsigned int *pObjectsNamesNum
);
/* Get object supported methods names
and number of object instances.
\param pObjectName Name of object [I],
\param pObjectMethods Pointer to array of strings [O],
\param pObjectMethodsNum Pointer to number of methods [O],
\param pObjectNum Pointer to number of instances of object [O].
\return 0 on success,
-1 on any error including not supported Ubus framework.
*/
int DSL_ST_UbusObjectsDetailsGet(
const char *pObjectName,
char ***pObjectMethods,
unsigned int *pObjectMethodsNum,
unsigned int *pObjectNum
);
/* Get DSL Status matching specific Ubus instance,
e.g. dsl.line.0 info
\param pObjectName Name of object [I],
\param pMethodName Name of method [I],
\param nObjectNum Number of object instance [I],
\param nChannelLineNum Number of line (only for channel object) [I],
\param pData Pointer to UBUS data [O],
\param bSubscriptionMode Indication of working mode [I].
\return 0 on success,
-1 on any error including not supported Ubus framework.
*/
int DSL_ST_UbusDataGet(
const char *pObjectName,
const char *pMethodName,
const unsigned int nObjectNum,
const unsigned int nChannelLineNum,
struct blob_buf *pData,
const bool bSubscriptionMode
);
#endif /* _DSL_MGMT_UBUS_INTERFACE_H_ */

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,114 @@
/******************************************************************************
Copyright (c) 2020 Intel Corporation
For licensing information, see the file 'LICENSE' in the root folder of
this software module.
*******************************************************************************/
#ifndef _DSL_MGMT_MANAGER_H_
#define _DSL_MGMT_MANAGER_H_
#ifdef HAVE_CONFIG_H
#include "dsl_cpe_config.h"
#endif
#include <stdio.h> /* fprintf */
#if defined(INCLUDE_DSL_STATUS_UBUS_SUPPORT) && (INCLUDE_DSL_STATUS_UBUS_SUPPORT == 1)
#define DSL_MNGR_UBUS_SUPPORT 1
#else
#define DSL_MNGR_UBUS_SUPPORT 0
#endif /* defined(INCLUDE_DSL_UBUS_SUPPORT) && (INCLUDE_DSL_UBUS_SUPPORT == 0) */
#if defined(DSL_MNGR_UBUS_SUPPORT) && (DSL_MNGR_UBUS_SUPPORT == 1)
#include <stdarg.h> /* va_list */
#include <libubox/uloop.h>
#include <libubox/blobmsg.h>
#include <libubus.h>
#endif /* defined(DSL_MNGR_UBUS_SUPPORT) && (DSL_MNGR_UBUS_SUPPORT == 1) */
#define DSL_MNGR_PREFIX "DSL_MNGR: "
#define DSL_MNGR_CRLF "\n"
#if defined(DSL_MNGR_UBUS_SUPPORT) && (DSL_MNGR_UBUS_SUPPORT == 1)
/**********************************************/
/* typedefs */
/**********************************************/
typedef enum {
DSL_MNGR_CHANNEL_METHOD_ARG_LINE,
__DSL_MNGR_CHANNEL_METHOD_ARG_MAX,
} DSL_MNGR_ChannelMethodPolicy_t;
typedef enum {
DSL_MNGR_LOG_LEVEL_FIRST = 0,
DSL_MNGR_LOG_LEVEL_DEBUG = 0,
DSL_MNGR_LOG_LEVEL_INFO,
DSL_MNGR_LOG_LEVEL_WARNING,
DSL_MNGR_LOG_LEVEL_ERROR,
DSL_MNGR_LOG_LEVEL_LAST
} DSL_MNGR_LogLevel_t;
/**********************************************/
/* external declarations */
/**********************************************/
extern struct blobmsg_policy
DSL_MNGR_ChannelMethodPolicy[__DSL_MNGR_CHANNEL_METHOD_ARG_MAX];
extern DSL_MNGR_LogLevel_t nLogLevel;
/**********************************************/
/* global function declarations */
/**********************************************/
void DSL_MNGR_LogError(
const char* msg,
...
);
void DSL_MNGR_LogWarning(
const char* msg,
...
);
void DSL_MNGR_LogInfo(
const char* msg,
...
);
void DSL_MNGR_LogDebug(
const char* msg,
...
);
/**********************************************/
/* global function definitions */
/**********************************************/
/**
Prints message to stdout according to log level.
\param level Log level on which message will be printed, [I]
\param msg Message to be printed, [I]
\param args list of arguments to be printed. [I]
\return none
*/
inline void DSL_MNGR_Log(
const DSL_MNGR_LogLevel_t level,
const char* msg,
va_list args)
{
if (level >= nLogLevel)
{
vfprintf(stdout, msg, args);
}
}
#endif /* defined(DSL_MNGR_UBUS_SUPPORT) && (DSL_MNGR_UBUS_SUPPORT == 1) */
#endif /* _DSL_MGMT_MANAGER_H_ */

View file

@ -0,0 +1,204 @@
/******************************************************************************
Copyright (c) 2020 Intel Corporation
For licensing information, see the file 'LICENSE' in the root folder of
this software module.
*******************************************************************************/
#include "dsl_mgmt_manager_objects_methods.h"
#include "dsl_mgmt_ubus_interface.h"
#if defined(DSL_MNGR_UBUS_SUPPORT) && (DSL_MNGR_UBUS_SUPPORT == 1)
/**********************************************/
/* local function declarations */
/**********************************************/
int DSL_MNGR_GetObjectNumber(
const char *pName,
unsigned int *pObjectNumber
);
int DSL_MNGR_CommonHandler(
struct ubus_context *ctx, struct ubus_object *obj, struct ubus_request_data *req,
const char *method, struct blob_attr *msg
);
int DSL_MNGR_CommonChannelHandler(
struct ubus_context *ctx, struct ubus_object *obj, struct ubus_request_data *req,
const char *method, struct blob_attr *msg
);
/**********************************************/
/* global function definitions */
/**********************************************/
int DSL_MNGR_LineInfoHandle(
struct ubus_context *ctx, struct ubus_object *obj, struct ubus_request_data *req,
const char *method, struct blob_attr *msg)
{
return DSL_MNGR_CommonHandler(ctx, obj, req, method, msg);
}
int DSL_MNGR_LineStatsHandle(
struct ubus_context *ctx, struct ubus_object *obj, struct ubus_request_data *req,
const char *method, struct blob_attr *msg)
{
return DSL_MNGR_CommonHandler(ctx, obj, req, method, msg);
}
int DSL_MNGR_LineStatsIntervalHandle(
struct ubus_context *ctx, struct ubus_object *obj, struct ubus_request_data *req,
const char *method, struct blob_attr *msg)
{
return DSL_MNGR_CommonHandler(ctx, obj, req, method, msg);
}
int DSL_MNGR_ChannelInfoHandle(
struct ubus_context *ctx, struct ubus_object *obj, struct ubus_request_data *req,
const char *method, struct blob_attr *msg)
{
return DSL_MNGR_CommonChannelHandler(ctx, obj, req, method, msg);
}
int DSL_MNGR_ChannelStatsHandle(
struct ubus_context *ctx, struct ubus_object *obj, struct ubus_request_data *req,
const char *method, struct blob_attr *msg)
{
return DSL_MNGR_CommonChannelHandler(ctx, obj, req, method, msg);
}
int DSL_MNGR_ChannelStatsIntervalHandle(
struct ubus_context *ctx, struct ubus_object *obj, struct ubus_request_data *req,
const char *method, struct blob_attr *msg)
{
return DSL_MNGR_CommonChannelHandler(ctx, obj, req, method, msg);
}
int DSL_MNGR_BondingGroupInfoHandle(
struct ubus_context *ctx, struct ubus_object *obj, struct ubus_request_data *req,
const char *method, struct blob_attr *msg)
{
return DSL_MNGR_CommonHandler(ctx, obj, req, method, msg);
}
/**********************************************/
/* local function definitions */
/**********************************************/
int DSL_MNGR_GetObjectNumber(
const char *pName,
unsigned int *pObjectNumber)
{
int nErrorCode = -1;
char *pLastDot = NULL;
if ((pLastDot = strrchr(pName, '.')) != NULL)
{
char *pEnd;
*pObjectNumber = (unsigned int)strtoul(pLastDot + 1, &pEnd, 10);
nErrorCode = 0;
}
return nErrorCode;
}
int DSL_MNGR_CommonHandler(
struct ubus_context *ctx, struct ubus_object *obj, struct ubus_request_data *req,
const char *method, struct blob_attr *msg)
{
int nErrorCode = 0;
int nRetCode = 0;
struct blob_buf bb = { 0 };
unsigned int num = 0;
const unsigned int nLineNum = 0;
const bool bSubscriptionMode = false;
if ((nRetCode = DSL_MNGR_GetObjectNumber(obj->name, &num)))
{
DSL_MNGR_LogError(DSL_MNGR_PREFIX
"%s: Failed to get object number (retCode=<%d>)" DSL_MNGR_CRLF, __func__,
nRetCode);
return -1;
}
blob_buf_init(&bb, 0);
if ((nRetCode = DSL_ST_UbusDataGet(obj->type->name, method, num, nLineNum, &bb, bSubscriptionMode)))
{
DSL_MNGR_LogError(DSL_MNGR_PREFIX
"%s: Failed to get data '%s'(%u)->%s (retCode<%d>)!" DSL_MNGR_CRLF, __func__,
obj->type->name, num, method, nRetCode);
nErrorCode = -1;
}
else
{
ubus_send_reply(ctx, req, bb.head);
}
blob_buf_free(&bb);
return nErrorCode;
}
int DSL_MNGR_CommonChannelHandler(
struct ubus_context *ctx, struct ubus_object *obj, struct ubus_request_data *req,
const char *method, struct blob_attr *msg)
{
int nErrorCode = 0;
int nRetCode = 0;
struct blob_buf bb = { 0 };
unsigned int num = 0;
unsigned int nLine = 0;
struct blob_attr *args[__DSL_MNGR_CHANNEL_METHOD_ARG_MAX] = { 0 };
const bool bSubscriptionMode = false;
if ((nRetCode = DSL_MNGR_GetObjectNumber(obj->name, &num)))
{
DSL_MNGR_LogError(DSL_MNGR_PREFIX
"%s: Failed to get object number (retCode=<%d>)" DSL_MNGR_CRLF, __func__,
nRetCode);
return -1;
}
blobmsg_parse(DSL_MNGR_ChannelMethodPolicy, __DSL_MNGR_CHANNEL_METHOD_ARG_MAX,
args, blob_data(msg), blob_len(msg));
if (args[DSL_MNGR_CHANNEL_METHOD_ARG_LINE] == NULL)
{
DSL_MNGR_LogWarning(DSL_MNGR_PREFIX
"%s: No line number provided! Assuming line 0..." DSL_MNGR_CRLF, __func__);
}
else
{
nLine = blobmsg_get_u32(args[DSL_MNGR_CHANNEL_METHOD_ARG_LINE]);
DSL_MNGR_LogDebug(DSL_MNGR_PREFIX
"%s: Line number=<%u>" DSL_MNGR_CRLF, __func__,
nLine);
}
blob_buf_init(&bb, 0);
if ((nRetCode = DSL_ST_UbusDataGet(obj->type->name, method, num, nLine, &bb, bSubscriptionMode)))
{
DSL_MNGR_LogError(DSL_MNGR_PREFIX
"%s: Failed to get data '%s'(%u)->%s (retCode<%d>)!" DSL_MNGR_CRLF, __func__,
obj->type->name, num, method, nRetCode);
nErrorCode = -1;
}
else
{
ubus_send_reply(ctx, req, bb.head);
}
blob_buf_free(&bb);
return nErrorCode;
}
#endif /* defined(DSL_MNGR_UBUS_SUPPORT) && (DSL_MNGR_UBUS_SUPPORT == 1) */

View file

@ -0,0 +1,54 @@
/******************************************************************************
Copyright (c) 2020 Intel Corporation
For licensing information, see the file 'LICENSE' in the root folder of
this software module.
*******************************************************************************/
#ifndef _DSL_MGMT_MANAGER_OBJECTS_METHODS_H_
#define _DSL_MGMT_MANAGER_OBJECTS_METHODS_H_
#include "dsl_mgmt_manager.h"
#if defined(DSL_MNGR_UBUS_SUPPORT) && (DSL_MNGR_UBUS_SUPPORT == 1)
int DSL_MNGR_LineInfoHandle(
struct ubus_context *ctx, struct ubus_object *obj, struct ubus_request_data *req,
const char *method, struct blob_attr *msg
);
int DSL_MNGR_LineStatsHandle(
struct ubus_context *ctx, struct ubus_object *obj, struct ubus_request_data *req,
const char *method, struct blob_attr *msg
);
int DSL_MNGR_LineStatsIntervalHandle(
struct ubus_context *ctx, struct ubus_object *obj, struct ubus_request_data *req,
const char *method, struct blob_attr *msg
);
int DSL_MNGR_ChannelInfoHandle(
struct ubus_context *ctx, struct ubus_object *obj, struct ubus_request_data *req,
const char *method, struct blob_attr *msg
);
int DSL_MNGR_ChannelStatsHandle(
struct ubus_context *ctx, struct ubus_object *obj, struct ubus_request_data *req,
const char *method, struct blob_attr *msg
);
int DSL_MNGR_ChannelStatsIntervalHandle(
struct ubus_context *ctx, struct ubus_object *obj, struct ubus_request_data *req,
const char *method, struct blob_attr *msg
);
int DSL_MNGR_BondingGroupInfoHandle(
struct ubus_context *ctx, struct ubus_object *obj, struct ubus_request_data *req,
const char *method, struct blob_attr *msg
);
#endif /* defined(DSL_MNGR_UBUS_SUPPORT) && (DSL_MNGR_UBUS_SUPPORT == 1) */
#endif /* _DSL_MGMT_MANAGER_OBJECTS_METHODS_H_ */

View file

@ -0,0 +1,375 @@
/******************************************************************************
Copyright (c) 2020 Intel Corporation
For licensing information, see the file 'LICENSE' in the root folder of
this software module.
*******************************************************************************/
#include <stdio.h>
#include "dsl_mgmt_manager_testclient.h"
#include "dsl_mgmt_manager_testclient_interface.h"
#if defined(DSL_MNGR_UBUS_SUPPORT) && (DSL_MNGR_UBUS_SUPPORT == 1)
#include <stdlib.h>
#include <string.h>
#include <libubox/uloop.h>
#include <libubox/blobmsg.h>
#include <libubox/blobmsg_json.h>
#include <libubus.h>
/**********************************************/
/* defines */
/**********************************************/
#define DSL_MNGR_TIMER_ITER_MAX 500
#define DSL_MNGR_TIMER_POLL_TIME_MS 200
/**********************************************/
/* global variable declarations */
/**********************************************/
static struct ubus_context *gpTestClientUbusCtx = NULL;
static const char *gpUbusObjectToWatch = NULL;
/**********************************************/
/* local function declarations */
/**********************************************/
static void DSL_MNGR_TestClientSubscriptionRemove(
struct ubus_context *ctx,
struct ubus_subscriber *s,
unsigned int id
);
static int DSL_MNGR_TestClientNotify(
struct ubus_context *ctx,
struct ubus_object *obj,
struct ubus_request_data *req,
const char *method,
struct blob_attr *msg
);
void DSL_MNGR_TestClientNotifierTimerHandle(
struct uloop_timeout *t
);
int DSL_MNGR_TestClientInit(
struct ubus_context **pUbusCtx,
const char *pUbusSocket
);
int DSL_MNGR_TestClientRun(
struct ubus_context *pUbusCtx
);
int DSL_MNGR_TestClientDeinit(
struct ubus_context *pUbusCtx
);
#endif /* defined(DSL_MNGR_UBUS_SUPPORT) && (DSL_MNGR_UBUS_SUPPORT == 1) */
/**********************************************/
/* global function definitions */
/**********************************************/
int DSL_MNGR_TestClient(
const char *pUbusSocket,
const char *pUbusObject)
{
int nErrorCode = 0;
#if defined(DSL_MNGR_UBUS_SUPPORT) && (DSL_MNGR_UBUS_SUPPORT == 1)
int nRetCode = 0;
fprintf(stdout, DSL_MNGR_PREFIX
"%s: IN (socket='%s', watch='%s')" DSL_MNGR_CRLF, __func__,
pUbusSocket, pUbusObject);
gpUbusObjectToWatch = pUbusObject;
fprintf(stdout, DSL_MNGR_PREFIX
"%s: Initializing..." DSL_MNGR_CRLF, __func__);
if ((nRetCode = DSL_MNGR_TestClientInit(&gpTestClientUbusCtx, pUbusSocket)))
{
fprintf(stdout, DSL_MNGR_PREFIX
"%s: Init stage failed (errorCode=<%d>)" DSL_MNGR_CRLF, __func__,
nRetCode);
return -1;
}
fprintf(stdout, DSL_MNGR_PREFIX
"%s: Running main loop..." DSL_MNGR_CRLF, __func__);
if ((nRetCode = DSL_MNGR_TestClientRun(gpTestClientUbusCtx)))
{
fprintf(stdout, DSL_MNGR_PREFIX
"%s: Run stage failed (errorCode=<%d>)" DSL_MNGR_CRLF, __func__,
nRetCode);
return -1;
}
fprintf(stdout, DSL_MNGR_PREFIX
"%s: Stopping the loop..." DSL_MNGR_CRLF, __func__);
if ((nRetCode = DSL_MNGR_TestClientDeinit(gpTestClientUbusCtx)))
{
fprintf(stdout, DSL_MNGR_PREFIX
"%s: Deinit stage failed (errorCode=<%d>)" DSL_MNGR_CRLF, __func__,
nRetCode);
return -1;
}
fprintf(stdout, DSL_MNGR_PREFIX
"%s: OUT (errorCode=<%d>)" DSL_MNGR_CRLF, __func__,
nErrorCode);
#else
fprintf(stdout, DSL_MNGR_PREFIX
"%s: Ubus framework not available!" DSL_MNGR_CRLF, __func__);
nErrorCode = -1;
#endif /* defined(DSL_MNGR_UBUS_SUPPORT) && (DSL_MNGR_UBUS_SUPPORT == 1) */
return nErrorCode;
}
/**********************************************/
/* local function definitions */
/**********************************************/
#if defined(DSL_MNGR_UBUS_SUPPORT) && (DSL_MNGR_UBUS_SUPPORT == 1)
static void DSL_MNGR_TestClientSubscriptionRemove(
struct ubus_context *ctx,
struct ubus_subscriber *s,
unsigned int id)
{
fprintf(stdout, DSL_MNGR_PREFIX
"%s: Object id=<%u> does not exist!" DSL_MNGR_CRLF, __func__,
id);
return;
}
static int DSL_MNGR_TestClientNotify(
struct ubus_context *ctx,
struct ubus_object *obj,
struct ubus_request_data *req,
const char *method,
struct blob_attr *msg)
{
int nErrorCode = 0;
char *str;
str = blobmsg_format_json(msg, true);
fprintf(stdout, DSL_MNGR_PREFIX
"%s: Received notification '%s': %s" DSL_MNGR_CRLF, __func__,
method, str);
free(str);
return nErrorCode;
}
void DSL_MNGR_TestClientNotifierTimerHandle(
struct uloop_timeout *t)
{
int nRetCode = 0;
static unsigned int nLoop = 0;
const unsigned int nLoopMax = DSL_MNGR_TIMER_ITER_MAX;
static unsigned int nObjectId = 0;
static struct ubus_subscriber s;
if (gpUbusObjectToWatch == NULL ||
strlen(gpUbusObjectToWatch) == 0)
{
fprintf(stdout, DSL_MNGR_PREFIX
"%s: No object given to watch!" DSL_MNGR_CRLF, __func__);
uloop_cancelled = true;
return;
}
/**
* on first time or until bonding_group will not be registered:
* - if not yet - then register subscriber!!
* - find wanted object
* - set callbacks and subscribe changes
*/
if (nLoop == 0 || nObjectId == 0)
{
if (s.obj.methods == NULL)
{
if ((nRetCode = ubus_register_subscriber(gpTestClientUbusCtx, &s)))
{
fprintf(stdout, DSL_MNGR_PREFIX
"%s: Failed to register subscriber ('%s')!" DSL_MNGR_CRLF, __func__,
ubus_strerror(nRetCode));
}
}
else
{
if ((nRetCode = ubus_lookup_id(gpTestClientUbusCtx, gpUbusObjectToWatch, &nObjectId)))
{
fprintf(stdout, DSL_MNGR_PREFIX
"%s: Failed to get '%s' id, ('%s')!" DSL_MNGR_CRLF, __func__,
gpUbusObjectToWatch, ubus_strerror(nRetCode));
}
else
{
s.remove_cb = DSL_MNGR_TestClientSubscriptionRemove;
s.cb = DSL_MNGR_TestClientNotify;
if ((nRetCode = ubus_subscribe(gpTestClientUbusCtx, &s, nObjectId)))
{
fprintf(stdout, DSL_MNGR_PREFIX
"%s: Failed to subscribe object id=<%u> ('%s')!" DSL_MNGR_CRLF, __func__,
nObjectId, ubus_strerror(nRetCode));
uloop_cancelled = true;
}
else
{
fprintf(stdout, DSL_MNGR_PREFIX
"%s: Watching object id=<%u>" DSL_MNGR_CRLF, __func__,
nObjectId);
}
}
}
}
/* on last iteration unregister, unsubscribe and exit main loop */
else if (nLoop == nLoopMax)
{
if (s.obj.methods != NULL)
{
if ((nRetCode = ubus_unsubscribe(gpTestClientUbusCtx, &s, nObjectId)))
{
fprintf(stdout, DSL_MNGR_PREFIX
"%s: Failed to unsubscribe object id=<%u> ('%s')" DSL_MNGR_CRLF, __func__,
nObjectId, ubus_strerror(nRetCode));
}
else
{
fprintf(stdout, DSL_MNGR_PREFIX
"%s: Unwatching object id=<%u>" DSL_MNGR_CRLF, __func__,
nObjectId);
}
if ((nRetCode = ubus_unregister_subscriber(gpTestClientUbusCtx, &s)))
{
fprintf(stdout, DSL_MNGR_PREFIX
"%s: Failed to unregister subscriber ('%s')!" DSL_MNGR_CRLF, __func__,
ubus_strerror(nRetCode));
}
else
{
fprintf(stdout, DSL_MNGR_PREFIX
"%s: Unregistering subscriber." DSL_MNGR_CRLF, __func__);
}
}
uloop_cancelled = true;
}
if (nLoop < nLoopMax)
{
++nLoop;
uloop_timeout_set(t, DSL_MNGR_TIMER_POLL_TIME_MS);
}
return;
}
int DSL_MNGR_TestClientInit(
struct ubus_context **pUbusCtx,
const char *pUbusSocket)
{
int nErrorCode = 0;
fprintf(stdout, DSL_MNGR_PREFIX
"%s: IN (*pUbusCtx=<%p>)" DSL_MNGR_CRLF, __func__,
*pUbusCtx);
if (pUbusSocket == NULL ||
strlen(pUbusSocket) == 0)
{
fprintf(stdout, DSL_MNGR_PREFIX
"%s: Missing socket!" DSL_MNGR_CRLF, __func__);
return -1;
}
uloop_init();
*pUbusCtx = ubus_connect(pUbusSocket);
if (*pUbusCtx == NULL)
{
fprintf(stdout, DSL_MNGR_PREFIX
"%s: ubus_connect failed!" DSL_MNGR_CRLF, __func__);
return -1;
}
else
{
fprintf(stdout, DSL_MNGR_PREFIX
"%s: ubus_connect succeed (*pUbusCtx=<%p>)" DSL_MNGR_CRLF, __func__,
*pUbusCtx);
}
ubus_add_uloop(*pUbusCtx);
fprintf(stdout, DSL_MNGR_PREFIX
"%s: OUT (errorCode=<%d>)" DSL_MNGR_CRLF, __func__,
nErrorCode);
return nErrorCode;
}
int DSL_MNGR_TestClientRun(struct ubus_context *pUbusCtx)
{
int nErrorCode = 0;
struct uloop_timeout notifier = { 0 };
fprintf(stdout, DSL_MNGR_PREFIX
"%s: IN (pUbusCtx=<%p>)" DSL_MNGR_CRLF, __func__,
pUbusCtx);
notifier.cb = DSL_MNGR_TestClientNotifierTimerHandle;
uloop_timeout_set(&notifier, DSL_MNGR_TIMER_POLL_TIME_MS);
uloop_run();
fprintf(stdout, DSL_MNGR_PREFIX
"%s: OUT (errorCode=<%d>)" DSL_MNGR_CRLF, __func__,
nErrorCode);
return nErrorCode;
}
int DSL_MNGR_TestClientDeinit(struct ubus_context *pUbusCtx)
{
int nErrorCode = 0;
fprintf(stdout, DSL_MNGR_PREFIX
"%s: IN (pUbusCtx=<%p>)" DSL_MNGR_CRLF, __func__,
pUbusCtx);
ubus_free(pUbusCtx);
uloop_done();
fprintf(stdout, DSL_MNGR_PREFIX
"%s: OUT (errorCode=<%d>)" DSL_MNGR_CRLF, __func__,
nErrorCode);
return nErrorCode;
}
#endif /* defined(DSL_MNGR_UBUS_SUPPORT) && (DSL_MNGR_UBUS_SUPPORT == 1) */

View file

@ -0,0 +1,26 @@
/******************************************************************************
Copyright (c) 2020 Intel Corporation
For licensing information, see the file 'LICENSE' in the root folder of
this software module.
*******************************************************************************/
#ifndef _DSL_MGMT_MANAGER_TESTCLIENT_H_
#define _DSL_MGMT_MANAGER_TESTCLIENT_H_
#ifdef HAVE_CONFIG_H
#include "dsl_cpe_config.h"
#endif
#if defined(INCLUDE_DSL_STATUS_UBUS_SUPPORT) && (INCLUDE_DSL_STATUS_UBUS_SUPPORT == 1)
#define DSL_MNGR_UBUS_SUPPORT 1
#else
#define DSL_MNGR_UBUS_SUPPORT 0
#endif /* defined(INCLUDE_DSL_UBUS_SUPPORT) && (INCLUDE_DSL_UBUS_SUPPORT == 0) */
#define DSL_MNGR_PREFIX "DSL_MNGR_TC: "
#define DSL_MNGR_CRLF "\n"
#endif /* _DSL_MGMT_MANAGER_TESTCLIENT_H_ */

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,813 @@
/******************************************************************************
Copyright (c) 2020 Intel Corporation
For licensing information, see the file 'LICENSE' in the root folder of
this software module.
*******************************************************************************/
#if defined(DSL_VRX_DEVICE_VRX518) || defined(DSL_GFAST_DEVICE_VRX618)
#if defined(INCLUDE_DSL_JSON_PARSING) && (INCLUDE_DSL_JSON_PARSING == 1)
#include "dsl_mgmt_status_json.h"
#include "json.h"
#if defined(WIN32) /* SIMULATION */
#define STATUS_JSON_FILE_PATH_TMP "..\\dsl_daemon\\dsl_daemon.status_tmp.json"
#define STATUS_JSON_FILE_PATH "..\\dsl_daemon\\dsl_daemon.status.json"
#else /* LINUX */
#define STATUS_JSON_FILE_PATH_TMP "/tmp/status/dsl.tmp"
#define STATUS_JSON_FILE_PATH "/tmp/status/dsl"
#endif /* defined(WIN32) */
/*
JSON Status File node definition
*/
typedef struct DSL_ST_JsonStatusParam_t
{
const DSL_ST_StatusNode_t *pStatusNode;
DSL_uint16_t nLine;
DSL_uint8_t nChannel;
DSL_uint8_t nBndGroup;
DSL_char_t jsonPath[STATUS_PARAM_PATH_LENGTH];
struct DSL_ST_JsonStatusParam_t* pNext;
} DSL_ST_JsonStatusParamsList_t;
static DSL_uint32_t nJsonParamsNum = 0;
/*
Main array to keep JSON Status File entire structure definition (metadata),
to be used for creation of physical Status File as well as for further
operations. Filled with data on the basis of statusNodesArray[]
*/
static DSL_ST_JsonStatusParamsList_t *pJsonStatusParams = DSL_NULL;
/*
main buffer to keep the status file in a json format
(this buffer will be kept for whole parser lifetime
in order to be updated and written down to the
destination file only in case of need - with this
approach no status file read operation is needed)
*/
static json_object *pJsonStatusRootObj = DSL_NULL;
/*
This separator has to be defined as an array, because
it is used differently by some JSON functions
*/
static const char JSON_NODES_SEPARATOR[] = ".";
/*
Macro to check 2 related pointers and free them accordingly
if necessary
*/
#define DSL_ST_CHECK_POINTERS(pA, pB) \
do { \
if (pA == DSL_NULL || pB == DSL_NULL) \
{ \
if (pA == DSL_NULL && pB == DSL_NULL) \
{ \
return DSL_NULL; \
} \
else if (pA == DSL_NULL) \
{ \
DSL_ST_Free(pB); \
pB = DSL_NULL; \
} \
else if (pB == DSL_NULL) \
{ \
DSL_ST_Free(pA); \
pA = DSL_NULL; \
} \
return DSL_NULL; \
} \
} while(0)
/**********************************************/
/* start local function declarations */
/**********************************************/
static DSL_void_t DSL_ST_JsonStatusFileCreate();
static DSL_Error_t DSL_ST_JsonStatusFileWrite();
static DSL_void_t DSL_ST_JsonParamsListCreate();
static json_object* DSL_ST_JsonNodeParentGet(
json_object *pRoot,
const DSL_char_t *pSectionPath
);
static const DSL_char_t* DSL_ST_JsonNodePathGet(
const DSL_ST_StatusNodeIdx_t eNodeIdx,
const DSL_uint16_t nLine,
const DSL_uint8_t nChannel
);
static const DSL_char_t* DSL_ST_JsonNodeNameGet(
const DSL_char_t* jsonPath
);
/**********************************************/
/* start global function definitions */
/**********************************************/
DSL_void_t DSL_ST_JsonStatusInitialize()
{
DSL_ST_JsonParamsListCreate();
DSL_ST_JsonStatusFileCreate();
}
DSL_Error_t DSL_ST_JsonStatusUpdate()
{
return DSL_ST_JsonStatusFileWrite();
}
/*
This function updates selected JSON parameter
with provided value
*/
DSL_void_t DSL_ST_JsonStatusParamUpdate(
const DSL_ST_StatusNodeIdx_t eNodeIdx,
const DSL_uint16_t nLine,
const DSL_uint8_t nChannel,
const DSL_ST_StatusNodeType_t eParamType,
const DSL_ST_ParamValue_t *uValue
)
{
const DSL_char_t *jsonPath = DSL_NULL;
json_object *pParentObj = DSL_NULL, *pNewObj = DSL_NULL;
if (pJsonStatusRootObj == DSL_NULL)
{
#if defined(DSL_ST_PLATFORM_VRX518)
/* TODO: unify printing for VRX518 and VRX618 */
DSL_CCA_DEBUG(DSL_CCA_DBG_ERR, (DSL_CPE_PREFIX
"ERROR - DSL_ST_JsonStatusParamUpdate: root object is NULL!"
DSL_CPE_CRLF));
#elif defined(DSL_ST_PLATFORM_VRX618)
DSL_FPrintf(DSL_STDOUT,
"ERROR - DSL_ST_JsonStatusParamUpdate: root object is NULL!"
DSL_CRLF);
#endif /* defined(DSL_ST_PLATFORM_VRX518) */
return;
}
jsonPath = DSL_ST_JsonNodePathGet(eNodeIdx, nLine, nChannel);
if (jsonPath == DSL_NULL)
{
#if defined(DSL_ST_PLATFORM_VRX518)
/* TODO: unify printing for VRX518 and VRX618 */
DSL_CCA_DEBUG(DSL_CCA_DBG_ERR, (DSL_CPE_PREFIX
"ERROR - DSL_ST_JsonStatusParamUpdate: node index (%d) undefined!"
DSL_CPE_CRLF, (DSL_int_t)eNodeIdx));
#elif defined(DSL_ST_PLATFORM_VRX618)
DSL_FPrintf(DSL_STDOUT,
"ERROR - DSL_ST_JsonStatusParamUpdate: node index (%d) undefined!"
DSL_CRLF, (DSL_int_t)eNodeIdx);
#endif /* defined(DSL_ST_PLATFORM_VRX518) */
return;
}
switch (eParamType)
{
case DSL_ST_NODE_TYPE_ARRAY:
if (uValue->aValue.eOutputType == HEX)
{
/* biggest possible value would be "0xFF" */
char sHex[MAX_JSON_HEX_STR_LEN] = { 0 };
/* create json array object */
pNewObj = json_object_new_array();
/* update json object */
for (DSL_uint32_t i = 0; i < uValue->aValue.nSize; ++i)
{
if (uValue->aValue.eInputType == U8)
{
DSL_ST_snprintf_s(sHex, sizeof(sHex),
"0x%02X", uValue->aValue.uArray.pU8Array[i]);
}
else if (uValue->aValue.eInputType == U32)
{
DSL_ST_snprintf_s(sHex, sizeof(sHex),
"0x%02X", uValue->aValue.uArray.pU32Array[i]);
}
else
{
break;
}
sHex[MAX_JSON_HEX_STR_LEN - 1] = '\0';
json_object_array_add(pNewObj,
json_object_new_string(sHex));
}
}
else if (uValue->aValue.eOutputType == STR)
{
char sStr[MAX_JSON_ARR_STR_LEN] = { 0 };
/* create json array object */
pNewObj = json_object_new_array();
/* update json object */
for (DSL_uint32_t i = 0; i < uValue->aValue.nSize; ++i)
{
memset(sStr, 0, MAX_JSON_ARR_STR_LEN);
DSL_ST_strncpy_s(sStr, MAX_JSON_ARR_STR_LEN,
uValue->aValue.uArray.ppStrArray[i],
DSL_ST_strnlen_s(uValue->aValue.uArray.ppStrArray[i],
MAX_JSON_ARR_STR_LEN - 1));
json_object_array_add(pNewObj,
json_object_new_string(sStr));
}
}
break;
case DSL_ST_NODE_TYPE_STRING:
pNewObj = json_object_new_string(uValue->sValue);
break;
case DSL_ST_NODE_TYPE_INT:
pNewObj = json_object_new_int(uValue->nValue);
break;
case DSL_ST_NODE_TYPE_DOUBLE:
pNewObj = json_object_new_double(uValue->nValue);
break;
case DSL_ST_NODE_TYPE_BOOL:
pNewObj = json_object_new_boolean(uValue->bValue);
break;
default:
break;
}
if(pNewObj != DSL_NULL)
{
pParentObj = DSL_ST_JsonNodeParentGet(pJsonStatusRootObj, jsonPath);
json_object_object_add(pParentObj,
DSL_ST_JsonNodeNameGet(jsonPath), pNewObj);
}
}
/**********************************************/
/* start local function definitions */
/**********************************************/
/**
This function creates JSON status file and stores it in the
common JSON object for further use
*/
static DSL_void_t DSL_ST_JsonStatusFileCreate()
{
json_object *pParentObj = DSL_NULL, *pNewObj = DSL_NULL;
DSL_ST_JsonStatusParamsList_t *pStatusParamsListItem = DSL_NULL;
if (pJsonStatusParams != DSL_NULL)
{
pStatusParamsListItem = pJsonStatusParams;
}
else
{
#if defined(DSL_ST_PLATFORM_VRX518)
/* TODO: unify printing for VRX518 and VRX618 */
DSL_CCA_DEBUG(DSL_CCA_DBG_ERR, (DSL_CPE_PREFIX
"ERROR - DSL_ST_JsonStatusFileCreate: status params "
"list not initialized!" DSL_CPE_CRLF));
#endif /* defined(DSL_ST_PLATFORM_VRX518) */
return;
}
pJsonStatusRootObj = json_object_new_object();
if (pJsonStatusRootObj == DSL_NULL)
{
#if defined(DSL_ST_PLATFORM_VRX518)
/* TODO: unify printing for VRX518 and VRX618 */
DSL_CCA_DEBUG(DSL_CCA_DBG_ERR, (DSL_CPE_PREFIX
"ERROR - DSL_ST_JsonStatusFileCreate: root object is NULL!"
DSL_CPE_CRLF));
#endif /* defined(DSL_ST_PLATFORM_VRX518) */
return;
}
while (pStatusParamsListItem != DSL_NULL)
{
pParentObj = DSL_ST_JsonNodeParentGet(
pJsonStatusRootObj, pStatusParamsListItem->jsonPath);
/* to prevent json_object_object_add function from asserting */
if (pParentObj != DSL_NULL &&
json_object_get_type(pParentObj) == json_type_object)
{
switch (pStatusParamsListItem->pStatusNode->eNodeType)
{
case DSL_ST_NODE_TYPE_OBJ:
pNewObj = json_object_new_object();
break;
case DSL_ST_NODE_TYPE_ARRAY:
pNewObj = json_object_new_array();
break;
case DSL_ST_NODE_TYPE_STRING:
pNewObj = json_object_new_string("");
break;
case DSL_ST_NODE_TYPE_INT:
pNewObj = json_object_new_int(0);
break;
default:
break;
}
if (pNewObj)
{
json_object_object_add(pParentObj,
DSL_ST_JsonNodeNameGet(pStatusParamsListItem->jsonPath), pNewObj);
pNewObj = DSL_NULL;
}
}
/* go to the next param in the list */
pStatusParamsListItem = pStatusParamsListItem->pNext;
}
}
static DSL_Error_t DSL_ST_JsonStatusFileWrite()
{
const DSL_char_t * pBufferOut = DSL_NULL;
DSL_ST_File_t *pFile = DSL_NULL;
DSL_size_t nBufSize = 0;
/* The size of pJsonStatusRootObj is growing in runtime
due to increasing parameters' values. Upper limit
is needed for safe_C function and is taken from debug
calculations, assuming that the AVERAGE LENGTH of each
parameter's name and its value will never exceeds
50 characters (needs to be updated if necessary) */
const DSL_size_t nMaxBufSize = (DSL_size_t)(nJsonParamsNum) * 50;
if (pJsonStatusRootObj == DSL_NULL)
{
#if defined(DSL_ST_PLATFORM_VRX518)
/* TODO: unify printing for VRX518 and VRX618 */
DSL_CCA_DEBUG(DSL_CCA_DBG_ERR, (DSL_CPE_PREFIX
"ERROR - DSL_ST_JsonStatusFileWrite: root object is NULL!"
DSL_CPE_CRLF));
#endif /* defined(DSL_ST_PLATFORM_VRX518) */
return DSL_ERROR;
}
/* Write updated data to file */
pBufferOut = json_object_to_json_string_ext(pJsonStatusRootObj,
JSON_C_TO_STRING_PRETTY);
pFile = DSL_ST_FOpen(STATUS_JSON_FILE_PATH_TMP, "w");
if (pFile == DSL_NULL)
{
#if defined(DSL_ST_PLATFORM_VRX518)
/* TODO: unify printing for VRX518 and VRX618 */
DSL_CCA_DEBUG(DSL_CCA_DBG_ERR, (DSL_CPE_PREFIX
"ERROR - DSL_ST_JsonStatusFileWrite: failed to open status file!"
DSL_CPE_CRLF));
#endif /* defined(DSL_ST_PLATFORM_VRX518) */
return DSL_ERROR;
}
nBufSize = DSL_ST_strnlen_s(pBufferOut, nMaxBufSize);
if (nBufSize == nMaxBufSize)
{
#if defined(DSL_ST_PLATFORM_VRX518)
DSL_CCA_DEBUG(DSL_CCA_DBG_WRN, (DSL_CPE_PREFIX
"DSL: WARNING - status parser max buffer size might be exceeded!"
DSL_CPE_CRLF));
#elif defined(DSL_ST_PLATFORM_VRX618)
DSL_FPrintf(DSL_STDOUT,
"DSL: WARNING - status parser max buffer size might be exceeded!"
DSL_CRLF);
#endif /* VRX518/VRX618 */
}
DSL_ST_FWrite(
pBufferOut,
sizeof(DSL_char_t),
nBufSize,
pFile);
DSL_ST_FClose(pFile);
/* execute atomic rename operation to store the status file in the final
destination and keep it locked as short as possible */
rename(STATUS_JSON_FILE_PATH_TMP, STATUS_JSON_FILE_PATH);
return DSL_SUCCESS;
}
/*
This function returns common section JSON path
*/
static DSL_char_t* DSL_ST_JsonStatusCommonPathCreate(
const DSL_uint32_t nNode
)
{
DSL_char_t* sJsonPath =
(DSL_char_t*)DSL_ST_Malloc(STATUS_PARAM_PATH_LENGTH);
if (sJsonPath == DSL_NULL)
{
#if defined(DSL_ST_PLATFORM_VRX518)
DSL_CCA_DEBUG(DSL_CCA_DBG_WRN, (DSL_CPE_PREFIX
"DSL: WARNING - Memory allocation for Common Path failed!"
DSL_CPE_CRLF));
#elif defined(DSL_ST_PLATFORM_VRX618)
DSL_FPrintf(DSL_STDOUT,
"DSL: WARNING - Memory allocation for Common Path failed!"
DSL_CRLF);
#endif /* VRX518/VRX618 */
return DSL_NULL;
}
memset(sJsonPath, 0, STATUS_PARAM_PATH_LENGTH);
if (strcmp(statusNodesArray[nNode].jsonParamName, DSL_ST_JSON_NO_PARAM) == 0)
{
/* no param name defined, take only base path */
DSL_ST_snprintf_s(sJsonPath, STATUS_PARAM_PATH_LENGTH, "%s",
statusNodesArray[nNode].jsonBasePath);
}
else
{
/* concatenate base path with the param name */
DSL_ST_snprintf_s(sJsonPath, STATUS_PARAM_PATH_LENGTH, "%s.%s",
statusNodesArray[nNode].jsonBasePath,
statusNodesArray[nNode].jsonParamName);
}
return sJsonPath;
}
/*
This function returns line section JSON path
(with line number)
*/
static DSL_char_t* DSL_ST_JsonStatusLinePathCreate(
const DSL_uint32_t nNode,
const DSL_uint16_t nLine
)
{
DSL_char_t *sJsonPath, *sJsonTmpPath;
sJsonPath = (DSL_char_t*)DSL_ST_Malloc(STATUS_PARAM_PATH_LENGTH);
sJsonTmpPath = (DSL_char_t*)DSL_ST_Malloc(STATUS_PARAM_PATH_LENGTH);
DSL_ST_CHECK_POINTERS(sJsonPath, sJsonTmpPath);
memset(sJsonPath, 0, STATUS_PARAM_PATH_LENGTH);
memset(sJsonTmpPath, 0, STATUS_PARAM_PATH_LENGTH);
/* add "line" keyword to the path */
DSL_ST_snprintf_s(sJsonPath, STATUS_PARAM_PATH_LENGTH, "%s.%s",
statusNodesArray[nNode].jsonBasePath, DSL_ST_JSON_LINE_NODE);
if (strcmp(statusNodesArray[nNode].jsonParamName, DSL_ST_JSON_NO_PARAM) == 0)
{
/* no param name defined, add only line number */
DSL_ST_snprintf_s(sJsonTmpPath, STATUS_PARAM_PATH_LENGTH, "%s.%d",
sJsonPath, nLine);
}
else
{
DSL_ST_snprintf_s(sJsonTmpPath, STATUS_PARAM_PATH_LENGTH, "%s.%d.%s",
sJsonPath, nLine, statusNodesArray[nNode].jsonParamName);
}
/* set the final line path */
DSL_ST_strncpy_s(sJsonPath, STATUS_PARAM_PATH_LENGTH,
sJsonTmpPath, STATUS_PARAM_PATH_LENGTH);
DSL_ST_Free(sJsonTmpPath);
return sJsonPath;
}
/*
This function returns channel section JSON path
(with line and channel number)
*/
static DSL_char_t* DSL_ST_JsonStatusChannelPathCreate(
const DSL_uint32_t nNode,
const DSL_uint16_t nLine,
const DSL_uint8_t nChannel
)
{
DSL_char_t *sJsonPath, *sJsonTmpPath;
sJsonPath = (DSL_char_t*)DSL_ST_Malloc(STATUS_PARAM_PATH_LENGTH);
sJsonTmpPath = (DSL_char_t*)DSL_ST_Malloc(STATUS_PARAM_PATH_LENGTH);
DSL_ST_CHECK_POINTERS(sJsonPath, sJsonTmpPath);
memset(sJsonPath, 0, STATUS_PARAM_PATH_LENGTH);
memset(sJsonTmpPath, 0, STATUS_PARAM_PATH_LENGTH);
/* add "line" (with line number) and "channel" keyword to the path */
DSL_ST_snprintf_s(sJsonPath, STATUS_PARAM_PATH_LENGTH, "%s.%s.%d.%s",
statusNodesArray[nNode].jsonBasePath, DSL_ST_JSON_LINE_NODE,
nLine, DSL_ST_JSON_CHANNEL_NODE);
if (strcmp(statusNodesArray[nNode].jsonParamName, DSL_ST_JSON_NO_PARAM) == 0)
{
/* no param name defined, add only channel number */
DSL_ST_snprintf_s(sJsonTmpPath, STATUS_PARAM_PATH_LENGTH, "%s.%d",
sJsonPath, nChannel);
}
else
{
DSL_ST_snprintf_s(sJsonTmpPath, STATUS_PARAM_PATH_LENGTH, "%s.%d.%s",
sJsonPath, nChannel , statusNodesArray[nNode].jsonParamName);
}
/* set the final channel path */
DSL_ST_strncpy_s(sJsonPath, STATUS_PARAM_PATH_LENGTH,
sJsonTmpPath, STATUS_PARAM_PATH_LENGTH);
DSL_ST_Free(sJsonTmpPath);
return sJsonPath;
}
#if defined(DSL_ST_PLATFORM_VRX518)
/*
This function returns bonding group section JSON path
(with bonding group number)
*/
static DSL_char_t* DSL_ST_JsonStatusBndGroupPathCreate(
const DSL_uint32_t nNode,
const DSL_uint8_t nBndGroup
)
{
DSL_char_t *sJsonPath, *sJsonTmpPath;
sJsonPath = (DSL_char_t*)DSL_ST_Malloc(STATUS_PARAM_PATH_LENGTH);
sJsonTmpPath = (DSL_char_t*)DSL_ST_Malloc(STATUS_PARAM_PATH_LENGTH);
DSL_ST_CHECK_POINTERS(sJsonPath, sJsonTmpPath);
memset(sJsonPath, 0, STATUS_PARAM_PATH_LENGTH);
memset(sJsonTmpPath, 0, STATUS_PARAM_PATH_LENGTH);
/* add "bonding_group" keyword to the path */
DSL_ST_snprintf_s(sJsonPath, STATUS_PARAM_PATH_LENGTH, "%s.%s",
statusNodesArray[nNode].jsonBasePath, DSL_ST_JSON_BND_GROUP_NODE);
if (strcmp(statusNodesArray[nNode].jsonParamName, DSL_ST_JSON_NO_PARAM) == 0)
{
/* no param name defined, add only bonding_group number */
DSL_ST_snprintf_s(sJsonTmpPath, STATUS_PARAM_PATH_LENGTH, "%s.%d",
sJsonPath, nBndGroup);
}
else
{
DSL_ST_snprintf_s(sJsonTmpPath, STATUS_PARAM_PATH_LENGTH, "%s.%d.%s",
sJsonPath, nBndGroup, statusNodesArray[nNode].jsonParamName);
}
/* set the final bonding_group path */
DSL_ST_strncpy_s(sJsonPath, STATUS_PARAM_PATH_LENGTH,
sJsonTmpPath, STATUS_PARAM_PATH_LENGTH);
DSL_ST_Free(sJsonTmpPath);
return sJsonPath;
}
#endif /* defined(DSL_ST_PLATFORM_VRX518) */
/*
This function adds item to the global pJsonStatusParams list
*/
static DSL_void_t DSL_ST_JsonParamsListItemAdd(
const DSL_ST_StatusNode_t* pNode,
const DSL_uint16_t nLine,
const DSL_uint8_t nChannel,
const DSL_uint8_t nBndGroup,
const DSL_char_t *pJsonPath
)
{
DSL_ST_JsonStatusParamsList_t *pJsonParam =
(DSL_ST_JsonStatusParamsList_t*)
DSL_ST_Malloc(sizeof(DSL_ST_JsonStatusParamsList_t));
if (pJsonParam != DSL_NULL)
{
/* create new status parameter */
pJsonParam->pStatusNode = pNode;
pJsonParam->nLine = nLine;
pJsonParam->nChannel = nChannel;
pJsonParam->nBndGroup = nBndGroup;
DSL_ST_strncpy_s(pJsonParam->jsonPath,
STATUS_PARAM_PATH_LENGTH, pJsonPath, STATUS_PARAM_PATH_LENGTH);
pJsonParam->pNext = DSL_NULL;
/* update pJsonStatusParams list with the new parameter */
if (pJsonStatusParams == DSL_NULL)
{
pJsonStatusParams = pJsonParam;
}
else
{
DSL_ST_JsonStatusParamsList_t* pHead = pJsonStatusParams;
while (pHead->pNext != DSL_NULL)
{
pHead = pHead->pNext;
}
pHead->pNext = pJsonParam;
}
/* update global variable keeping number of parameters */
nJsonParamsNum++;
}
}
/*
This function creates list of all JSON status parameters
with line and channel numbers and the related JSON path,
on the basis of "nodes" defined in the statusNodesArray array
and number of lines and channels in the current configuration
*/
static DSL_void_t DSL_ST_JsonParamsListCreate()
{
DSL_uint16_t nLine = 0;
DSL_uint8_t nChannel = 0, nBndGroup = 0;
DSL_char_t* sJsonPath = DSL_NULL;
/* iterate through all nodes in the statusNodesArray array
and create appropriate JSON status parameter */
for (DSL_uint32_t nNode = 0; nNode < nNodesNum; ++nNode)
{
if (statusNodesArray[nNode].eSubsection == DSL_ST_SUBSECTION_COMMON)
{
#if defined(DSL_ST_PLATFORM_VRX518)
if (statusNodesArray[nNode].eNodeIdx == DSL_STATUS_BND_GROUP &&
!INCLUDE_DSL_BONDING)
{
/* skip this node in single link mode */
continue;
}
#endif /* defined(DSL_ST_PLATFORM_VRX518) */
/* create a common JSON path (without a line and channel number)
and add it to the list */
sJsonPath = DSL_ST_JsonStatusCommonPathCreate(nNode);
if (sJsonPath != DSL_NULL)
{
DSL_ST_JsonParamsListItemAdd(
&statusNodesArray[nNode],
nLine, nChannel, nBndGroup, sJsonPath);
DSL_ST_Free(sJsonPath);
sJsonPath = DSL_NULL;
}
}
#if defined(DSL_ST_PLATFORM_VRX518)
else if (statusNodesArray[nNode].eSubsection == DSL_ST_SUBSECTION_BND_GROUP &&
INCLUDE_DSL_BONDING)
{
/* for CPE nBndGroup is always 0 */
sJsonPath = DSL_ST_JsonStatusBndGroupPathCreate(nNode, nBndGroup);
if (sJsonPath != DSL_NULL)
{
DSL_ST_JsonParamsListItemAdd(
&statusNodesArray[nNode],
nLine, nChannel, nBndGroup, sJsonPath);
DSL_ST_Free(sJsonPath);
sJsonPath = DSL_NULL;
}
}
#endif /* defined(DSL_ST_PLATFORM_VRX518) */
else if (statusNodesArray[nNode].eSubsection == DSL_ST_SUBSECTION_LINE
|| statusNodesArray[nNode].eSubsection == DSL_ST_SUBSECTION_CHANNEL)
{
for (nLine = 0; nLine < DSL_ST_DSL_ENTITIES; ++nLine)
{
if (statusNodesArray[nNode].eSubsection == DSL_ST_SUBSECTION_LINE)
{
/* create a JSON path with a line number
and add it to the list */
sJsonPath = DSL_ST_JsonStatusLinePathCreate(nNode, nLine);
if (sJsonPath != DSL_NULL)
{
DSL_ST_JsonParamsListItemAdd(
&statusNodesArray[nNode],
nLine, nChannel, nBndGroup, sJsonPath);
DSL_ST_Free(sJsonPath);
sJsonPath = DSL_NULL;
}
}
else if (statusNodesArray[nNode].eSubsection == DSL_ST_SUBSECTION_CHANNEL)
{
for (nChannel = 0;
nChannel < DSL_ST_CHANNELS_PER_LINE; ++nChannel)
{
/* create a JSON path with a line and channel number
and add it to the list */
sJsonPath = DSL_ST_JsonStatusChannelPathCreate(
nNode, nLine, nChannel);
if (sJsonPath != DSL_NULL)
{
DSL_ST_JsonParamsListItemAdd(
&statusNodesArray[nNode],
nLine, nChannel, nBndGroup, sJsonPath);
DSL_ST_Free(sJsonPath);
sJsonPath = DSL_NULL;
}
}
/* reset nChannel value for line-only (no channel) params,
in order to not to store incorrect (non-zero) channel
value in them */
nChannel = 0;
}
}
/* reset nLine value for common (no line and no channel) params,
in order to not to store incorrect (non-zero) line value in them */
nLine = 0;
}
}
}
/**
This function returns parent node for the given json node
*/
static json_object* DSL_ST_JsonNodeParentGet(
json_object *pRoot,
const DSL_char_t *pSectionPath)
{
typedef struct
{
DSL_char_t *pName;
json_object *pJsonObj;
} DSL_ST_JsonNode_t;
DSL_char_t inputPath[STATUS_PARAM_PATH_LENGTH];
DSL_ST_JsonNode_t visitedNode;
DSL_char_t *pToken = DSL_NULL;
DSL_size_t nStrMax = STATUS_PARAM_PATH_LENGTH;
DSL_char_t *pNextToken = DSL_NULL;
memset(inputPath, 0, sizeof(inputPath));
DSL_ST_strncpy_s(inputPath, sizeof(inputPath),
pSectionPath, sizeof(inputPath));
nStrMax = DSL_ST_strnlen_s(inputPath, STATUS_PARAM_PATH_LENGTH - 1) + 1;
memset(&visitedNode, 0, sizeof(visitedNode));
visitedNode.pJsonObj = pRoot;
pToken = DSL_ST_strtok_s(
inputPath, &nStrMax, JSON_NODES_SEPARATOR, &pNextToken);
while (pToken)
{
visitedNode.pName = pToken;
json_object_object_foreach(visitedNode.pJsonObj, key, val)
{
if (strcmp(key, visitedNode.pName) == 0)
{
if (json_object_get_type(val) == json_type_object)
{
visitedNode.pJsonObj = val;
}
break;
}
}
pToken = DSL_ST_strtok_s(
NULL, &nStrMax, JSON_NODES_SEPARATOR, &pNextToken);
}
return visitedNode.pJsonObj;
}
/**
This function returns full json path for the given node index
*/
static const DSL_char_t* DSL_ST_JsonNodePathGet(
const DSL_ST_StatusNodeIdx_t eNodeIdx,
const DSL_uint16_t nLine,
const DSL_uint8_t nChannel)
{
const DSL_char_t *sOutputPath = DSL_NULL;
DSL_ST_JsonStatusParamsList_t *pStatusParamsListItem = pJsonStatusParams;
while (pStatusParamsListItem != DSL_NULL)
{
if (pStatusParamsListItem->pStatusNode->eNodeIdx == eNodeIdx &&
(pStatusParamsListItem->pStatusNode->eSubsection
== DSL_ST_SUBSECTION_COMMON ||
#if defined(DSL_ST_PLATFORM_VRX518)
pStatusParamsListItem->pStatusNode->eSubsection
== DSL_ST_SUBSECTION_BND_GROUP ||
#endif /* defined(DSL_ST_PLATFORM_VRX518 */
(pStatusParamsListItem->nLine == nLine &&
pStatusParamsListItem->nChannel == nChannel)))
{
sOutputPath = pStatusParamsListItem->jsonPath;
break;
}
/* go to the next param in the list */
pStatusParamsListItem = pStatusParamsListItem->pNext;
}
return sOutputPath;
}
/**
This function returns key (last node) name for the given json path
*/
static const DSL_char_t* DSL_ST_JsonNodeNameGet(
const DSL_char_t* jsonPath)
{
const char *jsonLastNode =
strrchr(jsonPath, (int)JSON_NODES_SEPARATOR[0]);
return jsonLastNode ? jsonLastNode + 1 : jsonPath;
}
#endif /* defined(INCLUDE_DSL_JSON_PARSING) && (INCLUDE_DSL_JSON_PARSING == 1) */
#endif /* defined(DSL_VRX_DEVICE_VRX518) || defined(DSL_GFAST_DEVICE_VRX618) */

View file

@ -0,0 +1,37 @@
/******************************************************************************
Copyright (c) 2020 Intel Corporation
For licensing information, see the file 'LICENSE' in the root folder of
this software module.
*******************************************************************************/
#ifndef _DSL_MGMT_STATUS_JSON_H
#define _DSL_MGMT_STATUS_JSON_H
#if defined(DSL_VRX_DEVICE_VRX518) || defined(DSL_GFAST_DEVICE_VRX618)
#if defined(INCLUDE_DSL_JSON_PARSING) && (INCLUDE_DSL_JSON_PARSING == 1)
#include "dsl_mgmt_status_definitions.h"
/* Max string length to be written to an output array */
#define MAX_JSON_ARR_STR_LEN 512
#define MAX_JSON_HEX_STR_LEN 5
DSL_void_t DSL_ST_JsonStatusInitialize();
DSL_Error_t DSL_ST_JsonStatusUpdate();
DSL_void_t DSL_ST_JsonStatusParamUpdate(
const DSL_ST_StatusNodeIdx_t eNodeIdx,
const DSL_uint16_t nLine,
const DSL_uint8_t nChannel,
const DSL_ST_StatusNodeType_t eParamType,
const DSL_ST_ParamValue_t *uValue
);
#endif /* defined(INCLUDE_DSL_JSON_PARSING) && (INCLUDE_DSL_JSON_PARSING == 1) */
#endif /* defined(DSL_VRX_DEVICE_VRX518) || defined(DSL_GFAST_DEVICE_VRX618) */
#endif /* _DSL_MGMT_STATUS_JSON_H */

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,326 @@
/******************************************************************************
Copyright (c) 2019 - 2020 Intel Corporation
For licensing information, see the file 'LICENSE' in the root folder of
this software module.
*******************************************************************************/
#ifndef _DSL_MGMT_STATUS_PARSER_H
#define _DSL_MGMT_STATUS_PARSER_H
#if defined(DSL_VRX_DEVICE_VRX518) || defined(DSL_GFAST_DEVICE_VRX618)
#if defined(DSL_VRX_DEVICE_VRX518)
/* VRX518 */
#include "dsl_cpe_control.h"
#elif defined(DSL_GFAST_DEVICE_VRX618)
/* VRX618 */
#include "lib_dsl_api.h"
#endif /* VRX518/VRX618 */
#if defined(INCLUDE_DSL_STATUS_PARSER) && (INCLUDE_DSL_STATUS_PARSER == 1)
#if defined(DSL_VRX_DEVICE_VRX518)
/* VRX518 */
#define DSL_ST_Context_t DSL_CPE_Control_Context_t
#elif defined(DSL_GFAST_DEVICE_VRX618)
/* VRX618 */
#define DSL_ST_Context_t DSL_Context_t
#endif /* VRX518/VRX618 */
/**
Definitions for all specified Status File nodes
(these definitions will be used for different
type parameters' updates)
*/
typedef enum
{
DSL_ROOT = 0,
/* common section */
DSL_LINE_ENTRIES,/*1*/
DSL_CHANNEL_ENTRIES,/*2*/
DSL_BND_GROUP_ENTRIES,/*3*/
DSL_API_VERSION,/*4*/
DSL_DRV_VERSION,/*5*/
DSL_HW_VERSION,/*6*/
DSL_CHIPSET_TYPE,/*7*/
/* <dsl.status> section */
DSL_STATUS,/*8*/
DSL_STATUS_LINE,/*9*/
/* <dsl.status.line.[id]> section */
DSL_STATUS_LINE_ID,
DSL_STATUS_LINE_STATUS,
DSL_STATUS_LINE_UPSTREAM,
DSL_STATUS_LINE_FW_VERSION,
DSL_STATUS_LINE_LINK_STATUS,
DSL_STATUS_LINE_STD_SUPPORTED,
DSL_STATUS_LINE_XTSE,
DSL_STATUS_LINE_STD_USED,
DSL_STATUS_LINE_XTSE_USED,
DSL_STATUS_LINE_ENCODING,
DSL_STATUS_LINE_ALLOWED_PROFILES,
DSL_STATUS_LINE_CURRENT_PROFILE,
DSL_STATUS_LINE_PWR_MGMT_STATE,
DSL_STATUS_LINE_SUCC_FAIL_CAUSE,
DSL_STATUS_LINE_LAST_STATE_TRANSM,
DSL_STATUS_LINE_LAST_STATE_TRANSM_US,
DSL_STATUS_LINE_LAST_STATE_TRANSM_DS,
DSL_STATUS_LINE_US0_MASK,
DSL_STATUS_LINE_TRELLIS,
DSL_STATUS_LINE_TRELLIS_US,
DSL_STATUS_LINE_TRELLIS_DS,
DSL_STATUS_LINE_ACT_SNR_MODE,
DSL_STATUS_LINE_ACT_SNR_MODE_US,
DSL_STATUS_LINE_ACT_SNR_MODE_DS,
DSL_STATUS_LINE_LINE_NR,
DSL_STATUS_LINE_MAX_BIT_RATE,
DSL_STATUS_LINE_MAX_BIT_RATE_US,
DSL_STATUS_LINE_MAX_BIT_RATE_DS,
DSL_STATUS_LINE_NOISE_MARGIN,
DSL_STATUS_LINE_NOISE_MARGIN_US,
DSL_STATUS_LINE_NOISE_MARGIN_DS,
DSL_STATUS_LINE_SNR_MPB,
DSL_STATUS_LINE_SNR_MPB_US,
DSL_STATUS_LINE_SNR_MPB_DS,
DSL_STATUS_LINE_POWER,
DSL_STATUS_LINE_POWER_US,
DSL_STATUS_LINE_POWER_DS,
DSL_STATUS_LINE_XTUR_VENDOR,
DSL_STATUS_LINE_XTUR_COUNTRY,
DSL_STATUS_LINE_XTUR_ANSI_STD,
DSL_STATUS_LINE_XTUR_ANSI_REV,
DSL_STATUS_LINE_XTUC_VENDOR,
DSL_STATUS_LINE_XTUC_COUNTRY,
DSL_STATUS_LINE_XTUC_ANSI_STD,
DSL_STATUS_LINE_XTUC_ANSI_REV,
#if defined(DSL_VRX_DEVICE_VRX518)
DSL_STATUS_LINE_UPBOKLER,
#endif /* defined(DSL_VRX_DEVICE_VRX518) */
DSL_STATUS_LINE_UPBOKLER_PB,
DSL_STATUS_LINE_RXTHRSH_DS,
DSL_STATUS_LINE_ACT_RA_MODE,
DSL_STATUS_LINE_ACT_RA_MODE_US,
DSL_STATUS_LINE_ACT_RA_MODE_DS,
DSL_STATUS_LINE_SNR_MROC,
DSL_STATUS_LINE_SNR_MROC_US,
DSL_STATUS_LINE_SNR_MROC_DS,
DSL_STATUS_LINE_ATTENUATION,
DSL_STATUS_LINE_ATTENUATION_US,
DSL_STATUS_LINE_ATTENUATION_DS,
#if defined(DSL_VRX_DEVICE_VRX518) && defined(INCLUDE_DSL_FILTER_DETECTION)
DSL_STATUS_LINE_MFD_BASIC_DATA,
DSL_STATUS_LINE_MFD_BASIC_DATA_FILTER_DETECTION,
DSL_STATUS_LINE_MFD_BASIC_DATA_METRIC3,
#endif /* defined(DSL_VRX_DEVICE_VRX518) && defined(INCLUDE_DSL_FILTER_DETECTION) */
DSL_STATUS_LINE_CHANNEL,
/* <dsl.status.line.[id].channel.[id]> section */
DSL_STATUS_LINE_CHANNEL_ID,
DSL_STATUS_LINE_CHANNEL_STATUS,
DSL_STATUS_LINE_CHANNEL_LINKENC_SUPP,
DSL_STATUS_LINE_CHANNEL_LINKENC_USED,
DSL_STATUS_LINE_CHANNEL_LPATH,
DSL_STATUS_LINE_CHANNEL_INTLVDEPTH,
DSL_STATUS_LINE_CHANNEL_INTLVBLOCK,
DSL_STATUS_LINE_CHANNEL_ACT_INTERL_DELAY,
DSL_STATUS_LINE_CHANNEL_ACTINP,
DSL_STATUS_LINE_CHANNEL_INPREPORT,
DSL_STATUS_LINE_CHANNEL_NFEC,
DSL_STATUS_LINE_CHANNEL_RFEC,
DSL_STATUS_LINE_CHANNEL_LSYMB,
DSL_STATUS_LINE_CHANNEL_DATARATE,
DSL_STATUS_LINE_CHANNEL_DATARATE_US,
DSL_STATUS_LINE_CHANNEL_DATARATE_DS,
DSL_STATUS_LINE_CHANNEL_ACTNDR,
DSL_STATUS_LINE_CHANNEL_ACTNDR_US,
DSL_STATUS_LINE_CHANNEL_ACTNDR_DS,
DSL_STATUS_LINE_CHANNEL_ACTINPREIN,
DSL_STATUS_LINE_CHANNEL_ACTINPREIN_US,
DSL_STATUS_LINE_CHANNEL_ACTINPREIN_DS,
#if defined(DSL_VRX_DEVICE_VRX518)
DSL_STATUS_BND_GROUP,
/* <dsl.status.bonding_group.[id]> section */
DSL_STATUS_BND_GROUP_ID,
DSL_STATUS_BND_GROUP_BOND_SCHEMES_SUPPORTED,
DSL_STATUS_BND_GROUP_BOND_SCHEME,
DSL_STATUS_BND_GROUP_DATARATE,
DSL_STATUS_BND_GROUP_DATARATE_US,
DSL_STATUS_BND_GROUP_DATARATE_DS,
#endif /* defined(DSL_VRX_DEVICE_VRX518) */
#if defined(DSL_GFAST_DEVICE_VRX618) && (INCLUDE_DSL_API_GFAST_SUPPORT == 1)
/* <dsl.status.fast> section */
DSL_STATUS_FAST,
DSL_STATUS_FAST_LINE,
/* <dsl.status.fast.line.[id]> section */
DSL_STATUS_FAST_LINE_ID,
DSL_STATUS_FAST_LINE_ALLOWED_PROFILES,
DSL_STATUS_FAST_LINE_CURRENT_PROFILE,
DSL_STATUS_FAST_LINE_SNRMRMC,
DSL_STATUS_FAST_LINE_SNRMRMC_US,
DSL_STATUS_FAST_LINE_SNRMRMC_DS,
DSL_STATUS_FAST_LINE_BITSRMCPS,
DSL_STATUS_FAST_LINE_BITSRMCPS_US,
DSL_STATUS_FAST_LINE_BITSRMCPS_DS,
DSL_STATUS_FAST_LINE_MINEFTR,
#endif /* defined(DSL_GFAST_DEVICE_VRX618) && (INCLUDE_DSL_API_GFAST_SUPPORT == 1) */
/* <dsl.stats> section */
DSL_STATS,
DSL_STATS_LINE,
/* <dsl.stats.line.[id]> section */
DSL_STATS_LINE_ID,
DSL_STATS_LINE_TOTAL_START,
DSL_STATS_LINE_SHOWTIME_START,
DSL_STATS_LINE_LAST_SHOWTIME_START,
DSL_STATS_LINE_CURRENT_DAY_START,
DSL_STATS_LINE_QUARTER_HOUR_START,
DSL_STATS_LINE_TOTAL,
DSL_STATS_LINE_TOTAL_ERR_SECS,
DSL_STATS_LINE_TOTAL_SEV_ERR_SECS,
DSL_STATS_LINE_SHOWTIME,
DSL_STATS_LINE_SHOWTIME_ERR_SECS,
DSL_STATS_LINE_SHOWTIME_SEV_ERR_SECS,
DSL_STATS_LINE_LAST_SHOWTIME,
DSL_STATS_LINE_LAST_SHOWTIME_ERR_SECS,
DSL_STATS_LINE_LAST_SHOWTIME_SEV_ERR_SECS,
DSL_STATS_LINE_CURRENT_DAY,
DSL_STATS_LINE_CURRENT_DAY_ERR_SECS,
DSL_STATS_LINE_CURRENT_DAY_SEV_ERR_SECS,
DSL_STATS_LINE_QUARTER_HOUR,
DSL_STATS_LINE_QUARTER_HOUR_ERR_SECS,
DSL_STATS_LINE_QUARTER_HOUR_SEV_ERR_SECS,
DSL_STATS_LINE_CHANNEL,
/* <dsl.stats.line.[id].channel.[id]> section */
DSL_STATS_LINE_CHANNEL_ID,
DSL_STATS_LINE_CHANNEL_TOTAL_START,
DSL_STATS_LINE_CHANNEL_SHOWTIME_START,
DSL_STATS_LINE_CHANNEL_LAST_SHOWTIME_START,
DSL_STATS_LINE_CHANNEL_CURRENT_DAY_START,
DSL_STATS_LINE_CHANNEL_QUARTER_HOUR_START,
DSL_STATS_LINE_CHANNEL_TOTAL,
DSL_STATS_LINE_CHANNEL_TOTAL_XTUR_FEC_ERRORS,
DSL_STATS_LINE_CHANNEL_TOTAL_XTUR_CRC_ERRORS,
DSL_STATS_LINE_CHANNEL_TOTAL_XTUC_FEC_ERRORS,
DSL_STATS_LINE_CHANNEL_TOTAL_XTUC_CRC_ERRORS,
DSL_STATS_LINE_CHANNEL_TOTAL_XTUR_HEC_ERRORS,
DSL_STATS_LINE_CHANNEL_TOTAL_XTUC_HEC_ERRORS,
DSL_STATS_LINE_CHANNEL_SHOWTIME,
DSL_STATS_LINE_CHANNEL_SHOWTIME_XTUR_FEC_ERRORS,
DSL_STATS_LINE_CHANNEL_SHOWTIME_XTUR_CRC_ERRORS,
DSL_STATS_LINE_CHANNEL_SHOWTIME_XTUC_FEC_ERRORS,
DSL_STATS_LINE_CHANNEL_SHOWTIME_XTUC_CRC_ERRORS,
DSL_STATS_LINE_CHANNEL_SHOWTIME_XTUR_HEC_ERRORS,
DSL_STATS_LINE_CHANNEL_SHOWTIME_XTUC_HEC_ERRORS,
DSL_STATS_LINE_CHANNEL_LAST_SHOWTIME,
DSL_STATS_LINE_CHANNEL_LAST_SHOWTIME_XTUR_FEC_ERRORS,
DSL_STATS_LINE_CHANNEL_LAST_SHOWTIME_XTUR_CRC_ERRORS,
DSL_STATS_LINE_CHANNEL_LAST_SHOWTIME_XTUC_FEC_ERRORS,
DSL_STATS_LINE_CHANNEL_LAST_SHOWTIME_XTUC_CRC_ERRORS,
DSL_STATS_LINE_CHANNEL_LAST_SHOWTIME_XTUR_HEC_ERRORS,
DSL_STATS_LINE_CHANNEL_LAST_SHOWTIME_XTUC_HEC_ERRORS,
DSL_STATS_LINE_CHANNEL_CURRENT_DAY,
DSL_STATS_LINE_CHANNEL_CURRENT_DAY_XTUR_FEC_ERRORS,
DSL_STATS_LINE_CHANNEL_CURRENT_DAY_XTUR_CRC_ERRORS,
DSL_STATS_LINE_CHANNEL_CURRENT_DAY_XTUC_FEC_ERRORS,
DSL_STATS_LINE_CHANNEL_CURRENT_DAY_XTUC_CRC_ERRORS,
DSL_STATS_LINE_CHANNEL_CURRENT_DAY_XTUR_HEC_ERRORS,
DSL_STATS_LINE_CHANNEL_CURRENT_DAY_XTUC_HEC_ERRORS,
DSL_STATS_LINE_CHANNEL_QUARTER_HOUR,
DSL_STATS_LINE_CHANNEL_QUARTER_HOUR_XTUR_FEC_ERRORS,
DSL_STATS_LINE_CHANNEL_QUARTER_HOUR_XTUR_CRC_ERRORS,
DSL_STATS_LINE_CHANNEL_QUARTER_HOUR_XTUC_FEC_ERRORS,
DSL_STATS_LINE_CHANNEL_QUARTER_HOUR_XTUC_CRC_ERRORS,
DSL_STATS_LINE_CHANNEL_QUARTER_HOUR_XTUR_HEC_ERRORS,
DSL_STATS_LINE_CHANNEL_QUARTER_HOUR_XTUC_HEC_ERRORS,
#if defined(DSL_GFAST_DEVICE_VRX618) && (INCLUDE_DSL_API_GFAST_SUPPORT == 1)
DSL_STATS_FAST,
DSL_STATS_FAST_LINE,
/* <dsl.stats.fast.line.[id]> section */
DSL_STATS_FAST_LINE_ID,
DSL_STATS_FAST_LINE_TOTAL,
DSL_STATS_FAST_LINE_TOTAL_SUCCESS_BSW,
DSL_STATS_FAST_LINE_TOTAL_SUCCESS_SRA,
DSL_STATS_FAST_LINE_TOTAL_SUCCESS_FRA,
DSL_STATS_FAST_LINE_TOTAL_SUCCESS_RPA,
DSL_STATS_FAST_LINE_TOTAL_SUCCESS_TIGA,
DSL_STATS_FAST_LINE_SHOWTIME,
DSL_STATS_FAST_LINE_SHOWTIME_SUCCESS_BSW,
DSL_STATS_FAST_LINE_SHOWTIME_SUCCESS_SRA,
DSL_STATS_FAST_LINE_SHOWTIME_SUCCESS_FRA,
DSL_STATS_FAST_LINE_SHOWTIME_SUCCESS_RPA,
DSL_STATS_FAST_LINE_SHOWTIME_SUCCESS_TIGA,
DSL_STATS_FAST_LINE_LAST_SHOWTIME,
DSL_STATS_FAST_LINE_LAST_SHOWTIME_SUCCESS_BSW,
DSL_STATS_FAST_LINE_LAST_SHOWTIME_SUCCESS_SRA,
DSL_STATS_FAST_LINE_LAST_SHOWTIME_SUCCESS_FRA,
DSL_STATS_FAST_LINE_LAST_SHOWTIME_SUCCESS_RPA,
DSL_STATS_FAST_LINE_LAST_SHOWTIME_SUCCESS_TIGA,
#endif /* defined(DSL_GFAST_DEVICE_VRX618) && (INCLUDE_DSL_API_GFAST_SUPPORT == 1) */
DSL_CONFIGURATION,
DSL_CONFIGURATION_STATUS
} DSL_ST_StatusNodeIdx_t;
typedef enum
{
DSL_ST_STATUS,
DSL_ST_STATISTICS,
DSL_ST_CONFIGURATION
} DSL_ST_StatusSectionIdx_t;
/**
This function creates the initial Status File
and updates the init parameters values
\param pContext - Pointer to dsl library context structure, [I]
\return
Return values are defined within the DSL_Error_t definition
- DSL_SUCCESS in case of success
- DSL_ERROR if operation failed
*/
DSL_Error_t DSL_ST_DslStatusInitialize(
DSL_ST_Context_t *pContext);
/**
This function updates Status File parameters
triggered by events
\param pContext - Pointer to dsl library context structure, [I]
\return
Return values are defined within the DSL_Error_t definition
- DSL_SUCCESS in case of success
- DSL_ERROR if operation failed
*/
DSL_Error_t DSL_ST_DslStatusEvtUpdate(
DSL_ST_Context_t *pContext,
const DSL_ST_StatusNodeIdx_t eNodeIdx,
DSL_uint16_t nLine,
DSL_uint8_t nChannel);
/**
This function updates Status File parameters
triggered by the polling timer
\param pContext - Pointer to dsl library context structure, [I]
\return
Return values are defined within the DSL_Error_t definition
- DSL_SUCCESS in case of success
- DSL_ERROR if operation failed
*/
DSL_Error_t DSL_ST_DslStatusPollUpdate(
DSL_ST_Context_t *pContext,
const DSL_ST_StatusSectionIdx_t ePollSectionIdx);
/**
This function frees Status File related
dynamically allocated resources
*/
DSL_void_t DSL_ST_DslStatusResourcesFree(
DSL_void_t);
#endif /* defined(INCLUDE_DSL_STATUS_PARSER) && (INCLUDE_DSL_STATUS_PARSER == 1) */
#endif /* defined(DSL_VRX_DEVICE_VRX518) || defined(DSL_GFAST_DEVICE_VRX618) */
#endif /* _DSL_MGMT_STATUS_PARSER_H */

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,67 @@
/******************************************************************************
Copyright (c) 2020 Intel Corporation
For licensing information, see the file 'LICENSE' in the root folder of
this software module.
*******************************************************************************/
#ifndef _DSL_MGMT_STATUS_UBUS_H
#define _DSL_MGMT_STATUS_UBUS_H
#if defined(DSL_VRX_DEVICE_VRX518)
#include "dsl_mgmt_status_definitions.h"
#if defined(INCLUDE_DSL_STATUS_UBUS_SUPPORT) && (INCLUDE_DSL_STATUS_UBUS_SUPPORT == 1)
/**
Create and initialize internal data.
\return 0 on success,
-1 on any error.
*/
DSL_Error_t DSL_ST_UbusInit();
/**
Updates status parameter in Ubus Module's internal data structure.
\param eNodeIdx status node index [I]
\param nLine line number [I]
\param nChannel channel number [I]
\param eParamType redundant? [I]
\param uValue new value [I]
\return 0 on success,
-1 on any error.
*/
DSL_Error_t DSL_ST_UbusUpdate(
const DSL_ST_StatusNodeIdx_t eNodeIdx,
const DSL_uint16_t nLine,
const DSL_uint8_t nChannel,
const DSL_ST_StatusNodeType_t eParamType,
const DSL_ST_ParamValue_t *uValue
);
/**
Finalize update process.
Prepare data to be provided for DSL Manager.
\return 0 on success,
-1 on any error.
*/
DSL_Error_t DSL_ST_UbusSync(DSL_void_t);
/**
Free acquired resources.
\return 0 on success,
-1 on any error.
*/
DSL_Error_t DSL_ST_UbusDeinit(DSL_void_t);
#endif /* defined(INCLUDE_DSL_STATUS_UBUS_SUPPORT) && (INCLUDE_DSL_STATUS_UBUS_SUPPORT == 1) */
#endif /* defined(DSL_VRX_DEVICE_VRX518) */
#endif /* _DSL_MGMT_STATUS_UBUS_H */

View file

@ -2,8 +2,14 @@
bin_PROGRAMS = dsl_cpe_control
AM_CPPFLAGS = -I@srcdir@ @DSL_DRIVER_INCL_PATH@ @DSL_DEVICE_DRIVER_INCL_PATH@ @IFXOS_INCLUDE_PATH@ @DTI_INCL_PATH@
AM_CPPFLAGS = \
-I@srcdir@ \
-I@srcdir@/../dsl_mgmt_if/status \
-I@srcdir@/../dsl_mgmt_if/include \
@DSL_DRIVER_INCL_PATH@ \
@DSL_DEVICE_DRIVER_INCL_PATH@ \
@IFXOS_INCLUDE_PATH@ \
@DTI_INCL_PATH@
if DSL_CPE_STATIC_LINKING
dsl_cpe_control_common_ldflags = -static
@ -14,12 +20,12 @@ endif
dsl_cpe_control_LDADD = -lpthread -lrt
if INCLUDE_DSL_CPE_DTI_SUPPORT
dsl_cpe_control_LDADD += -ldti_agent
dsl_cpe_control_LDADD += -lifxos
dsl_cpe_control_LDADD += -ldti_agent
dsl_cpe_control_LDADD += -lifxos
endif
if INCLUDE_DSL_CPE_IFXOS_SUPPORT
dsl_cpe_control_LDADD += -lifxos
dsl_cpe_control_LDADD += -lifxos
endif
if SAFEC_SUPPORT
@ -27,16 +33,30 @@ AM_CPPFLAGS += @SAFEC_INCL_PATH@
dsl_cpe_control_LDADD += -l@SAFEC_LIB_NAME@
endif
if INCLUDE_DSL_STATUS_PARSER
dsl_cpe_control_LDADD += -ljson-c
endif
if INCLUDE_DSL_JSON_PARSING
AM_CPPFLAGS += @LIBJSON_C_INCL_PATH@
dsl_cpe_control_LDADD += -ljson-c
endif
if INCLUDE_DSL_STATUS_UBUS_SUPPORT
AM_CPPFLAGS += \
@LIBUBOX_INCL_PATH@ \
@UBUS_LIBJSON_C_INCL_PATH@
dsl_cpe_control_LDADD += -lubox -lubus -lblobmsg_json
endif
if IMA_BONDING_DRV_SUPPORT
AM_CPPFLAGS += @IMA_BONDING_DRV_INCL_PATH@
endif
bin_SCRIPTS = ../scripts/alias_dsl_cpe.sh
if DEVICE_VRX
dsl_cpe_control_bnd_sources = \
dsl_cpe_bnd_vrx.c
dsl_cpe_bnd_vrx.c
endif
dsl_cpe_control_cli_sources = \
@ -45,14 +65,28 @@ dsl_cpe_control_cli_sources = \
dsl_cpe_cli_access.c \
dsl_cpe_cli_console.c
if INCLUDE_DSL_JSON_PARSING
dsl_cpe_configuration_parser_sources = \
dsl_cpe_configuration_parser.c
dsl_cpe_status_parser_sources = \
dsl_cpe_status_parser.c
else
dsl_cpe_configuration_parser_sources =
dsl_cpe_status_parser_sources =
dsl_mgmt_if = \
@srcdir@/../dsl_mgmt_if/manager/dsl_mgmt_manager.c
if INCLUDE_DSL_STATUS_PARSER
dsl_mgmt_if += \
@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_parser.c \
@srcdir@/../dsl_mgmt_if/include/dsl_mgmt_interface.h
endif
if INCLUDE_DSL_JSON_PARSING
dsl_cpe_configuration_parser_sources += \
dsl_cpe_configuration_parser.c
dsl_mgmt_if += \
@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_json.c
endif
if INCLUDE_DSL_STATUS_UBUS_SUPPORT
dsl_mgmt_if += \
@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_ubus.c \
@srcdir@/../dsl_mgmt_if/include/dsl_mgmt_ubus_interface.h \
@srcdir@/../dsl_mgmt_if/manager/dsl_mgmt_manager_objects_methods.c
endif
dsl_cpe_control_cli_autogen_sources = \
@ -116,11 +150,9 @@ dsl_cpe_control_SOURCES += \
$(dsl_cpe_control_cli_danube_sources)
endif
if INCLUDE_DSL_JSON_PARSING
dsl_cpe_control_SOURCES += \
$(dsl_cpe_configuration_parser_sources) \
$(dsl_cpe_status_parser_sources)
endif
$(dsl_mgmt_if)
if DEVICE_VRX
dsl_cpe_control_SOURCES += \
@ -128,7 +160,6 @@ dsl_cpe_control_SOURCES += \
endif
endif
EXTRA_DIST = \
../LICENSE \
$(dsl_cpe_control_bnd_sources) \
@ -139,7 +170,7 @@ EXTRA_DIST = \
$(dsl_cpe_control_debug_danube_sources) \
$(dsl_cpe_control_debug_vrx_sources) \
$(dsl_cpe_configuration_parser_sources) \
$(dsl_cpe_status_parser_sources) \
$(dsl_mgmt_if) \
dsl_cpe_control.h \
dsl_cpe_init_cfg.h \
dsl_cpe_cli.h \
@ -164,14 +195,15 @@ EXTRA_DIST = \
../scripts/alias_dsl_cpe.sh \
../scripts/dsl_cpe_pipe.sh \
../tools/pipe/dsl_pipe_client.h \
dsl_cpe_safec_wrapper.h
if INCLUDE_DSL_JSON_PARSING
EXTRA_DIST += \
dsl_cpe_configuration_parser.h \
dsl_cpe_status_parser.h \
dsl_cpe_interface.h
endif
dsl_cpe_safec_wrapper.h \
@srcdir@/../dsl_mgmt_if/include/dsl_mgmt_manager_interface.h \
@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_parser.h \
@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_definitions.h \
dsl_cpe_configuration_parser.h \
@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_json.h \
@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_ubus.h \
@srcdir@/../dsl_mgmt_if/manager/dsl_mgmt_manager.h \
@srcdir@/../dsl_mgmt_if/manager/dsl_mgmt_manager_objects_methods.h
if ADD_APPL_CFLAGS_SET
dsl_cpe_control_cflags = $(ADD_APPL_CFLAGS)
@ -203,16 +235,24 @@ else
dsl_cpe_control_safec_ldflags =
endif
if INCLUDE_DSL_JSON_PARSING
dsl_cpe_control_json_parsing_cflags = -DINCLUDE_DSL_JSON_PARSING=1
dsl_cpe_control_json_c_ldflags = @LIBJSON_C_LIBRARY_PATH@
else
dsl_cpe_control_json_parsing_cflags =
dsl_cpe_control_json_parsing_cflags =
dsl_cpe_control_json_c_ldflags =
if INCLUDE_DSL_STATUS_PARSER
dsl_cpe_control_json_parsing_cflags += -DDSL_VRX_DEVICE_VRX518
endif
if INCLUDE_DSL_JSON_PARSING
dsl_cpe_control_json_parsing_cflags += -DINCLUDE_DSL_JSON_PARSING=1
dsl_cpe_control_json_c_ldflags += @LIBJSON_C_LIBRARY_PATH@
endif
if INCLUDE_DSL_STATUS_UBUS_SUPPORT
dsl_cpe_control_json_c_ldflags += @UBUS_LIBS_PATH@
endif
dsl_cpe_control_common_cflags = -Wall -Wimplicit -Wreturn-type -Wunused -Wundef \
-Wswitch -Wno-format -Wcomment -Wuninitialized -DLINUX -g3
-Wswitch -Wno-format -Wcomment -Wuninitialized -DLINUX -g3
# compile cflags
dsl_cpe_control_compile_cflags = $(EXTRA_APP_CFLAGS)
@ -225,19 +265,21 @@ if CONFIG_USE_DSL_ADD_EXT_APPL_CFLAGS
dsl_cpe_control_external_cflags= $(DSL_ADD_EXT_APPL_CFLAGS)
endif
dsl_cpe_control_CFLAGS = $(dsl_cpe_control_common_cflags) \
$(dsl_cpe_control_cflags) \
$(dsl_cpe_control_compile_cflags) \
$(dsl_cpe_control_external_cflags) \
$(dsl_cpe_control_json_parsing_cflags)
dsl_cpe_control_CFLAGS = \
$(dsl_cpe_control_common_cflags) \
$(dsl_cpe_control_cflags) \
$(dsl_cpe_control_compile_cflags) \
$(dsl_cpe_control_external_cflags) \
$(dsl_cpe_control_json_parsing_cflags)
dsl_cpe_control_LDFLAGS = $(dsl_cpe_control_common_ldflags) \
$(dsl_cpe_control_ldflags) \
$(dsl_cpe_control_compile_cflags) \
$(dsl_cpe_control_ifxos_ldflags) \
$(dsl_cpe_control_dti_ldflags) \
$(dsl_cpe_control_safec_ldflags) \
$(dsl_cpe_control_json_c_ldflags)
dsl_cpe_control_LDFLAGS = \
$(dsl_cpe_control_common_ldflags) \
$(dsl_cpe_control_ldflags) \
$(dsl_cpe_control_compile_cflags) \
$(dsl_cpe_control_ifxos_ldflags) \
$(dsl_cpe_control_dti_ldflags) \
$(dsl_cpe_control_safec_ldflags) \
$(dsl_cpe_control_json_c_ldflags)
lint:
@flint +b -vm \

View file

@ -92,36 +92,56 @@ bin_PROGRAMS = dsl_cpe_control$(EXEEXT)
@INCLUDE_DSL_CPE_IFXOS_SUPPORT_TRUE@am__append_2 = -lifxos
@SAFEC_SUPPORT_TRUE@am__append_3 = @SAFEC_INCL_PATH@
@SAFEC_SUPPORT_TRUE@am__append_4 = -l@SAFEC_LIB_NAME@
@INCLUDE_DSL_JSON_PARSING_TRUE@am__append_5 = @LIBJSON_C_INCL_PATH@
@INCLUDE_DSL_JSON_PARSING_TRUE@am__append_6 = -ljson-c
@DEVICE_DANUBE_TRUE@am__append_7 = \
@INCLUDE_DSL_STATUS_PARSER_TRUE@am__append_5 = -ljson-c
@INCLUDE_DSL_JSON_PARSING_TRUE@am__append_6 = @LIBJSON_C_INCL_PATH@
@INCLUDE_DSL_STATUS_UBUS_SUPPORT_TRUE@am__append_7 = \
@INCLUDE_DSL_STATUS_UBUS_SUPPORT_TRUE@ @LIBUBOX_INCL_PATH@ \
@INCLUDE_DSL_STATUS_UBUS_SUPPORT_TRUE@ @UBUS_LIBJSON_C_INCL_PATH@
@INCLUDE_DSL_STATUS_UBUS_SUPPORT_TRUE@am__append_8 = -lubox -lubus -lblobmsg_json
@IMA_BONDING_DRV_SUPPORT_TRUE@am__append_9 = @IMA_BONDING_DRV_INCL_PATH@
@INCLUDE_DSL_STATUS_PARSER_TRUE@am__append_10 = \
@INCLUDE_DSL_STATUS_PARSER_TRUE@ @srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_parser.c \
@INCLUDE_DSL_STATUS_PARSER_TRUE@ @srcdir@/../dsl_mgmt_if/include/dsl_mgmt_interface.h
@INCLUDE_DSL_JSON_PARSING_TRUE@am__append_11 = \
@INCLUDE_DSL_JSON_PARSING_TRUE@ dsl_cpe_configuration_parser.c
@INCLUDE_DSL_JSON_PARSING_TRUE@am__append_12 = \
@INCLUDE_DSL_JSON_PARSING_TRUE@ @srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_json.c
@INCLUDE_DSL_STATUS_UBUS_SUPPORT_TRUE@am__append_13 = \
@INCLUDE_DSL_STATUS_UBUS_SUPPORT_TRUE@ @srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_ubus.c \
@INCLUDE_DSL_STATUS_UBUS_SUPPORT_TRUE@ @srcdir@/../dsl_mgmt_if/include/dsl_mgmt_ubus_interface.h \
@INCLUDE_DSL_STATUS_UBUS_SUPPORT_TRUE@ @srcdir@/../dsl_mgmt_if/manager/dsl_mgmt_manager_objects_methods.c
@DEVICE_DANUBE_TRUE@am__append_14 = \
@DEVICE_DANUBE_TRUE@ $(dsl_cpe_control_debug_danube_sources)
@DEVICE_VRX_LAYER_TRUE@am__append_8 = \
@DEVICE_VRX_LAYER_TRUE@am__append_15 = \
@DEVICE_VRX_LAYER_TRUE@ $(dsl_cpe_control_debug_vrx_sources)
@INCLUDE_DSL_CPE_CLI_SUPPORT_TRUE@am__append_9 = \
@INCLUDE_DSL_CPE_CLI_SUPPORT_TRUE@am__append_16 = \
@INCLUDE_DSL_CPE_CLI_SUPPORT_TRUE@ $(dsl_cpe_control_cli_sources)
@INCLUDE_DSL_CPE_CLI_AUTOGEN_SUPPORT_TRUE@@INCLUDE_DSL_CPE_CLI_SUPPORT_TRUE@am__append_10 = \
@INCLUDE_DSL_CPE_CLI_AUTOGEN_SUPPORT_TRUE@@INCLUDE_DSL_CPE_CLI_SUPPORT_TRUE@am__append_17 = \
@INCLUDE_DSL_CPE_CLI_AUTOGEN_SUPPORT_TRUE@@INCLUDE_DSL_CPE_CLI_SUPPORT_TRUE@ $(dsl_cpe_control_cli_autogen_sources)
@DEVICE_DANUBE_TRUE@@INCLUDE_DSL_CPE_CLI_SUPPORT_TRUE@am__append_11 = \
@DEVICE_DANUBE_TRUE@@INCLUDE_DSL_CPE_CLI_SUPPORT_TRUE@am__append_18 = \
@DEVICE_DANUBE_TRUE@@INCLUDE_DSL_CPE_CLI_SUPPORT_TRUE@ $(dsl_cpe_control_cli_danube_sources)
@INCLUDE_DSL_CPE_CLI_SUPPORT_TRUE@@INCLUDE_DSL_JSON_PARSING_TRUE@am__append_12 = \
@INCLUDE_DSL_CPE_CLI_SUPPORT_TRUE@@INCLUDE_DSL_JSON_PARSING_TRUE@ $(dsl_cpe_configuration_parser_sources) \
@INCLUDE_DSL_CPE_CLI_SUPPORT_TRUE@@INCLUDE_DSL_JSON_PARSING_TRUE@ $(dsl_cpe_status_parser_sources)
@INCLUDE_DSL_CPE_CLI_SUPPORT_TRUE@am__append_19 = \
@INCLUDE_DSL_CPE_CLI_SUPPORT_TRUE@ $(dsl_cpe_configuration_parser_sources) \
@INCLUDE_DSL_CPE_CLI_SUPPORT_TRUE@ $(dsl_mgmt_if)
@DEVICE_VRX_TRUE@@INCLUDE_DSL_CPE_CLI_SUPPORT_TRUE@am__append_13 = \
@DEVICE_VRX_TRUE@@INCLUDE_DSL_CPE_CLI_SUPPORT_TRUE@am__append_20 = \
@DEVICE_VRX_TRUE@@INCLUDE_DSL_CPE_CLI_SUPPORT_TRUE@ $(dsl_cpe_control_cli_vrx_sources)
@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_interface.h
@DSL_CCA_DBG_MAX_LEVEL_SET_TRUE@am__append_15 = -DDSL_CCA_DBG_MAX_LEVEL=$(DSL_CCA_DBG_MAX_LEVEL_PRE)
@INCLUDE_DSL_STATUS_PARSER_TRUE@am__append_21 = -DDSL_VRX_DEVICE_VRX518
@INCLUDE_DSL_JSON_PARSING_TRUE@am__append_22 = -DINCLUDE_DSL_JSON_PARSING=1
@INCLUDE_DSL_JSON_PARSING_TRUE@am__append_23 = @LIBJSON_C_LIBRARY_PATH@
@INCLUDE_DSL_STATUS_UBUS_SUPPORT_TRUE@am__append_24 = @UBUS_LIBS_PATH@
@DSL_CCA_DBG_MAX_LEVEL_SET_TRUE@am__append_25 = -DDSL_CCA_DBG_MAX_LEVEL=$(DSL_CCA_DBG_MAX_LEVEL_PRE)
subdir = src
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
@ -141,7 +161,14 @@ am__dsl_cpe_control_SOURCES_DIST = dsl_cpe_control.c \
dsl_cpe_cli_pipe.c dsl_cpe_cli_access.c dsl_cpe_cli_console.c \
dsl_cpe_cli_access2.c dsl_cpe_cli_autogen.c \
dsl_cpe_cli_danube.c dsl_cpe_cli_mib.c \
dsl_cpe_configuration_parser.c dsl_cpe_status_parser.c \
dsl_cpe_configuration_parser.c \
@srcdir@/../dsl_mgmt_if/manager/dsl_mgmt_manager.c \
@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_parser.c \
@srcdir@/../dsl_mgmt_if/include/dsl_mgmt_interface.h \
@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_json.c \
@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_ubus.c \
@srcdir@/../dsl_mgmt_if/include/dsl_mgmt_ubus_interface.h \
@srcdir@/../dsl_mgmt_if/manager/dsl_mgmt_manager_objects_methods.c \
dsl_cpe_cli_vrx.c
@INCLUDE_DSL_CPE_DTI_SUPPORT_TRUE@am__objects_1 = dsl_cpe_control-dsl_cpe_dti.$(OBJEXT) \
@INCLUDE_DSL_CPE_DTI_SUPPORT_TRUE@ dsl_cpe_control-dsl_cpe_dti_vrx.$(OBJEXT)
@ -163,11 +190,17 @@ am__objects_11 = dsl_cpe_control-dsl_cpe_cli_danube.$(OBJEXT) \
dsl_cpe_control-dsl_cpe_cli_mib.$(OBJEXT)
@DEVICE_DANUBE_TRUE@@INCLUDE_DSL_CPE_CLI_SUPPORT_TRUE@am__objects_12 = $(am__objects_11)
@INCLUDE_DSL_JSON_PARSING_TRUE@am__objects_13 = dsl_cpe_control-dsl_cpe_configuration_parser.$(OBJEXT)
@INCLUDE_DSL_JSON_PARSING_TRUE@am__objects_14 = dsl_cpe_control-dsl_cpe_status_parser.$(OBJEXT)
@INCLUDE_DSL_CPE_CLI_SUPPORT_TRUE@@INCLUDE_DSL_JSON_PARSING_TRUE@am__objects_15 = $(am__objects_13) \
@INCLUDE_DSL_CPE_CLI_SUPPORT_TRUE@@INCLUDE_DSL_JSON_PARSING_TRUE@ $(am__objects_14)
am__objects_16 = dsl_cpe_control-dsl_cpe_cli_vrx.$(OBJEXT)
@DEVICE_VRX_TRUE@@INCLUDE_DSL_CPE_CLI_SUPPORT_TRUE@am__objects_17 = $(am__objects_16)
am__objects_14 = $(am__objects_13)
@INCLUDE_DSL_STATUS_PARSER_TRUE@am__objects_15 = dsl_cpe_control-dsl_mgmt_status_parser.$(OBJEXT)
@INCLUDE_DSL_JSON_PARSING_TRUE@am__objects_16 = dsl_cpe_control-dsl_mgmt_status_json.$(OBJEXT)
@INCLUDE_DSL_STATUS_UBUS_SUPPORT_TRUE@am__objects_17 = dsl_cpe_control-dsl_mgmt_status_ubus.$(OBJEXT) \
@INCLUDE_DSL_STATUS_UBUS_SUPPORT_TRUE@ dsl_cpe_control-dsl_mgmt_manager_objects_methods.$(OBJEXT)
am__objects_18 = dsl_cpe_control-dsl_mgmt_manager.$(OBJEXT) \
$(am__objects_15) $(am__objects_16) $(am__objects_17)
@INCLUDE_DSL_CPE_CLI_SUPPORT_TRUE@am__objects_19 = $(am__objects_14) \
@INCLUDE_DSL_CPE_CLI_SUPPORT_TRUE@ $(am__objects_18)
am__objects_20 = dsl_cpe_control-dsl_cpe_cli_vrx.$(OBJEXT)
@DEVICE_VRX_TRUE@@INCLUDE_DSL_CPE_CLI_SUPPORT_TRUE@am__objects_21 = $(am__objects_20)
am_dsl_cpe_control_OBJECTS = \
dsl_cpe_control-dsl_cpe_control.$(OBJEXT) \
dsl_cpe_control-dsl_cpe_init_cfg.$(OBJEXT) \
@ -175,12 +208,12 @@ am_dsl_cpe_control_OBJECTS = \
dsl_cpe_control-dsl_cpe_debug.$(OBJEXT) $(am__objects_1) \
$(am__objects_3) $(am__objects_5) $(am__objects_6) \
$(am__objects_8) $(am__objects_10) $(am__objects_12) \
$(am__objects_15) $(am__objects_17)
$(am__objects_19) $(am__objects_21)
dsl_cpe_control_OBJECTS = $(am_dsl_cpe_control_OBJECTS)
am__DEPENDENCIES_1 =
dsl_cpe_control_DEPENDENCIES = $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
dsl_cpe_control_LINK = $(CCLD) $(dsl_cpe_control_CFLAGS) $(CFLAGS) \
$(dsl_cpe_control_LDFLAGS) $(LDFLAGS) -o $@
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@ -314,6 +347,8 @@ EXTRA_APP_CFLAGS = @EXTRA_APP_CFLAGS@
GREP = @GREP@
IFXOS_INCLUDE_PATH = @IFXOS_INCLUDE_PATH@
IFXOS_LIBRARY_PATH = @IFXOS_LIBRARY_PATH@
IMA_BONDING_DRV_INCL_PATH = @IMA_BONDING_DRV_INCL_PATH@
IMA_BONDING_DRV_SUPPORT = @IMA_BONDING_DRV_SUPPORT@
INCLUDE_DEPRECATED = @INCLUDE_DEPRECATED@
INCLUDE_DEVICE_EXCEPTION_CODES = @INCLUDE_DEVICE_EXCEPTION_CODES@
INCLUDE_DSL_ADSL_MIB = @INCLUDE_DSL_ADSL_MIB@
@ -357,6 +392,7 @@ INCLUDE_DSL_G997_STATUS = @INCLUDE_DSL_G997_STATUS@
INCLUDE_DSL_JSON_PARSING = @INCLUDE_DSL_JSON_PARSING@
INCLUDE_DSL_PM = @INCLUDE_DSL_PM@
INCLUDE_DSL_RESOURCE_STATISTICS = @INCLUDE_DSL_RESOURCE_STATISTICS@
INCLUDE_DSL_STATUS_UBUS_SUPPORT = @INCLUDE_DSL_STATUS_UBUS_SUPPORT@
INCLUDE_DSL_SYSTEM_INTERFACE = @INCLUDE_DSL_SYSTEM_INTERFACE@
INCLUDE_DTI_AGENT_STANDALONE_SUPPORT = @INCLUDE_DTI_AGENT_STANDALONE_SUPPORT@
INCLUDE_FW_REQUEST_SUPPORT = @INCLUDE_FW_REQUEST_SUPPORT@
@ -373,6 +409,7 @@ LIBJSON_C_INCL_PATH = @LIBJSON_C_INCL_PATH@
LIBJSON_C_LIBRARY_PATH = @LIBJSON_C_LIBRARY_PATH@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBUBOX_INCL_PATH = @LIBUBOX_INCL_PATH@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
@ -392,6 +429,8 @@ SAFEC_SUPPORT = @SAFEC_SUPPORT@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
UBUS_LIBJSON_C_INCL_PATH = @UBUS_LIBJSON_C_INCL_PATH@
UBUS_LIBS_PATH = @UBUS_LIBS_PATH@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
@ -435,16 +474,18 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = -I@srcdir@ @DSL_DRIVER_INCL_PATH@ \
AM_CPPFLAGS = -I@srcdir@ -I@srcdir@/../dsl_mgmt_if/status \
-I@srcdir@/../dsl_mgmt_if/include @DSL_DRIVER_INCL_PATH@ \
@DSL_DEVICE_DRIVER_INCL_PATH@ @IFXOS_INCLUDE_PATH@ \
@DTI_INCL_PATH@ $(am__append_3) $(am__append_5)
@DTI_INCL_PATH@ $(am__append_3) $(am__append_6) \
$(am__append_7) $(am__append_9)
@DSL_CPE_STATIC_LINKING_FALSE@dsl_cpe_control_common_ldflags =
@DSL_CPE_STATIC_LINKING_TRUE@dsl_cpe_control_common_ldflags = -static
dsl_cpe_control_LDADD = -lpthread -lrt $(am__append_1) $(am__append_2) \
$(am__append_4) $(am__append_6)
$(am__append_4) $(am__append_5) $(am__append_8)
bin_SCRIPTS = ../scripts/alias_dsl_cpe.sh
@DEVICE_VRX_TRUE@dsl_cpe_control_bnd_sources = \
@DEVICE_VRX_TRUE@ dsl_cpe_bnd_vrx.c
@DEVICE_VRX_TRUE@ dsl_cpe_bnd_vrx.c
dsl_cpe_control_cli_sources = \
dsl_cpe_cli.c \
@ -452,14 +493,9 @@ dsl_cpe_control_cli_sources = \
dsl_cpe_cli_access.c \
dsl_cpe_cli_console.c
@INCLUDE_DSL_JSON_PARSING_FALSE@dsl_cpe_configuration_parser_sources =
@INCLUDE_DSL_JSON_PARSING_TRUE@dsl_cpe_configuration_parser_sources = \
@INCLUDE_DSL_JSON_PARSING_TRUE@ dsl_cpe_configuration_parser.c
@INCLUDE_DSL_JSON_PARSING_FALSE@dsl_cpe_status_parser_sources =
@INCLUDE_DSL_JSON_PARSING_TRUE@dsl_cpe_status_parser_sources = \
@INCLUDE_DSL_JSON_PARSING_TRUE@ dsl_cpe_status_parser.c
dsl_cpe_configuration_parser_sources = $(am__append_11)
dsl_mgmt_if = @srcdir@/../dsl_mgmt_if/manager/dsl_mgmt_manager.c \
$(am__append_10) $(am__append_12) $(am__append_13)
dsl_cpe_control_cli_autogen_sources = \
dsl_cpe_cli_access2.c \
dsl_cpe_cli_autogen.c
@ -484,27 +520,55 @@ dsl_cpe_control_debug_vrx_sources = \
dsl_cpe_control_SOURCES = dsl_cpe_control.c dsl_cpe_init_cfg.c \
dsl_cpe_linux.c dsl_cpe_debug.c $(dsl_cpe_control_dti_sources) \
$(am__append_7) $(am__append_8) $(dsl_cpe_control_bnd_sources) \
$(am__append_9) $(am__append_10) $(am__append_11) \
$(am__append_12) $(am__append_13)
EXTRA_DIST = ../LICENSE $(dsl_cpe_control_bnd_sources) \
$(dsl_cpe_control_cli_sources) $(dsl_cpe_control_dti_sources) \
$(am__append_14) $(am__append_15) \
$(dsl_cpe_control_bnd_sources) $(am__append_16) \
$(am__append_17) $(am__append_18) $(am__append_19) \
$(am__append_20)
EXTRA_DIST = \
../LICENSE \
$(dsl_cpe_control_bnd_sources) \
$(dsl_cpe_control_cli_sources) \
$(dsl_cpe_control_dti_sources) \
$(dsl_cpe_control_cli_danube_sources) \
$(dsl_cpe_control_cli_vrx_sources) \
$(dsl_cpe_control_debug_danube_sources) \
$(dsl_cpe_control_debug_vrx_sources) \
$(dsl_cpe_configuration_parser_sources) \
$(dsl_cpe_status_parser_sources) dsl_cpe_control.h \
dsl_cpe_init_cfg.h dsl_cpe_cli.h dsl_cpe_dti.h \
dsl_cpe_dti_vrx_ctx.h dsl_cpe_bnd_vrx.h dsl_cpe_cli_console.h \
dsl_cpe_simulator.c dsl_cpe_simulator.h dsl_cpe_win32.c \
dsl_cpe_win32.h dsl_cpe_os.h dsl_cpe_os_lint_map.h \
dsl_cpe_linux.h dsl_cpe_vxworks.c dsl_cpe_vxworks.h \
dsl_cpe_rtems.c dsl_cpe_rtems.h dsl_cpe_debug.h \
dsl_cpe_debug_danube.h dsl_cpe_debug_vrx.h \
../scripts/alias_dsl_cpe.sh ../scripts/dsl_cpe_pipe.sh \
../tools/pipe/dsl_pipe_client.h dsl_cpe_safec_wrapper.h \
$(am__append_14)
$(dsl_mgmt_if) \
dsl_cpe_control.h \
dsl_cpe_init_cfg.h \
dsl_cpe_cli.h \
dsl_cpe_dti.h \
dsl_cpe_dti_vrx_ctx.h \
dsl_cpe_bnd_vrx.h \
dsl_cpe_cli_console.h \
dsl_cpe_simulator.c \
dsl_cpe_simulator.h \
dsl_cpe_win32.c \
dsl_cpe_win32.h \
dsl_cpe_os.h \
dsl_cpe_os_lint_map.h \
dsl_cpe_linux.h \
dsl_cpe_vxworks.c \
dsl_cpe_vxworks.h \
dsl_cpe_rtems.c \
dsl_cpe_rtems.h \
dsl_cpe_debug.h \
dsl_cpe_debug_danube.h \
dsl_cpe_debug_vrx.h \
../scripts/alias_dsl_cpe.sh \
../scripts/dsl_cpe_pipe.sh \
../tools/pipe/dsl_pipe_client.h \
dsl_cpe_safec_wrapper.h \
@srcdir@/../dsl_mgmt_if/include/dsl_mgmt_manager_interface.h \
@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_parser.h \
@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_definitions.h \
dsl_cpe_configuration_parser.h \
@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_json.h \
@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_ubus.h \
@srcdir@/../dsl_mgmt_if/manager/dsl_mgmt_manager.h \
@srcdir@/../dsl_mgmt_if/manager/dsl_mgmt_manager_objects_methods.h
@ADD_APPL_CFLAGS_SET_FALSE@dsl_cpe_control_cflags =
@ADD_APPL_CFLAGS_SET_TRUE@dsl_cpe_control_cflags = $(ADD_APPL_CFLAGS)
@ADD_APPL_LDFLAGS_SET_FALSE@dsl_cpe_control_ldflags =
@ -515,30 +579,31 @@ EXTRA_DIST = ../LICENSE $(dsl_cpe_control_bnd_sources) \
@INCLUDE_DSL_CPE_DTI_SUPPORT_TRUE@dsl_cpe_control_dti_ldflags = @DTI_LIBRARY_PATH@
@SAFEC_SUPPORT_FALSE@dsl_cpe_control_safec_ldflags =
@SAFEC_SUPPORT_TRUE@dsl_cpe_control_safec_ldflags = @SAFEC_LIB_PATH@
@INCLUDE_DSL_JSON_PARSING_FALSE@dsl_cpe_control_json_parsing_cflags =
@INCLUDE_DSL_JSON_PARSING_TRUE@dsl_cpe_control_json_parsing_cflags = -DINCLUDE_DSL_JSON_PARSING=1
@INCLUDE_DSL_JSON_PARSING_FALSE@dsl_cpe_control_json_c_ldflags =
@INCLUDE_DSL_JSON_PARSING_TRUE@dsl_cpe_control_json_c_ldflags = @LIBJSON_C_LIBRARY_PATH@
dsl_cpe_control_json_parsing_cflags = $(am__append_21) \
$(am__append_22)
dsl_cpe_control_json_c_ldflags = $(am__append_23) $(am__append_24)
dsl_cpe_control_common_cflags = -Wall -Wimplicit -Wreturn-type \
-Wunused -Wundef -Wswitch -Wno-format -Wcomment \
-Wuninitialized -DLINUX -g3 $(am__append_15)
-Wuninitialized -DLINUX -g3 $(am__append_25)
# compile cflags
dsl_cpe_control_compile_cflags = $(EXTRA_APP_CFLAGS)
@CONFIG_USE_DSL_ADD_EXT_APPL_CFLAGS_TRUE@dsl_cpe_control_external_cflags = $(DSL_ADD_EXT_APPL_CFLAGS)
dsl_cpe_control_CFLAGS = $(dsl_cpe_control_common_cflags) \
$(dsl_cpe_control_cflags) \
$(dsl_cpe_control_compile_cflags) \
$(dsl_cpe_control_external_cflags) \
$(dsl_cpe_control_json_parsing_cflags)
dsl_cpe_control_CFLAGS = \
$(dsl_cpe_control_common_cflags) \
$(dsl_cpe_control_cflags) \
$(dsl_cpe_control_compile_cflags) \
$(dsl_cpe_control_external_cflags) \
$(dsl_cpe_control_json_parsing_cflags)
dsl_cpe_control_LDFLAGS = $(dsl_cpe_control_common_ldflags) \
$(dsl_cpe_control_ldflags) \
$(dsl_cpe_control_compile_cflags) \
$(dsl_cpe_control_ifxos_ldflags) \
$(dsl_cpe_control_dti_ldflags) \
$(dsl_cpe_control_safec_ldflags) \
$(dsl_cpe_control_json_c_ldflags)
dsl_cpe_control_LDFLAGS = \
$(dsl_cpe_control_common_ldflags) \
$(dsl_cpe_control_ldflags) \
$(dsl_cpe_control_compile_cflags) \
$(dsl_cpe_control_ifxos_ldflags) \
$(dsl_cpe_control_dti_ldflags) \
$(dsl_cpe_control_safec_ldflags) \
$(dsl_cpe_control_json_c_ldflags)
all: dsl_cpe_config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
@ -696,7 +761,11 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsl_cpe_control-dsl_cpe_dti_vrx.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsl_cpe_control-dsl_cpe_init_cfg.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsl_cpe_control-dsl_cpe_linux.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsl_cpe_control-dsl_cpe_status_parser.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsl_cpe_control-dsl_mgmt_manager.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsl_cpe_control-dsl_mgmt_manager_objects_methods.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsl_cpe_control-dsl_mgmt_status_json.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsl_cpe_control-dsl_mgmt_status_parser.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsl_cpe_control-dsl_mgmt_status_ubus.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@ -964,19 +1033,75 @@ dsl_cpe_control-dsl_cpe_configuration_parser.obj: dsl_cpe_configuration_parser.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dsl_cpe_control_CFLAGS) $(CFLAGS) -c -o dsl_cpe_control-dsl_cpe_configuration_parser.obj `if test -f 'dsl_cpe_configuration_parser.c'; then $(CYGPATH_W) 'dsl_cpe_configuration_parser.c'; else $(CYGPATH_W) '$(srcdir)/dsl_cpe_configuration_parser.c'; fi`
dsl_cpe_control-dsl_cpe_status_parser.o: dsl_cpe_status_parser.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dsl_cpe_control_CFLAGS) $(CFLAGS) -MT dsl_cpe_control-dsl_cpe_status_parser.o -MD -MP -MF $(DEPDIR)/dsl_cpe_control-dsl_cpe_status_parser.Tpo -c -o dsl_cpe_control-dsl_cpe_status_parser.o `test -f 'dsl_cpe_status_parser.c' || echo '$(srcdir)/'`dsl_cpe_status_parser.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dsl_cpe_control-dsl_cpe_status_parser.Tpo $(DEPDIR)/dsl_cpe_control-dsl_cpe_status_parser.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dsl_cpe_status_parser.c' object='dsl_cpe_control-dsl_cpe_status_parser.o' libtool=no @AMDEPBACKSLASH@
dsl_cpe_control-dsl_mgmt_manager.o: @srcdir@/../dsl_mgmt_if/manager/dsl_mgmt_manager.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dsl_cpe_control_CFLAGS) $(CFLAGS) -MT dsl_cpe_control-dsl_mgmt_manager.o -MD -MP -MF $(DEPDIR)/dsl_cpe_control-dsl_mgmt_manager.Tpo -c -o dsl_cpe_control-dsl_mgmt_manager.o `test -f '@srcdir@/../dsl_mgmt_if/manager/dsl_mgmt_manager.c' || echo '$(srcdir)/'`@srcdir@/../dsl_mgmt_if/manager/dsl_mgmt_manager.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dsl_cpe_control-dsl_mgmt_manager.Tpo $(DEPDIR)/dsl_cpe_control-dsl_mgmt_manager.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/../dsl_mgmt_if/manager/dsl_mgmt_manager.c' object='dsl_cpe_control-dsl_mgmt_manager.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dsl_cpe_control_CFLAGS) $(CFLAGS) -c -o dsl_cpe_control-dsl_cpe_status_parser.o `test -f 'dsl_cpe_status_parser.c' || echo '$(srcdir)/'`dsl_cpe_status_parser.c
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dsl_cpe_control_CFLAGS) $(CFLAGS) -c -o dsl_cpe_control-dsl_mgmt_manager.o `test -f '@srcdir@/../dsl_mgmt_if/manager/dsl_mgmt_manager.c' || echo '$(srcdir)/'`@srcdir@/../dsl_mgmt_if/manager/dsl_mgmt_manager.c
dsl_cpe_control-dsl_cpe_status_parser.obj: dsl_cpe_status_parser.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dsl_cpe_control_CFLAGS) $(CFLAGS) -MT dsl_cpe_control-dsl_cpe_status_parser.obj -MD -MP -MF $(DEPDIR)/dsl_cpe_control-dsl_cpe_status_parser.Tpo -c -o dsl_cpe_control-dsl_cpe_status_parser.obj `if test -f 'dsl_cpe_status_parser.c'; then $(CYGPATH_W) 'dsl_cpe_status_parser.c'; else $(CYGPATH_W) '$(srcdir)/dsl_cpe_status_parser.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dsl_cpe_control-dsl_cpe_status_parser.Tpo $(DEPDIR)/dsl_cpe_control-dsl_cpe_status_parser.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dsl_cpe_status_parser.c' object='dsl_cpe_control-dsl_cpe_status_parser.obj' libtool=no @AMDEPBACKSLASH@
dsl_cpe_control-dsl_mgmt_manager.obj: @srcdir@/../dsl_mgmt_if/manager/dsl_mgmt_manager.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dsl_cpe_control_CFLAGS) $(CFLAGS) -MT dsl_cpe_control-dsl_mgmt_manager.obj -MD -MP -MF $(DEPDIR)/dsl_cpe_control-dsl_mgmt_manager.Tpo -c -o dsl_cpe_control-dsl_mgmt_manager.obj `if test -f '@srcdir@/../dsl_mgmt_if/manager/dsl_mgmt_manager.c'; then $(CYGPATH_W) '@srcdir@/../dsl_mgmt_if/manager/dsl_mgmt_manager.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/../dsl_mgmt_if/manager/dsl_mgmt_manager.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dsl_cpe_control-dsl_mgmt_manager.Tpo $(DEPDIR)/dsl_cpe_control-dsl_mgmt_manager.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/../dsl_mgmt_if/manager/dsl_mgmt_manager.c' object='dsl_cpe_control-dsl_mgmt_manager.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dsl_cpe_control_CFLAGS) $(CFLAGS) -c -o dsl_cpe_control-dsl_cpe_status_parser.obj `if test -f 'dsl_cpe_status_parser.c'; then $(CYGPATH_W) 'dsl_cpe_status_parser.c'; else $(CYGPATH_W) '$(srcdir)/dsl_cpe_status_parser.c'; fi`
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dsl_cpe_control_CFLAGS) $(CFLAGS) -c -o dsl_cpe_control-dsl_mgmt_manager.obj `if test -f '@srcdir@/../dsl_mgmt_if/manager/dsl_mgmt_manager.c'; then $(CYGPATH_W) '@srcdir@/../dsl_mgmt_if/manager/dsl_mgmt_manager.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/../dsl_mgmt_if/manager/dsl_mgmt_manager.c'; fi`
dsl_cpe_control-dsl_mgmt_status_parser.o: @srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_parser.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dsl_cpe_control_CFLAGS) $(CFLAGS) -MT dsl_cpe_control-dsl_mgmt_status_parser.o -MD -MP -MF $(DEPDIR)/dsl_cpe_control-dsl_mgmt_status_parser.Tpo -c -o dsl_cpe_control-dsl_mgmt_status_parser.o `test -f '@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_parser.c' || echo '$(srcdir)/'`@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_parser.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dsl_cpe_control-dsl_mgmt_status_parser.Tpo $(DEPDIR)/dsl_cpe_control-dsl_mgmt_status_parser.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_parser.c' object='dsl_cpe_control-dsl_mgmt_status_parser.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dsl_cpe_control_CFLAGS) $(CFLAGS) -c -o dsl_cpe_control-dsl_mgmt_status_parser.o `test -f '@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_parser.c' || echo '$(srcdir)/'`@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_parser.c
dsl_cpe_control-dsl_mgmt_status_parser.obj: @srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_parser.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dsl_cpe_control_CFLAGS) $(CFLAGS) -MT dsl_cpe_control-dsl_mgmt_status_parser.obj -MD -MP -MF $(DEPDIR)/dsl_cpe_control-dsl_mgmt_status_parser.Tpo -c -o dsl_cpe_control-dsl_mgmt_status_parser.obj `if test -f '@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_parser.c'; then $(CYGPATH_W) '@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_parser.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_parser.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dsl_cpe_control-dsl_mgmt_status_parser.Tpo $(DEPDIR)/dsl_cpe_control-dsl_mgmt_status_parser.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_parser.c' object='dsl_cpe_control-dsl_mgmt_status_parser.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dsl_cpe_control_CFLAGS) $(CFLAGS) -c -o dsl_cpe_control-dsl_mgmt_status_parser.obj `if test -f '@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_parser.c'; then $(CYGPATH_W) '@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_parser.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_parser.c'; fi`
dsl_cpe_control-dsl_mgmt_status_json.o: @srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_json.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dsl_cpe_control_CFLAGS) $(CFLAGS) -MT dsl_cpe_control-dsl_mgmt_status_json.o -MD -MP -MF $(DEPDIR)/dsl_cpe_control-dsl_mgmt_status_json.Tpo -c -o dsl_cpe_control-dsl_mgmt_status_json.o `test -f '@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_json.c' || echo '$(srcdir)/'`@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_json.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dsl_cpe_control-dsl_mgmt_status_json.Tpo $(DEPDIR)/dsl_cpe_control-dsl_mgmt_status_json.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_json.c' object='dsl_cpe_control-dsl_mgmt_status_json.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dsl_cpe_control_CFLAGS) $(CFLAGS) -c -o dsl_cpe_control-dsl_mgmt_status_json.o `test -f '@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_json.c' || echo '$(srcdir)/'`@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_json.c
dsl_cpe_control-dsl_mgmt_status_json.obj: @srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_json.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dsl_cpe_control_CFLAGS) $(CFLAGS) -MT dsl_cpe_control-dsl_mgmt_status_json.obj -MD -MP -MF $(DEPDIR)/dsl_cpe_control-dsl_mgmt_status_json.Tpo -c -o dsl_cpe_control-dsl_mgmt_status_json.obj `if test -f '@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_json.c'; then $(CYGPATH_W) '@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_json.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_json.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dsl_cpe_control-dsl_mgmt_status_json.Tpo $(DEPDIR)/dsl_cpe_control-dsl_mgmt_status_json.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_json.c' object='dsl_cpe_control-dsl_mgmt_status_json.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dsl_cpe_control_CFLAGS) $(CFLAGS) -c -o dsl_cpe_control-dsl_mgmt_status_json.obj `if test -f '@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_json.c'; then $(CYGPATH_W) '@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_json.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_json.c'; fi`
dsl_cpe_control-dsl_mgmt_status_ubus.o: @srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_ubus.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dsl_cpe_control_CFLAGS) $(CFLAGS) -MT dsl_cpe_control-dsl_mgmt_status_ubus.o -MD -MP -MF $(DEPDIR)/dsl_cpe_control-dsl_mgmt_status_ubus.Tpo -c -o dsl_cpe_control-dsl_mgmt_status_ubus.o `test -f '@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_ubus.c' || echo '$(srcdir)/'`@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_ubus.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dsl_cpe_control-dsl_mgmt_status_ubus.Tpo $(DEPDIR)/dsl_cpe_control-dsl_mgmt_status_ubus.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_ubus.c' object='dsl_cpe_control-dsl_mgmt_status_ubus.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dsl_cpe_control_CFLAGS) $(CFLAGS) -c -o dsl_cpe_control-dsl_mgmt_status_ubus.o `test -f '@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_ubus.c' || echo '$(srcdir)/'`@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_ubus.c
dsl_cpe_control-dsl_mgmt_status_ubus.obj: @srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_ubus.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dsl_cpe_control_CFLAGS) $(CFLAGS) -MT dsl_cpe_control-dsl_mgmt_status_ubus.obj -MD -MP -MF $(DEPDIR)/dsl_cpe_control-dsl_mgmt_status_ubus.Tpo -c -o dsl_cpe_control-dsl_mgmt_status_ubus.obj `if test -f '@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_ubus.c'; then $(CYGPATH_W) '@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_ubus.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_ubus.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dsl_cpe_control-dsl_mgmt_status_ubus.Tpo $(DEPDIR)/dsl_cpe_control-dsl_mgmt_status_ubus.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_ubus.c' object='dsl_cpe_control-dsl_mgmt_status_ubus.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dsl_cpe_control_CFLAGS) $(CFLAGS) -c -o dsl_cpe_control-dsl_mgmt_status_ubus.obj `if test -f '@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_ubus.c'; then $(CYGPATH_W) '@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_ubus.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/../dsl_mgmt_if/status/dsl_mgmt_status_ubus.c'; fi`
dsl_cpe_control-dsl_mgmt_manager_objects_methods.o: @srcdir@/../dsl_mgmt_if/manager/dsl_mgmt_manager_objects_methods.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dsl_cpe_control_CFLAGS) $(CFLAGS) -MT dsl_cpe_control-dsl_mgmt_manager_objects_methods.o -MD -MP -MF $(DEPDIR)/dsl_cpe_control-dsl_mgmt_manager_objects_methods.Tpo -c -o dsl_cpe_control-dsl_mgmt_manager_objects_methods.o `test -f '@srcdir@/../dsl_mgmt_if/manager/dsl_mgmt_manager_objects_methods.c' || echo '$(srcdir)/'`@srcdir@/../dsl_mgmt_if/manager/dsl_mgmt_manager_objects_methods.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dsl_cpe_control-dsl_mgmt_manager_objects_methods.Tpo $(DEPDIR)/dsl_cpe_control-dsl_mgmt_manager_objects_methods.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/../dsl_mgmt_if/manager/dsl_mgmt_manager_objects_methods.c' object='dsl_cpe_control-dsl_mgmt_manager_objects_methods.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dsl_cpe_control_CFLAGS) $(CFLAGS) -c -o dsl_cpe_control-dsl_mgmt_manager_objects_methods.o `test -f '@srcdir@/../dsl_mgmt_if/manager/dsl_mgmt_manager_objects_methods.c' || echo '$(srcdir)/'`@srcdir@/../dsl_mgmt_if/manager/dsl_mgmt_manager_objects_methods.c
dsl_cpe_control-dsl_mgmt_manager_objects_methods.obj: @srcdir@/../dsl_mgmt_if/manager/dsl_mgmt_manager_objects_methods.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dsl_cpe_control_CFLAGS) $(CFLAGS) -MT dsl_cpe_control-dsl_mgmt_manager_objects_methods.obj -MD -MP -MF $(DEPDIR)/dsl_cpe_control-dsl_mgmt_manager_objects_methods.Tpo -c -o dsl_cpe_control-dsl_mgmt_manager_objects_methods.obj `if test -f '@srcdir@/../dsl_mgmt_if/manager/dsl_mgmt_manager_objects_methods.c'; then $(CYGPATH_W) '@srcdir@/../dsl_mgmt_if/manager/dsl_mgmt_manager_objects_methods.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/../dsl_mgmt_if/manager/dsl_mgmt_manager_objects_methods.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dsl_cpe_control-dsl_mgmt_manager_objects_methods.Tpo $(DEPDIR)/dsl_cpe_control-dsl_mgmt_manager_objects_methods.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/../dsl_mgmt_if/manager/dsl_mgmt_manager_objects_methods.c' object='dsl_cpe_control-dsl_mgmt_manager_objects_methods.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dsl_cpe_control_CFLAGS) $(CFLAGS) -c -o dsl_cpe_control-dsl_mgmt_manager_objects_methods.obj `if test -f '@srcdir@/../dsl_mgmt_if/manager/dsl_mgmt_manager_objects_methods.c'; then $(CYGPATH_W) '@srcdir@/../dsl_mgmt_if/manager/dsl_mgmt_manager_objects_methods.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/../dsl_mgmt_if/manager/dsl_mgmt_manager_objects_methods.c'; fi`
dsl_cpe_control-dsl_cpe_cli_vrx.o: dsl_cpe_cli_vrx.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dsl_cpe_control_CFLAGS) $(CFLAGS) -MT dsl_cpe_control-dsl_cpe_cli_vrx.o -MD -MP -MF $(DEPDIR)/dsl_cpe_control-dsl_cpe_cli_vrx.Tpo -c -o dsl_cpe_control-dsl_cpe_cli_vrx.o `test -f 'dsl_cpe_cli_vrx.c' || echo '$(srcdir)/'`dsl_cpe_cli_vrx.c

View file

@ -1,9 +1,9 @@
/******************************************************************************
Copyright 2018, Intel Corporation
Copyright (c) 2007-2015
Lantiq Beteiligungs-GmbH & Co. KG
Copyright 2016 - 2020 Intel Corporation
Copyright 2015 - 2016 Lantiq Beteiligungs-GmbH & Co. KG
Copyright 2009 - 2014 Lantiq Deutschland GmbH
Copyright 2007 - 2008 Infineon Technologies AG
For licensing information, see the file 'LICENSE' in the root folder of
this software module.
@ -185,44 +185,16 @@ static DSL_Error_t DSL_CPE_BND_BondingCheck(
return DSL_SUCCESS;
}
DSL_Error_t DSL_CPE_BND_RemotePafAvailableCheck(
static DSL_Error_t DSL_CPE_BND_LocalConfigCheck(
DSL_int_t fd,
DSL_uint16_t *pRemotePafAvailable)
DSL_uint16_t *pLocalPafAvailable,
DSL_uint16_t *pLocalImapAvailable)
{
DSL_int_t ret = 0;
DSL_BND_HsStatusGet_t status;
DSL_BND_Config_t bndConfig;
/* read bonding status */
memset (&status, 0, sizeof(DSL_BND_HsStatusGet_t));
ret = DSL_CPE_Ioctl(fd, DSL_FIO_BND_HS_STATUS_GET, (DSL_int_t)&status);
if ((ret < 0) || (status.accessCtl.nReturn < DSL_SUCCESS))
{
if (status.accessCtl.nReturn != DSL_ERR_NOT_SUPPORTED_BY_FIRMWARE)
{
DSL_CCA_DEBUG(DSL_CCA_DBG_ERR, (DSL_CPE_PREFIX
"BND - DSL_FIO_BND_HS_STATUS_GET ioctl call failed!" DSL_CPE_CRLF));
return DSL_ERROR;
}
}
/* Set RemotePafAvailable */
*pRemotePafAvailable = (DSL_uint16_t)status.data.nRemotePafSupported;
return DSL_SUCCESS;
}
static DSL_Error_t DSL_CPE_BND_LocalPafAvailableCheck(
DSL_int_t fd,
DSL_uint16_t *pLocalPafAvailable)
{
DSL_int_t ret = 0;
DSL_BND_ConfigGet_t bndConfig;
/* read bonding status */
memset (&bndConfig, 0, sizeof(DSL_BND_ConfigGet_t));
memset (&bndConfig, 0, sizeof(DSL_BND_Config_t));
ret = DSL_CPE_Ioctl(fd, DSL_FIO_BND_CONFIG_GET, (DSL_int_t)&bndConfig);
@ -235,6 +207,42 @@ static DSL_Error_t DSL_CPE_BND_LocalPafAvailableCheck(
}
*pLocalPafAvailable = (DSL_uint16_t)bndConfig.data.bPafEnable;
*pLocalImapAvailable = (DSL_uint16_t)bndConfig.data.bImapEnable;
return DSL_SUCCESS;
}
static DSL_Error_t DSL_CPE_BND_StatusCheck(
DSL_int_t fd,
DSL_uint16_t *pLocalPafSupported,
DSL_uint16_t *pLocalImapSupported,
DSL_uint16_t *pRemotePafSupported,
DSL_uint16_t *pRemoteImapSupported)
{
DSL_int_t ret = 0;
DSL_BND_StatusGet_t status;
/* read bonding status */
memset (&status, 0, sizeof(DSL_BND_StatusGet_t));
ret = DSL_CPE_Ioctl(fd, DSL_FIO_BND_STATUS_GET, (DSL_int_t)&status);
if ((ret < 0) || (status.accessCtl.nReturn < DSL_SUCCESS))
{
if (status.accessCtl.nReturn != DSL_ERR_NOT_SUPPORTED_BY_FIRMWARE)
{
DSL_CCA_DEBUG(DSL_CCA_DBG_ERR, (DSL_CPE_PREFIX
"BND - DSL_FIO_BND_STATUS_GET ioctl call failed!" DSL_CPE_CRLF));
return DSL_ERROR;
}
}
/* Set RemotePafAvailable */
*pLocalPafSupported = (DSL_uint16_t)status.data.nPafEnable;
*pLocalImapSupported = (DSL_uint16_t)status.data.nImapEnable;
*pRemotePafSupported = (DSL_uint16_t)status.data.nRemotePafSupported;
*pRemoteImapSupported = (DSL_uint16_t)status.data.nRemoteImapSupported;
return DSL_SUCCESS;
}
@ -446,6 +454,102 @@ DSL_Error_t DSL_CPE_BND_SyncDownloadFirmware(
return nErrorCode;
}
static DSL_boolean_t DSL_CPE_BND_IsAtmBndConfigured(
DSL_CPE_BND_Context_t *pBndCtx,
const DSL_uint32_t nLine)
{
DSL_Error_t nErrorCode = DSL_SUCCESS;
DSL_CPE_Control_Context_t *pContext = pBndCtx->pCtrlCtx;
DSL_VersionInformation_t ioctlVig;
DSL_SystemInterfaceStatus_t ioctlSysIf;
DSL_uint8_t nPlatformId = 0;
DSL_uint16_t PafConfigured = 0, ImapConfigured = 0;
DSL_int_t FwApplication = -1;
DSL_boolean_t bIsAtmBndPossible = DSL_FALSE;
nErrorCode = DSL_CPE_BND_LocalConfigCheck(
pContext->fd[nLine],
&PafConfigured, &ImapConfigured);
if (nErrorCode != DSL_SUCCESS)
{
DSL_CCA_DEBUG(DSL_CCA_DBG_ERR, (DSL_CPE_PREFIX
"BND - Local Imap Check failed, Device=%d" DSL_CPE_CRLF, nLine));
return bIsAtmBndPossible;
}
/* Check if IMA+ (ATM Bonding) is configured as enabled */
if (ImapConfigured)
{
/* Check if the line is in ADSL mode */
memset(&ioctlVig, 0x00, sizeof(DSL_VersionInformation_t));
if (DSL_CPE_Ioctl(pContext->fd[nLine],
DSL_FIO_VERSION_INFORMATION_GET, (DSL_int_t)&ioctlVig) >= 0)
{
DSL_CPE_FwInfoFromWhatstringGet(ioctlVig.data.DSL_ChipSetFWVersion,
&FwApplication, &nPlatformId);
/* The following application types are defined.
- 0x01: ADSL Annex A
- 0x02: ADSL Annex B
- 0x06: VDSL
- 0x07: VDSL with G.Vector support */
if (FwApplication == 0x1 || FwApplication == 0x2)
{
/* Check if TcLayer is ATM */
memset(&ioctlSysIf, 0x00, sizeof(DSL_SystemInterfaceStatus_t));
if (DSL_CPE_Ioctl (pContext->fd[nLine],
DSL_FIO_SYSTEM_INTERFACE_STATUS_GET, (int) &ioctlSysIf) >= 0)
{
if (ioctlSysIf.data.nTcLayer == DSL_TC_ATM)
{
bIsAtmBndPossible = DSL_TRUE;
}
}
}
}
}
return bIsAtmBndPossible;
}
static DSL_Error_t DSL_CPE_BND_DisabledLineRestart(
DSL_CPE_BND_Context_t *pBndCtx,
const DSL_uint32_t nLine)
{
DSL_Error_t nErrorCode = DSL_SUCCESS;
DSL_CPE_Control_Context_t *pContext = pBndCtx->pCtrlCtx;
DSL_LineState_t ioctlLineState;
DSL_AutobootControl_t pAcs;
memset(&ioctlLineState, 0x00, sizeof(DSL_LineState_t));
if (DSL_CPE_Ioctl (pContext->fd[nLine],
DSL_FIO_LINE_STATE_GET, (int) &ioctlLineState) >= 0)
{
if (ioctlLineState.data.nLineState == DSL_LINESTATE_DISABLED)
{
memset(&pAcs, 0x00, sizeof(DSL_AutobootControl_t));
pAcs.data.nCommand = DSL_AUTOBOOT_CTRL_RESTART_FULL;
if (DSL_CPE_Ioctl(pContext->fd[nLine],
DSL_FIO_AUTOBOOT_CONTROL_SET, (DSL_int_t) &pAcs) < 0)
{
DSL_CCA_DEBUG(DSL_CCA_DBG_ERR, (DSL_CPE_PREFIX
"BND - disabled line %d full restart failed!"DSL_CPE_CRLF,
nLine));
nErrorCode = DSL_ERROR;
}
}
}
else
{
DSL_CCA_DEBUG(DSL_CCA_DBG_ERR, (DSL_CPE_PREFIX
"BND - line %d status get failed!"DSL_CPE_CRLF,
nLine));
}
return nErrorCode;
}
DSL_Error_t DSL_CPE_BND_SystemInterfaceStatusHandle(
DSL_CPE_BND_Context_t *pBndCtx,
DSL_int_t fd,
@ -454,6 +558,7 @@ DSL_Error_t DSL_CPE_BND_SystemInterfaceStatusHandle(
DSL_Error_t nErrorCode = DSL_SUCCESS;
DSL_uint32_t nCurrentLine, nOppositeLine, nLine;
DSL_AutobootControl_t nAcs;
DSL_boolean_t bBondingSupported[DSL_CPE_MAX_DSL_ENTITIES] = { DSL_FALSE };
DSL_boolean_t bDisableLine = DSL_FALSE;
nCurrentLine = nDevice % DSL_CPE_DSL_ENTITIES;
@ -461,66 +566,122 @@ DSL_Error_t DSL_CPE_BND_SystemInterfaceStatusHandle(
#ifdef INCLUDE_SCRIPT_NOTIFICATION
nErrorCode = DSL_CPE_SetEnv("DSL_BONDING_STATUS",
pBndCtx->lineBondingConfig[nCurrentLine].nRemotePafAvailable ? "ACTIVE" : "INACTIVE");
(pBndCtx->lineBondingConfig[nCurrentLine].nLocalPafSupported ||
pBndCtx->lineBondingConfig[nCurrentLine].nLocalImapSupported ||
pBndCtx->lineBondingConfig[nCurrentLine].nRemotePafAvailable ||
pBndCtx->lineBondingConfig[nCurrentLine].nRemoteImapAvailable) ? "ACTIVE" : "INACTIVE");
if (nErrorCode != DSL_SUCCESS)
{
return nErrorCode;
}
#endif
#endif /* INCLUDE_SCRIPT_NOTIFICATION */
if(!pBndCtx->lineBondingConfig[nCurrentLine].nPafLineDisabled &&
!pBndCtx->lineBondingConfig[nOppositeLine].nPafLineDisabled)
{
bBondingSupported[nCurrentLine] = (DSL_boolean_t)(
pBndCtx->lineBondingConfig[nCurrentLine].nLocalPafSupported ||
pBndCtx->lineBondingConfig[nCurrentLine].nLocalImapSupported ||
pBndCtx->lineBondingConfig[nCurrentLine].nRemotePafAvailable ||
pBndCtx->lineBondingConfig[nCurrentLine].nRemoteImapAvailable
);
bBondingSupported[nOppositeLine] = (DSL_boolean_t)(
pBndCtx->lineBondingConfig[nOppositeLine].nLocalPafSupported ||
pBndCtx->lineBondingConfig[nOppositeLine].nLocalImapSupported ||
pBndCtx->lineBondingConfig[nOppositeLine].nRemotePafAvailable ||
pBndCtx->lineBondingConfig[nOppositeLine].nRemoteImapAvailable
);
/**
* One bonding and one non-bonding lines (CO) are connected to a
* bonding (CPE) board
*/
if(pBndCtx->lineBondingConfig[nCurrentLine].nFullInitReached &&
pBndCtx->lineBondingConfig[nCurrentLine].nRemotePafAvailable &&
bBondingSupported[nCurrentLine] == DSL_TRUE &&
pBndCtx->lineBondingConfig[nOppositeLine].nFullInitReached &&
!pBndCtx->lineBondingConfig[nOppositeLine].nRemotePafAvailable)
bBondingSupported[nOppositeLine] == DSL_FALSE)
{
bDisableLine = DSL_TRUE;
nLine = nOppositeLine;
DSL_CCA_DEBUG(DSL_CCA_DBG_MSG, (DSL_CPE_PREFIX
"BND - Device=%d PAF mismatch #2a (disable #%d)"
"BND - Device=%d BND support mismatch #2a (disable #%d)"
DSL_CPE_CRLF, nCurrentLine, nLine));
}
else if(pBndCtx->lineBondingConfig[nOppositeLine].nFullInitReached &&
pBndCtx->lineBondingConfig[nOppositeLine].nRemotePafAvailable &&
bBondingSupported[nOppositeLine] == DSL_TRUE &&
pBndCtx->lineBondingConfig[nCurrentLine].nFullInitReached &&
!pBndCtx->lineBondingConfig[nCurrentLine].nRemotePafAvailable)
bBondingSupported[nCurrentLine] == DSL_FALSE)
{
bDisableLine = DSL_TRUE;
nLine = nCurrentLine;
DSL_CCA_DEBUG(DSL_CCA_DBG_MSG, (DSL_CPE_PREFIX
"BND - Device=%d PAF mismatch #2b (disable #%d)"
"BND - Device=%d BND support mismatch #2b (disable #%d)"
DSL_CPE_CRLF, nCurrentLine, nLine));
}
/**
* 2 non-bonded CO lines are connected to a bonding (CPE) board
*/
else if(pBndCtx->lineBondingConfig[nCurrentLine].nFullInitReached &&
!pBndCtx->lineBondingConfig[nCurrentLine].nRemotePafAvailable)
bBondingSupported[nCurrentLine] == DSL_FALSE)
{
bDisableLine = DSL_TRUE;
nLine = nOppositeLine;
/* Skip disabling the other line if ATM Bonding is configured
(for ATM Bonding configuration both lines have to reach showtime
in a single mode at first in order to get ASM cells from the CO
which indicates that reconfiguration to IMA+ bonding is needed) */
if(DSL_CPE_BND_IsAtmBndConfigured(
pBndCtx, nCurrentLine) == DSL_FALSE)
{
bDisableLine = DSL_TRUE;
nLine = nOppositeLine;
DSL_CCA_DEBUG(DSL_CCA_DBG_MSG, (DSL_CPE_PREFIX
"BND - Device=%d PAF mismatch #1a (disable #%d)"
DSL_CPE_CRLF, nCurrentLine, nLine));
DSL_CCA_DEBUG(DSL_CCA_DBG_MSG, (DSL_CPE_PREFIX
"BND - Device=%d BND support mismatch #1a (disable #%d)"
DSL_CPE_CRLF, nCurrentLine, nLine));
}
else
{
/* restart the other line if previously disabled
to allow ATM Bonding */
if (DSL_CPE_BND_DisabledLineRestart(
pBndCtx, nOppositeLine) == DSL_ERROR)
{
DSL_CCA_DEBUG(DSL_CCA_DBG_ERR, (DSL_CPE_PREFIX
"BND - failed to recover line %d from DISABLED state!"DSL_CPE_CRLF,
nOppositeLine));
}
}
}
else if(pBndCtx->lineBondingConfig[nOppositeLine].nFullInitReached &&
!pBndCtx->lineBondingConfig[nOppositeLine].nRemotePafAvailable)
bBondingSupported[nOppositeLine] == DSL_FALSE)
{
bDisableLine = DSL_TRUE;
nLine = nCurrentLine;
/* Skip disabling the other line if ATM Bonding is configured
(for ATM Bonding configuration both lines have to reach showtime
in a single mode at first in order to get ASM cells from the CO
which indicates that reconfiguration to IMA+ bonding is needed) */
if(DSL_CPE_BND_IsAtmBndConfigured(
pBndCtx, nOppositeLine) == DSL_FALSE)
{
bDisableLine = DSL_TRUE;
nLine = nCurrentLine;
DSL_CCA_DEBUG(DSL_CCA_DBG_MSG, (DSL_CPE_PREFIX
"BND - Device=%d PAF mismatch #1b (disable #%d)"
DSL_CPE_CRLF, nCurrentLine, nLine));
DSL_CCA_DEBUG(DSL_CCA_DBG_MSG, (DSL_CPE_PREFIX
"BND - Device=%d BND support mismatch #1b (disable #%d)"
DSL_CPE_CRLF, nCurrentLine, nLine));
}
else
{
/* restart the other line if previously disabled
to allow ATM Bonding */
if (DSL_CPE_BND_DisabledLineRestart(
pBndCtx, nCurrentLine) == DSL_ERROR)
{
DSL_CCA_DEBUG(DSL_CCA_DBG_ERR, (DSL_CPE_PREFIX
"BND - failed to recover line %d from DISABLED state!"DSL_CPE_CRLF,
nCurrentLine));
}
}
}
}
@ -567,17 +728,33 @@ DSL_Error_t DSL_CPE_BND_LineStateHandle(
{
pBndCtx->lineBondingConfig[nCurrentLine].nFullInitReached = 1;
nErrorCode = DSL_CPE_BND_RemotePafAvailableCheck(fd,
(DSL_uint16_t *)&(pBndCtx->lineBondingConfig[nCurrentLine].nRemotePafAvailable));
nErrorCode = DSL_CPE_BND_StatusCheck(fd,
(DSL_uint16_t *)&(pBndCtx->
lineBondingConfig[nCurrentLine].nLocalPafSupported),
(DSL_uint16_t *)&(pBndCtx->
lineBondingConfig[nCurrentLine].nLocalImapSupported),
(DSL_uint16_t *)&(pBndCtx->
lineBondingConfig[nCurrentLine].nRemotePafAvailable),
(DSL_uint16_t *)&(pBndCtx->
lineBondingConfig[nCurrentLine].nRemoteImapAvailable));
if (nErrorCode != DSL_SUCCESS)
{
return nErrorCode;
}
DSL_CCA_DEBUG(DSL_CCA_DBG_ERR, (DSL_CPE_PREFIX
"BND - Device=%d remote PAF is %ssupported"
"BND - Device=%d: "
"local PAF is %ssupported, local IMA+ is %ssupported, "
"remote PAF is %ssupported, remote IMA+ is %ssupported"
DSL_CPE_CRLF, nCurrentLine,
pBndCtx->lineBondingConfig[nCurrentLine].nRemotePafAvailable ? "" : "not "));
pBndCtx->
lineBondingConfig[nCurrentLine].nLocalPafSupported ? "" : "not ",
pBndCtx->
lineBondingConfig[nCurrentLine].nLocalImapSupported ? "" : "not ",
pBndCtx->
lineBondingConfig[nCurrentLine].nRemotePafAvailable ? "" : "not ",
pBndCtx->
lineBondingConfig[nCurrentLine].nRemoteImapAvailable ? "" : "not "));
}
/* Link drop condition */
@ -590,6 +767,7 @@ DSL_Error_t DSL_CPE_BND_LineStateHandle(
pBndCtx->lineBondingConfig[nCurrentLine].nFullInitReached = 0;
pBndCtx->lineBondingConfig[nCurrentLine].nRemotePafAvailable = 0;
pBndCtx->lineBondingConfig[nCurrentLine].nRemoteImapAvailable = 0;
if (pBndCtx->lineBondingConfig[nOppositeLine].nPafLineDisabled)
{
@ -663,10 +841,12 @@ DSL_Error_t DSL_CPE_BND_LineStateHandle(
DSL_CCA_DEBUG(DSL_CCA_DBG_MSG, (DSL_CPE_PREFIX
"BND - Device=%d entering SHOWTIME_TC_SYNC" DSL_CPE_CRLF, nDevice));
/* Check CL information for RemotePafAvailable */
nErrorCode = DSL_CPE_BND_RemotePafAvailableCheck(
fd,
&(pBndCtx->lineMonitorStateMachine[nDevice].RemotePafAvailable));
/* Check CL information for Bonding */
nErrorCode = DSL_CPE_BND_StatusCheck(fd,
&(pBndCtx->lineMonitorStateMachine[nDevice].LocalPafSupported),
&(pBndCtx->lineMonitorStateMachine[nDevice].LocalImapSupported),
&(pBndCtx->lineMonitorStateMachine[nDevice].RemotePafAvailable),
&(pBndCtx->lineMonitorStateMachine[nDevice].RemoteImapAvailable));
if (nErrorCode != DSL_SUCCESS)
{
@ -675,10 +855,11 @@ DSL_Error_t DSL_CPE_BND_LineStateHandle(
return nErrorCode;
}
/* Check CL information for PafAvailable */
nErrorCode = DSL_CPE_BND_LocalPafAvailableCheck(
/* Check CL information */
nErrorCode = DSL_CPE_BND_LocalConfigCheck(
fd,
&(pBndCtx->lineMonitorStateMachine[nDevice].PafAvailable));
&(pBndCtx->lineMonitorStateMachine[nDevice].PafConfigured),
&(pBndCtx->lineMonitorStateMachine[nDevice].ImapConfigured));
if (nErrorCode != DSL_SUCCESS)
{
@ -688,31 +869,44 @@ DSL_Error_t DSL_CPE_BND_LineStateHandle(
}
/* enable/disable bonding */
if ((pBndCtx->lineMonitorStateMachine[nDevice].PafAvailable) &&
(pBndCtx->lineMonitorStateMachine[nDevice].RemotePafAvailable == 1) &&
(pBndCtx->lineMonitorStateMachine[nDevice].PafAggregate == 1) )
if (
/* PAF Bonding */
(
(pBndCtx->lineMonitorStateMachine[nDevice].PafConfigured) &&
((pBndCtx->lineMonitorStateMachine[nDevice].LocalPafSupported == 1) ||
((pBndCtx->lineMonitorStateMachine[nDevice].RemotePafAvailable == 1) &&
(pBndCtx->lineMonitorStateMachine[nDevice].PafAggregate == 1)))
)
||
/* IMA+ Bonding */
(
(pBndCtx->lineMonitorStateMachine[nDevice].ImapConfigured) &&
((pBndCtx->lineMonitorStateMachine[nDevice].LocalImapSupported == 1) ||
(pBndCtx->lineMonitorStateMachine[nDevice].RemoteImapAvailable == 1))
)
)
{
pBndCtx->lineMonitorStateMachine[nDevice].PafEnable = 1;
pBndCtx->lineMonitorStateMachine[nDevice].BndEnable = 1;
}
else
{
pBndCtx->lineMonitorStateMachine[nDevice].PafEnable = 0;
pBndCtx->lineMonitorStateMachine[nDevice].BndEnable = 0;
}
/* Check M/S status*/
/* Check Master/Slave status*/
if (pBndCtx->lineMonitorStateMachine[1-nDevice].MsStatus == DSL_BND_SLAVE)
{
pBndCtx->lineMonitorStateMachine[nDevice].MsStatus = DSL_BND_MASTER;
}
else
{
if (pBndCtx->lineMonitorStateMachine[1-nDevice].PafEnable != 1)
if (pBndCtx->lineMonitorStateMachine[1-nDevice].BndEnable != 1)
{
return DSL_SUCCESS;
}
if (pBndCtx->lineMonitorStateMachine[nDevice].PafEnable != 1)
if (pBndCtx->lineMonitorStateMachine[nDevice].BndEnable != 1)
{
return DSL_SUCCESS;
}
@ -726,13 +920,14 @@ DSL_Error_t DSL_CPE_BND_LineStateHandle(
"BND - Device=%d leaving SHOWTIME_TC_SYNC" DSL_CPE_CRLF, nDevice));
pBndCtx->lineMonitorStateMachine[nDevice].RemotePafAvailable = 0;
pBndCtx->lineMonitorStateMachine[nDevice].RemoteImapAvailable = 0;
if (pBndCtx->lineMonitorStateMachine[nDevice].MsStatus == DSL_BND_MASTER)
{
pBndCtx->lineMonitorStateMachine[nDevice].MsStatus = DSL_BND_SLAVE;
if ((pBndCtx->lineMonitorStateMachine[nDevice].PafEnable == 1) &&
(pBndCtx->lineMonitorStateMachine[1-nDevice].PafEnable == 1) )
if ((pBndCtx->lineMonitorStateMachine[nDevice].BndEnable == 1) &&
(pBndCtx->lineMonitorStateMachine[1-nDevice].BndEnable == 1) )
{
/* Exchange line mastership*/
pBndCtx->lineMonitorStateMachine[1-nDevice].MsStatus = DSL_BND_MASTER;
@ -740,12 +935,12 @@ DSL_Error_t DSL_CPE_BND_LineStateHandle(
}
else
{
if (pBndCtx->lineMonitorStateMachine[nDevice].PafEnable != 1)
if (pBndCtx->lineMonitorStateMachine[nDevice].BndEnable != 1)
{
return DSL_SUCCESS;
}
if (pBndCtx->lineMonitorStateMachine[1-nDevice].PafEnable != 1)
if (pBndCtx->lineMonitorStateMachine[1-nDevice].BndEnable != 1)
{
return DSL_SUCCESS;
}
@ -755,6 +950,31 @@ DSL_Error_t DSL_CPE_BND_LineStateHandle(
return DSL_SUCCESS;
}
DSL_void_t DSL_CPE_BND_GroupDataRatesHandle(
DSL_CPE_BND_Context_t *pBndCtx)
{
/* for CPE nBndGroup is always 0 */
const DSL_uint16_t nBndGroup = 0;
const DSL_uint16_t nChannel = 0;
if (pBndCtx == DSL_NULL || pBndCtx->pCtrlCtx == DSL_NULL)
{
return;
}
pBndCtx->nActualDataRateUs[nBndGroup] = 0;
pBndCtx->nActualDataRateDs[nBndGroup] = 0;
for (DSL_uint_t nDev = 0; nDev < DSL_CPE_DSL_ENTITIES; ++nDev)
{
pBndCtx->nActualDataRateUs[nBndGroup] +=
pBndCtx->pCtrlCtx->nChannelActualDataRate[nDev][DSL_UPSTREAM][nChannel];
pBndCtx->nActualDataRateDs[nBndGroup] +=
pBndCtx->pCtrlCtx->nChannelActualDataRate[nDev][DSL_DOWNSTREAM][nChannel];
}
return;
}
static DSL_Error_t DSL_CPE_BND_HwInit(
DSL_CPE_BND_Context_t *pBndCtx,
DSL_int_t fd)
@ -816,19 +1036,24 @@ DSL_Error_t DSL_CPE_BND_Start(
pBndCtx->lineMonitorStateMachine[0].Port = 0;
pBndCtx->lineMonitorStateMachine[1].Port = 1;
for (i = 0; i < DSL_CPE_DSL_ENTITIES; i++)
for (i = 0; i < DSL_CPE_DSL_ENTITIES; ++i)
{
pBndCtx->lineMonitorStateMachine[i].PafAvailable = -1;
pBndCtx->lineMonitorStateMachine[i].LocalPafSupported = -1;
pBndCtx->lineMonitorStateMachine[i].LocalImapSupported = -1;
pBndCtx->lineMonitorStateMachine[i].RemotePafAvailable = -1;
pBndCtx->lineMonitorStateMachine[i].PafAggregate = -1;
pBndCtx->lineMonitorStateMachine[i].PafEnable = 0;
pBndCtx->lineMonitorStateMachine[i].TxDataRate = 0;
pBndCtx->lineMonitorStateMachine[i].RemoteImapAvailable = -1;
pBndCtx->lineMonitorStateMachine[i].PafAggregate = -1;
pBndCtx->lineMonitorStateMachine[i].BndEnable = 0;
pBndCtx->lineMonitorStateMachine[i].TxDataRate = 0;
pBndCtx->lineMonitorStateMachine[i].MsStatus = DSL_BND_SLAVE;
pBndCtx->lineBondingConfig[i].nFullInitReached = 0;
pBndCtx->lineBondingConfig[i].nFullInitReached = 0;
pBndCtx->lineBondingConfig[i].nLocalPafSupported = 0;
pBndCtx->lineBondingConfig[i].nLocalImapSupported = 0;
pBndCtx->lineBondingConfig[i].nRemotePafAvailable = 0;
pBndCtx->lineBondingConfig[i].nPafLineDisabled = 0;
pBndCtx->lineBondingConfig[i].nRemoteImapAvailable = 0;
pBndCtx->lineBondingConfig[i].nPafLineDisabled = 0;
}
memset(&(pBndCtx->remoteDiscoveryCode), 0x0, 6);
@ -838,6 +1063,12 @@ DSL_Error_t DSL_CPE_BND_Start(
pBndCtx->nPafLineDisabled = -1;
pBndCtx->pCtrlCtx = pCtrlCtx;
for (i = 0; i < DSL_CPE_BND_MAX_GROUPS; ++i)
{
pBndCtx->nActualDataRateUs[i] = 0;
pBndCtx->nActualDataRateDs[i] = 0;
}
/* Initialize Bonding HW*/
ret = DSL_CPE_BND_HwInit(pBndCtx, fd);

View file

@ -1,7 +1,9 @@
/******************************************************************************
Copyright (c) 2007-2015
Lantiq Beteiligungs-GmbH & Co. KG
Copyright 2016 - 2020 Intel Corporation
Copyright 2015 - 2016 Lantiq Beteiligungs-GmbH & Co. KG
Copyright 2009 - 2014 Lantiq Deutschland GmbH
Copyright 2007 - 2008 Infineon Technologies AG
For licensing information, see the file 'LICENSE' in the root folder of
this software module.
@ -20,6 +22,8 @@ extern "C" {
*/
#define DSL_CPE_BND_TX_RATE_RATIO_UNITY (0x0100)
/* Number of bonding groups (for CPE it's always 1) */
#define DSL_CPE_BND_MAX_GROUPS 1
typedef enum
{
@ -32,10 +36,14 @@ typedef enum
*/
typedef struct {
DSL_uint16_t Port;
DSL_uint16_t PafAvailable;
DSL_uint16_t PafConfigured;
DSL_uint16_t ImapConfigured;
DSL_uint16_t LocalPafSupported;
DSL_uint16_t LocalImapSupported;
DSL_uint16_t RemotePafAvailable;
DSL_uint16_t RemoteImapAvailable;
DSL_uint16_t PafAggregate;
DSL_uint16_t PafEnable;
DSL_uint16_t BndEnable;
DSL_uint32_t TxDataRate;
DSL_CPE_BND_MsStatus_t MsStatus;
} DSL_CPE_BND_LineMonitorStateMachine_t;
@ -54,16 +62,46 @@ typedef struct {
link activation handling state. */
DSL_boolean_t nFullInitReached;
/**
Indicates that a line received information from the FW that PAF is supported
SET : It will be set (to 1) for the current line if nFullInitReached for
the current line equals 1 and BondingAvailableCheck indicates that
the FW supports PAF (PTM Bonding)
RESET: It will be (unconditionally) reset (to 0) for the current line in
case of link drop happens on current line.
\note Link drop condition will be detected at its earliest possible
link activation handling state. */
DSL_boolean_t nLocalPafSupported;
/**
Indicates that a line received information from the FW that IMA+ is supported
SET : It will be set (to 1) for the current line if nFullInitReached for
the current line equals 1 and BondingAvailableCheck indicates that
the FW supports IMA+ (ATM Bonding)
RESET: It will be (unconditionally) reset (to 0) for the current line in
case of link drop happens on current line.
\note Link drop condition will be detected at its earliest possible
link activation handling state. */
DSL_boolean_t nLocalImapSupported;
/**
Indicates that a line received information from CO side that PAF is supported
SET : It will be set (to 1) for the current line if nFullInitReached for
the current line equals 1 and RemotePafAvailableCheck indicates that
the CO supports PAF (bonding)
the CO supports PAF (PTM bonding)
RESET: It will be (unconditionally) reset (to 0) for the current line in
case of link drop happens on current line.
\note Link drop condition will be detected at its earliest possible
link activation handling state. */
DSL_boolean_t nRemotePafAvailable;
/**
Indicates that a line received information from CO side that IMA+ is supported
SET : It will be set (to 1) for the current line if nFullInitReached for
the current line equals 1 and RemoteImapAvailableCheck indicates that
the CO supports IMA+ (ATM bonding)
RESET: It will be (unconditionally) reset (to 0) for the current line in
case of link drop happens on current line.
\note Link drop condition will be detected at its earliest possible
link activation handling state. */
DSL_boolean_t nRemoteImapAvailable;
/**
Indicates that a line was disabled due to PAF configuration mismatch between both lines.
SET : It will be set (to 1) for a line in case of PAF (bonding) mismatch is
detected. Depending on the current line activation process it could
@ -111,6 +149,18 @@ typedef struct
Line num was disabled by absent Paf*/
DSL_int8_t nPafLineDisabled;
DSL_CPE_BND_LineBondingConfiguration_t lineBondingConfig[DSL_CPE_MAX_DSL_ENTITIES];
/**
Actual Group Data Rate - US
NOTE: this is a sum of the upstream data rates (ActualDataRate) which are
provided by the "G997_ChannelStatusGet"/"g997csg" respective ioctl "DSL_FIO_G997_CHANNEL_STATUS_GET" for the lines which are included
in the bonding group*/
DSL_uint32_t nActualDataRateUs[DSL_CPE_BND_MAX_GROUPS];
/**
Actual Group Data Rate - DS
NOTE: this is a sum of the downstream data rates (ActualDataRate) which are
provided by the "G997_ChannelStatusGet"/"g997csg" respective ioctl "DSL_FIO_G997_CHANNEL_STATUS_GET" for the lines which are included
in the bonding group*/
DSL_uint32_t nActualDataRateDs[DSL_CPE_BND_MAX_GROUPS];
} DSL_CPE_BND_Context_t;
/*
@ -126,12 +176,6 @@ DSL_Error_t DSL_CPE_BND_Start(
DSL_void_t DSL_CPE_BND_Stop(
DSL_CPE_BND_Context_t *pBndContext);
/*
Function to check the remote PAF status
*/
DSL_Error_t DSL_CPE_BND_RemotePafAvailableCheck(
DSL_int_t fd,
DSL_uint16_t *pRemotePafAvailable);
/*
Bonding handling for the Autoboot Restart Wait state
*/
@ -157,6 +201,12 @@ DSL_Error_t DSL_CPE_BND_LineStateHandle(
DSL_LineStateValue_t nLineState,
DSL_LineStateValue_t nPrevLineState);
/*
Bonding handling for the Group Data Rates
*/
DSL_void_t DSL_CPE_BND_GroupDataRatesHandle(
DSL_CPE_BND_Context_t *pBndCtx);
/*
Bonding handling for the System Interface status notification
*/

View file

@ -1,6 +1,6 @@
/******************************************************************************
Copyright 2016 - 2019 Intel Corporation
Copyright 2016 - 2020 Intel Corporation
Copyright 2015 - 2016 Lantiq Beteiligungs-GmbH & Co. KG
Copyright 2009 - 2014 Lantiq Deutschland GmbH
Copyright 2007 - 2008 Infineon Technologies AG
@ -3413,6 +3413,7 @@ static const DSL_char_t g_sG997csg[] =
"- DSL_uint32_t ActualNetDataRate" DSL_CPE_CRLF
"- DSL_uint16_t ActualImpulseNoiseProtectionRein" DSL_CPE_CRLF
"- DSL_uint16_t ActualImpulseNoiseProtectionNoErasure" DSL_CPE_CRLF
"- DSL_boolean_t ImpulseNoiseProtectionReportingMode" DSL_CPE_CRLF
DSL_CPE_CRLF "";
#else
"";
@ -3451,7 +3452,8 @@ DSL_CLI_LOCAL DSL_int_t DSL_CPE_CLI_G997_ChannelStatusGet(
"PreviousDataRate=%u ActualInterleaveDelay=%u "
"ActualImpulseNoiseProtection=%hu ActualNetDataRate=%u "
"ActualImpulseNoiseProtectionRein=%hu "
"ActualImpulseNoiseProtectionNoErasure=%hu" DSL_CPE_CRLF,
"ActualImpulseNoiseProtectionNoErasure=%hu "
"ImpulseNoiseProtectionReportingMode=%d" DSL_CPE_CRLF,
DSL_CPE_RET_VAL(pData.accessCtl.nReturn),
pData.nChannel, pData.nDirection,
(DSL_uint32_t)pData.data.ActualDataRate,(DSL_uint32_t) pData.data.PreviousDataRate,
@ -3459,7 +3461,8 @@ DSL_CLI_LOCAL DSL_int_t DSL_CPE_CLI_G997_ChannelStatusGet(
(DSL_uint32_t)pData.data.ActualImpulseNoiseProtection,
(DSL_uint32_t)pData.data.ActualNetDataRate,
(DSL_uint32_t)pData.data.ActualImpulseNoiseProtectionRein,
(DSL_uint32_t)pData.data.ActualImpulseNoiseProtectionNoErasure);
(DSL_uint32_t)pData.data.ActualImpulseNoiseProtectionNoErasure,
pData.data.ImpulseNoiseProtectionReportingMode);
}
return 0;
@ -12154,6 +12157,57 @@ DSL_CLI_LOCAL DSL_int_t DSL_CPE_CLI_FilterDetectionDataGet(
return 0;
}
static const DSL_char_t g_sFdbdg[] =
#ifndef DSL_CPE_DEBUG_DISABLE
"Long Form: %s" DSL_CPE_CRLF
"Short Form: %s" DSL_CPE_CRLF
DSL_CPE_CRLF
"%s"
"Output Parameter" DSL_CPE_CRLF
"- DSL_Error_t nReturn" DSL_CPE_CRLF
"- DSL_FilterDetectionInitResult_t nInitResult" DSL_CPE_CRLF
" DSL_MFD_INIT_RESULT_UNKNOWN = 0" DSL_CPE_CRLF
" DSL_MFD_INIT_RESULT_FILTER_NO = 1" DSL_CPE_CRLF
" DSL_MFD_INIT_RESULT_FILTER_YES = 2" DSL_CPE_CRLF
" DSL_MFD_INIT_RESULT_UNDONE = 3" DSL_CPE_CRLF
"- DSL_int16_t nMetric3" DSL_CPE_CRLF
DSL_CPE_CRLF "";
#else
"";
#endif
DSL_CLI_LOCAL DSL_int_t DSL_CPE_CLI_FilterDetectionBasicDataGet(
DSL_int_t fd,
DSL_char_t *pCommands,
DSL_CPE_File_t *out)
{
DSL_int_t ret = 0;
DSL_FilterDetectionBasic_t pData;
if (DSL_CPE_CLI_CheckParamNumber(pCommands, 0, DSL_CLI_EQUALS) == DSL_FALSE)
{
return -1;
}
memset(&pData, 0x0, sizeof(DSL_FilterDetectionBasic_t));
ret = DSL_CPE_Ioctl (fd, DSL_FIO_FILTER_DETECTION_BASIC_DATA_GET, (int) &pData);
if ((ret < 0) && (pData.accessCtl.nReturn < DSL_SUCCESS))
{
DSL_CPE_FPrintf (out, sFailureReturn, DSL_CPE_RET_VAL(pData.accessCtl.nReturn));
}
else
{
DSL_CPE_FPrintf (out, "nReturn=%d "
"nInitResult=%u nMetric3=%hd" DSL_CPE_CRLF,
pData.accessCtl.nReturn,
pData.data.nInitResult, pData.data.nMetric3);
}
return 0;
}
#endif /* #ifdef INCLUDE_DSL_FILTER_DETECTION*/
static const DSL_char_t g_sHsdg[] =
@ -13270,6 +13324,7 @@ DSL_void_t DSL_CPE_CLI_AccessCommandsRegister(DSL_void_t)
#ifdef INCLUDE_DSL_FILTER_DETECTION
DSL_CPE_CLI_CMD_ADD_DEVICE_1ARG ("fddg", "FilterDetectionDataGet", DSL_CPE_CLI_FilterDetectionDataGet, g_sFddg);
DSL_CPE_CLI_CMD_ADD_DEVICE_1ARG ("fdbdg", "FilterDetectionBasicDataGet", DSL_CPE_CLI_FilterDetectionBasicDataGet, g_sFdbdg);
#endif /* #ifdef INCLUDE_DSL_FILTER_DETECTION*/
DSL_CPE_CLI_CMD_ADD_DEVICE_1ARG ("hsdg", "HybridSelectionDataGet", DSL_CPE_CLI_HybridSelectionDataGet, g_sHsdg);

View file

@ -1,6 +1,6 @@
/******************************************************************************
Copyright 2016 - 2019 Intel Corporation
Copyright 2016 - 2020 Intel Corporation
Copyright 2015 - 2016 Lantiq Beteiligungs-GmbH & Co. KG
Copyright 2009 - 2014 Lantiq Deutschland GmbH
Copyright 2007 - 2008 Infineon Technologies AG
@ -495,7 +495,7 @@ static const DSL_char_t g_sAufg[] =
"%s"
"- DSL_char_t xdsl_firmware[1-256]" DSL_CPE_CRLF
/*TODO: Handle OnChipBonding */
#if defined(INCLUDE_DSL_BONDING)
#if defined(INCLUDE_DSL_BONDING)
"- DSL_char_t xdsl_firmware2[1-256]"DSL_CPE_CRLF
#endif
DSL_CPE_CRLF "";
@ -551,7 +551,7 @@ static const DSL_char_t g_sAlf[] =
"%s"
"- DSL_char_t xdsl_firmware[1-256] (Attention: Use absolute firmware path only"DSL_CPE_CRLF
/*TODO: Handle On chip bonding */
#if defined(INCLUDE_DSL_BONDING)
#if defined(INCLUDE_DSL_BONDING)
"- DSL_char_t xdsl_firmware2[1-256] (Attention: Use absolute firmware path only"DSL_CPE_CRLF
#endif
DSL_CPE_CRLF
@ -1411,8 +1411,10 @@ static const DSL_char_t g_sG997upbosg[] =
" AELE_MODE_3 = 3" DSL_CPE_CRLF
"- DSL_uint16_t UpboElmt" DSL_CPE_CRLF
"- DSL_int16_t RxThreshDs" DSL_CPE_CRLF
"- DSL_int16_t[" _MKSTR(DSL_G997_MAX_NUMBER_OF_BANDS) "] nKleOPb" DSL_CPE_CRLF
"- DSL_int16_t[" _MKSTR(DSL_G997_MAX_NUMBER_OF_BANDS) "] nKleRPb" DSL_CPE_CRLF
"- DSL_uint16_t[" _MKSTR(DSL_G997_MAX_NUMBER_OF_BANDS) "] nKleOPb" DSL_CPE_CRLF
"- DSL_uint16_t[" _MKSTR(DSL_G997_MAX_NUMBER_OF_BANDS) "] nKleRPb" DSL_CPE_CRLF
"- DSL_uint16_t nKl0EstimO" DSL_CPE_CRLF
"- DSL_uint16_t nKl0EstimR" DSL_CPE_CRLF
DSL_CPE_CRLF "";
#else
"";
@ -1455,6 +1457,9 @@ DSL_CLI_LOCAL DSL_int_t DSL_CPE_CLI_G997_UsPowerBackOffStatusGet(
DSL_CPE_FPrintf(out, "nKleRPb[%d]=%hu ", i, pData.data.nKl0EstimRPb[i]);
}
DSL_CPE_FPrintf(out, "nKl0EstimO=%hu nKl0EstimR=%hu",
pData.data.nKl0EstimO, pData.data.nKl0EstimR);
DSL_CPE_FPrintf(out, DSL_CPE_CRLF );
}
@ -2133,13 +2138,19 @@ DSL_CLI_LOCAL DSL_int_t DSL_CPE_CLI_BND_DBG_StatusGet(
}
DSL_CPE_FPrintf (out, "\"");
DSL_CPE_FPrintf (out, "nMsStatus=%u nPafAvailable=%u nRemotePafAvailable=%u "
"nPafAggregate=%u nPafEnable=%u nTxDataRate=%u"DSL_CPE_CRLF,
DSL_CPE_FPrintf (out, "nMsStatus=%u nPafConfigured=%u nImapConfigured=%u "
"nLocalPafSupported=%u nLocalImapSupported=%u "
"nRemotePafAvailable=%u nRemoteImapAvailable=%u "
"nPafAggregate=%u nBndEnable=%u nTxDataRate=%u"DSL_CPE_CRLF,
pBnd->lineMonitorStateMachine[nDevice].MsStatus,
pBnd->lineMonitorStateMachine[nDevice].PafAvailable,
pBnd->lineMonitorStateMachine[nDevice].PafConfigured,
pBnd->lineMonitorStateMachine[nDevice].ImapConfigured,
pBnd->lineMonitorStateMachine[nDevice].LocalPafSupported,
pBnd->lineMonitorStateMachine[nDevice].LocalImapSupported,
pBnd->lineMonitorStateMachine[nDevice].RemotePafAvailable,
pBnd->lineMonitorStateMachine[nDevice].RemoteImapAvailable,
pBnd->lineMonitorStateMachine[nDevice].PafAggregate,
pBnd->lineMonitorStateMachine[nDevice].PafEnable,
pBnd->lineMonitorStateMachine[nDevice].BndEnable,
pBnd->lineMonitorStateMachine[nDevice].TxDataRate);
return 0;
@ -2161,6 +2172,9 @@ static const DSL_char_t g_sBNDcs[] =
"- DSL_boolean_t bPafEnable" DSL_CPE_CRLF
" disable = 0" DSL_CPE_CRLF
" enable = 1" DSL_CPE_CRLF
"- DSL_boolean_t bImapEnable" DSL_CPE_CRLF
" disable = 0" DSL_CPE_CRLF
" enable = 1" DSL_CPE_CRLF
DSL_CPE_CRLF
"Output Parameter" DSL_CPE_CRLF
"- DSL_Error_t nReturn" DSL_CPE_CRLF
@ -2176,21 +2190,23 @@ DSL_CLI_LOCAL DSL_int_t DSL_CPE_CLI_BND_ConfigSet(
DSL_CPE_File_t *out)
{
DSL_int_t ret = 0;
DSL_BND_ConfigSet_t pData;
DSL_BND_Config_t pData;
DSL_uint_t nDslMode = 0;
DSL_uint_t pafEnable = 0;
DSL_uint_t imapEnable = 0;
if (DSL_CPE_CLI_CheckParamNumber(pCommands, 2, DSL_CLI_EQUALS) == DSL_FALSE)
if (DSL_CPE_CLI_CheckParamNumber(pCommands, 3, DSL_CLI_EQUALS) == DSL_FALSE)
{
return -1;
}
memset(&pData, 0x0, sizeof(DSL_BND_ConfigSet_t));
memset(&pData, 0x0, sizeof(DSL_BND_Config_t));
sscanf (pCommands, "%u %u", &nDslMode, &pafEnable);
sscanf (pCommands, "%u %u %u", &nDslMode, &pafEnable, &imapEnable);
pData.nDslMode = nDslMode;
pData.data.bPafEnable = pafEnable;
pData.data.bImapEnable = imapEnable;
ret = DSL_CPE_Ioctl (fd, DSL_FIO_BND_CONFIG_SET, (int) &pData);
@ -2232,6 +2248,9 @@ static const DSL_char_t g_sBNDcg[] =
"- DSL_boolean_t bPafEnable" DSL_CPE_CRLF
" false = 0" DSL_CPE_CRLF
" true = 1" DSL_CPE_CRLF
"- DSL_boolean_t bImapEnable" DSL_CPE_CRLF
" disable = 0" DSL_CPE_CRLF
" enable = 1" DSL_CPE_CRLF
DSL_CPE_CRLF "";
#else
"";
@ -2243,7 +2262,7 @@ DSL_CLI_LOCAL DSL_int_t DSL_CPE_CLI_BND_ConfigGet(
DSL_CPE_File_t *out)
{
DSL_int_t ret = 0;
DSL_BND_ConfigGet_t pData;
DSL_BND_Config_t pData;
DSL_uint_t nDslMode = 0;
if (DSL_CPE_CLI_CheckParamNumber(pCommands, 1, DSL_CLI_EQUALS) == DSL_FALSE)
@ -2251,7 +2270,7 @@ DSL_CLI_LOCAL DSL_int_t DSL_CPE_CLI_BND_ConfigGet(
return -1;
}
memset(&pData, 0x0, sizeof(DSL_BND_ConfigGet_t));
memset(&pData, 0x0, sizeof(DSL_BND_Config_t));
sscanf (pCommands, "%u", &nDslMode);
@ -2265,14 +2284,139 @@ DSL_CLI_LOCAL DSL_int_t DSL_CPE_CLI_BND_ConfigGet(
}
else
{
DSL_CPE_FPrintf (out, DSL_CPE_RET"nDslMode=%u bPafEnable=%u" DSL_CPE_CRLF,
DSL_CPE_RET_VAL(pData.accessCtl.nReturn), pData.nDslMode, pData.data.bPafEnable);
DSL_CPE_FPrintf (out, DSL_CPE_RET"nDslMode=%u bPafEnable=%u bImapEnable=%u" DSL_CPE_CRLF,
DSL_CPE_RET_VAL(pData.accessCtl.nReturn), pData.nDslMode,
pData.data.bPafEnable, pData.data.bImapEnable);
}
return 0;
}
#endif /* INCLUDE_DSL_CONFIG_GET*/
static const DSL_char_t g_sBNDsg[] =
#ifndef DSL_CPE_DEBUG_DISABLE
"Long Form: %s" DSL_CPE_CRLF
"Short Form: %s" DSL_CPE_CRLF
DSL_CPE_CRLF
"Input Parameter" DSL_CPE_CRLF
"%s"
DSL_CPE_CRLF
"Output Parameter" DSL_CPE_CRLF
"- DSL_Error_t nReturn" DSL_CPE_CRLF
"%s"
"- DSL_boolean_t bPafEnable" DSL_CPE_CRLF
" false = 0" DSL_CPE_CRLF
" true = 1" DSL_CPE_CRLF
"- DSL_boolean_t bImapEnable" DSL_CPE_CRLF
" disable = 0" DSL_CPE_CRLF
" enable = 1" DSL_CPE_CRLF
"- DSL_boolean_t bRemotePafSupported" DSL_CPE_CRLF
" disable = 0" DSL_CPE_CRLF
" enable = 1" DSL_CPE_CRLF
"- DSL_boolean_t bRemoteImapSupported" DSL_CPE_CRLF
" disable = 0" DSL_CPE_CRLF
" enable = 1" DSL_CPE_CRLF
DSL_CPE_CRLF "";
#else
"";
#endif /* DSL_CPE_DEBUG_DISABLE */
DSL_CLI_LOCAL DSL_int_t DSL_CPE_CLI_BND_StatusGet(
DSL_int_t fd,
DSL_char_t *pCommands,
DSL_CPE_File_t *out)
{
DSL_int_t ret = 0;
DSL_BND_StatusGet_t pData;
if (DSL_CPE_CLI_CheckParamNumber(pCommands, 0, DSL_CLI_EQUALS) == DSL_FALSE)
{
return -1;
}
memset(&pData, 0x0, sizeof(DSL_BND_StatusGet_t));
ret = DSL_CPE_Ioctl (fd, DSL_FIO_BND_STATUS_GET, (int) &pData);
if ((ret < 0) && (pData.accessCtl.nReturn < DSL_SUCCESS))
{
DSL_CPE_FPrintf (out, sFailureReturn, DSL_CPE_RET_VAL(pData.accessCtl.nReturn));
}
else
{
DSL_CPE_FPrintf (out, DSL_CPE_RET"bPafEnable=%u bImapEnable=%u "
"bRemotePafSupported=%u bRemoteImapSupported=%u" DSL_CPE_CRLF,
DSL_CPE_RET_VAL(pData.accessCtl.nReturn),
pData.data.nPafEnable, pData.data.nImapEnable,
pData.data.nRemotePafSupported, pData.data.nRemoteImapSupported);
}
return 0;
}
static const DSL_char_t g_sBNDgsg[] =
#ifndef DSL_CPE_DEBUG_DISABLE
"Long Form: %s" DSL_CPE_CRLF
"Short Form: %s" DSL_CPE_CRLF
DSL_CPE_CRLF
"Input Parameter" DSL_CPE_CRLF
"- DSL_uint8_t nGroup" DSL_CPE_CRLF
DSL_CPE_CRLF
"Output Parameter" DSL_CPE_CRLF
"- DSL_Error_t nReturn" DSL_CPE_CRLF
"- DSL_uint8_t nGroup" DSL_CPE_CRLF
"- DSL_uint32_t nActualDataRateUs" DSL_CPE_CRLF
"- DSL_uint32_t nActualDataRateDs" DSL_CPE_CRLF
DSL_CPE_CRLF "";
#else
"";
#endif
DSL_CLI_LOCAL DSL_int_t DSL_CPE_CLI_BND_GroupStatusGet(
DSL_int_t fd,
DSL_char_t *pCommands,
DSL_CPE_File_t *out)
{
DSL_CPE_Control_Context_t *pCtx = DSL_NULL;
DSL_CPE_BND_Context_t *pBnd = DSL_NULL;
DSL_uint16_t nBndGroup = 0;
if (DSL_CPE_CLI_CheckParamNumber(pCommands, 1, DSL_CLI_EQUALS) == DSL_FALSE)
{
return -1;
}
sscanf (pCommands, "%hu", &nBndGroup);
if ((pCtx = DSL_CPE_GetGlobalContext()) != DSL_NULL)
{
if ((pBnd = (DSL_CPE_BND_Context_t*)pCtx->pBnd) == DSL_NULL)
{
DSL_CPE_FPrintf (out, DSL_CPE_RET DSL_CPE_CRLF, DSL_CPE_RET_VAL(-1));
return 0;
}
}
else
{
DSL_CPE_FPrintf (out, DSL_CPE_RET DSL_CPE_CRLF, DSL_CPE_RET_VAL(-1));
return 0;
}
if (nBndGroup >= DSL_CPE_BND_MAX_GROUPS)
{
DSL_CPE_FPrintf (out, DSL_CPE_RET DSL_CPE_CRLF, DSL_CPE_RET_VAL(-1));
return 0;
}
DSL_CPE_FPrintf (out,
DSL_CPE_RET"nGroup=%hu nActualDataRateUs=%u nActualDataRateDs=%u"
DSL_CPE_CRLF,
DSL_CPE_RET_VAL(DSL_SUCCESS), nBndGroup,
pBnd->nActualDataRateUs[nBndGroup], pBnd->nActualDataRateDs[nBndGroup]);
return 0;
}
static const DSL_char_t g_sBNDhsg[] =
#ifndef DSL_CPE_DEBUG_DISABLE
"Long Form: %s" DSL_CPE_CRLF
@ -2946,6 +3090,8 @@ DSL_void_t DSL_CPE_CLI_DeviceCommandsRegister (DSL_void_t)
#ifdef INCLUDE_DSL_CONFIG_GET
DSL_CPE_CLI_CMD_ADD_DEVICE ("bndcg", "BND_ConfigGet", DSL_CPE_CLI_BND_ConfigGet, g_sBNDcg);
#endif /* #ifdef INCLUDE_DSL_CONFIG_GET*/
DSL_CPE_CLI_CMD_ADD_DEVICE ("bndsg", "BND_StatusGet", DSL_CPE_CLI_BND_StatusGet, g_sBNDsg);
DSL_CPE_CLI_CMD_ADD_COMM ("bndgsg", "BND_GroupStatusGet", DSL_CPE_CLI_BND_GroupStatusGet, g_sBNDgsg);
DSL_CPE_CLI_CMD_ADD_DEVICE_1ARG ("bndhsg", "BND_HsStatusGet", DSL_CPE_CLI_BND_HsStatusGet, g_sBNDhsg);
DSL_CPE_CLI_CMD_ADD_DEVICE_1ARG ("bndethdbgcg", "BND_ETH_DBG_CountersGet", DSL_CPE_CLI_BND_ETH_DBG_CountersGet, g_sBNDETHDBGcg);
DSL_CPE_CLI_CMD_ADD_DEVICE_1ARG ("bndethcg", "BND_ETH_CountersGet", DSL_CPE_CLI_BND_ETH_CountersGet, g_sBNDETHcg);

View file

@ -46,6 +46,9 @@
/* Define to 1 if you have the <json-c/json.h> header file. */
#undef HAVE_JSON_C_JSON_H
/* Define to 1 if you have the <libubus.h> header file. */
#undef HAVE_LIBUBUS_H
/* Define to 1 if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
@ -97,6 +100,9 @@
/* Define to 1 if the system has the type `_Bool'. */
#undef HAVE__BOOL
/* IMA Bonding Drv support */
#undef IMA_BONDING_DRV_SUPPORT
/* Include deprecated functions */
#undef INCLUDE_DEPRECATED
@ -232,6 +238,12 @@
/* Include Resource Statistics support */
#undef INCLUDE_DSL_RESOURCE_STATISTICS
/* DSL Status Core */
#undef INCLUDE_DSL_STATUS_PARSER
/* DSL Status UBUS support */
#undef INCLUDE_DSL_STATUS_UBUS_SUPPORT
/* Include System Interface configuration support */
#undef INCLUDE_DSL_SYSTEM_INTERFACE

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
/******************************************************************************
Copyright 2018 - 2019 Intel Corporation
Copyright 2018 - 2020 Intel Corporation
For licensing information, see the file 'LICENSE' in the root folder of
this software module.
@ -12,6 +12,8 @@
#if defined(INCLUDE_DSL_JSON_PARSING) && (INCLUDE_DSL_JSON_PARSING == 1)
#include "dsl_cpe_control.h" /* DSL_CPE_ConfigStatus_t */
typedef struct
{
/**
@ -154,6 +156,26 @@ typedef struct
typedef struct
{
/**
Configuration of the bonding feature for ADSL PTM, ADSL ATM,
VDSL PTM and VDSL ATM modes:
0: DSL_BND_ENABLE_OFF
1: DSL_BND_ENABLE_ON
*/
unsigned int nBonding_AdslPtm;
unsigned int nBonding_AdslAtm;
unsigned int nBonding_VdslPtm;
unsigned int nBonding_VdslAtm;
} DSL_CFG_Bonding_t;
typedef struct
{
/**
Configuration of the link re-start trigger after config update:
0: Do not restart link after configuration update (reconfiguration)
1: Restart link after any configuration update (reconfiguration)
*/
unsigned int nLinkStart;
/**
Configuration of test and debug interface usage
0: Do not use debug and test interfaces.
@ -198,7 +220,7 @@ typedef struct
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)
successful enabling of the full G.Vector functionality (Annex X)
+ 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
@ -289,6 +311,9 @@ typedef struct
/** SystemInterface configuration */
DSL_CFG_SystemInterface_t sSystemIfConfig;
/** Bonding configuration */
DSL_CFG_Bonding_t sBondingConfig;
/** Common configuration */
DSL_CFG_Common_t sCommonConfig;
@ -301,8 +326,19 @@ typedef struct
} DSL_ConfigurationData_t;
typedef enum
{
DSL_CPE_CONFIGURATION_TYPE_UNSET,
DSL_CPE_CONFIGURATION_TYPE_FILE,
DSL_CPE_CONFIGURATION_TYPE_BACKUP,
DSL_CPE_CONFIGURATION_TYPE_DEFAULT
} DSL_CPE_ConfigurationType_e;
typedef struct
{
/** Type of source of data */
DSL_CPE_ConfigurationType_e type;
/**
Structure that contains initialization data */
DSL_ConfigurationData_t data;
@ -321,7 +357,7 @@ typedef struct
DSL_Error_t DSL_CPE_ConfigInit();
/*
This function provides accesss to current configuration params.
This function provides read accesss to current configuration params.
\param pConfiguration Pointer to pointer to
DSL_Configuration_t structure, [O]
@ -348,6 +384,36 @@ DSL_Error_t DSL_CPE_ConfigUpdate(
DSL_CPE_Control_Context_t *pCtrlCtx
);
/*
This function transfers ownership
of current final status of configuration process.
\param ppConfigurationStatus Pointer to pointer to destination. [I/O]
\return Return values are defined within the \ref DSL_Error_t definition
- DSL_SUCCESS in case of success
- DSL_ERROR if operation failed
\note Thread-safe.
*/
DSL_Error_t DSL_CPE_ConfigStatusTransfer(
DSL_CPE_ConfigStatus_t **ppConfigurationStatus
);
/*
This function gives information about configuration process.
It is used in EventHandler before handling DSL_EVENT_S_AUTOBOOT_STATUS event.
\return
- DSL_TRUE in case of ongoing reconfiguration process
- DSL_FALSE if reconfiguration is not ongoing
\note Thread-safe.
*/
DSL_boolean_t DSL_CPE_ConfigProcessIsOngoingCheck(
DSL_void_t
);
#endif /* defined(INCLUDE_DSL_JSON_PARSING) && (INCLUDE_DSL_JSON_PARSING == 1) */
#endif /* _LIB_DSL_CONFIGURATION_PARSER_H */

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
/******************************************************************************
Copyright 2016 - 2019 Intel Corporation
Copyright 2016 - 2020 Intel Corporation
Copyright 2015 - 2016 Lantiq Beteiligungs-GmbH & Co. KG
Copyright 2009 - 2014 Lantiq Deutschland GmbH
Copyright 2007 - 2008 Infineon Technologies AG
@ -157,6 +157,14 @@ extern DSL_char_t *g_sRcScript;
DSL_void_t DSL_CPE_ScriptRun(DSL_void_t);
#endif /* INCLUDE_SCRIPT_NOTIFICATION*/
/* Possible value e.g.: 123.456.789.012.345.678, (including comma delimiter)
(\ref DSL_VersionInformationData_t \ref DSL_VRX_FwVersion_t) */
#define DSL_CPE_WHAT_STRING_MAX_SIZE 25
#if defined (INCLUDE_DSL_CPE_API_VRX)
#define DSL_CPE_WHAT_STRING_ENTITIES_NUM 2
#else
#define DSL_CPE_WHAT_STRING_ENTITIES_NUM 1
#endif
#define MAX_WHAT_STRING_LEN 64
#define WHAT_STRING_CHUNK_LEN (64*1024)
@ -328,11 +336,29 @@ typedef struct
DSL_FirmwareFeatures_t fwFeatures;
} DSL_CPE_Firmware_t;
#if defined(INCLUDE_DSL_JSON_PARSING) && (INCLUDE_DSL_JSON_PARSING == 1)
/**
List of final configuration statuses
*/
typedef struct DSL_CPE_ConfigStatus
{
DSL_char_t *pStatus;
struct DSL_CPE_ConfigStatus *pNext;
} DSL_CPE_ConfigStatus_t;
#endif /* defined(INCLUDE_DSL_JSON_PARSING) && (INCLUDE_DSL_JSON_PARSING == 1) */
typedef struct
{
DSL_char_t sData[DSL_CPE_WHAT_STRING_ENTITIES_NUM * DSL_CPE_WHAT_STRING_MAX_SIZE];
DSL_boolean_t bCreated;
} DSL_CPE_FirmwareWhatStrings_t;
typedef struct
{
DSL_int_t fd[DSL_CPE_MAX_DSL_ENTITIES];
DSL_boolean_t bRun;
DSL_CPE_ThreadCtrl_t EventControl;
DSL_CPE_ThreadCtrl_t DslManagerControl;
DSL_boolean_t bEvtRun;
DSL_boolean_t bBackwardCompMode;
DSL_int_t nDevNum;
@ -358,6 +384,13 @@ typedef struct
DSL_SwVersion_t applicationVer;
DSL_void_t *pBnd;
DSL_boolean_t bForceFirmwareDownload[DSL_CPE_MAX_DSL_ENTITIES];
#if defined(INCLUDE_DSL_JSON_PARSING) && (INCLUDE_DSL_JSON_PARSING == 1)
DSL_CPE_ConfigStatus_t *pConfigurationStatus;
#endif /* defined(INCLUDE_DSL_JSON_PARSING) && (INCLUDE_DSL_JSON_PARSING == 1) */
/** Actual Data Rate per line, per direction, per channel */
DSL_uint32_t nChannelActualDataRate[DSL_CPE_MAX_DSL_ENTITIES][DSL_ACCESSDIR_LAST][DSL_MAX_SUPPORTED_CHANNELS_PER_LINE];
/* Current FW version information */
DSL_CPE_FirmwareWhatStrings_t *pWhatStrings;
} DSL_CPE_Control_Context_t;
#include "dsl_cpe_debug.h"
@ -516,6 +549,12 @@ DSL_Error_t DSL_CPE_EventHandlerStart (
DSL_CPE_Control_Context_t * pContext
);
DSL_Error_t DSL_CPE_FwInfoFromWhatstringGet(
DSL_char_t *pWhatString,
DSL_int_t *pFwApplication,
DSL_uint8_t *nPlatformId
);
#ifdef INCLUDE_DSL_CPE_CMV_SCRIPTS_SUPPORT
DSL_void_t DSL_CPE_Echo
(

19
tools/manager/Makefile.am Normal file
View file

@ -0,0 +1,19 @@
bin_PROGRAMS = dsl_manager_testclient
AM_CPPFLAGS = -I@srcdir@/../../dsl_mgmt_if/include
dsl_manager_testclient_SOURCES = \
dsl_testclient.c \
@srcdir@/../../dsl_mgmt_if/manager/dsl_mgmt_manager_testclient.c
dsl_manager_testclient_CFLAGS = -std=c99 -Wall -g
if INCLUDE_DSL_STATUS_UBUS_SUPPORT
AM_CPPFLAGS += \
@LIBUBOX_INCL_PATH@ \
@UBUS_LIBJSON_C_INCL_PATH@
dsl_manager_testclient_LDADD = -ljson-c -lubox -lubus -lblobmsg_json
dsl_manager_testclient_LDFLAGS = @UBUS_LIBS_PATH@
endif
EXTRA_DIST = \
@srcdir@/../../dsl_mgmt_if/manager/dsl_mgmt_manager_testclient.h \
@srcdir@/../../dsl_mgmt_if/include/dsl_mgmt_manager_testclient_interface.h

693
tools/manager/Makefile.in Normal file
View file

@ -0,0 +1,693 @@
# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
bin_PROGRAMS = dsl_manager_testclient$(EXEEXT)
@INCLUDE_DSL_STATUS_UBUS_SUPPORT_TRUE@am__append_1 = \
@INCLUDE_DSL_STATUS_UBUS_SUPPORT_TRUE@ @LIBUBOX_INCL_PATH@ \
@INCLUDE_DSL_STATUS_UBUS_SUPPORT_TRUE@ @UBUS_LIBJSON_C_INCL_PATH@
subdir = tools/manager
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/dsl_cpe_config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
PROGRAMS = $(bin_PROGRAMS)
am_dsl_manager_testclient_OBJECTS = \
dsl_manager_testclient-dsl_testclient.$(OBJEXT) \
dsl_manager_testclient-dsl_mgmt_manager_testclient.$(OBJEXT)
dsl_manager_testclient_OBJECTS = $(am_dsl_manager_testclient_OBJECTS)
dsl_manager_testclient_DEPENDENCIES =
dsl_manager_testclient_LINK = $(CCLD) $(dsl_manager_testclient_CFLAGS) \
$(CFLAGS) $(dsl_manager_testclient_LDFLAGS) $(LDFLAGS) -o $@
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo " CC " $@;
am__v_CC_1 =
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = $(dsl_manager_testclient_SOURCES)
DIST_SOURCES = $(dsl_manager_testclient_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ADD_APPL_CFLAGS = @ADD_APPL_CFLAGS@
ADD_APPL_LDFLAGS = @ADD_APPL_LDFLAGS@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DISTCHECK_CONFIGURE_PARAMS = @DISTCHECK_CONFIGURE_PARAMS@
DSL_ADD_EXT_APPL_CFLAGS = @DSL_ADD_EXT_APPL_CFLAGS@
DSL_CCA_DBG_MAX_LEVEL_PRE = @DSL_CCA_DBG_MAX_LEVEL_PRE@
DSL_CCA_DBG_MAX_LEVEL_SET = @DSL_CCA_DBG_MAX_LEVEL_SET@
DSL_CONFIG_MODEL_TYPE = @DSL_CONFIG_MODEL_TYPE@
DSL_CPE_DEBUG_DISABLE = @DSL_CPE_DEBUG_DISABLE@
DSL_DBG_MSG_NETLINK_ID = @DSL_DBG_MSG_NETLINK_ID@
DSL_DEBUG_TOOL_INTERFACE = @DSL_DEBUG_TOOL_INTERFACE@
DSL_DEVICE_DRIVER_INCL_PATH = @DSL_DEVICE_DRIVER_INCL_PATH@
DSL_DEVICE_NAME = @DSL_DEVICE_NAME@
DSL_DRIVER_INCL_PATH = @DSL_DRIVER_INCL_PATH@
DSL_VRX_DEVICE_NAME = @DSL_VRX_DEVICE_NAME@
DTI_INCL_PATH = @DTI_INCL_PATH@
DTI_LIBRARY_PATH = @DTI_LIBRARY_PATH@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
EXTRA_APP_CFLAGS = @EXTRA_APP_CFLAGS@
GREP = @GREP@
IFXOS_INCLUDE_PATH = @IFXOS_INCLUDE_PATH@
IFXOS_LIBRARY_PATH = @IFXOS_LIBRARY_PATH@
IMA_BONDING_DRV_INCL_PATH = @IMA_BONDING_DRV_INCL_PATH@
IMA_BONDING_DRV_SUPPORT = @IMA_BONDING_DRV_SUPPORT@
INCLUDE_DEPRECATED = @INCLUDE_DEPRECATED@
INCLUDE_DEVICE_EXCEPTION_CODES = @INCLUDE_DEVICE_EXCEPTION_CODES@
INCLUDE_DSL_ADSL_MIB = @INCLUDE_DSL_ADSL_MIB@
INCLUDE_DSL_CEOC = @INCLUDE_DSL_CEOC@
INCLUDE_DSL_CONFIG_GET = @INCLUDE_DSL_CONFIG_GET@
INCLUDE_DSL_CPE_CLI_AUTOGEN_SUPPORT = @INCLUDE_DSL_CPE_CLI_AUTOGEN_SUPPORT@
INCLUDE_DSL_CPE_CLI_SUPPORT = @INCLUDE_DSL_CPE_CLI_SUPPORT@
INCLUDE_DSL_CPE_CMV_SCRIPTS_MATH = @INCLUDE_DSL_CPE_CMV_SCRIPTS_MATH@
INCLUDE_DSL_CPE_CMV_SCRIPTS_SUPPORT = @INCLUDE_DSL_CPE_CMV_SCRIPTS_SUPPORT@
INCLUDE_DSL_CPE_DEBUG_LOGGER_SUPPORT = @INCLUDE_DSL_CPE_DEBUG_LOGGER_SUPPORT@
INCLUDE_DSL_CPE_DTI_SUPPORT = @INCLUDE_DSL_CPE_DTI_SUPPORT@
INCLUDE_DSL_CPE_FILESYSTEM_SUPPORT = @INCLUDE_DSL_CPE_FILESYSTEM_SUPPORT@
INCLUDE_DSL_CPE_IFXOS_SUPPORT = @INCLUDE_DSL_CPE_IFXOS_SUPPORT@
INCLUDE_DSL_CPE_MISC_LINE_STATUS = @INCLUDE_DSL_CPE_MISC_LINE_STATUS@
INCLUDE_DSL_CPE_PM_CHANNEL_COUNTERS = @INCLUDE_DSL_CPE_PM_CHANNEL_COUNTERS@
INCLUDE_DSL_CPE_PM_CHANNEL_EXT_COUNTERS = @INCLUDE_DSL_CPE_PM_CHANNEL_EXT_COUNTERS@
INCLUDE_DSL_CPE_PM_CHANNEL_THRESHOLDS = @INCLUDE_DSL_CPE_PM_CHANNEL_THRESHOLDS@
INCLUDE_DSL_CPE_PM_CONFIG = @INCLUDE_DSL_CPE_PM_CONFIG@
INCLUDE_DSL_CPE_PM_DATA_PATH_COUNTERS = @INCLUDE_DSL_CPE_PM_DATA_PATH_COUNTERS@
INCLUDE_DSL_CPE_PM_DATA_PATH_FAILURE_COUNTERS = @INCLUDE_DSL_CPE_PM_DATA_PATH_FAILURE_COUNTERS@
INCLUDE_DSL_CPE_PM_DATA_PATH_THRESHOLDS = @INCLUDE_DSL_CPE_PM_DATA_PATH_THRESHOLDS@
INCLUDE_DSL_CPE_PM_HISTORY = @INCLUDE_DSL_CPE_PM_HISTORY@
INCLUDE_DSL_CPE_PM_LINE_COUNTERS = @INCLUDE_DSL_CPE_PM_LINE_COUNTERS@
INCLUDE_DSL_CPE_PM_LINE_EVENT_SHOWTIME_COUNTERS = @INCLUDE_DSL_CPE_PM_LINE_EVENT_SHOWTIME_COUNTERS@
INCLUDE_DSL_CPE_PM_LINE_THRESHOLDS = @INCLUDE_DSL_CPE_PM_LINE_THRESHOLDS@
INCLUDE_DSL_CPE_PM_OPTIONAL_PARAMETERS = @INCLUDE_DSL_CPE_PM_OPTIONAL_PARAMETERS@
INCLUDE_DSL_CPE_PM_RETX_COUNTERS = @INCLUDE_DSL_CPE_PM_RETX_COUNTERS@
INCLUDE_DSL_CPE_PM_RETX_THRESHOLDS = @INCLUDE_DSL_CPE_PM_RETX_THRESHOLDS@
INCLUDE_DSL_CPE_PM_SHOWTIME_COUNTERS = @INCLUDE_DSL_CPE_PM_SHOWTIME_COUNTERS@
INCLUDE_DSL_CPE_PM_TOTAL_COUNTERS = @INCLUDE_DSL_CPE_PM_TOTAL_COUNTERS@
INCLUDE_DSL_CPE_TRACE_BUFFER = @INCLUDE_DSL_CPE_TRACE_BUFFER@
INCLUDE_DSL_DELT = @INCLUDE_DSL_DELT@
INCLUDE_DSL_EVENT_POLLING = @INCLUDE_DSL_EVENT_POLLING@
INCLUDE_DSL_FILTER_DETECTION = @INCLUDE_DSL_FILTER_DETECTION@
INCLUDE_DSL_FRAMING_PARAMETERS = @INCLUDE_DSL_FRAMING_PARAMETERS@
INCLUDE_DSL_G997_ALARM = @INCLUDE_DSL_G997_ALARM@
INCLUDE_DSL_G997_FRAMING_PARAMETERS = @INCLUDE_DSL_G997_FRAMING_PARAMETERS@
INCLUDE_DSL_G997_LINE_INVENTORY = @INCLUDE_DSL_G997_LINE_INVENTORY@
INCLUDE_DSL_G997_PER_TONE = @INCLUDE_DSL_G997_PER_TONE@
INCLUDE_DSL_G997_STATUS = @INCLUDE_DSL_G997_STATUS@
INCLUDE_DSL_JSON_PARSING = @INCLUDE_DSL_JSON_PARSING@
INCLUDE_DSL_PM = @INCLUDE_DSL_PM@
INCLUDE_DSL_RESOURCE_STATISTICS = @INCLUDE_DSL_RESOURCE_STATISTICS@
INCLUDE_DSL_STATUS_UBUS_SUPPORT = @INCLUDE_DSL_STATUS_UBUS_SUPPORT@
INCLUDE_DSL_SYSTEM_INTERFACE = @INCLUDE_DSL_SYSTEM_INTERFACE@
INCLUDE_DTI_AGENT_STANDALONE_SUPPORT = @INCLUDE_DTI_AGENT_STANDALONE_SUPPORT@
INCLUDE_FW_REQUEST_SUPPORT = @INCLUDE_FW_REQUEST_SUPPORT@
INCLUDE_PILOT_TONES_STATUS = @INCLUDE_PILOT_TONES_STATUS@
INCLUDE_REAL_TIME_TRACE = @INCLUDE_REAL_TIME_TRACE@
INCLUDE_SCRIPT_NOTIFICATION = @INCLUDE_SCRIPT_NOTIFICATION@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBJSON_C_INCL_PATH = @LIBJSON_C_INCL_PATH@
LIBJSON_C_LIBRARY_PATH = @LIBJSON_C_LIBRARY_PATH@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBUBOX_INCL_PATH = @LIBUBOX_INCL_PATH@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
SAFEC_INCL_PATH = @SAFEC_INCL_PATH@
SAFEC_LIB_NAME = @SAFEC_LIB_NAME@
SAFEC_LIB_PATH = @SAFEC_LIB_PATH@
SAFEC_SUPPORT = @SAFEC_SUPPORT@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
UBUS_LIBJSON_C_INCL_PATH = @UBUS_LIBJSON_C_INCL_PATH@
UBUS_LIBS_PATH = @UBUS_LIBS_PATH@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build_alias = @build_alias@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host_alias = @host_alias@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = -I@srcdir@/../../dsl_mgmt_if/include $(am__append_1)
dsl_manager_testclient_SOURCES = \
dsl_testclient.c \
@srcdir@/../../dsl_mgmt_if/manager/dsl_mgmt_manager_testclient.c
dsl_manager_testclient_CFLAGS = -std=c99 -Wall -g
@INCLUDE_DSL_STATUS_UBUS_SUPPORT_TRUE@dsl_manager_testclient_LDADD = -ljson-c -lubox -lubus -lblobmsg_json
@INCLUDE_DSL_STATUS_UBUS_SUPPORT_TRUE@dsl_manager_testclient_LDFLAGS = @UBUS_LIBS_PATH@
EXTRA_DIST = \
@srcdir@/../../dsl_mgmt_if/manager/dsl_mgmt_manager_testclient.h \
@srcdir@/../../dsl_mgmt_if/include/dsl_mgmt_manager_testclient_interface.h
all: all-am
.SUFFIXES:
.SUFFIXES: .c .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/manager/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu tools/manager/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
$(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
fi; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p \
; then echo "$$p"; echo "$$p"; else :; fi; \
done | \
sed -e 'p;s,.*/,,;n;h' \
-e 's|.*|.|' \
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
if ($$2 == $$4) files[d] = files[d] " " $$1; \
else { print "f", $$3 "/" $$4, $$1; } } \
END { for (d in files) print "f", d, files[d] }' | \
while read type dir files; do \
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
test -z "$$files" || { \
echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
$(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
} \
; done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-e 's/$$/$(EXEEXT)/' \
`; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(bindir)" && rm -f $$files
clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
dsl_manager_testclient$(EXEEXT): $(dsl_manager_testclient_OBJECTS) $(dsl_manager_testclient_DEPENDENCIES) $(EXTRA_dsl_manager_testclient_DEPENDENCIES)
@rm -f dsl_manager_testclient$(EXEEXT)
$(AM_V_CCLD)$(dsl_manager_testclient_LINK) $(dsl_manager_testclient_OBJECTS) $(dsl_manager_testclient_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsl_manager_testclient-dsl_mgmt_manager_testclient.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsl_manager_testclient-dsl_testclient.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
dsl_manager_testclient-dsl_testclient.o: dsl_testclient.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dsl_manager_testclient_CFLAGS) $(CFLAGS) -MT dsl_manager_testclient-dsl_testclient.o -MD -MP -MF $(DEPDIR)/dsl_manager_testclient-dsl_testclient.Tpo -c -o dsl_manager_testclient-dsl_testclient.o `test -f 'dsl_testclient.c' || echo '$(srcdir)/'`dsl_testclient.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dsl_manager_testclient-dsl_testclient.Tpo $(DEPDIR)/dsl_manager_testclient-dsl_testclient.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dsl_testclient.c' object='dsl_manager_testclient-dsl_testclient.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dsl_manager_testclient_CFLAGS) $(CFLAGS) -c -o dsl_manager_testclient-dsl_testclient.o `test -f 'dsl_testclient.c' || echo '$(srcdir)/'`dsl_testclient.c
dsl_manager_testclient-dsl_testclient.obj: dsl_testclient.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dsl_manager_testclient_CFLAGS) $(CFLAGS) -MT dsl_manager_testclient-dsl_testclient.obj -MD -MP -MF $(DEPDIR)/dsl_manager_testclient-dsl_testclient.Tpo -c -o dsl_manager_testclient-dsl_testclient.obj `if test -f 'dsl_testclient.c'; then $(CYGPATH_W) 'dsl_testclient.c'; else $(CYGPATH_W) '$(srcdir)/dsl_testclient.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dsl_manager_testclient-dsl_testclient.Tpo $(DEPDIR)/dsl_manager_testclient-dsl_testclient.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dsl_testclient.c' object='dsl_manager_testclient-dsl_testclient.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dsl_manager_testclient_CFLAGS) $(CFLAGS) -c -o dsl_manager_testclient-dsl_testclient.obj `if test -f 'dsl_testclient.c'; then $(CYGPATH_W) 'dsl_testclient.c'; else $(CYGPATH_W) '$(srcdir)/dsl_testclient.c'; fi`
dsl_manager_testclient-dsl_mgmt_manager_testclient.o: @srcdir@/../../dsl_mgmt_if/manager/dsl_mgmt_manager_testclient.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dsl_manager_testclient_CFLAGS) $(CFLAGS) -MT dsl_manager_testclient-dsl_mgmt_manager_testclient.o -MD -MP -MF $(DEPDIR)/dsl_manager_testclient-dsl_mgmt_manager_testclient.Tpo -c -o dsl_manager_testclient-dsl_mgmt_manager_testclient.o `test -f '@srcdir@/../../dsl_mgmt_if/manager/dsl_mgmt_manager_testclient.c' || echo '$(srcdir)/'`@srcdir@/../../dsl_mgmt_if/manager/dsl_mgmt_manager_testclient.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dsl_manager_testclient-dsl_mgmt_manager_testclient.Tpo $(DEPDIR)/dsl_manager_testclient-dsl_mgmt_manager_testclient.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/../../dsl_mgmt_if/manager/dsl_mgmt_manager_testclient.c' object='dsl_manager_testclient-dsl_mgmt_manager_testclient.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dsl_manager_testclient_CFLAGS) $(CFLAGS) -c -o dsl_manager_testclient-dsl_mgmt_manager_testclient.o `test -f '@srcdir@/../../dsl_mgmt_if/manager/dsl_mgmt_manager_testclient.c' || echo '$(srcdir)/'`@srcdir@/../../dsl_mgmt_if/manager/dsl_mgmt_manager_testclient.c
dsl_manager_testclient-dsl_mgmt_manager_testclient.obj: @srcdir@/../../dsl_mgmt_if/manager/dsl_mgmt_manager_testclient.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dsl_manager_testclient_CFLAGS) $(CFLAGS) -MT dsl_manager_testclient-dsl_mgmt_manager_testclient.obj -MD -MP -MF $(DEPDIR)/dsl_manager_testclient-dsl_mgmt_manager_testclient.Tpo -c -o dsl_manager_testclient-dsl_mgmt_manager_testclient.obj `if test -f '@srcdir@/../../dsl_mgmt_if/manager/dsl_mgmt_manager_testclient.c'; then $(CYGPATH_W) '@srcdir@/../../dsl_mgmt_if/manager/dsl_mgmt_manager_testclient.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/../../dsl_mgmt_if/manager/dsl_mgmt_manager_testclient.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dsl_manager_testclient-dsl_mgmt_manager_testclient.Tpo $(DEPDIR)/dsl_manager_testclient-dsl_mgmt_manager_testclient.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@srcdir@/../../dsl_mgmt_if/manager/dsl_mgmt_manager_testclient.c' object='dsl_manager_testclient-dsl_mgmt_manager_testclient.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dsl_manager_testclient_CFLAGS) $(CFLAGS) -c -o dsl_manager_testclient-dsl_mgmt_manager_testclient.obj `if test -f '@srcdir@/../../dsl_mgmt_if/manager/dsl_mgmt_manager_testclient.c'; then $(CYGPATH_W) '@srcdir@/../../dsl_mgmt_if/manager/dsl_mgmt_manager_testclient.c'; else $(CYGPATH_W) '$(srcdir)/@srcdir@/../../dsl_mgmt_if/manager/dsl_mgmt_manager_testclient.c'; fi`
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-am
TAGS: tags
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: ctags-am
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: cscopelist-am
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS)
installdirs:
for dir in "$(DESTDIR)$(bindir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am: install-binPROGRAMS
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-binPROGRAMS
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \
distclean distclean-compile distclean-generic distclean-tags \
distdir dvi dvi-am html html-am info info-am install \
install-am install-binPROGRAMS install-data install-data-am \
install-dvi install-dvi-am install-exec install-exec-am \
install-html install-html-am install-info install-info-am \
install-man install-pdf install-pdf-am install-ps \
install-ps-am install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \
ps ps-am tags tags-am uninstall uninstall-am \
uninstall-binPROGRAMS
.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View file

@ -0,0 +1,27 @@
/******************************************************************************
Copyright (c) 2020 Intel Corporation
For licensing information, see the file 'LICENSE' in the root folder of
this software module.
*******************************************************************************/
#include "dsl_mgmt_manager_testclient_interface.h"
int main(int argc, char **argv)
{
const char *pDefaultUbusObject = "dsl.bonding_group.0";
const char *pUbusObject;
if (argc > 1)
{
pUbusObject = argv[1];
}
else
{
pUbusObject = pDefaultUbusObject;
}
return DSL_MNGR_TestClient("/var/run/ubus/ubus.sock", pUbusObject);
}

View file

@ -209,6 +209,8 @@ EXTRA_APP_CFLAGS = @EXTRA_APP_CFLAGS@
GREP = @GREP@
IFXOS_INCLUDE_PATH = @IFXOS_INCLUDE_PATH@
IFXOS_LIBRARY_PATH = @IFXOS_LIBRARY_PATH@
IMA_BONDING_DRV_INCL_PATH = @IMA_BONDING_DRV_INCL_PATH@
IMA_BONDING_DRV_SUPPORT = @IMA_BONDING_DRV_SUPPORT@
INCLUDE_DEPRECATED = @INCLUDE_DEPRECATED@
INCLUDE_DEVICE_EXCEPTION_CODES = @INCLUDE_DEVICE_EXCEPTION_CODES@
INCLUDE_DSL_ADSL_MIB = @INCLUDE_DSL_ADSL_MIB@
@ -252,6 +254,7 @@ INCLUDE_DSL_G997_STATUS = @INCLUDE_DSL_G997_STATUS@
INCLUDE_DSL_JSON_PARSING = @INCLUDE_DSL_JSON_PARSING@
INCLUDE_DSL_PM = @INCLUDE_DSL_PM@
INCLUDE_DSL_RESOURCE_STATISTICS = @INCLUDE_DSL_RESOURCE_STATISTICS@
INCLUDE_DSL_STATUS_UBUS_SUPPORT = @INCLUDE_DSL_STATUS_UBUS_SUPPORT@
INCLUDE_DSL_SYSTEM_INTERFACE = @INCLUDE_DSL_SYSTEM_INTERFACE@
INCLUDE_DTI_AGENT_STANDALONE_SUPPORT = @INCLUDE_DTI_AGENT_STANDALONE_SUPPORT@
INCLUDE_FW_REQUEST_SUPPORT = @INCLUDE_FW_REQUEST_SUPPORT@
@ -268,6 +271,7 @@ LIBJSON_C_INCL_PATH = @LIBJSON_C_INCL_PATH@
LIBJSON_C_LIBRARY_PATH = @LIBJSON_C_LIBRARY_PATH@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBUBOX_INCL_PATH = @LIBUBOX_INCL_PATH@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
@ -287,6 +291,8 @@ SAFEC_SUPPORT = @SAFEC_SUPPORT@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
UBUS_LIBJSON_C_INCL_PATH = @UBUS_LIBJSON_C_INCL_PATH@
UBUS_LIBS_PATH = @UBUS_LIBS_PATH@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@

View file

@ -1,6 +1,6 @@
/******************************************************************************
Copyright 2016 - 2019 Intel Corporation
Copyright 2016 - 2020 Intel Corporation
Copyright 2015 - 2016 Lantiq Beteiligungs-GmbH & Co. KG
Copyright 2009 - 2014 Lantiq Deutschland GmbH
Copyright 2007 - 2008 Infineon Technologies AG
@ -319,10 +319,6 @@ DSL_Error_t DSL_PIPE_SemaphoreSet(int sem)
}
}
/* 1 colon means there is a required parameter */
/* 2 colons means there is an optional parameter */
static const char GETOPT_LONG_OPTSTRING[] = "hve:";
int main(int argc, char **argv)
{
char *pCommand = DSL_NULL;