[prev in list] [next in list] [prev in thread] [next in thread] 

List:       net-snmp-coders
Subject:    Re: Help to get started to integrate an agent module
From:       Murali Karicheri <m-karicheri2 () ti ! com>
Date:       2017-05-03 17:49:05
Message-ID: 590A1811.2090404 () ti ! com
[Download RAW message or body]

On 05/03/2017 01:02 PM, Murali Karicheri wrote:
> On 05/03/2017 12:15 PM, Murali Karicheri wrote:
> > Hello Coders,
> > 
> > I am exploring how to add a agent mib module to net-snmp. I have the MIB \
> > definition text file which in this case is IEC-62439-3-MIB.txt that have copied \
> > to mibs folder of net-snmp source tree (fetched from \
> > git://git.code.sf.net/p/net-snmp/code). My Google search landed me to 
> > 
> > http://www.net-snmp.org/tutorial/tutorial-5/toolkit/mib_module/index.html
> > 
> > So I will first try to add a scalar as described there. But I also see two
> > options to add a Table. One is using mib2c and other is using the table of
> > data stored within the agent example. Which one is preferred? Also the mib2c
> > example requires some plumbing to build it as part of the agent code. Is
> > there any other document for this that I can refer? Your help is highly
> > appreciated as I am afraid that I may be heading in the wrong direction.
> > 
> > Thanks
> > 
> I have include example module in my configure script as 
> 
> ./configure --prefix=/exports/sdk-ga-3.3.0.4-A --host=arm-linux-gnueabihf \
> --target=arm-linux-gnueabihf --build=i686 --disable-manuals --disable-ipv6 \
> --with-cc=arm-linux-gnueabihf-gcc --with-ar=arm-linux-gnueabihf-ar  --without-rpm \
> --disable-applications --disable-embedded-perl  --disable-deprecated \
> --disable-shared --enable-static --with-pcre \
> --with-sysroot=/home/a0868495/ti-processor-sdk-linux-rt-am57xx-evm-03.03.00.04/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi \
> --with-mib-modules="examples" 
> Also see scalar_int.o built under agent/mibgroup/examples. But when I do snmpget, I \
> get an error 
> root@am57xx-evm:~# snmpget -v 2c -c public localhost sysName.0
> SNMPv2-MIB::sysName.0 = STRING: am57xx-evm
> root@am57xx-evm:~# snmpget -v 2c -c public localhost netSnmpExampleInteger.0
> NET-SNMP-EXAMPLES-MIB::netSnmpExampleInteger.0 = No Such Object available on this \
> agent at this OID 
> Any idea why this is not seen by the agent?
> 
I got it working,
root@am57xx-evm:/lib# snmpset -v 2c -c private localhost netSnmpExampleInteger.0 = 50
NET-SNMP-EXAMPLES-MIB::netSnmpExampleInteger.0 = INTEGER: 50
root@am57xx-evm:/lib# snmpget -v 2c -c public localhost netSnmpExampleInteger.0
NET-SNMP-EXAMPLES-MIB::netSnmpExampleInteger.0 = INTEGER: 50

-- 
Murali Karicheri
Linux Kernel, Keystone

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic