Dear all:
I use mib2c tool to generate one C code with ucd-snmp old api ,the smi file as follow:
{ABC-SMI DEFINITIONS ::= BEGIN
IMPORTS
enterprises
FROM RFC1155-SMI;
abc OBJECT IDENTIFIER ::= { enterprises 1234 }
abcSamples OBJECT IDENTIFIER ::= { abc 2356 }
systemsummary OBJECT IDENTIFIER ::= { abcSamples 1 }
-- object types
-- the systemsummary group
ssName OBJECT-TYPE
SYNTAX OCTET STRING
ACCESS read-only
STATUS mandatory
DESCRIPTION
"noname"
::= { systemsummary 1 }
}
a part of the file abc.c as follow:
{
static oid abc_variables_oid[] = { 1, 3, 6, 1, 4, 1, 1234};
struct variable4 via_variables[] = {
#define SSNAME 2
{SSNAME, ASN_OCTET_STR, RONLY, var_abc, 2, {1,1}},
}
init_abc(void)
{
DEBUGMSGTL(("via", "Initializing\n"));
/*
* register ourselves with the agent to handle our mib tree
*/
REGISTER_MIB("abc", via_variables, variable4, via_variables_oid);
.............
}
}
i can't understand where is the abcSamples ?After i compliled abc.c with other
code,and ran snmpd on my computer.I found i can't get SSNAME,i can get other nodes.so i thought mib2c make a mistake,i change abc.c like this:
struct variable7 via_variables[] = {
#define SSNAME 2
{SSNAME, ASN_OCTET_STR, RONLY, var_abc, 3, {2356, 1,1}},
}
REGISTER_MIB("abc", abc_variables, variable7, abc_variables_oid);
but i also can't get SSNAME,Could you kind show me what should I do ? thank you!!
regarts!
cindy