mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2025-12-10 07:44:39 +01:00
Move Device.GatewayInfo to gateway-info package
This commit is contained in:
parent
64e898c47e
commit
49d9497d18
3 changed files with 0 additions and 82 deletions
|
|
@ -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}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
};
|
||||
|
||||
|
|
@ -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
|
||||
|
||||
Loading…
Add table
Reference in a new issue