Hi all,
I am using net-snmp 5.4.2.1 and created template code using "mib2c.create-dataset.conf" file for the attached ABC-MIB file. That subagent will read the data.txt file and created each row for each line in that file. An alarm was registered in "abc.c" to update the table but I don't know how to get the rows using index number. Please check the attached files and guide me. Thanks, Prakash Raju
Makefile
Description: Binary data
abc.h
Description: Binary data
ABC-MIB DEFINITIONS ::= BEGIN
IMPORTS
RowStatus
FROM SNMPv2-TC
OBJECT-GROUP, NOTIFICATION-GROUP
FROM SNMPv2-CONF
enterprises, MODULE-IDENTITY, OBJECT-TYPE, Integer32,
NOTIFICATION-TYPE
FROM SNMPv2-SMI;
abcModule MODULE-IDENTITY
LAST-UPDATED "201002021512Z"
ORGANIZATION "Organization"
CONTACT-INFO "Contact-info"
DESCRIPTION "Description"
REVISION "201002021512Z"
DESCRIPTION "Sample Message"
::= {enterprises 11456}
abc OBJECT IDENTIFIER
::= {abcModule 3}
--
-- Message Table
--
messageTable OBJECT-TYPE
SYNTAX SEQUENCE OF MessageEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "Table Description"
::= {abc 3}
messageEntry OBJECT-TYPE
SYNTAX MessageEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "Row Description"
INDEX {messageIndex}
::= {messageTable 1}
MessageEntry ::= SEQUENCE {
messageIndex Integer32,
messageType OCTET STRING,
sentMsgCount Integer32,
errorMsgCount Integer32,
currentMsgID Integer32
}
messageIndex OBJECT-TYPE
SYNTAX Integer32(1 .. 25)
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "Message Index"
::= {messageEntry 1}
messageType OBJECT-TYPE
SYNTAX OCTET STRING
MAX-ACCESS read-write
STATUS current
DESCRIPTION "Message Format"
DEFVAL {"AMF"}
::= {messageEntry 2}
sentMsgCount OBJECT-TYPE
SYNTAX Integer32(0..9999)
MAX-ACCESS read-write
STATUS current
DESCRIPTION "Sent messages count"
DEFVAL {0}
::= {messageEntry 3}
errorMsgCount OBJECT-TYPE
SYNTAX Integer32(0..9999)
MAX-ACCESS read-write
STATUS current
DESCRIPTION "Error messages count"
DEFVAL {0}
::= {messageEntry 4}
currentMsgID OBJECT-TYPE
SYNTAX Integer32(0..9999)
MAX-ACCESS read-write
STATUS current
DESCRIPTION "Current message ID"
DEFVAL {0}
::= {messageEntry 5}
END
AFM,098374,098374,000004 AMQ,302587,302587,000011 UDF,554875,554875,000067 CTM,000087,000087,000000 LRK,004584,004584,000000
abc-demo.c
Description: Binary data
abc.c
Description: Binary data
------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
