diff --git a/libbbfdm/device.c b/libbbfdm/device.c index dcb980f3a257e2a7241b9a565d91cede1d6f51dc..7fe1f59081e832aa36ab1a7b55c3f009bd0fdb14 100644 --- a/libbbfdm/device.c +++ b/libbbfdm/device.c @@ -13,7 +13,6 @@ #include "device.h" #include "lanconfigsecurity.h" #include "security.h" -#include "gatewayinfo.h" #include "schedules.h" /************************************************************* @@ -95,7 +94,6 @@ DMOBJ tDMRootObj[] = { {"LANConfigSecurity", &DMREAD, NULL, NULL, "file:/etc/config/users", NULL, NULL, NULL, NULL, tLANConfigSecurityParams, NULL, BBFDM_BOTH}, {"Schedules", &DMREAD, NULL, NULL, NULL, NULL, NULL, NULL, tSchedulesObj, tSchedulesParams, NULL, BBFDM_BOTH}, {"Security", &DMREAD, NULL, NULL, NULL, NULL, NULL, NULL, tSecurityObj, tSecurityParams, NULL, BBFDM_CWMP}, -{"GatewayInfo", &DMREAD, NULL, NULL, NULL, NULL, NULL, NULL, NULL, tGatewayInfoParams, NULL, BBFDM_CWMP}, {0} }; diff --git a/libbbfdm/gatewayinfo.c b/libbbfdm/gatewayinfo.c deleted file mode 100644 index f6d0046569663e9c91e226431fce725b1ffafbd0..0000000000000000000000000000000000000000 --- a/libbbfdm/gatewayinfo.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2022 iopsys Software Solutions AB - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 2.1 - * as published by the Free Software Foundation - * - * Author: Suvendhu Hansa <suvendhu.hansa@iopsys.eu> - */ - -#include "gatewayinfo.h" - -static int get_manufacturer_oui(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value) -{ - dmuci_get_option_value_string_varstate("icwmp", "gatewayinfo", "oui", value); - if (*value[0] == '\0') { - dmuci_get_option_value_string("cwmp", "cpe", "manufacturer_oui", value); - if (*value[0] == '\0') - db_get_value_string("device", "deviceinfo", "ManufacturerOUI", value); - } - - return 0; -} - -static int get_product_class(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value) -{ - dmuci_get_option_value_string_varstate("icwmp", "gatewayinfo", "class", value); - if (*value[0] == '\0') { - dmuci_get_option_value_string("cwmp", "cpe", "product_class", value); - if (*value[0] == '\0') - db_get_value_string("device", "deviceinfo", "ProductClass", value); - } - - return 0; -} - -static int get_serial_number(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value) -{ - dmuci_get_option_value_string_varstate("icwmp", "gatewayinfo", "serial", value); - if (*value[0] == '\0') { - dmuci_get_option_value_string("cwmp", "cpe", "serial_number", value); - if (*value[0] == '\0') - db_get_value_string("device", "deviceinfo", "SerialNumber", value); - } - - return 0; -} - -/********************************************************************************************************************************** -* OBJ & PARAM DEFINITION -***********************************************************************************************************************************/ -/* *** Device.GatewayInfo. *** */ -DMLEAF tGatewayInfoParams[] = { -/* PARAM, permission, type, getvalue, setvalue, bbfdm_type, version*/ -{"ManufacturerOUI", &DMREAD, DMT_STRING, get_manufacturer_oui, NULL, BBFDM_CWMP}, -{"ProductClass", &DMREAD, DMT_STRING, get_product_class, NULL, BBFDM_CWMP}, -{"SerialNumber", &DMREAD, DMT_STRING, get_serial_number, NULL, BBFDM_CWMP}, -{0} -}; - diff --git a/libbbfdm/gatewayinfo.h b/libbbfdm/gatewayinfo.h deleted file mode 100644 index 6e7b5d71a71f77b15d394c05898f9f876fc3d75a..0000000000000000000000000000000000000000 --- a/libbbfdm/gatewayinfo.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2022 iopsys Software Solutions AB - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 2.1 - * as published by the Free Software Foundation - * - * Author Suvendhu Hansa <suvendhu.hansa@iopsys.eu> - * - */ - -#ifndef __GATEWAYINFO_H -#define __GATEWAYINFO_H - -#include "libbbfdm-api/legacy/dmcommon.h" - -extern DMLEAF tGatewayInfoParams[]; - -#endif -