[Fwd: [libsmi] problem restricting TimeTicks - bad error message???]

I didn't see any response from this?
In summary: A) is restricting TimeTicks like the below, legal SMIv2?
testInteger OBJECT-TYPE SYNTAX TimeTicks (500..12000)
B) even if it's not, the error message libsmi spits out when it sees this is totally wrong and misleading:
the SPPI construct/keyword `MAX-ACCESS' may not be used in a MIB
Pete Flugstad Icon Labs

Hi!
Pete> I didn't see any response from this?
Sorry.
Pete> In summary: Pete> A) is restricting TimeTicks like the below, legal SMIv2?
Pete> testInteger OBJECT-TYPE Pete> SYNTAX TimeTicks (500..12000)
No. RFC 2578 says:
7.1.8. TimeTicks [...] The TimeTicks type may not be sub-typed.
Pete> B) even if it's not, the error message libsmi spits out when Pete> it sees this is totally wrong and misleading:
Pete> the SPPI construct/keyword `MAX-ACCESS' Pete> may not be used in a MIB
Yes, I agree. The resulting error message is completely wrong and misleading. I've fixed it in the version in the anonymous CVS repository and for upcoming releases. Now it says:
/home/strauss/test.mib:22: `TimeTicks' must not be subtyped
Thanks,
-frank

Pete Flugstad wrote:
test.mib:22: the SPPI construct/keyword `MAX-ACCESS' may not be used in a MIB ...
Even if it's not, the error message is completely wrong and misleading, as the problem has nothing at all to do with the MAX-ACCESS line.
Note: the same bad error message occurs in other situations, such as when someone tries to sub-type something like IpAddress.
Pete Flugstad Icon Labs

Hi!
test.mib:22: the SPPI construct/keyword `MAX-ACCESS' may not be used in a MIB ... Even if it's not, the error message is completely wrong and misleading, as the problem has nothing at all to do with the MAX-ACCESS line.
Pete> Note: the same bad error message occurs in other situations, such Pete> as when someone tries to sub-type something like IpAddress.
Thanks, Pete. I've now checked the parser code for situations where specific type tokes where expected and unexpected subtyping was not handled. This should be fixed now and lead to this error message:
$ ./tools/smilint -e ./TEST-MIB ./TEST-MIB:22: {subtype-illegal} subtyping not allowed [...]
Description of (selected) error/warning messages:
Error: subtype-illegal (level 2) Message: subtyping not allowed Description: The types OBJECT IDENTIFIER, IpAddress, Counter32, Counter64, and TimeTicks, and any types in a SEQUENCE clause must not be sub-typed (RFC 2578, Sections 7.1.12 and 9).
-frank
participants (3)
-
Frank Strauss
-
Pete Flugstad
-
Pete Flugstad