
I'm trying to understand the lexical structure allowed for descriptors (RFC 2578) in the following: descriptor OBJECT IDENTIFIER ::= { ... }
Is RFC 2578 the correct reference for SMIv2 syntax?
RFC 2578 allows mixed case descriptors in this place in the syntax, provided they start with a lower case letter. As I would expect from my limited use of your fine product, libsmi supports this correctly :-)
However, we're seeing various vendor MIBs that have the initial letter in upper case. Did SMIv1 allow this or are the vendors just wrong? I can't find an RFC that seems to document the SMIv1 syntax with the clarity of RFC 2578 for SMIv2.
As you'll appreciate, users object to having to modify the vendor MIBs to get them to compile. As a developer, I prefer the strict approach (if the source is wrong, fix it, don't accept it). However, I'm under some pressure from our customer support team to deliver what they term "a usability fix." We're not aiming at a technically sophisticated market.
Can anyone offer advice as to the consequences if I were to modify the SMI lexer/parser to allow these descriptors to start with an uppercase letter? Would it break valid MIBs?
Cheers, Pat
-- !! This message is brought to you via the `libsmi' mailing list. !! Please do not reply to this message to unsubscribe. To subscribe or !! unsubscribe, send a mail message to libsmi-request@ibr.cs.tu-bs.de. !! See http://www.ibr.cs.tu-bs.de/projects/libsmi/ for more information.

Hi Pat,
Another problem is that the mib-compiler complains about a parsing error when encounters a descriptors that start with a capital letter.
If possible, I wish a more specific error from the compiler giving us a better hint of the problem. Something like: "descriptors <xxx> must start with a lower-case letter".
Thanks,
Pat Knight pat@ktgroup.co.uk wrote:
I'm trying to understand the lexical structure allowed for descriptors (RFC 2578) in the following: descriptor OBJECT IDENTIFIER ::= { ... }
Is RFC 2578 the correct reference for SMIv2 syntax?
RFC 2578 allows mixed case descriptors in this place in the syntax, provided they start with a lower case letter. As I would expect from my limited use of your fine product, libsmi supports this correctly :-)
However, we're seeing various vendor MIBs that have the initial letter in upper case. Did SMIv1 allow this or are the vendors just wrong? I can't find an RFC that seems to document the SMIv1 syntax with the clarity of RFC 2578 for SMIv2.
As you'll appreciate, users object to having to modify the vendor MIBs to get them to compile. As a developer, I prefer the strict approach (if the source is wrong, fix it, don't accept it). However, I'm under some pressure from our customer support team to deliver what they term "a usability fix." We're not aiming at a technically sophisticated market.
Can anyone offer advice as to the consequences if I were to modify the SMI lexer/parser to allow these descriptors to start with an uppercase letter? Would it break valid MIBs?
Cheers, Pat
-- !! This message is brought to you via the `libsmi' mailing list. !! Please do not reply to this message to unsubscribe. To subscribe or !! unsubscribe, send a mail message to libsmi-request@ibr.cs.tu-bs.de. !! See http://www.ibr.cs.tu-bs.de/projects/libsmi/ for more information.

Yigal Hochberg writes:
Yigal> Another problem is that the mib-compiler complains about a Yigal> parsing error when encounters a descriptors that start with a Yigal> capital letter.
Yigal> If possible, I wish a more specific error from the compiler Yigal> giving us a better hint of the problem. Something like: Yigal> "descriptors <xxx> must start with a lower-case letter".
Yes, the libsmi compiler lacks an error recovery rule for this case. You are of course invited to contribute a patch for this case... :-)
/js

Pat Knight writes:
Pat> Is RFC 2578 the correct reference for SMIv2 syntax?
Yes.
Pat> RFC 2578 allows mixed case descriptors in this place in the Pat> syntax, provided they start with a lower case letter. As I would Pat> expect from my limited use of your fine product, libsmi supports Pat> this correctly :-)
Thanks.
Pat> However, we're seeing various vendor MIBs that have the initial Pat> letter in upper case. Did SMIv1 allow this or are the vendors Pat> just wrong? I can't find an RFC that seems to document the SMIv1 Pat> syntax with the clarity of RFC 2578 for SMIv2.
The SMI has until now always inherited its syntax rules from ASN.1. Even if the SMIv1 specifications do not clearly says that a descriptor must start with a lower-case letter, the ASN.1 documents are pretty clear about this (but I guess most people did not read them).
Pat> As you'll appreciate, users object to having to modify the vendor Pat> MIBs to get them to compile. As a developer, I prefer the strict Pat> approach (if the source is wrong, fix it, don't accept Pat> it). However, I'm under some pressure from our customer support Pat> team to deliver what they term "a usability fix." We're not Pat> aiming at a technically sophisticated market.
One of the reasons for writing libsmi was to provide a MIB parser implementation that takes the language definition serious. I understand your concerns though from a practical marketing point of view. But even if you change the libsmi parser to accept upper-case descriptors, you should do so by automatically converting them to lower-case and sending a big warning to stderr.
Pat> Can anyone offer advice as to the consequences if I were to Pat> modify the SMI lexer/parser to allow these descriptors to start Pat> with an uppercase letter? Would it break valid MIBs?
It can't break valid MIBs since a MIB with an upper-case descriptor is invalid. What can happen in some corner cases is that you get interesting name clashes and/or broken imports if you automatically convert upper-case descriptors to lower-case descriptors.
/js
participants (3)
-
Juergen Schoenwaelder
-
Pat Knight
-
Yigal Hochberg