On Tue, Jun 30, 2015 at 08:53:16PM +0000, Mani Pooni wrote: > I am trying to use net-snmp to write my own subagent. My use case is like > this. I want anything with a specific oid prefix needs to forwarded to my > subagent. I have looked at the autogenerated code. But for that I need to > define to generate code for every table. Is there any example code someone > can point to me where it show how I can register for a specific oid prefix > and for everything underneath that oid prefix the subagent gets called. > > For example if I register a subagent for oid .1.3.6.1.4.1.22610.2.4.4 then > for anything underneath this oid prefix .1.3.6.1.4.1.22610.2.4.4.1 or > .1.3.6.1.4.1.22610.2.4.4.1.1 the subagent needs to be called.
I usually calls netsnmp_create_handler_registration and then call netsnmp_register_handler on the output from that. The resulting handler takes everything below the registering OID that ain't overridden by a more specific handler. /MF ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders