Commit 44fec5d1 authored by Adam Wujek's avatar Adam Wujek 💬

lib/snmp: add wrpcVersionHwType

Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 9d52aaaf
......@@ -148,10 +148,10 @@ config SNMP_SET
help
This option enables support for SET requests for Mini SNMP responder
config SNMP_SYSTEM_NAME
config SNMP_HW_TYPE
depends on SNMP
default "wrc-3.0"
string "System's name to be returned by SNMP"
default "spec"
string "Hardware type reported by SNMP"
config BUILD_INIT
depends on WR_NODE
......
......@@ -40,15 +40,15 @@ wrpcCore OBJECT IDENTIFIER ::= { wrWrpcMIB 1 }
--x wrpcCustom OBJECT IDENTIFIER ::= { wrWrpcMIB 2 }
-- ****************************************************************************
--x wrpcVersionGroup OBJECT IDENTIFIER ::= { wrpcCore 1 }
wrpcVersionGroup OBJECT IDENTIFIER ::= { wrpcCore 1 }
--x wrpcVersionHwType OBJECT-TYPE
--x SYNTAX DisplayString (SIZE (0..31))
--x MAX-ACCESS read-only
--x STATUS current
--x DESCRIPTION
--x "The hw type"
--x ::= { wrpcVersionGroup 1 }
wrpcVersionHwType OBJECT-TYPE
SYNTAX DisplayString (SIZE (0..31))
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The hw type"
::= { wrpcVersionGroup 1 }
--x wrpcVersionSwVersion OBJECT-TYPE
--x SYNTAX DisplayString (SIZE (0..31))
......
......@@ -108,8 +108,8 @@ struct snmp_oid {
extern struct pp_instance ppi_static;
static struct wr_servo_state *wr_s_state;
#define SNMP_SYSTEM_NAME_LEN 32
char snmp_system_name[SNMP_SYSTEM_NAME_LEN] = CONFIG_SNMP_SYSTEM_NAME;
#define SNMP_HW_TYPE_LEN 32
char snmp_hw_type[SNMP_HW_TYPE_LEN] = CONFIG_SNMP_HW_TYPE;
/* store SNMP version, not fully used yet */
uint8_t snmp_version;
......@@ -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_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
OIDs */
static struct snmp_oid oid_array[] = {
OID_FIELD_VAR( oid_wrpcVersionHwType, get_p, NO_SET, ASN_OCTET_STR, &snmp_hw_type),
{ 0, }
};
......
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