Re: Strange error in test program...

This is a discussion on Re: Strange error in test program... within the SNMP Coders forums, part of the Networking and Network Related category; Hi Dave, On Tue, Apr 8, 2008 at 12:53 PM, Dave Shield <D.T.Shield@liverpool.ac.uk&...


Go Back   Usenet Forums > Networking and Network Related > SNMP Coders

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-08-2008
Kris van Rens
 
Posts: n/a
Default Re: Strange error in test program...

Hi Dave,

On Tue, Apr 8, 2008 at 12:53 PM, Dave Shield <D.T.Shield@liverpool.ac.uk> wrote:
> On 08/04/2008, Kris van Rens <krisvanrens.list@gmail.com> wrote:
>
> > > You are also assuming that ifTable entries will always be
> > > in a strict consecutive sequence (starting from 1). That's
> > > probably true for most simple systems, but it's not guaranteed.
> > > It is perfectly valid to have 3 interfaces, with indexes 2, 3
> > > and 27, for example.

> >
> >
> > Mmm...ok. I could send another PDU to get the ifIndex.x list...this
> > works but needs another PDU.

>
> But how do you know which ifIndex.{x} values to ask for?
> The {x} there is the same as the {x} in the ifPhysAddress.{x}
> OID. So this is just moving the problem (unnecessarily).


I suspected that for IF-MIB::ifIndex{x} = {y} the value {x} would be
in a strict consecutive order, that is, for your example this would
give:

IF-MIB::ifIndex.0 = 2
IF-MIB::ifIndex.1 = 3
IF-MIB::ifIndex.2 = 27

So I would iterate three times (from IF-MIB::ifNumber.0) and build an
index list with which I can build the 'IF-MIB::ifPhysAddress.{y}'
strings.

Very tedious, I know, but it works for SNMP v1, for which I must most
likely build in compatability.


> This is where GETNEXT (or GETBULK) comes in.
>
> In fact, with GETNEXT, you don't need to retrieve ifNumber.0
> in the first place. Just start walking the ifPhysAddress column,
> and stop when you fall off the end.


I'm building a second solution using this approach.

Thanks again!

-Kris

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Register now and save $200. Hurry, offer ends at 11:59 p.m.,
Monday, April 7! Use priority code J8TLD2.
http://ad.doubleclick.net/clk;198757...un.com/javaone
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:45 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0