Re: Pass and snmpwalk problem

"Dave Shield" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On 17/04/07, Nelson Vale <[email protected]> wrote:
> The script that I'm using is aperl script like:
>
> #!/usr/bin/perl
>
> if($ARGV[0] eq "-g") {
>         print "$ARGV[1]\n";
>         print "string\n";
>         print "1\n";
> }
> if($ARGV[0] eq "-n") {
>         print "$ARGV[1]\n";
>         print "string\n";
>         print "9\n";
> }

This script never bothers to look at the OID that it is
being asked for, or to check whether this is actually
valid.   So yes, you will get strange results.

In the case of a GET request ("-g"), you should
only return a value if the requested OID is
exactly the same as the OID that you're implementing.

In the case of a GETNEXT request ("-n"), you should
only return a value if the requested OID is *less* than
the OID that you're implementing.
   And you should return this implemented OID, *not* the
OID that you were originally given.

That's why the walk is getting confused.

Dave

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.