On Wed, 2005-09-14 at 03:49 -0700, Alaios wrote:
> Hi after fetching everything about interfaces now i
> want to store the ipaddresses that the interface
> has... My problem is that
> i dont know what oid i should use so as to fetch the
> ip address...
ipAdEntIfIndex OBJECT-TYPE
SYNTAX INTEGER (1..2147483647)
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The index value which uniquely identifies the interface to
which this entry is applicable. The interface identified by
a particular value of this index is the same interface as
identified by the same value of RFC 1573's ifIndex."
::= { ipAddrEntry 2 }
> I mention this because after using
> snmpwalk i have noticed that there is no oid for ip
> addresses but the snmp stores them as information to
> the oids
> e.x
> 1.3.1...bla.bla.bla.192.168.1.10
Correct
> so how is it possible to fetch the ip address when the
> same time is a part of the oid?
By using 'snmpwalk' (or a sequence of GETNEXT requests)
to work through the ipAdEntIfIndex values, looking for
the value(s) that match your required interface index.
Once you've found a suitable entry, you can extract the
IP address from the index value.
Dave
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders