Commit a879488d authored by Michal Wasiak's avatar Michal Wasiak Committed by Adam Wujek

snmp/bridge_mib: update dot1qVlanCurrentTable

Signed-off-by: 's avatarMichal Wasiak <michal.wasiak@gmail.com>
parent 6fecc497
......@@ -7,6 +7,7 @@ BRIDGE_DIRS= \
dot1qFdbTable \
dot1qPortVlanTable \
dot1qTpFdbTable \
dot1qVlanCurrentTable \
dot1qVlanStaticTable \
BRIDGE_INCLUDE_DIRS:=$(addsuffix /Makefile,$(BRIDGE_DIRS))
......
BRIDGE_MIB_SRCS += \
dot1qVlanCurrentTable/dot1qVlanCurrentTable.c \
dot1qVlanCurrentTable/dot1qVlanCurrentTable_data_get.c \
dot1qVlanCurrentTable/dot1qVlanCurrentTable_data_set.c \
dot1qVlanCurrentTable/dot1qVlanCurrentTable_data_access.c \
dot1qVlanCurrentTable/dot1qVlanCurrentTable_interface.c
......@@ -336,88 +336,6 @@ dot1qVlanCurrentUntaggedPorts_get( dot1qVlanCurrentTable_rowreq_ctx *rowreq_ctx,
return MFD_SUCCESS;
} /* dot1qVlanCurrentUntaggedPorts_get */
/*---------------------------------------------------------------------
* Q-BRIDGE-MIB::dot1qVlanCurrentEntry.dot1qVlanStatus
* dot1qVlanStatus is subid 6 of dot1qVlanCurrentEntry.
* Its status is Current, and its access level is ReadOnly.
* OID: .1.3.6.1.2.1.17.7.1.4.2.1.6
* Description:
This object indicates the status of this entry.
other(1) - this entry is currently in use, but the
conditions under which it will remain so differ
from the following values.
permanent(2) - this entry, corresponding to an entry
in dot1qVlanStaticTable, is currently in use and
will remain so after the next reset of the
device. The port lists for this entry include
ports from the equivalent dot1qVlanStaticTable
entry and ports learned dynamically.
dynamicGvrp(3) - this entry is currently in use
and will remain so until removed by GVRP. There
is no static entry for this VLAN, and it will be
removed when the last port leaves the VLAN.
*
* Attributes:
* accessible 1 isscalar 0 enums 1 hasdefval 0
* readable 1 iscolumn 1 ranges 0 hashint 0
* settable 0
*
* Enum range: 3/8. Values: other(1), permanent(2), dynamicGvrp(3)
*
* Its syntax is INTEGER (based on perltype INTEGER)
* The net-snmp type is ASN_INTEGER. The C type decl is long (u_long)
*/
/**
* map a value from its original native format to the MIB format.
*
* @retval MFD_SUCCESS : success
* @retval MFD_ERROR : Any other error
*
* @note parameters follow the memset convention (dest, src).
*
* @note generation and use of this function can be turned off by re-running
* mib2c after adding the following line to the file
* defaults/node-dot1qVlanStatus.m2d :
* @eval $m2c_node_skip_mapping = 1@
*
* @remark
* If the values for your data type don't exactly match the
* possible values defined by the mib, you should map them here.
* Otherwise, just do a direct copy.
*/
int
dot1qVlanStatus_map(u_long *mib_dot1qVlanStatus_val_ptr, u_long raw_dot1qVlanStatus_val)
{
netsnmp_assert(NULL != mib_dot1qVlanStatus_val_ptr);
DEBUGMSGTL(("verbose:dot1qVlanCurrentTable:dot1qVlanStatus_map","called\n"));
/*
* TODO:241:o: |-> Implement dot1qVlanStatus enum mapping.
* uses INTERNAL_* macros defined in the header files
*/
switch(raw_dot1qVlanStatus_val) {
case INTERNAL_DOT1QVLANCURRENTTABLE_DOT1QVLANSTATUS_OTHER:
*mib_dot1qVlanStatus_val_ptr = DOT1QVLANSTATUS_OTHER;
break;
case INTERNAL_DOT1QVLANCURRENTTABLE_DOT1QVLANSTATUS_PERMANENT:
*mib_dot1qVlanStatus_val_ptr = DOT1QVLANSTATUS_PERMANENT;
break;
case INTERNAL_DOT1QVLANCURRENTTABLE_DOT1QVLANSTATUS_DYNAMICGVRP:
*mib_dot1qVlanStatus_val_ptr = DOT1QVLANSTATUS_DYNAMICGVRP;
break;
default:
snmp_log(LOG_ERR, "couldn't map value %ld for dot1qVlanStatus\n", raw_dot1qVlanStatus_val );
return MFD_ERROR;
}
return MFD_SUCCESS;
} /* dot1qVlanStatus_map */
/**
* Extract the current value of the dot1qVlanStatus data.
*
......
......@@ -41,18 +41,10 @@ extern "C" {
/*
* indexes
*/
int dot1qVlanTimeMark_map(u_long *mib_dot1qVlanTimeMark_val_ptr, u_long raw_dot1qVlanTimeMark_val);
int dot1qVlanIndex_map(u_long *mib_dot1qVlanIndex_val_ptr, u_long raw_dot1qVlanIndex_val);
int dot1qVlanFdbId_map(u_long *mib_dot1qVlanFdbId_val_ptr, u_long raw_dot1qVlanFdbId_val);
int dot1qVlanFdbId_get( dot1qVlanCurrentTable_rowreq_ctx *rowreq_ctx, u_long * dot1qVlanFdbId_val_ptr );
int dot1qVlanCurrentEgressPorts_map(char **mib_dot1qVlanCurrentEgressPorts_val_ptr_ptr, size_t *mib_dot1qVlanCurrentEgressPorts_val_ptr_len_ptr, char *raw_dot1qVlanCurrentEgressPorts_val_ptr, size_t raw_dot1qVlanCurrentEgressPorts_val_ptr_len, int allow_realloc);
int dot1qVlanCurrentEgressPorts_get( dot1qVlanCurrentTable_rowreq_ctx *rowreq_ctx, char **dot1qVlanCurrentEgressPorts_val_ptr_ptr, size_t *dot1qVlanCurrentEgressPorts_val_ptr_len_ptr );
int dot1qVlanCurrentUntaggedPorts_map(char **mib_dot1qVlanCurrentUntaggedPorts_val_ptr_ptr, size_t *mib_dot1qVlanCurrentUntaggedPorts_val_ptr_len_ptr, char *raw_dot1qVlanCurrentUntaggedPorts_val_ptr, size_t raw_dot1qVlanCurrentUntaggedPorts_val_ptr_len, int allow_realloc);
int dot1qVlanCurrentUntaggedPorts_get( dot1qVlanCurrentTable_rowreq_ctx *rowreq_ctx, char **dot1qVlanCurrentUntaggedPorts_val_ptr_ptr, size_t *dot1qVlanCurrentUntaggedPorts_val_ptr_len_ptr );
int dot1qVlanStatus_map(u_long *mib_dot1qVlanStatus_val_ptr, u_long raw_dot1qVlanStatus_val);
int dot1qVlanStatus_get( dot1qVlanCurrentTable_rowreq_ctx *rowreq_ctx, u_long * dot1qVlanStatus_val_ptr );
int dot1qVlanCreationTime_map(u_long *mib_dot1qVlanCreationTime_val_ptr, u_long raw_dot1qVlanCreationTime_val);
int dot1qVlanCreationTime_get( dot1qVlanCurrentTable_rowreq_ctx *rowreq_ctx, u_long * dot1qVlanCreationTime_val_ptr );
......
......@@ -16,6 +16,7 @@
#include "dot1qFdbTable/dot1qFdbTable.h"
#include "dot1qPortVlanTable/dot1qPortVlanTable.h"
#include "dot1qTpFdbTable/dot1qTpFdbTable.h"
#include "dot1qVlanCurrentTable/dot1qVlanCurrentTable.h"
#include "dot1qVlanStaticTable/dot1qVlanStaticTable.h"
void init_bridge_mib(void)
......@@ -28,5 +29,6 @@ void init_bridge_mib(void)
init_dot1qFdbTable();
init_dot1qPortVlanTable();
init_dot1qTpFdbTable();
init_dot1qVlanCurrentTable();
init_dot1qVlanStaticTable();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment