Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
86
Issues
86
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Software
Commits
6907596b
Commit
6907596b
authored
Oct 14, 2020
by
Michal Wasiak
Committed by
Adam Wujek
Oct 29, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
snmp/bridge_mib: update dot1dStaticTable
Signed-off-by:
Michal Wasiak
<
michal.wasiak@gmail.com
>
parent
8886548b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
145 additions
and
191 deletions
+145
-191
Makefile
userspace/snmpd/bridge_mib/Makefile
+1
-0
Makefile
userspace/snmpd/bridge_mib/dot1dStaticTable/Makefile
+7
-0
dot1dStaticTable_data_access.c
...ridge_mib/dot1dStaticTable/dot1dStaticTable_data_access.c
+129
-158
dot1dStaticTable_data_get.c
...d/bridge_mib/dot1dStaticTable/dot1dStaticTable_data_get.c
+6
-20
dot1dStaticTable_enums.h
...nmpd/bridge_mib/dot1dStaticTable/dot1dStaticTable_enums.h
+0
-13
init_bridge_mib.c
userspace/snmpd/bridge_mib/init_bridge_mib.c
+2
-0
No files found.
userspace/snmpd/bridge_mib/Makefile
View file @
6907596b
...
...
@@ -2,6 +2,7 @@
BRIDGE_DIRS
=
\
dot1dBasePortTable
\
dot1dStaticTable
\
dot1dTpFdbTable
\
dot1qFdbTable
\
dot1qTpFdbTable
\
...
...
userspace/snmpd/bridge_mib/dot1dStaticTable/Makefile
0 → 100644
View file @
6907596b
BRIDGE_MIB_SRCS
+=
\
dot1dStaticTable/dot1dStaticTable.c
\
dot1dStaticTable/dot1dStaticTable_data_get.c
\
dot1dStaticTable/dot1dStaticTable_data_set.c
\
dot1dStaticTable/dot1dStaticTable_data_access.c
\
dot1dStaticTable/dot1dStaticTable_interface.c
userspace/snmpd/bridge_mib/dot1dStaticTable/dot1dStaticTable_data_access.c
View file @
6907596b
This diff is collapsed.
Click to expand it.
userspace/snmpd/bridge_mib/dot1dStaticTable/dot1dStaticTable_data_get.c
View file @
6907596b
...
...
@@ -10,6 +10,9 @@
#include <net-snmp/net-snmp-includes.h>
#include <net-snmp/agent/net-snmp-agent-includes.h>
#include "wrsSnmp.h"
#include "snmp_shmem.h"
/* include our parent header */
#include "dot1dStaticTable.h"
...
...
@@ -290,29 +293,12 @@ dot1dStaticStatus_map(u_long *mib_dot1dStaticStatus_val_ptr, u_long raw_dot1dSta
* uses INTERNAL_* macros defined in the header files
*/
switch
(
raw_dot1dStaticStatus_val
)
{
case
INTERNAL_DOT1DSTATICTABLE_DOT1DSTATICSTATUS_OTHER
:
*
mib_dot1dStaticStatus_val_ptr
=
DOT1DSTATICSTATUS_OTHER
;
break
;
case
INTERNAL_DOT1DSTATICTABLE_DOT1DSTATICSTATUS_INVALID
:
*
mib_dot1dStaticStatus_val_ptr
=
DOT1DSTATICSTATUS_INVALID
;
break
;
case
INTERNAL_DOT1DSTATICTABLE_DOT1DSTATICSTATUS_PERMANENT
:
case
RTU_ENTRY_TYPE_STATIC
:
*
mib_dot1dStaticStatus_val_ptr
=
DOT1DSTATICSTATUS_PERMANENT
;
break
;
case
INTERNAL_DOT1DSTATICTABLE_DOT1DSTATICSTATUS_DELETEONRESET
:
*
mib_dot1dStaticStatus_val_ptr
=
DOT1DSTATICSTATUS_DELETEONRESET
;
break
;
case
INTERNAL_DOT1DSTATICTABLE_DOT1DSTATICSTATUS_DELETEONTIMEOUT
:
*
mib_dot1dStaticStatus_val_ptr
=
DOT1DSTATICSTATUS_DELETEONTIMEOUT
;
break
;
default:
snmp_log
(
LOG_ERR
,
"couldn't map value %ld for dot1dStaticStatus
\n
"
,
raw_dot1dStaticStatus_val
);
return
MFD_ERROR
;
default:
*
mib_dot1dStaticStatus_val_ptr
=
DOT1DSTATICSTATUS_OTHER
;
}
return
MFD_SUCCESS
;
...
...
userspace/snmpd/bridge_mib/dot1dStaticTable/dot1dStaticTable_enums.h
View file @
6907596b
...
...
@@ -49,19 +49,6 @@ extern "C" {
#endif
/* DOT1DSTATICSTATUS_ENUMS */
/*
* TODO:140:o: Define your interal representation of dot1dStaticStatus enums.
* (used for value mapping; see notes at top of file)
*/
#define INTERNAL_DOT1DSTATICTABLE_DOT1DSTATICSTATUS_OTHER 1
#define INTERNAL_DOT1DSTATICTABLE_DOT1DSTATICSTATUS_INVALID 2
#define INTERNAL_DOT1DSTATICTABLE_DOT1DSTATICSTATUS_PERMANENT 3
#define INTERNAL_DOT1DSTATICTABLE_DOT1DSTATICSTATUS_DELETEONRESET 4
#define INTERNAL_DOT1DSTATICTABLE_DOT1DSTATICSTATUS_DELETEONTIMEOUT 5
#ifdef __cplusplus
}
#endif
...
...
userspace/snmpd/bridge_mib/init_bridge_mib.c
View file @
6907596b
...
...
@@ -10,6 +10,7 @@
#include "snmp_shmem.h"
#include "dot1dBase.h"
#include "dot1dBasePortTable/dot1dBasePortTable.h"
#include "dot1dStaticTable/dot1dStaticTable.h"
#include "dot1dTpFdbTable/dot1dTpFdbTable.h"
#include "dot1qFdbTable/dot1qFdbTable.h"
#include "dot1qTpFdbTable/dot1qTpFdbTable.h"
...
...
@@ -18,6 +19,7 @@ void init_bridge_mib(void)
{
init_dot1dBase
();
init_dot1dBasePortTable
();
init_dot1dStaticTable
();
init_dot1dTpFdbTable
();
init_dot1qFdbTable
();
init_dot1qTpFdbTable
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment