[ First - *please* don't mail me privately, without copying
any responses to the mailing list. I don't have the time
or inclination to offer private, unpaid, SNMP consultancy.
Keep discussions to the list, where others can both learn
and offer advice. Thanks. ]
> First, what is the purpose for having a read-only field in the MIB if no
> decisions are made on it?
Who said that no decisions are made on it?
Many MIB objects are read-only - particularly if they are used for
monitoring what is currently going on, rather than actively managing
and manipulating it.
It's impossible to comment on the purpose of any given MIB object in
abstract - it depends on the exact definition of that particular object.
> The agent script must know some other way (maybe
> reading the MIB explicitly or hard-coding the permissions in) if
> a variable is read only.
Yes.
The agent script (or MIB module code) must hard-code the behaviour
of *every* MIB object that it implements. Not just whether it is
read-only or read-write, but what syntax type it is, how to determine
the appropriate current value, what new values it can take and how
to apply any such assignments.
The main agent is basically just an empty shell.
*ALL* the useful work is handled by the extension scripts, subagents,
MIB module code, etc.
> It just doesn't make sense for the MIB to have a value in
> which no decisions are based.
Probably not.
But that's a matter for the MIB designer and/or implementer.
We just provide a basic framework.
> Second, how do you return an error? I've tried exit(4) but no error is
> displayed in the snmpset output.
The snmpd.conf man page isn't quite as clear as it might be, but
under the entry for "pass" SET handling, it says:
Return nothing to stdout, and the set will assumed to
have been successful. Otherwise, return one of the fol-
lowing error strings to signal an error: not-writable, or
wrong-type and the appropriate error response will be
generated instead.
This holds true for "pass_persist" as well.
Anything else will be taken to indicate a successful SET.
You certainly don't want to call 'exit' - since that defeats the
whole point of "pass_persist" over "pass" in the first place!
Dave
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
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