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
7
Merge Requests
7
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
8b534e10
Commit
8b534e10
authored
Apr 18, 2016
by
Adam Wujek
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib/snmp: add wrpcVersionSwBuildDate
Signed-off-by:
Adam Wujek
<
adam.wujek@cern.ch
>
parent
440f4126
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
+12
-8
WR-WRPC-MIB.txt
lib/WR-WRPC-MIB.txt
+7
-7
snmp.c
lib/snmp.c
+5
-1
No files found.
lib/WR-WRPC-MIB.txt
View file @
8b534e10
...
...
@@ -67,13 +67,13 @@ wrpcVersionSwBuildBy OBJECT-TYPE
'git config -get-all user.name' at build time"
::= { wrpcVersionGroup 3 }
--x
wrpcVersionSwBuildDate OBJECT-TYPE
--x
SYNTAX DisplayString (SIZE (0..31))
--x
MAX-ACCESS read-only
--x
STATUS current
--x
DESCRIPTION
--x
"The build time and date of the software"
--x
::= { wrpcVersionGroup 4 }
wrpcVersionSwBuildDate OBJECT-TYPE
SYNTAX DisplayString (SIZE (0..31))
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The build time and date of the software"
::= { wrpcVersionGroup 4 }
--x wrpcVersionGwVersion OBJECT-TYPE
--x SYNTAX DisplayString (SIZE (0..31))
...
...
lib/snmp.c
View file @
8b534e10
...
...
@@ -110,6 +110,9 @@ extern struct pp_instance ppi_static;
static
struct
wr_servo_state
*
wr_s_state
;
#define SNMP_HW_TYPE_LEN 32
char
snmp_hw_type
[
SNMP_HW_TYPE_LEN
]
=
CONFIG_SNMP_HW_TYPE
;
/* __DATE__ and __TIME__ is already stored in struct spll_stats stats, but
* redefining it here makes code smaller than concatenate existing one */
static
char
*
snmp_build_date
=
__DATE__
" "
__TIME__
;
/* store SNMP version, not fully used yet */
uint8_t
snmp_version
;
...
...
@@ -127,10 +130,10 @@ 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_p
(
uint8_t
*
buf
,
struct
snmp_oid
*
obj
);
static
uint8_t
oid_wrpcVersionHwType
[]
=
{
0x2B
,
6
,
1
,
4
,
1
,
96
,
101
,
1
,
1
,
1
,
0
};
static
uint8_t
oid_wrpcVersionSwVersion
[]
=
{
0x2B
,
6
,
1
,
4
,
1
,
96
,
101
,
1
,
1
,
2
,
0
};
static
uint8_t
oid_wrpcVersionSwBuildBy
[]
=
{
0x2B
,
6
,
1
,
4
,
1
,
96
,
101
,
1
,
1
,
3
,
0
};
static
uint8_t
oid_wrpcVersionSwBuildDate
[]
=
{
0x2B
,
6
,
1
,
4
,
1
,
96
,
101
,
1
,
1
,
4
,
0
};
/* NOTE: to have SNMP_GET_NEXT working properly this array has to be sorted by
OIDs */
...
...
@@ -138,6 +141,7 @@ static struct snmp_oid oid_array[] = {
OID_FIELD_VAR
(
oid_wrpcVersionHwType
,
get_p
,
NO_SET
,
ASN_OCTET_STR
,
&
snmp_hw_type
),
OID_FIELD_VAR
(
oid_wrpcVersionSwVersion
,
get_pp
,
NO_SET
,
ASN_OCTET_STR
,
&
build_revision
),
OID_FIELD_VAR
(
oid_wrpcVersionSwBuildBy
,
get_pp
,
NO_SET
,
ASN_OCTET_STR
,
&
build_by
),
OID_FIELD_VAR
(
oid_wrpcVersionSwBuildDate
,
get_pp
,
NO_SET
,
ASN_OCTET_STR
,
&
snmp_build_date
),
{
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