On 29/04/07, Charles Sprickman <[EMAIL PROTECTED]> wrote: > Let me make sure I'm following this correctly: > > PLACE=".1.3.6.1.4.1.2021.255" # sets the base OID > > [snip] > > # by this point we just match the OID passed in ARGV to a string in our > # own OID - ie: a request for .1.3.6.1.4.1.2021.255.1 will return the > # answer to the meaning of life, a request for .1.3.6.1.4.1.2021.255.4 > # will return "127.0.0.1", etc.
Yes - that the idea. > I really don't get what the "-n" option would do Remember that there are two basic information retrieval requests - GET and GETNEXT. With a GET request, the agent should return the information associated with the requested OID. That's basically what the "case $RET" block does. If the requested OID doesn't match one of the valid OIDs implemented by this script, then it returns nothing, and the agent will respond with a suitable error. But the other request is GETNEXT, where the agent (and hence the pass script) should provide the information associated with the *next* (valid) OID. That's what the (first) "case $REQ" block does - decides which is the appropriate "next OID" to return. The -n flag is passed to the script to indicate a GETNEXT request, while -g indicates a GET request. 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 Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users