On 14 January 2011 13:58, Egor <[email protected]> wrote:
> I have a net-snmp-5.4.2.1, want to make mib-module with own OIDs. So, I made
> MIB file, then used mib2c utility, and got 11 files:
>>
>> myMibTable.c
>> myMibTable.h
<etc>
So these files are designed to implement a MIB table.
> In the end, want to show MIB file:
>> myMibInfo OBJECT IDENTIFIER::={ myMibTable 1 }
>> InfoInteger OBJECT-TYPE
>> SYNTAX Integer32 (0..2147483647)
>> MAX-ACCESS read-write
>> STATUS current>>
>> DESCRIPTION
>> "Interger decription of info information"
>> ::= { myMibInfo 1 }
>>
>> InfoString OBJECT-TYPE
>> SYNTAX OCTET STRING (SIZE(0..1024))
>> MAX-ACCESS read-write
>> STATUS current
>> DESCRIPTION
>> "A publicly settable string that can be set for testing
>> snmpsets. This value has no real usage other than
>> testing purposes."
>> ::= { myMibInfo 2 }
but this MIB defines two scalar objects.
> So, what is the problem in automatically generated file with uninitialized
> variable?
If you want to implement a MIB table, then you need to provide
a MIB file that defines a table.
>> myMibTable MODULE-IDENTITY
Just because an OID is called 'xxxTable', that doesn't make it a table.
It needs to look like a table, walk like a table, and quack like a table.
*Then* (and only then) can you call it a table.
Dave
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders