mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2026-02-17 17:51:22 +01:00
change cwmp -> bbfdm
This commit is contained in:
parent
9574e5dc0b
commit
4777b9166f
64 changed files with 156 additions and 140 deletions
|
|
@ -1,11 +1,10 @@
|
|||
CWMP_VERSION = 3.0.0
|
||||
LIB_BBFDM_VERSION = 3:0:0
|
||||
|
||||
lib_LTLIBRARIES = libbbfdm.la
|
||||
|
||||
libbbfdm_la_SOURCES = \
|
||||
../md5.c \
|
||||
../dmcwmp.c \
|
||||
../dmbbf.c \
|
||||
../dmentry.c \
|
||||
../dmmem.c \
|
||||
../dmubus.c \
|
||||
|
|
@ -100,9 +99,6 @@ libbbfdm_la_LIBADD = \
|
|||
$(LIBTRACE_LIBS) \
|
||||
$(LBLOBMSG_LIBS)
|
||||
|
||||
libbbfdm_la_CFLAGS+=-DCWMP_VERSION=\"$(CWMP_VERSION)\"
|
||||
libbbfdm_la_LDFLAGS+=-DCWMP_VERSION=\"$(CWMP_VERSION)\"
|
||||
|
||||
libbbfdm_la_CFLAGS+=-I../
|
||||
libbbfdm_la_CFLAGS+=-I../dmtree/
|
||||
libbbfdm_la_CFLAGS+=-I../dmtree/tr181
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
#include <uci.h>
|
||||
#include <ctype.h>
|
||||
#include "dmuci.h"
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmmem.h"
|
||||
#include "device.h"
|
||||
#include "times.h"
|
||||
|
|
@ -40,7 +40,6 @@
|
|||
#include "routing.h"
|
||||
#include "nat.h"
|
||||
#include "xmpp.h"
|
||||
#include "dmcwmp.h"
|
||||
#include "dmjson.h"
|
||||
#ifdef BBF_TR104
|
||||
#include "voice_services.h"
|
||||
|
|
@ -1915,9 +1914,9 @@ static int get_linker_value_check_param(DMPARAM_ARGS)
|
|||
* UPNP entries
|
||||
* ******************/
|
||||
|
||||
int upnp_map_cwmp_fault(int cwmp_fault)
|
||||
int upnp_map_bbf_fault(int bbf_fault)
|
||||
{
|
||||
switch (cwmp_fault) {
|
||||
switch (bbf_fault) {
|
||||
case FAULT_9005:
|
||||
return FAULT_UPNP_703;
|
||||
case FAULT_9003:
|
||||
|
|
@ -1927,9 +1926,9 @@ int upnp_map_cwmp_fault(int cwmp_fault)
|
|||
case FAULT_9008:
|
||||
return FAULT_UPNP_706;
|
||||
}
|
||||
if (cwmp_fault > __FAULT_UPNP_MAX)
|
||||
if (bbf_fault > __FAULT_UPNP_MAX)
|
||||
return FAULT_UPNP_701;
|
||||
return cwmp_fault;
|
||||
return bbf_fault;
|
||||
}
|
||||
|
||||
int plugin_upnp_structured_obj_match(DMOBJECT_ARGS)
|
||||
|
|
@ -2221,7 +2220,7 @@ int dm_entry_upnp_get_instances(struct dmctx *dmctx)
|
|||
if (dmctx->findparam)
|
||||
return 0;
|
||||
else
|
||||
return (upnp_map_cwmp_fault(err));
|
||||
return (upnp_map_bbf_fault(err));
|
||||
}
|
||||
|
||||
static int mparam_upnp_get_instances(DMPARAM_ARGS)
|
||||
|
|
@ -2275,7 +2274,7 @@ int dm_entry_upnp_get_supported_parameters(struct dmctx *dmctx)
|
|||
if (dmctx->findparam)
|
||||
return 0;
|
||||
else
|
||||
return (upnp_map_cwmp_fault(err));
|
||||
return (upnp_map_bbf_fault(err));
|
||||
}
|
||||
|
||||
static int mparam_upnp_get_supportedparams(DMPARAM_ARGS)
|
||||
|
|
@ -2367,7 +2366,7 @@ int dm_entry_upnp_get_selected_values(struct dmctx *dmctx)
|
|||
if (dmctx->findparam)
|
||||
return 0;
|
||||
else
|
||||
return (upnp_map_cwmp_fault(err));
|
||||
return (upnp_map_bbf_fault(err));
|
||||
}
|
||||
|
||||
static int mparam_upnp_structured_get_value_in_param(DMPARAM_ARGS)
|
||||
|
|
@ -2434,7 +2433,7 @@ int dm_entry_upnp_get_values(struct dmctx *dmctx)
|
|||
if (findparam_check && dmctx->findparam)
|
||||
return 0;
|
||||
else
|
||||
return (upnp_map_cwmp_fault(err));
|
||||
return (upnp_map_bbf_fault(err));
|
||||
}
|
||||
|
||||
static int upnp_get_value_obj(DMOBJECT_ARGS)
|
||||
|
|
@ -2506,7 +2505,7 @@ int dm_entry_upnp_set_values(struct dmctx *dmctx)
|
|||
dmctx->method_param = mparam_upnp_set_value;
|
||||
err = dm_browse(dmctx, &node, root, NULL, NULL);
|
||||
if (dmctx->stop)
|
||||
return (upnp_map_cwmp_fault(err));
|
||||
return (upnp_map_bbf_fault(err));
|
||||
else
|
||||
return FAULT_UPNP_703;
|
||||
}
|
||||
|
|
@ -2581,7 +2580,7 @@ int dm_entry_upnp_delete_instance(struct dmctx *dmctx)
|
|||
dmctx->method_param = upnp_delete_instance_param;
|
||||
err = dm_browse(dmctx, &node, root, NULL, NULL);
|
||||
if (dmctx->stop)
|
||||
return (upnp_map_cwmp_fault(err));
|
||||
return (upnp_map_bbf_fault(err));
|
||||
else
|
||||
return FAULT_UPNP_703;
|
||||
}
|
||||
|
|
@ -2640,7 +2639,7 @@ int dm_entry_upnp_add_instance(struct dmctx *dmctx)
|
|||
dmctx->method_param = mparam_upnp_add_instance;
|
||||
err = dm_browse(dmctx, &node, root, NULL, NULL);
|
||||
if (dmctx->stop)
|
||||
return (upnp_map_cwmp_fault(err));
|
||||
return (upnp_map_bbf_fault(err));
|
||||
else
|
||||
return FAULT_UPNP_703;
|
||||
}
|
||||
|
|
@ -2715,7 +2714,7 @@ int dm_entry_upnp_get_attributes(struct dmctx *dmctx)
|
|||
if (dmctx->findparam)
|
||||
return 0;
|
||||
else
|
||||
return (upnp_map_cwmp_fault(err));
|
||||
return (upnp_map_bbf_fault(err));
|
||||
}
|
||||
|
||||
static int mparam_upnp_get_attributes(DMPARAM_ARGS)
|
||||
|
|
@ -2827,7 +2826,7 @@ int dm_entry_upnp_set_attributes(struct dmctx *dmctx)
|
|||
if (dmctx->findparam)
|
||||
return 0;
|
||||
else
|
||||
return (upnp_map_cwmp_fault(err));
|
||||
return (upnp_map_bbf_fault(err));
|
||||
}
|
||||
|
||||
static int mparam_upnp_set_attributes(DMPARAM_ARGS)
|
||||
|
|
@ -2921,7 +2920,7 @@ int dm_entry_upnp_get_acl_data(struct dmctx *dmctx)
|
|||
if (dmctx->findparam)
|
||||
return 0;
|
||||
else
|
||||
return (upnp_map_cwmp_fault(err));
|
||||
return (upnp_map_bbf_fault(err));
|
||||
}
|
||||
|
||||
static int mparam_upnp_get_acldata(DMPARAM_ARGS)
|
||||
|
|
@ -3016,7 +3015,7 @@ int dm_entry_upnp_get_instance_numbers(struct dmctx *dmctx)
|
|||
if (dmctx->findparam)
|
||||
return 0;
|
||||
else
|
||||
return (upnp_map_cwmp_fault(err));
|
||||
return (upnp_map_bbf_fault(err));
|
||||
}
|
||||
|
||||
static int mparam_upnp_get_instance_numbers(DMPARAM_ARGS)
|
||||
|
|
@ -11,8 +11,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#ifndef __DMCWMP_H__
|
||||
#define __DMCWMP_H__
|
||||
#ifndef __DMBBF_H__
|
||||
#define __DMBBF_H__
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdbool.h>
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
#include <net/if.h>
|
||||
#include <net/if_arp.h>
|
||||
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmuci.h"
|
||||
#include "dmubus.h"
|
||||
#include "dmcommon.h"
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
#include <libubox/blobmsg_json.h>
|
||||
#include <json-c/json.h>
|
||||
#include <unistd.h>
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#define NVRAM_FILE "/proc/nvram/WpaKey"
|
||||
#define MAX_DHCP_LEASES 256
|
||||
#define MAX_PROC_ROUTING 256
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmubus.h"
|
||||
#include "dmuci.h"
|
||||
#include "dmentry.h"
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
#ifndef __DMENTRY_H__
|
||||
#define __DMENTRY_H__
|
||||
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
extern struct list_head head_package_change;
|
||||
extern unsigned char dmcli_timetrack;
|
||||
extern unsigned char dmcli_evaluatetest;
|
||||
|
|
|
|||
2
dmjson.h
2
dmjson.h
|
|
@ -15,7 +15,7 @@
|
|||
#include <string.h>
|
||||
#include <json-c/json.h>
|
||||
#include <libubox/blobmsg_json.h>
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
|
||||
struct dmjson_arg {
|
||||
char *key;
|
||||
|
|
|
|||
28
dmoperate.c
28
dmoperate.c
|
|
@ -26,7 +26,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <regex.h>
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmubus.h"
|
||||
#include "dmuci.h"
|
||||
#include "dmjson.h"
|
||||
|
|
@ -55,7 +55,7 @@ bool is_str_eq(const char *s1, const char *s2)
|
|||
return false;
|
||||
}
|
||||
|
||||
static void cwmp_init(struct dmctx *dm_ctx, char *path)
|
||||
static void bbf_init(struct dmctx *dm_ctx, char *path)
|
||||
{
|
||||
char *uci_amd = NULL, *uci_instance = NULL;
|
||||
int amd = AMD_2, instance = INSTANCE_MODE_ALIAS;
|
||||
|
|
@ -80,12 +80,12 @@ static void cwmp_init(struct dmctx *dm_ctx, char *path)
|
|||
dm_ctx_init_sub(dm_ctx, DM_CWMP, amd, instance);
|
||||
}
|
||||
|
||||
static void cwmp_cleanup(struct dmctx *dm_ctx)
|
||||
static void bbf_cleanup(struct dmctx *dm_ctx)
|
||||
{
|
||||
dm_ctx_clean_sub(dm_ctx);
|
||||
}
|
||||
|
||||
static bool cwmp_get(int operation, char *path, struct dmctx *dm_ctx)
|
||||
static bool bbf_get(int operation, char *path, struct dmctx *dm_ctx)
|
||||
{
|
||||
int fault = 0;
|
||||
|
||||
|
|
@ -109,13 +109,13 @@ static bool cwmp_get(int operation, char *path, struct dmctx *dm_ctx)
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool cwmp_set_value(char *path, char *value)
|
||||
static bool bbf_set_value(char *path, char *value)
|
||||
{
|
||||
int fault = 0, res;
|
||||
struct dmctx dm_ctx = {0};
|
||||
struct dmctx *p_dmctx = &dm_ctx;
|
||||
|
||||
cwmp_init(&dm_ctx, path);
|
||||
bbf_init(&dm_ctx, path);
|
||||
|
||||
fault = dm_entry_param_method(&dm_ctx, CMD_SET_VALUE, path, value, NULL);
|
||||
|
||||
|
|
@ -132,24 +132,24 @@ static bool cwmp_set_value(char *path, char *value)
|
|||
else
|
||||
res = SUCCESS;
|
||||
|
||||
cwmp_cleanup(&dm_ctx);
|
||||
bbf_cleanup(&dm_ctx);
|
||||
return res;
|
||||
}
|
||||
|
||||
static char *cwmp_get_value_by_id(char *id)
|
||||
static char *bbf_get_value_by_id(char *id)
|
||||
{
|
||||
struct dmctx dm_ctx = {0};
|
||||
struct dm_parameter *n;
|
||||
char *value = NULL;
|
||||
|
||||
cwmp_init(&dm_ctx, id);
|
||||
if(cwmp_get(CMD_GET_VALUE, id, &dm_ctx)) {
|
||||
bbf_init(&dm_ctx, id);
|
||||
if(bbf_get(CMD_GET_VALUE, id, &dm_ctx)) {
|
||||
list_for_each_entry(n, &dm_ctx.list_parameter, list) {
|
||||
value = dmstrdup(n->data);
|
||||
break;
|
||||
}
|
||||
}
|
||||
cwmp_cleanup(&dm_ctx);
|
||||
bbf_cleanup(&dm_ctx);
|
||||
return value;
|
||||
}
|
||||
|
||||
|
|
@ -167,7 +167,7 @@ static char *get_param_val_from_op_cmd(char *op_cmd, const char *param)
|
|||
strcat(node, param);
|
||||
|
||||
// Get parameter value
|
||||
val = cwmp_get_value_by_id(node);
|
||||
val = bbf_get_value_by_id(node);
|
||||
return val;
|
||||
}
|
||||
|
||||
|
|
@ -256,14 +256,14 @@ static opr_ret_t ap_security_reset(struct dmctx *dmctx, char *path, char *input)
|
|||
strncpy(reset_params[2].value, wpakey, MAXNAMLEN);
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
cwmp_set_value(reset_params[i].node, reset_params[i].value);
|
||||
bbf_set_value(reset_params[i].node, reset_params[i].value);
|
||||
}
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
static opr_ret_t dhcp_client_renew(struct dmctx *dmctx, char *path, char *input)
|
||||
{
|
||||
if(SUCCESS == cwmp_set_value(path, "true"))
|
||||
if(SUCCESS == bbf_set_value(path, "true"))
|
||||
return SUCCESS;
|
||||
else
|
||||
return FAIL;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
|
||||
#include "upnp_common.h"
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmuci.h"
|
||||
#include "dmubus.h"
|
||||
#include "dmjson.h"
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "upnp_configuration.h"
|
||||
#include "upnp_common.h"
|
||||
#include "dmuci.h"
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#ifndef UPNP_CONFIGURATION_H
|
||||
#define UPNP_CONFIGURATION_H
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
|
||||
struct upnp_configuration_args{
|
||||
struct uci_section *upnpConfiguration_sec;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
|
||||
#include "dmuci.h"
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "upnp_device.h"
|
||||
#include "deviceinfo.h"
|
||||
#include "managementserver.h"
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "upnp_deviceinfo.h"
|
||||
#include <sys/utsname.h>
|
||||
#include "dmuci.h"
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#ifndef UPNP_DEVICEINFO_H
|
||||
#define UPNP_DEVICEINFO_H
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
|
||||
struct upnp_dvinf_args
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "upnp_monitoring.h"
|
||||
#include "upnp_common.h"
|
||||
#include "dmubus.h"
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#ifndef UPNP_MONITORING_H
|
||||
#define UPNP_MONITORING_H
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
struct upnp_ip_usage_args{
|
||||
char *systemName;
|
||||
char *status;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
#include <ctype.h>
|
||||
#include <uci.h>
|
||||
#include <unistd.h>
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmuci.h"
|
||||
#include "dmubus.h"
|
||||
#include "dmcommon.h"
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
#include <ctype.h>
|
||||
#include "dmuci.h"
|
||||
#include "dmubus.h"
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmcommon.h"
|
||||
#include "dmjson.h"
|
||||
#include "dmentry.h"
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#include <ctype.h>
|
||||
#include <uci.h>
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmuci.h"
|
||||
#include "dmubus.h"
|
||||
#include "dmcommon.h"
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
#include <ctype.h>
|
||||
#include <uci.h>
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmuci.h"
|
||||
#include "dmubus.h"
|
||||
#include "dmcommon.h"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,13 @@
|
|||
/*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Copyright (C) 2019 iopsys Software Solutions AB
|
||||
* Author: Omar Kallel <omar.kallel@pivasoftware.com>
|
||||
*/
|
||||
|
||||
#include "datamodelversion.h"
|
||||
|
||||
int get_Device_RootDataModelVersion(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,19 @@
|
|||
/*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Copyright (C) 2019 iopsys Software Solutions AB
|
||||
* Author: Omar Kallel <omar.kallel@pivasoftware.com>
|
||||
*/
|
||||
|
||||
#ifndef __DATAMODELVERSION_H
|
||||
#define __DATAMODELVERSION_H
|
||||
#include "dmcwmp.h"
|
||||
|
||||
#include "dmbbf.h"
|
||||
#include "dmcommon.h"
|
||||
|
||||
int get_Device_RootDataModelVersion(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
*/
|
||||
|
||||
#include "dmuci.h"
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "device.h"
|
||||
#include "deviceinfo.h"
|
||||
#include "managementserver.h"
|
||||
|
|
@ -54,7 +54,7 @@
|
|||
#include "voice_services.h"
|
||||
#endif
|
||||
|
||||
/* *** CWMP *** */
|
||||
/* *** BBFDM *** */
|
||||
DMOBJ tEntry181Obj[] = {
|
||||
/* OBJ, permission, addobj, delobj, checkobj, browseinstobj, forced_inform, notification, nextobj, leaf, linker, bbfdm_type*/
|
||||
{(char *)&dmroot, &DMREAD, NULL, NULL, NULL, NULL, &DMFINFRM, &DMNONE, tRoot_181_Obj, tRoot_181_Params, NULL, BBFDM_BOTH},
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/klog.h>
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmuci.h"
|
||||
#include "dmubus.h"
|
||||
#include "dmcommon.h"
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
#ifndef __DEVICE_INFO_H
|
||||
#define __DEVICE_INFO_H
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
|
||||
#define UPTIME "/proc/uptime"
|
||||
#define DEFAULT_CONFIG_DIR "/etc/config/"
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
#include <arpa/inet.h>
|
||||
#include "dmuci.h"
|
||||
#include "dmubus.h"
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmcommon.h"
|
||||
#include "dhcpv4.h"
|
||||
#include "dmjson.h"
|
||||
|
|
@ -434,7 +434,7 @@ int addObjDHCPv4Client(char *refparam, struct dmctx *ctx, void *data, char **ins
|
|||
char *wan_eth, *value, *wanname, *instancepara, *v;
|
||||
|
||||
check_create_dmmap_package("dmmap_dhcp_client");
|
||||
instancepara = get_last_instance_bbfdm("dmmap_dhcp_client", "interface", "cwmp_dhcpv4client_instance");
|
||||
instancepara = get_last_instance_bbfdm("dmmap_dhcp_client", "interface", "bbf_dhcpv4client_instance");
|
||||
dmuci_get_option_value_string("ports", "WAN", "ifname", &wan_eth);
|
||||
dmasprintf(&wanname, "%s.1", wan_eth);
|
||||
dmuci_add_section("network", "interface", &s, &value);
|
||||
|
|
@ -443,7 +443,7 @@ int addObjDHCPv4Client(char *refparam, struct dmctx *ctx, void *data, char **ins
|
|||
dmuci_set_value_by_section(s, "type", "anywan");
|
||||
dmuci_add_section_bbfdm("dmmap_dhcp_client", "interface", &dmmap_sect, &v);
|
||||
dmuci_set_value_by_section(dmmap_sect, "section_name", section_name(s));
|
||||
*instance = update_instance_bbfdm(dmmap_sect, instancepara, "cwmp_dhcpv4client_instance");
|
||||
*instance = update_instance_bbfdm(dmmap_sect, instancepara, "bbf_dhcpv4client_instance");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -506,7 +506,7 @@ int delObjDHCPv4Client(char *refparam, struct dmctx *ctx, void *data, char *inst
|
|||
get_dmmap_section_of_config_section("dmmap_dhcp_client", "interface", section_name(s), &dmmap_section);
|
||||
if(strlen(ipv4addr) == 0){
|
||||
if(dmmap_section != NULL)
|
||||
dmuci_get_value_by_section_string(dmmap_section, "cwmp_dhcpv4client_instance", &v);
|
||||
dmuci_get_value_by_section_string(dmmap_section, "bbf_dhcpv4client_instance", &v);
|
||||
else
|
||||
dmasprintf(&v, "%d", 0);
|
||||
|
||||
|
|
@ -533,12 +533,12 @@ int addObjDHCPv4ClientSentOption(char *refparam, struct dmctx *ctx, void *data,
|
|||
char *value, *instancepara, *v;
|
||||
|
||||
check_create_dmmap_package("dmmap_dhcp_client");
|
||||
instancepara= get_last_instance_lev2_bbfdm_dmmap_opt("dmmap_dhcp_client", "send_option", "cwmp_dhcpv4_sentopt_instance", "section_name", section_name(dhcp_client_args->dhcp_client_conf));
|
||||
instancepara= get_last_instance_lev2_bbfdm_dmmap_opt("dmmap_dhcp_client", "send_option", "bbf_dhcpv4_sentopt_instance", "section_name", section_name(dhcp_client_args->dhcp_client_conf));
|
||||
dmuci_add_section_bbfdm("dmmap_dhcp_client", "send_option", &dmmap_sect, &value);
|
||||
if(dhcp_client_args->dhcp_client_conf != NULL)
|
||||
DMUCI_SET_VALUE_BY_SECTION(bbfdm, dmmap_sect, "section_name", section_name(dhcp_client_args->dhcp_client_conf));
|
||||
DMUCI_SET_VALUE_BY_SECTION(bbfdm, dmmap_sect, "option_tag", "0");
|
||||
*instance = update_instance_bbfdm(dmmap_sect, instancepara, "cwmp_dhcpv4_sentopt_instance");
|
||||
*instance = update_instance_bbfdm(dmmap_sect, instancepara, "bbf_dhcpv4_sentopt_instance");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -577,12 +577,12 @@ int addObjDHCPv4ClientReqOption(char *refparam, struct dmctx *ctx, void *data, c
|
|||
char *value, *instancepara, *v;
|
||||
|
||||
check_create_dmmap_package("dmmap_dhcp_client");
|
||||
instancepara= get_last_instance_lev2_bbfdm_dmmap_opt("dmmap_dhcp_client", "req_option", "cwmp_dhcpv4_sentopt_instance", "section_name", section_name(dhcp_client_args->dhcp_client_conf));
|
||||
instancepara= get_last_instance_lev2_bbfdm_dmmap_opt("dmmap_dhcp_client", "req_option", "bbf_dhcpv4_sentopt_instance", "section_name", section_name(dhcp_client_args->dhcp_client_conf));
|
||||
dmuci_add_section_bbfdm("dmmap_dhcp_client", "req_option", &dmmap_sect, &value);
|
||||
if(dhcp_client_args->dhcp_client_conf != NULL)
|
||||
DMUCI_SET_VALUE_BY_SECTION(bbfdm, dmmap_sect, "section_name", section_name(dhcp_client_args->dhcp_client_conf));
|
||||
DMUCI_SET_VALUE_BY_SECTION(bbfdm, dmmap_sect, "option_tag", "0");
|
||||
*instance = update_instance_bbfdm(dmmap_sect, instancepara, "cwmp_dhcpv4_sentopt_instance");
|
||||
*instance = update_instance_bbfdm(dmmap_sect, instancepara, "bbf_dhcpv4_sentopt_instance");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -620,12 +620,12 @@ int addObjDHCPv4ServerPoolOption(char *refparam, struct dmctx *ctx, void *data,
|
|||
char *value, *instancepara, *v;
|
||||
|
||||
check_create_dmmap_package("dmmap_dhcp");
|
||||
instancepara= get_last_instance_lev2_bbfdm_dmmap_opt("dmmap_dhcp", "servpool_option", "cwmp_dhcpv4_servpool_option_instance", "section_name", section_name(dhcp_arg->dhcp_sec));
|
||||
instancepara= get_last_instance_lev2_bbfdm_dmmap_opt("dmmap_dhcp", "servpool_option", "bbf_dhcpv4_servpool_option_instance", "section_name", section_name(dhcp_arg->dhcp_sec));
|
||||
dmuci_add_section_bbfdm("dmmap_dhcp", "servpool_option", &dmmap_sect, &value);
|
||||
if(dhcp_arg->dhcp_sec != NULL)
|
||||
DMUCI_SET_VALUE_BY_SECTION(bbfdm, dmmap_sect, "section_name", section_name(dhcp_arg->dhcp_sec));
|
||||
DMUCI_SET_VALUE_BY_SECTION(bbfdm, dmmap_sect, "option_tag", "0");
|
||||
*instance = update_instance_bbfdm(dmmap_sect, instancepara, "cwmp_dhcpv4_servpool_option_instance");
|
||||
*instance = update_instance_bbfdm(dmmap_sect, instancepara, "bbf_dhcpv4_servpool_option_instance");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -663,12 +663,12 @@ int addObjDHCPv4RelayForwarding(char *refparam, struct dmctx *ctx, void *data, c
|
|||
char *wan_eth, *value, *bridgerelay, *instancepara, *v;
|
||||
|
||||
check_create_dmmap_package("dmmap_dhcp_relay");
|
||||
instancepara = get_last_instance_bbfdm("dmmap_dhcp_relay", "interface", "cwmp_dhcpv4relay_instance");
|
||||
instancepara = get_last_instance_bbfdm("dmmap_dhcp_relay", "interface", "bbf_dhcpv4relay_instance");
|
||||
dmuci_add_section("network", "interface", &s, &value);
|
||||
dmuci_set_value_by_section(s, "proto", "relay");
|
||||
dmuci_add_section_bbfdm("dmmap_dhcp_relay", "interface", &dmmap_sect, &v);
|
||||
dmuci_set_value_by_section(dmmap_sect, "section_name", section_name(s));
|
||||
*instance = update_instance_bbfdm(dmmap_sect, instancepara, "cwmp_dhcpv4relay_instance");
|
||||
*instance = update_instance_bbfdm(dmmap_sect, instancepara, "bbf_dhcpv4relay_instance");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -685,8 +685,8 @@ int delObjDHCPv4RelayForwarding(char *refparam, struct dmctx *ctx, void *data, c
|
|||
case DEL_INST:
|
||||
if(is_section_unnamed(section_name(dhcp_relay_args->dhcp_client_conf))){
|
||||
LIST_HEAD(dup_list);
|
||||
delete_sections_save_next_sections("dmmap_dhcp_relay", "interface", "cwmp_dhcpv4relay_instance", section_name(dhcp_relay_args->dhcp_client_conf), atoi(instance), &dup_list);
|
||||
update_dmmap_sections(&dup_list, "cwmp_dhcpv4relay_instance", "dmmap_dhcp_relay", "interface");
|
||||
delete_sections_save_next_sections("dmmap_dhcp_relay", "interface", "bbf_dhcpv4relay_instance", section_name(dhcp_relay_args->dhcp_client_conf), atoi(instance), &dup_list);
|
||||
update_dmmap_sections(&dup_list, "bbf_dhcpv4relay_instance", "dmmap_dhcp_relay", "interface");
|
||||
dmuci_delete_by_section_unnamed(dhcp_relay_args->dhcp_client_conf, NULL, NULL);
|
||||
} else {
|
||||
get_dmmap_section_of_config_section("dmmap_dhcp_relay", "interface", section_name(dhcp_relay_args->dhcp_client_conf), &dmmap_section);
|
||||
|
|
@ -1644,7 +1644,7 @@ int get_DHCPv4Client_Alias(char *refparam, struct dmctx *ctx, void *data, char *
|
|||
{
|
||||
struct dhcp_client_args *dhcp_client_args = (struct dhcp_client_args*)data;
|
||||
|
||||
dmuci_get_value_by_section_string(dhcp_client_args->dhcp_client_dm, "cwmp_dhcpv4client_alias", value);
|
||||
dmuci_get_value_by_section_string(dhcp_client_args->dhcp_client_dm, "bbf_dhcpv4client_alias", value);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1657,7 +1657,7 @@ int set_DHCPv4Client_Alias(char *refparam, struct dmctx *ctx, void *data, char *
|
|||
case VALUECHECK:
|
||||
break;
|
||||
case VALUESET:
|
||||
dmuci_set_value_by_section(dhcp_client_args->dhcp_client_dm, "cwmp_dhcpv4client_alias", value);
|
||||
dmuci_set_value_by_section(dhcp_client_args->dhcp_client_dm, "bbf_dhcpv4client_alias", value);
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
|
|
@ -2034,7 +2034,7 @@ int get_DHCPv4ClientSentOption_Alias(char *refparam, struct dmctx *ctx, void *da
|
|||
{
|
||||
struct dhcp_client_option_args* dhcp_client_opt_args= (struct dhcp_client_option_args*)data;
|
||||
|
||||
dmuci_get_value_by_section_string(dhcp_client_opt_args->opt_sect, "cwmp_dhcpv4_sentopt_alias", value);
|
||||
dmuci_get_value_by_section_string(dhcp_client_opt_args->opt_sect, "bbf_dhcpv4_sentopt_alias", value);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -2047,7 +2047,7 @@ int set_DHCPv4ClientSentOption_Alias(char *refparam, struct dmctx *ctx, void *da
|
|||
case VALUECHECK:
|
||||
break;
|
||||
case VALUESET:
|
||||
DMUCI_SET_VALUE_BY_SECTION(bbfdm, dhcp_client_opt_args->opt_sect, "cwmp_dhcpv4_sentopt_alias", value);
|
||||
DMUCI_SET_VALUE_BY_SECTION(bbfdm, dhcp_client_opt_args->opt_sect, "bbf_dhcpv4_sentopt_alias", value);
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
|
|
@ -2200,7 +2200,7 @@ int get_DHCPv4ClientReqOption_Alias(char *refparam, struct dmctx *ctx, void *dat
|
|||
{
|
||||
struct dhcp_client_option_args* dhcp_client_opt_args= (struct dhcp_client_option_args*)data;
|
||||
|
||||
dmuci_get_value_by_section_string(dhcp_client_opt_args->opt_sect, "cwmp_dhcpv4_reqtopt_alias", value);
|
||||
dmuci_get_value_by_section_string(dhcp_client_opt_args->opt_sect, "bbf_dhcpv4_reqtopt_alias", value);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -2213,7 +2213,7 @@ int set_DHCPv4ClientReqOption_Alias(char *refparam, struct dmctx *ctx, void *dat
|
|||
case VALUECHECK:
|
||||
break;
|
||||
case VALUESET:
|
||||
DMUCI_SET_VALUE_BY_SECTION(bbfdm, dhcp_client_opt_args->opt_sect, "cwmp_dhcpv4_reqtopt_alias", value);
|
||||
DMUCI_SET_VALUE_BY_SECTION(bbfdm, dhcp_client_opt_args->opt_sect, "bbf_dhcpv4_reqtopt_alias", value);
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
|
|
@ -2386,7 +2386,7 @@ int get_DHCPv4ServerPoolOption_Alias(char *refparam, struct dmctx *ctx, void *da
|
|||
{
|
||||
struct dhcp_client_option_args* dhcp_client_opt_args= (struct dhcp_client_option_args*)data;
|
||||
|
||||
dmuci_get_value_by_section_string(dhcp_client_opt_args->opt_sect, "cwmp_dhcpv4_servpool_option_alias", value);
|
||||
dmuci_get_value_by_section_string(dhcp_client_opt_args->opt_sect, "bbf_dhcpv4_servpool_option_alias", value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -2397,7 +2397,7 @@ int set_DHCPv4ServerPoolOption_Alias(char *refparam, struct dmctx *ctx, void *da
|
|||
case VALUECHECK:
|
||||
break;
|
||||
case VALUESET:
|
||||
DMUCI_SET_VALUE_BY_SECTION(bbfdm, dhcp_client_opt_args->opt_sect, "cwmp_dhcpv4_servpool_option_alias", value);
|
||||
DMUCI_SET_VALUE_BY_SECTION(bbfdm, dhcp_client_opt_args->opt_sect, "bbf_dhcpv4_servpool_option_alias", value);
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
|
|
@ -2534,7 +2534,7 @@ int get_DHCPv4RelayForwarding_Alias(char *refparam, struct dmctx *ctx, void *dat
|
|||
struct uci_section *dmmap_section;
|
||||
char *v;
|
||||
|
||||
dmuci_get_value_by_section_string(dhcp_client_args->dhcp_client_dm, "cwmp_dhcpv4relay_alias", value);
|
||||
dmuci_get_value_by_section_string(dhcp_client_args->dhcp_client_dm, "bbf_dhcpv4relay_alias", value);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -2547,7 +2547,7 @@ int set_DHCPv4RelayForwarding_Alias(char *refparam, struct dmctx *ctx, void *dat
|
|||
case VALUECHECK:
|
||||
break;
|
||||
case VALUESET:
|
||||
dmuci_set_value_by_section(dhcp_client_args->dhcp_client_dm, "cwmp_dhcpv4relay_alias", value);
|
||||
dmuci_set_value_by_section(dhcp_client_args->dhcp_client_dm, "bbf_dhcpv4relay_alias", value);
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
|
|
@ -3162,7 +3162,7 @@ int browseDHCPv4ClientInst(struct dmctx *dmctx, DMNODE *parent_node, void *prev_
|
|||
dhcp_client_arg.dhcp_client_conf = p->config_section;
|
||||
dhcp_client_arg.dhcp_client_dm= p->dmmap_section;
|
||||
|
||||
instance= handle_update_instance(1, dmctx, &instnbr, update_instance_alias_bbfdm, 3, (void *)p->dmmap_section, "cwmp_dhcpv4client_instance", "cwmp_dhcpv4client_alias");
|
||||
instance= handle_update_instance(1, dmctx, &instnbr, update_instance_alias_bbfdm, 3, (void *)p->dmmap_section, "bbf_dhcpv4client_instance", "bbf_dhcpv4client_alias");
|
||||
if (DM_LINK_INST_OBJ(dmctx, parent_node, &dhcp_client_arg, instance) == DM_STOP)
|
||||
break;
|
||||
}
|
||||
|
|
@ -3214,7 +3214,7 @@ int browseDHCPv4ClientSentOptionInst(struct dmctx *dmctx, DMNODE *parent_node, v
|
|||
dhcp_client_opt_args.value= dmstrdup(v2);
|
||||
dhcp_client_opt_args.opt_sect= dmmap_sect;
|
||||
|
||||
instance= handle_update_instance(1, dmctx, &instnbr, update_instance_alias_bbfdm, 3, dmmap_sect, "cwmp_dhcpv4_sentopt_instance", "cwmp_dhcpv4_sentopt_alias");
|
||||
instance= handle_update_instance(1, dmctx, &instnbr, update_instance_alias_bbfdm, 3, dmmap_sect, "bbf_dhcpv4_sentopt_instance", "bbf_dhcpv4_sentopt_alias");
|
||||
if (DM_LINK_INST_OBJ(dmctx, parent_node, &dhcp_client_opt_args, instance) == DM_STOP)
|
||||
break;
|
||||
}
|
||||
|
|
@ -3250,7 +3250,7 @@ int browseDHCPv4ClientReqOptionInst(struct dmctx *dmctx, DMNODE *parent_node, vo
|
|||
dhcp_client_opt_args.value= dmstrdup("");
|
||||
dhcp_client_opt_args.opt_sect= dmmap_sect;
|
||||
|
||||
instance= handle_update_instance(1, dmctx, &instnbr, update_instance_alias_bbfdm, 3, dmmap_sect, "cwmp_dhcpv4_reqtopt_instance", "cwmp_dhcpv4_reqtopt_alias");
|
||||
instance= handle_update_instance(1, dmctx, &instnbr, update_instance_alias_bbfdm, 3, dmmap_sect, "bbf_dhcpv4_reqtopt_instance", "bbf_dhcpv4_reqtopt_alias");
|
||||
if (DM_LINK_INST_OBJ(dmctx, parent_node, &dhcp_client_opt_args, instance) == DM_STOP)
|
||||
break;
|
||||
}
|
||||
|
|
@ -3298,7 +3298,7 @@ int browseDHCPv4ServerPoolOptionInst(struct dmctx *dmctx, DMNODE *parent_node, v
|
|||
dhcp_client_opt_args.option_tag= strdup(v1);
|
||||
dhcp_client_opt_args.value= strdup(v2);
|
||||
dhcp_client_opt_args.opt_sect= dmmap_sect;
|
||||
instance= handle_update_instance(1, dmctx, &instnbr, update_instance_alias_bbfdm, 3, dmmap_sect, "cwmp_dhcpv4_servpool_option_instance", "cwmp_dhcpv4_servpool_option_alias");
|
||||
instance= handle_update_instance(1, dmctx, &instnbr, update_instance_alias_bbfdm, 3, dmmap_sect, "bbf_dhcpv4_servpool_option_instance", "bbf_dhcpv4_servpool_option_alias");
|
||||
if (DM_LINK_INST_OBJ(dmctx, parent_node, &dhcp_client_opt_args, instance) == DM_STOP)
|
||||
break;
|
||||
}
|
||||
|
|
@ -3435,7 +3435,7 @@ int browseDHCPv4RelayForwardingInst(struct dmctx *dmctx, DMNODE *parent_node, vo
|
|||
dhcp_relay_arg.dhcp_client_conf = p->config_section;
|
||||
|
||||
dhcp_relay_arg.dhcp_client_dm= p->dmmap_section;
|
||||
instance= handle_update_instance(1, dmctx, &instnbr, update_instance_alias_bbfdm, 3, (void *)p->dmmap_section, "cwmp_dhcpv4relay_instance", "cwmp_dhcpv4relay_alias");
|
||||
instance= handle_update_instance(1, dmctx, &instnbr, update_instance_alias_bbfdm, 3, (void *)p->dmmap_section, "bbf_dhcpv4relay_instance", "bbf_dhcpv4relay_alias");
|
||||
if (DM_LINK_INST_OBJ(dmctx, parent_node, &dhcp_relay_arg, instance) == DM_STOP)
|
||||
break;
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
#include <ctype.h>
|
||||
#include "dmuci.h"
|
||||
#include "dmubus.h"
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmcommon.h"
|
||||
#include "dmentry.h"
|
||||
#include "dhcpv4.h"
|
||||
|
|
@ -298,7 +298,7 @@ int browseDHCPv6ClientInst(struct dmctx *dmctx, DMNODE *parent_node, void *prev_
|
|||
dhcpv6_client_arg.dhcp_client_dm= p->dmmap_section;
|
||||
dhcpv6_client_arg.ip= strdup(ipv6addr?ipv6addr:"");
|
||||
|
||||
instance = handle_update_instance(1, dmctx, &instnbr, update_instance_alias, 3, p->dmmap_section, "cwmp_dhcpv6client_instance", "cwmp_dhcpv6client_alias");
|
||||
instance = handle_update_instance(1, dmctx, &instnbr, update_instance_alias, 3, p->dmmap_section, "bbf_dhcpv6client_instance", "bbf_dhcpv6client_alias");
|
||||
if (DM_LINK_INST_OBJ(dmctx, parent_node, &dhcpv6_client_arg, instance) == DM_STOP)
|
||||
break;
|
||||
}
|
||||
|
|
@ -425,7 +425,7 @@ int browseDHCPv6ServerPoolOptionInst(struct dmctx *dmctx, DMNODE *parent_node, v
|
|||
dhcp_client_opt_args.option_tag= strdup(v1);
|
||||
dhcp_client_opt_args.value= strdup(v2);
|
||||
dhcp_client_opt_args.opt_sect= dmmap_sect;
|
||||
instance= handle_update_instance(1, dmctx, &instnbr, update_instance_alias_bbfdm, 3, dmmap_sect, "cwmp_dhcpv6_servpool_option_instance", "cwmp_dhcpv6_servpool_option_alias");
|
||||
instance= handle_update_instance(1, dmctx, &instnbr, update_instance_alias_bbfdm, 3, dmmap_sect, "bbf_dhcpv6_servpool_option_instance", "bbf_dhcpv6_servpool_option_alias");
|
||||
if (DM_LINK_INST_OBJ(dmctx, parent_node, &dhcp_client_opt_args, instance) == DM_STOP)
|
||||
break;
|
||||
}
|
||||
|
|
@ -489,14 +489,14 @@ int addObjDHCPv6Client(char *refparam, struct dmctx *ctx, void *data, char **ins
|
|||
char *wan_eth, *value, *wanname, *instancepara, *v;
|
||||
|
||||
check_create_dmmap_package("dmmap_dhcpv6");
|
||||
instancepara = get_last_instance_bbfdm("dmmap_dhcpv6", "interface", "cwmp_dhcpv6client_instance");
|
||||
instancepara = get_last_instance_bbfdm("dmmap_dhcpv6", "interface", "bbf_dhcpv6client_instance");
|
||||
dmuci_add_section("network", "interface", &s, &value);
|
||||
dmuci_set_value_by_section(s, "proto", "dhcpv6");
|
||||
dmuci_set_value_by_section(s, "ifname", "@wan");
|
||||
dmuci_set_value_by_section(s, "type", "anywan");
|
||||
dmuci_add_section_bbfdm("dmmap_dhcpv6", "interface", &dmmap_sect, &v);
|
||||
dmuci_set_value_by_section(dmmap_sect, "section_name", section_name(s));
|
||||
*instance = update_instance_bbfdm(dmmap_sect, instancepara, "cwmp_dhcpv6client_instance");
|
||||
*instance = update_instance_bbfdm(dmmap_sect, instancepara, "bbf_dhcpv6client_instance");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -512,8 +512,8 @@ int delObjDHCPv6Client(char *refparam, struct dmctx *ctx, void *data, char *inst
|
|||
case DEL_INST:
|
||||
if(dhcpv6_client_args->dhcp_client_conf != NULL && is_section_unnamed(section_name(dhcpv6_client_args->dhcp_client_conf))){
|
||||
LIST_HEAD(dup_list);
|
||||
delete_sections_save_next_sections("dmmap_dhcpv6", "interface", "cwmp_dhcpv6client_instance", section_name(dhcpv6_client_args->dhcp_client_conf), atoi(instance), &dup_list);
|
||||
update_dmmap_sections(&dup_list, "cwmp_dhcpv6client_instance", "dmmap_dhcpv6", "interface");
|
||||
delete_sections_save_next_sections("dmmap_dhcpv6", "interface", "bbf_dhcpv6client_instance", section_name(dhcpv6_client_args->dhcp_client_conf), atoi(instance), &dup_list);
|
||||
update_dmmap_sections(&dup_list, "bbf_dhcpv6client_instance", "dmmap_dhcpv6", "interface");
|
||||
dmuci_delete_by_section_unnamed(dhcpv6_client_args->dhcp_client_conf, NULL, NULL);
|
||||
} else {
|
||||
get_dmmap_section_of_config_section("dmmap_dhcpv6", "interface", section_name(dhcpv6_client_args->dhcp_client_conf), &dmmap_section);
|
||||
|
|
@ -645,12 +645,12 @@ int addObjDHCPv6ServerPoolOption(char *refparam, struct dmctx *ctx, void *data,
|
|||
char *value, *instancepara, *v;
|
||||
|
||||
check_create_dmmap_package("dmmap_dhcpv6");
|
||||
instancepara= get_last_instance_lev2_bbfdm_dmmap_opt("dmmap_dhcpv6", "servpool_option", "cwmp_dhcpv6_servpool_option_instance", "section_name", section_name(dhcp_arg->dhcp_sec));
|
||||
instancepara= get_last_instance_lev2_bbfdm_dmmap_opt("dmmap_dhcpv6", "servpool_option", "bbf_dhcpv6_servpool_option_instance", "section_name", section_name(dhcp_arg->dhcp_sec));
|
||||
dmuci_add_section_bbfdm("dmmap_dhcpv6", "servpool_option", &dmmap_sect, &value);
|
||||
if(dhcp_arg->dhcp_sec != NULL)
|
||||
DMUCI_SET_VALUE_BY_SECTION(bbfdm, dmmap_sect, "section_name", section_name(dhcp_arg->dhcp_sec));
|
||||
DMUCI_SET_VALUE_BY_SECTION(bbfdm, dmmap_sect, "option_tag", "0");
|
||||
*instance = update_instance_bbfdm(dmmap_sect, instancepara, "cwmp_dhcpv6_servpool_option_instance");
|
||||
*instance = update_instance_bbfdm(dmmap_sect, instancepara, "bbf_dhcpv6_servpool_option_instance");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -742,7 +742,7 @@ int get_DHCPv6Client_Alias(char *refparam, struct dmctx *ctx, void *data, char *
|
|||
{
|
||||
struct dhcpv6_client_args *dhcpv6_client_args = (struct dhcpv6_client_args*)data;
|
||||
|
||||
dmuci_get_value_by_section_string(dhcpv6_client_args->dhcp_client_dm, "cwmp_dhcpv6client_alias", value);
|
||||
dmuci_get_value_by_section_string(dhcpv6_client_args->dhcp_client_dm, "bbf_dhcpv6client_alias", value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -754,7 +754,7 @@ int set_DHCPv6Client_Alias(char *refparam, struct dmctx *ctx, void *data, char *
|
|||
case VALUECHECK:
|
||||
break;
|
||||
case VALUESET:
|
||||
dmuci_set_value_by_section(dhcpv6_client_args->dhcp_client_dm, "cwmp_dhcpv6client_alias", value);
|
||||
dmuci_set_value_by_section(dhcpv6_client_args->dhcp_client_dm, "bbf_dhcpv6client_alias", value);
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
|
|
@ -1957,7 +1957,7 @@ int get_DHCPv6ServerPoolOption_Alias(char *refparam, struct dmctx *ctx, void *da
|
|||
{
|
||||
struct dhcpv6_client_option_args* dhcp_client_opt_args= (struct dhcpv6_client_option_args*)data;
|
||||
|
||||
dmuci_get_value_by_section_string(dhcp_client_opt_args->opt_sect, "cwmp_dhcpv6_servpool_option_alias", value);
|
||||
dmuci_get_value_by_section_string(dhcp_client_opt_args->opt_sect, "bbf_dhcpv6_servpool_option_alias", value);
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
|
@ -1970,7 +1970,7 @@ int set_DHCPv6ServerPoolOption_Alias(char *refparam, struct dmctx *ctx, void *da
|
|||
case VALUECHECK:
|
||||
break;
|
||||
case VALUESET:
|
||||
DMUCI_SET_VALUE_BY_SECTION(bbfdm, dhcp_client_opt_args->opt_sect, "cwmp_dhcpv6_servpool_option_alias", value);
|
||||
DMUCI_SET_VALUE_BY_SECTION(bbfdm, dhcp_client_opt_args->opt_sect, "bbf_dhcpv6_servpool_option_alias", value);
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#include "dmuci.h"
|
||||
#include "dmubus.h"
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmcommon.h"
|
||||
#include "dmjson.h"
|
||||
#include "dmentry.h"
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
#include <ctype.h>
|
||||
#include "dmuci.h"
|
||||
#include "dmubus.h"
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmcommon.h"
|
||||
#include "dmjson.h"
|
||||
#include "dmentry.h"
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
#include <ctype.h>
|
||||
#include "dmuci.h"
|
||||
#include "dmubus.h"
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmcommon.h"
|
||||
#include "ethernet.h"
|
||||
#include "dmjson.h"
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
* Author: Omar Kallel <omar.kallel@pivasoftware.com>
|
||||
*/
|
||||
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "firewall.h"
|
||||
#include "dmcommon.h"
|
||||
#include "dmentry.h"
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
#include <ctype.h>
|
||||
#include "dmuci.h"
|
||||
#include "dmubus.h"
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmcommon.h"
|
||||
#include "hosts.h"
|
||||
#include "dmjson.h"
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
* Author: Amin Ben Ramdhane <amin.benramdhane@pivasoftware.com>
|
||||
*/
|
||||
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmcommon.h"
|
||||
#include "dmubus.h"
|
||||
#include "dmjson.h"
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
#include <ctype.h>
|
||||
#include "dmuci.h"
|
||||
#include "dmubus.h"
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmcommon.h"
|
||||
#include "ip.h"
|
||||
#include "dmjson.h"
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include "dmmem.h"
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmuci.h"
|
||||
#include "dmubus.h"
|
||||
#include "dmcommon.h"
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#ifndef __MANAGEMENT_SERVER_H
|
||||
#define __MANAGEMENT_SERVER_H
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
extern DMLEAF tManagementServerParams[];
|
||||
|
||||
int get_management_server_url(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
#include <ctype.h>
|
||||
#include "dmuci.h"
|
||||
#include "dmubus.h"
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmcommon.h"
|
||||
#include "dmentry.h"
|
||||
#include "nat.h"
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
#include <ctype.h>
|
||||
#include "dmuci.h"
|
||||
#include "dmubus.h"
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmjson.h"
|
||||
#include "dmcommon.h"
|
||||
#include "dmentry.h"
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#include <ctype.h>
|
||||
#include <uci.h>
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmuci.h"
|
||||
#include "dmubus.h"
|
||||
#include "dmcommon.h"
|
||||
|
|
|
|||
|
|
@ -8,9 +8,8 @@
|
|||
* Author: Omar Kallel <omar.kallel@pivasoftware.com>
|
||||
*/
|
||||
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmcommon.h"
|
||||
#include "dmcwmp.h"
|
||||
#include "dmentry.h"
|
||||
#include "dmuci.h"
|
||||
#include "qos.h"
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
#include <ctype.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmuci.h"
|
||||
#include "dmubus.h"
|
||||
#include "dmcommon.h"
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
#include <ctype.h>
|
||||
#include <uci.h>
|
||||
#include <stdio.h>
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmuci.h"
|
||||
#include "dmubus.h"
|
||||
#include "dmcommon.h"
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
#include <uci.h>
|
||||
#include <ctype.h>
|
||||
#include "dmuci.h"
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmubus.h"
|
||||
#include "dmcommon.h"
|
||||
#include "dmentry.h"
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#ifndef __TIMES_H
|
||||
#define __TIMES_H
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
|
||||
extern DMLEAF tTimeParams[];
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
#include <ctype.h>
|
||||
#include "dmuci.h"
|
||||
#include "dmubus.h"
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmcommon.h"
|
||||
#include "upnp.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
* Author: Omar Kallel <omar.kallel@pivasoftware.com>
|
||||
*/
|
||||
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmcommon.h"
|
||||
#include "usb.h"
|
||||
#include <dirent.h>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
#include <ctype.h>
|
||||
#include "dmuci.h"
|
||||
#include "dmubus.h"
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmjson.h"
|
||||
#include "dmcommon.h"
|
||||
#include "userinterface.h"
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
* Author: Omar Kallel <omar.kallel@pivasoftware.com>
|
||||
*/
|
||||
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "users.h"
|
||||
#include "dmcommon.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -12,8 +12,7 @@
|
|||
#ifndef _USERS_H
|
||||
#define _USERS_H
|
||||
|
||||
#include "dmcwmp.h"
|
||||
|
||||
#include "dmbbf.h"
|
||||
|
||||
extern DMOBJ tUsersObj[];
|
||||
extern DMLEAF tUsersParams[];
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
#include <ctype.h>
|
||||
#include "dmuci.h"
|
||||
#include "dmubus.h"
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmcommon.h"
|
||||
#include "wifi.h"
|
||||
#include "dmjson.h"
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
#include <uci.h>
|
||||
#include <ctype.h>
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmuci.h"
|
||||
#include "dmubus.h"
|
||||
#include "dmcommon.h"
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#include <uci.h>
|
||||
#include <ctype.h>
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmuci.h"
|
||||
#include "dmubus.h"
|
||||
#include "dmcommon.h"
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
#include <ctype.h>
|
||||
#include "dmuci.h"
|
||||
#include "dmubus.h"
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmcommon.h"
|
||||
#include "x_iopsys_eu_ice.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
#include <ctype.h>
|
||||
#include "dmuci.h"
|
||||
#include "dmubus.h"
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmcommon.h"
|
||||
#include "x_iopsys_eu_igmp.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
#include <uci.h>
|
||||
#include <ctype.h>
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmuci.h"
|
||||
#include "dmubus.h"
|
||||
#include "dmcommon.h"
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
|
||||
#include <uci.h>
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmuci.h"
|
||||
#include "dmubus.h"
|
||||
#include "dmcommon.h"
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
#include <uci.h>
|
||||
#include <ctype.h>
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmuci.h"
|
||||
#include "dmubus.h"
|
||||
#include "dmcommon.h"
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmuci.h"
|
||||
#include "dmcommon.h"
|
||||
#include "x_iopsys_eu_power_mgmt.h"
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
#include <ctype.h>
|
||||
#include "dmuci.h"
|
||||
#include "dmubus.h"
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmcommon.h"
|
||||
#include "x_iopsys_eu_syslog.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#include <uci.h>
|
||||
#include <ctype.h>
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmuci.h"
|
||||
#include "dmubus.h"
|
||||
#include "dmcommon.h"
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
#include <uci.h>
|
||||
#include <ctype.h>
|
||||
#include "dmcwmp.h"
|
||||
#include "dmbbf.h"
|
||||
#include "dmuci.h"
|
||||
#include "dmubus.h"
|
||||
#include "dmcommon.h"
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ def cprinttopfile (fp, filename):
|
|||
print >> fp, "* Author: Amin Ben Ramdhane <amin.benramdhane@pivasoftware.com>"
|
||||
print >> fp, "*/"
|
||||
print >> fp, ""
|
||||
print >> fp, "#include \"dmcwmp.h\""
|
||||
print >> fp, "#include \"dmbbf.h\""
|
||||
print >> fp, "#include \"dmcommon.h\""
|
||||
print >> fp, "#include \"dmuci.h\""
|
||||
print >> fp, "#include \"dmubus.h\""
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ def cprinttopfile (fp, filename):
|
|||
print >> fp, "* Author: Amin Ben Ramdhane <amin.benramdhane@pivasoftware.com>"
|
||||
print >> fp, "*/"
|
||||
print >> fp, ""
|
||||
print >> fp, "#include \"dmcwmp.h\""
|
||||
print >> fp, "#include \"dmbbf.h\""
|
||||
print >> fp, "#include \"dmcommon.h\""
|
||||
print >> fp, "#include \"%s.h\"" % filename.lower()
|
||||
print >> fp, ""
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue