Subject: [MIB-DOCTORS] Advice on DEFVAL

From: "Adrian Farrel" <[email-masked]>
Date: Fri, 19 Jul 2013 00:00:32 +0100

Hi,

Section 7.9 of RFC 2578 says:

>   During conceptual row creation, if an instance of a columnar object
>   is not present as one of the operands in the correspondent management
>   protocol set operation, then the value of the DEFVAL clause, if
>   present, indicates an acceptable default value that an agent might
>   use (especially for a read-only object).

This has me puzzled...

I completely understand using DEFVAL for a read-create object that is not
provided during row creation.
I sort of understand using DEFVAL for a read-write object that has not been
written.
I am not sure I understand the use of DEFVAL for a read-only object.

Surely the default value for a read-only object is implementation-specific or
defined in the protocol that the MIB module models.
I'm pretty sure that back in the glory days when I was writing MIB modules I had
my knuckles firmly rapped for using DEFVAL on read-only objects.

Thoughts?

Adrian

---

From: Thomas Nadeau <[email-masked]>
Date: Fri, 19 Jul 2013 09:01:48 -0400

Its useful as a hint to implementations for a value to start with, as a means of fostering interop. At least that is the theory. *)

Quoting from http://www.ietf.org/rfc/rfc2578.txt?number=2578

7.9.  Mapping of the DEFVAL clause

   The DEFVAL clause, which need not be present, defines an acceptable
   default value which may be used at the discretion of an agent when an
   object instance is created.  That is, the value is a "hint" to
   implementors.

	...

   Note that if an operand to the management protocol set operation is
   an instance of a read-only object, then the error `notWritable' [6]
   will be returned.  As such, the DEFVAL clause can be used to provide
   an acceptable default value that an agent might use.

> _______________________________________________
> MIB-DOCTORS mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/mib-doctors
>