On Tue, Jun 19, 2012 at 5:23 PM, Dave Shield <d.t.shi...@liverpool.ac.uk> wrote: > On 18 June 2012 23:10, Wes Hardaker <harda...@users.sourceforge.net> wrote: >> Patch #1 is simple and just increases the shift variable allowing >> for 16 bits of index values instead of the previous 8 > > +1 > > >> Patch #2 is a bit more complex and creates new integer based index >> API for retrieving indexes and then ensure that they're < 2^SHIFT. > > Hmmm.... that's a trickier one. > > It's a bit more complex than ideally I'd like at this stage, > but in general I'm tempted to say yes. > But there are a couple of points of concern: > > - in the various compatibility routines, there's a statement > > *Index = returnIndex; > > Is it safe to assign an 'int' value to a 'short*' without masking > the value to 16bits?
A related question: isn't it safer to pretend to the compatibility functions that a given interface with ifIndex > 16 bits (or 15 bits) doesn't exist, rather than returning a potentially-aliased value (e.g., pretend I have two interfaces on my system: lo with ifIndex 1, and foo1 with ifIndex 65537. The compatibility functions will see two interfaces, both with ifIndex = 1.) (On one of my test systems, I have 66 interfaces, with ifIndex values from 1 to 2162175. Yes, lots of interfaces are getting deleted and recreated.) Bill > - in the header file, mibII/interfaces.h, the declaration of > Interface_Scan_NextInt has a first parameter of type 'Int' > Shouldn't this be 'int' ? > > 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 ------------------------------------------------------------------------------ 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