Commit 71c8c3cd authored by Michal Wasiak's avatar Michal Wasiak Committed by Adam Wujek

snmp/bridge_mib: update dot1qVlanStaticTable

Signed-off-by: 's avatarMichal Wasiak <michal.wasiak@gmail.com>
parent e694ef3f
......@@ -7,6 +7,7 @@ BRIDGE_DIRS= \
dot1qFdbTable \
dot1qPortVlanTable \
dot1qTpFdbTable \
dot1qVlanStaticTable \
BRIDGE_INCLUDE_DIRS:=$(addsuffix /Makefile,$(BRIDGE_DIRS))
BRIDGE_INCLUDE_DIRS:=$(addprefix $(BRIDGE_MIB_DIR)/,$(BRIDGE_INCLUDE_DIRS))
......
BRIDGE_MIB_SRCS += \
dot1qVlanStaticTable/dot1qVlanStaticTable.c \
dot1qVlanStaticTable/dot1qVlanStaticTable_data_get.c \
dot1qVlanStaticTable/dot1qVlanStaticTable_data_set.c \
dot1qVlanStaticTable/dot1qVlanStaticTable_data_access.c \
dot1qVlanStaticTable/dot1qVlanStaticTable_interface.c
......@@ -466,86 +466,6 @@ dot1qVlanStaticUntaggedPorts_get( dot1qVlanStaticTable_rowreq_ctx *rowreq_ctx, c
return MFD_SUCCESS;
} /* dot1qVlanStaticUntaggedPorts_get */
/*---------------------------------------------------------------------
* Q-BRIDGE-MIB::dot1qVlanStaticEntry.dot1qVlanStaticRowStatus
* dot1qVlanStaticRowStatus is subid 5 of dot1qVlanStaticEntry.
* Its status is Current, and its access level is Create.
* OID: .1.3.6.1.2.1.17.7.1.4.3.1.5
* Description:
This object indicates the status of this entry.
*
* Attributes:
* accessible 1 isscalar 0 enums 1 hasdefval 0
* readable 1 iscolumn 1 ranges 0 hashint 0
* settable 1
*
* Enum range: 4/8. Values: active(1), notInService(2), notReady(3), createAndGo(4), createAndWait(5), destroy(6)
*
* Its syntax is RowStatus (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-dot1qVlanStaticRowStatus.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
dot1qVlanStaticRowStatus_map(u_long *mib_dot1qVlanStaticRowStatus_val_ptr, u_long raw_dot1qVlanStaticRowStatus_val)
{
netsnmp_assert(NULL != mib_dot1qVlanStaticRowStatus_val_ptr);
DEBUGMSGTL(("verbose:dot1qVlanStaticTable:dot1qVlanStaticRowStatus_map","called\n"));
/*
* TODO:241:o: |-> Implement dot1qVlanStaticRowStatus enum mapping.
* uses INTERNAL_* macros defined in the header files
*/
switch(raw_dot1qVlanStaticRowStatus_val) {
case INTERNAL_DOT1QVLANSTATICTABLE_DOT1QVLANSTATICROWSTATUS_ACTIVE:
*mib_dot1qVlanStaticRowStatus_val_ptr = ROWSTATUS_ACTIVE;
break;
case INTERNAL_DOT1QVLANSTATICTABLE_DOT1QVLANSTATICROWSTATUS_NOTINSERVICE:
*mib_dot1qVlanStaticRowStatus_val_ptr = ROWSTATUS_NOTINSERVICE;
break;
case INTERNAL_DOT1QVLANSTATICTABLE_DOT1QVLANSTATICROWSTATUS_NOTREADY:
*mib_dot1qVlanStaticRowStatus_val_ptr = ROWSTATUS_NOTREADY;
break;
case INTERNAL_DOT1QVLANSTATICTABLE_DOT1QVLANSTATICROWSTATUS_CREATEANDGO:
*mib_dot1qVlanStaticRowStatus_val_ptr = ROWSTATUS_CREATEANDGO;
break;
case INTERNAL_DOT1QVLANSTATICTABLE_DOT1QVLANSTATICROWSTATUS_CREATEANDWAIT:
*mib_dot1qVlanStaticRowStatus_val_ptr = ROWSTATUS_CREATEANDWAIT;
break;
case INTERNAL_DOT1QVLANSTATICTABLE_DOT1QVLANSTATICROWSTATUS_DESTROY:
*mib_dot1qVlanStaticRowStatus_val_ptr = ROWSTATUS_DESTROY;
break;
default:
snmp_log(LOG_ERR, "couldn't map value %ld for dot1qVlanStaticRowStatus\n", raw_dot1qVlanStaticRowStatus_val );
return MFD_ERROR;
}
return MFD_SUCCESS;
} /* dot1qVlanStaticRowStatus_map */
/**
* Extract the current value of the dot1qVlanStaticRowStatus data.
*
......
......@@ -43,15 +43,10 @@ extern "C" {
*/
int dot1qVlanIndex_map(u_long *mib_dot1qVlanIndex_val_ptr, u_long raw_dot1qVlanIndex_val);
int dot1qVlanStaticName_map(char **mib_dot1qVlanStaticName_val_ptr_ptr, size_t *mib_dot1qVlanStaticName_val_ptr_len_ptr, char *raw_dot1qVlanStaticName_val_ptr, size_t raw_dot1qVlanStaticName_val_ptr_len, int allow_realloc);
int dot1qVlanStaticName_get( dot1qVlanStaticTable_rowreq_ctx *rowreq_ctx, char **dot1qVlanStaticName_val_ptr_ptr, size_t *dot1qVlanStaticName_val_ptr_len_ptr );
int dot1qVlanStaticEgressPorts_map(char **mib_dot1qVlanStaticEgressPorts_val_ptr_ptr, size_t *mib_dot1qVlanStaticEgressPorts_val_ptr_len_ptr, char *raw_dot1qVlanStaticEgressPorts_val_ptr, size_t raw_dot1qVlanStaticEgressPorts_val_ptr_len, int allow_realloc);
int dot1qVlanStaticEgressPorts_get( dot1qVlanStaticTable_rowreq_ctx *rowreq_ctx, char **dot1qVlanStaticEgressPorts_val_ptr_ptr, size_t *dot1qVlanStaticEgressPorts_val_ptr_len_ptr );
int dot1qVlanForbiddenEgressPorts_map(char **mib_dot1qVlanForbiddenEgressPorts_val_ptr_ptr, size_t *mib_dot1qVlanForbiddenEgressPorts_val_ptr_len_ptr, char *raw_dot1qVlanForbiddenEgressPorts_val_ptr, size_t raw_dot1qVlanForbiddenEgressPorts_val_ptr_len, int allow_realloc);
int dot1qVlanForbiddenEgressPorts_get( dot1qVlanStaticTable_rowreq_ctx *rowreq_ctx, char **dot1qVlanForbiddenEgressPorts_val_ptr_ptr, size_t *dot1qVlanForbiddenEgressPorts_val_ptr_len_ptr );
int dot1qVlanStaticUntaggedPorts_map(char **mib_dot1qVlanStaticUntaggedPorts_val_ptr_ptr, size_t *mib_dot1qVlanStaticUntaggedPorts_val_ptr_len_ptr, char *raw_dot1qVlanStaticUntaggedPorts_val_ptr, size_t raw_dot1qVlanStaticUntaggedPorts_val_ptr_len, int allow_realloc);
int dot1qVlanStaticUntaggedPorts_get( dot1qVlanStaticTable_rowreq_ctx *rowreq_ctx, char **dot1qVlanStaticUntaggedPorts_val_ptr_ptr, size_t *dot1qVlanStaticUntaggedPorts_val_ptr_len_ptr );
int dot1qVlanStaticRowStatus_map(u_long *mib_dot1qVlanStaticRowStatus_val_ptr, u_long raw_dot1qVlanStaticRowStatus_val);
int dot1qVlanStaticRowStatus_get( dot1qVlanStaticTable_rowreq_ctx *rowreq_ctx, u_long * dot1qVlanStaticRowStatus_val_ptr );
......
......@@ -16,6 +16,7 @@
#include "dot1qFdbTable/dot1qFdbTable.h"
#include "dot1qPortVlanTable/dot1qPortVlanTable.h"
#include "dot1qTpFdbTable/dot1qTpFdbTable.h"
#include "dot1qVlanStaticTable/dot1qVlanStaticTable.h"
void init_bridge_mib(void)
{
......@@ -27,4 +28,5 @@ void init_bridge_mib(void)
init_dot1qFdbTable();
init_dot1qPortVlanTable();
init_dot1qTpFdbTable();
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