On 1 May 2012 17:50, Robert Story <rst...@freesnmp.com> wrote: > On Tue, 1 May 2012 09:03:55 -0400 Jasti wrote: > JD> Instead of generating template code for ifTable (eg:) if we generate code > & > JD> adding necessary logic to the ifEntry code makes any difference? > JD> Because am comfortable with scalars rather than tables....... > > I don't know that it's been tried yet, but I suppose it might work. I don't > really recommend it, but you can try it and see. The code generated by > the mib2c.scalar.conf config won't deal with indexes, so you'll have to manage > that yourself.
Please remember that the code generated by mib2c.scalar.conf is dealing with scalar *objects*, not scalar instances. So it will be checking for an instance subidentifier of 0, and rejecting anything else. If you try using this template for processing a element within a table (which won't have this .0 instance subidentifier), then you're likely to run into major problems. As Robert said, this is a somewhat idiosyncratic approach, and you'll be pretty much on your own. But if you go down this route, make sure you use netsnmp_register_instance rather than netsnmp_register_scalar 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-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders