mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2026-03-04 00:23:45 +01:00
Network update: deprecate vendor extension 'tvid'
This commit is contained in:
parent
4364f3b529
commit
d10bc99924
6 changed files with 0 additions and 110 deletions
|
|
@ -165,42 +165,6 @@ void bridging_set_priority_list(char *uci_opt_name, void *data, char *value)
|
|||
}
|
||||
}
|
||||
|
||||
void bridging_get_vlan_tvid(char *uci_opt_name, void *data, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string(((struct bridge_vlan_args *)data)->bridge_vlan_sec, uci_opt_name, value);
|
||||
}
|
||||
|
||||
void bridging_set_vlan_tvid(char *uci_opt_name, void *data, char *value)
|
||||
{
|
||||
struct uci_section *dmmap_s = NULL;
|
||||
char *br_inst = NULL, *vlan_vid = NULL;
|
||||
|
||||
dmuci_get_value_by_section_string(((struct bridge_vlan_args *)data)->bridge_vlan_sec, "br_inst", &br_inst);
|
||||
dmuci_get_value_by_section_string(((struct bridge_vlan_args *)data)->bridge_vlan_sec, "vid", &vlan_vid);
|
||||
if (DM_STRLEN(vlan_vid) == 0)
|
||||
goto end;
|
||||
|
||||
uci_path_foreach_option_eq(bbfdm, "dmmap_bridge_vlanport", "bridge_vlanport", "br_inst", br_inst, dmmap_s) {
|
||||
char *curr_name = NULL;
|
||||
|
||||
dmuci_get_value_by_section_string(dmmap_s, "name", &curr_name);
|
||||
if (DM_STRLEN(curr_name) == 0)
|
||||
continue;
|
||||
|
||||
if (DM_STRSTR(curr_name, vlan_vid) != NULL) {
|
||||
struct uci_section *s = NULL;
|
||||
char *dev_name = NULL;
|
||||
|
||||
dmuci_get_value_by_section_string(dmmap_s, "device_name", &dev_name);
|
||||
get_config_section_of_dmmap_section("network", "device", dev_name, &s);
|
||||
if (s) dmuci_set_value_by_section(s, "tvid", value);
|
||||
}
|
||||
}
|
||||
|
||||
end:
|
||||
dmuci_set_value_by_section(((struct bridge_vlan_args *)data)->bridge_vlan_sec, uci_opt_name, !DM_LSTRCMP(value, "0") ? "" : value);
|
||||
}
|
||||
|
||||
static void bridge_remove_related_device_section(struct uci_list *br_ports_list)
|
||||
{
|
||||
struct uci_element *e = NULL;
|
||||
|
|
@ -2953,21 +2917,6 @@ static int set_BridgingBridgeVLANPort_VLAN(char *refparam, struct dmctx *ctx, vo
|
|||
dmuci_set_value_by_section(((struct bridge_vlanport_args *)data)->bridge_vlanport_sec, "vid", new_vid);
|
||||
}
|
||||
dmfree(new_vid);
|
||||
|
||||
/* Update tvid, read from dmmap_bridge_vlan, set in vlanport_sec */
|
||||
struct uci_section *vlan_s = NULL;
|
||||
|
||||
uci_path_foreach_option_eq(bbfdm, "dmmap_bridge_vlan", "bridge_vlan", "br_inst", ((struct bridge_vlanport_args *)data)->br_inst, vlan_s) {
|
||||
char *vlan_inst = NULL;
|
||||
|
||||
dmuci_get_value_by_section_string(vlan_s, "bridge_vlan_instance", &vlan_inst);
|
||||
if (vlan_inst && DM_STRCMP(vlan_inst, instance) == 0) {
|
||||
char *tvid;
|
||||
dmuci_get_value_by_section_string(vlan_s, "tvid", &tvid);
|
||||
dmuci_set_value_by_section(((struct bridge_vlanport_args *)data)->bridge_vlanport_sec, "tvid", tvid);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
handle_inner_vid();
|
||||
|
|
|
|||
|
|
@ -38,6 +38,4 @@ extern DMLEAF tBridgingProviderBridgeParams[];
|
|||
void bridging_get_priority_list(char *uci_opt_name, void *data, char **value);
|
||||
void bridging_set_priority_list(char *uci_opt_name, void *data, char *value);
|
||||
|
||||
void bridging_get_vlan_tvid(char *uci_opt_name, void *data, char **value);
|
||||
void bridging_set_vlan_tvid(char *uci_opt_name, void *data, char *value);
|
||||
#endif
|
||||
|
|
|
|||
26
dmtree/vendor/iopsys/tr181/bridging.c
vendored
26
dmtree/vendor/iopsys/tr181/bridging.c
vendored
|
|
@ -39,26 +39,6 @@ static int set_BridgingBridgePort_Egress_PriorityRegeneration(char *refparam, st
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int get_BridgingBridgeVLAN_TVID(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
bridging_get_vlan_tvid("tvid", data, value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int set_BridgingBridgeVLAN_TVID(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
|
||||
{
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_int(value, RANGE_ARGS{{"0","4094"}}, 1))
|
||||
return FAULT_9007;
|
||||
return 0;
|
||||
case VALUESET:
|
||||
bridging_set_vlan_tvid("tvid", data, value);
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************************
|
||||
* OBJ & PARAM DEFINITION
|
||||
***********************************************************************************************************************************/
|
||||
|
|
@ -67,9 +47,3 @@ DMLEAF tIOPSYS_BridgingBridgePortParams[] = {
|
|||
{BBF_VENDOR_PREFIX"EgressPriorityRegeneration", &DMWRITE, DMT_STRING, get_BridgingBridgePort_Egress_PriorityRegeneration, set_BridgingBridgePort_Egress_PriorityRegeneration, BBFDM_BOTH},
|
||||
{0}
|
||||
};
|
||||
|
||||
DMLEAF tIOPSYS_BridgingBridgeVLANParams[] = {
|
||||
/* PARAM, permission, type, getvalue, setvalue, bbfdm_type*/
|
||||
{BBF_VENDOR_PREFIX"TVID", &DMWRITE, DMT_INT, get_BridgingBridgeVLAN_TVID, set_BridgingBridgeVLAN_TVID, BBFDM_BOTH},
|
||||
{0}
|
||||
};
|
||||
|
|
|
|||
1
dmtree/vendor/iopsys/tr181/bridging.h
vendored
1
dmtree/vendor/iopsys/tr181/bridging.h
vendored
|
|
@ -15,6 +15,5 @@
|
|||
#include "libbbf_api/dmcommon.h"
|
||||
|
||||
extern DMLEAF tIOPSYS_BridgingBridgePortParams[];
|
||||
extern DMLEAF tIOPSYS_BridgingBridgeVLANParams[];
|
||||
|
||||
#endif //__IOPSYS_BRIDGING_H
|
||||
|
|
|
|||
1
dmtree/vendor/iopsys/tr181/vendor.c
vendored
1
dmtree/vendor/iopsys/tr181/vendor.c
vendored
|
|
@ -27,7 +27,6 @@ DM_MAP_OBJ tVendorExtensionIOPSYS[] = {
|
|||
{"Device.Ethernet.VLANTermination.{i}.", NULL, tIOPSYS_EthernetVLANTerminationParams},
|
||||
{"Device.Time.", NULL, tIOPSYS_TimeParams},
|
||||
{"Device.Bridging.Bridge.{i}.Port.{i}.", NULL, tIOPSYS_BridgingBridgePortParams},
|
||||
{"Device.Bridging.Bridge.{i}.VLAN.{i}.", NULL, tIOPSYS_BridgingBridgeVLANParams},
|
||||
{"Device.Services.VoiceService.{i}.CallLog.{i}.", NULL, tIOPSYS_VoiceServiceCallLogParams},
|
||||
{"Device.Services.VoiceService.{i}.CallLog.{i}.Session.{i}.Source.RTP.", NULL, tIOPSYS_VoiceServiceCallLogSessionSourceRTPParams},
|
||||
{"Device.Services.VoiceService.{i}.CallLog.{i}.Session.{i}.Destination.RTP.", NULL, tIOPSYS_VoiceServiceCallLogSessionDestinationRTPParams},
|
||||
|
|
|
|||
29
dmtree/vendor/iopsys/vendor.json
vendored
29
dmtree/vendor/iopsys/vendor.json
vendored
|
|
@ -498,35 +498,6 @@
|
|||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"Device.Bridging.Bridge.{i}.VLAN.{i}.": {
|
||||
"type": "object",
|
||||
"version": "2.5",
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"description": "Bridge VLAN table. If this table is supported, if MUST contain an entry for each VLAN known to the Bridge. This table only applies to an 802.1Q <<bibref|802.1Q-2011>> Bridge.",
|
||||
"access": true,
|
||||
"array": true,
|
||||
"{BBF_VENDOR_PREFIX}TVID": {
|
||||
"type": "int",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"version": "2.5",
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"description": "Translate vlan from lan network with new VLAN ID",
|
||||
"datatype": "int",
|
||||
"range" : [
|
||||
{
|
||||
"min": 0,
|
||||
"max": 4094
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue