Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
32
Issues
32
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
Software for White Rabbit PTP Core
Commits
44fec5d1
Commit
44fec5d1
authored
Apr 18, 2016
by
Adam Wujek
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib/snmp: add wrpcVersionHwType
Signed-off-by:
Adam Wujek
<
adam.wujek@cern.ch
>
parent
9d52aaaf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
14 deletions
+17
-14
Kconfig
Kconfig
+3
-3
WR-WRPC-MIB.txt
lib/WR-WRPC-MIB.txt
+8
-8
snmp.c
lib/snmp.c
+6
-3
No files found.
Kconfig
View file @
44fec5d1
...
@@ -148,10 +148,10 @@ config SNMP_SET
...
@@ -148,10 +148,10 @@ config SNMP_SET
help
help
This option enables support for SET requests for Mini SNMP responder
This option enables support for SET requests for Mini SNMP responder
config SNMP_
SYSTEM_NAM
E
config SNMP_
HW_TYP
E
depends on SNMP
depends on SNMP
default "
wrc-3.0
"
default "
spec
"
string "
System's name to be return
ed by SNMP"
string "
Hardware type report
ed by SNMP"
config BUILD_INIT
config BUILD_INIT
depends on WR_NODE
depends on WR_NODE
...
...
lib/WR-WRPC-MIB.txt
View file @
44fec5d1
...
@@ -40,15 +40,15 @@ wrpcCore OBJECT IDENTIFIER ::= { wrWrpcMIB 1 }
...
@@ -40,15 +40,15 @@ wrpcCore OBJECT IDENTIFIER ::= { wrWrpcMIB 1 }
--x wrpcCustom OBJECT IDENTIFIER ::= { wrWrpcMIB 2 }
--x wrpcCustom OBJECT IDENTIFIER ::= { wrWrpcMIB 2 }
-- ****************************************************************************
-- ****************************************************************************
--x
wrpcVersionGroup OBJECT IDENTIFIER ::= { wrpcCore 1 }
wrpcVersionGroup OBJECT IDENTIFIER ::= { wrpcCore 1 }
--x
wrpcVersionHwType OBJECT-TYPE
wrpcVersionHwType OBJECT-TYPE
--x
SYNTAX DisplayString (SIZE (0..31))
SYNTAX DisplayString (SIZE (0..31))
--x
MAX-ACCESS read-only
MAX-ACCESS read-only
--x
STATUS current
STATUS current
--x
DESCRIPTION
DESCRIPTION
--x
"The hw type"
"The hw type"
--x
::= { wrpcVersionGroup 1 }
::= { wrpcVersionGroup 1 }
--x wrpcVersionSwVersion OBJECT-TYPE
--x wrpcVersionSwVersion OBJECT-TYPE
--x SYNTAX DisplayString (SIZE (0..31))
--x SYNTAX DisplayString (SIZE (0..31))
...
...
lib/snmp.c
View file @
44fec5d1
...
@@ -108,8 +108,8 @@ struct snmp_oid {
...
@@ -108,8 +108,8 @@ struct snmp_oid {
extern
struct
pp_instance
ppi_static
;
extern
struct
pp_instance
ppi_static
;
static
struct
wr_servo_state
*
wr_s_state
;
static
struct
wr_servo_state
*
wr_s_state
;
#define SNMP_
SYSTEM_NAM
E_LEN 32
#define SNMP_
HW_TYP
E_LEN 32
char
snmp_
system_name
[
SNMP_SYSTEM_NAME_LEN
]
=
CONFIG_SNMP_SYSTEM_NAM
E
;
char
snmp_
hw_type
[
SNMP_HW_TYPE_LEN
]
=
CONFIG_SNMP_HW_TYP
E
;
/* store SNMP version, not fully used yet */
/* store SNMP version, not fully used yet */
uint8_t
snmp_version
;
uint8_t
snmp_version
;
...
@@ -127,10 +127,13 @@ static int get_i32sat(uint8_t *buf, uint8_t asn, void *p);
...
@@ -127,10 +127,13 @@ static int get_i32sat(uint8_t *buf, uint8_t asn, void *p);
static
int
set_pp
(
uint8_t
*
buf
,
struct
snmp_oid
*
obj
);
static
int
set_pp
(
uint8_t
*
buf
,
struct
snmp_oid
*
obj
);
static
int
set_p
(
uint8_t
*
buf
,
struct
snmp_oid
*
obj
);
static
int
set_p
(
uint8_t
*
buf
,
struct
snmp_oid
*
obj
);
static
uint8_t
oid_wrpcVersionHwType
[]
=
{
0x2B
,
6
,
1
,
4
,
1
,
96
,
101
,
1
,
1
,
1
,
0
};
/* NOTE: to have SNMP_GET_NEXT working properly this array has to be sorted by
/* NOTE: to have SNMP_GET_NEXT working properly this array has to be sorted by
OIDs */
OIDs */
static
struct
snmp_oid
oid_array
[]
=
{
static
struct
snmp_oid
oid_array
[]
=
{
OID_FIELD_VAR
(
oid_wrpcVersionHwType
,
get_p
,
NO_SET
,
ASN_OCTET_STR
,
&
snmp_hw_type
),
{
0
,
}
{
0
,
}
};
};
...
...
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