On Tue, 2005-04-12 at 10:58, Shivali Gupta wrote:

> I hav written a code to read the value of tcpMaxConn
> from TCPMIB as shown below.
> This works fine.Now i want to read values of entries
> in TCPCONNECTION table from the same MIB file.

Robert has already pointed you to the 'snmpwalk' source.

The basic difference from your "tcpMaxConn.0" example
is that you need to issue a series of GETNEXT requests
(rather than just a single GET request) starting with
the "tcpConnectionState" OID, and using the results
from one request as the input to the next.  Repeat until
the result no longer starts with the "cpConnectionState"
OID prefix.

For each result, the two ends of the connection (IP address
and port) are listed as the index values.


Alternatively, have a look at the routine protopr() in the
file apps/snmpnetstat/inet.c.   This basically implements
exactly the same thing.

Dave



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to