
Taken from a thread on mibs@ops.ietf.org so that it does not get lost. The libsmi does not complain on constructions like the following:
sFlowCollectorAddress OBJECT-TYPE SYNTAX InetAddress MAX-ACCESS read-write STATUS current DESCRIPTION "The IP address of the sFlow collector. If set to 0.0.0.0 all sampling is disabled." DEFVAL { "0.0.0.0" } ::= { sFlowEntry 9 }
[This is taken from the SFLOW-MIB published in RFC 3176.]
In general, I am not sure how smart libsmi checks DEFVAL values against the type constraints. But since libsmi has some build-in knowledge of well known types such as InetAddress, it might be able to at least detect some special cases like this one.
[Frank, it is fine to just add this to one of these TODO lists. ;-]
/js

HI,
Here is an explanation to make the below clear...
The InetAddress TC has base type of octet string. The value is determined by a discriminator object with TC InetAddressType. When the type is IPv4 the value is the binary and not text. In the example below, the value is specified in text. This is incorrect. The correct specification for IPv4 address 0.0.0.0 is '00000000'h.
And, of course, if I were reviewing the MIB module, then I would require the DESCRIPTION clause to specify the discriminator object. But I don't expect libsmi to parse the DESCRIPTION clause and look for the object descriptor.
At 05:34 PM 5/28/2003 +0200, Juergen Schoenwaelder wrote:
Taken from a thread on mibs@ops.ietf.org so that it does not get lost. The libsmi does not complain on constructions like the following:
sFlowCollectorAddress OBJECT-TYPE SYNTAX InetAddress MAX-ACCESS read-write STATUS current DESCRIPTION "The IP address of the sFlow collector. If set to 0.0.0.0 all sampling is disabled." DEFVAL { "0.0.0.0" } ::= { sFlowEntry 9 }
[This is taken from the SFLOW-MIB published in RFC 3176.]
In general, I am not sure how smart libsmi checks DEFVAL values against the type constraints. But since libsmi has some build-in knowledge of well known types such as InetAddress, it might be able to at least detect some special cases like this one.
[Frank, it is fine to just add this to one of these TODO lists. ;-]
/js
-- Juergen Schoenwaelder International University Bremen Phone: +49 421 200 3587 P.O. Box 750 561, 28725 Bremen, Germany Fax: +49 421 200 3103 http://www.iu-bremen.de/ --
/david t. perkins
participants (2)
-
David T. Perkins
-
Juergen Schoenwaelder