On 28 May 2012 16:44, Magda Stefan <fane...@yahoo.com> wrote: > Following your advice I've created a new MIB file, starting from > netSnmpPlaypen, but similar as structure with previous one.
Yes - that looks better. A couple of issues remain: - You don't need to repeat the definitions from NET-SNMP-MIB. Just IMPORT netSnmpPlaypen from that MIB, and then define netSnmpPrivateMib as a child of this object. - We would rather that you didn't unilaterally define anything directly under the netSnmpGroups object. Better to put that definition somewhere within the netSnmpPlaypen tree as well. But neither of these are particularly serious - the MIB you've got now should work OK. > When I checked > the MIB file that I wrote I had only one warning: "current group > "netSnmpPrvGroup" is not referenced in this module". How can I correct this > warning? Don't worry about that - it's not important. > The second thing I have tried to do was to use the framework that > recommended to me: > mib2c -S cache=1 -c mib2c.table_data.conf netSnmpPrvTable > but I got this errors: > > se of uninitialized value $key in hash element at > /usr/local/lib/perl5/SNMP.pm line 1377, <GEN0> line 274. Hmmm.... what version of the code are you using? (In particular, what version of the perl modules are you using? i.e. what value does the $VERSION variable in that file have). I've tried running that with my setup, and it works fine. > That framework generated 2 files, netSnmpPrvTable.c (and .h) > have no idea what to modify so I can bind a static value (eg. char[] > atr="1234") to the variable. That's not the way to think about this framework. Instead, have a look at the routine netSnmpPrvTable_load(). This is where the values for the table will be set up. The example code is based on reading data from a text file, but you may need to change this to match your system, depending on where you'll be getting the information from. Dave ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users