current vs. mandatory as status values

Hi!
I am rather new to this whole smi and mib stuff, so this question might be stupid: When converting RFC1213-MIB to xml with smidump (libsmi 0.4.1), the status attribute values in the resulting xml file are always equal to "current", though they should equal "mandatory" since RFC-1213 refers to SMIv1 (RFC1155) and not to SMIv2 (RFC2578). And why is status an attribute while access is a child node?
Have I gotten something completely wrong?
Regards Björn

Hi!
Björn> I am rather new to this whole smi and mib stuff, so this question Björn> might be stupid: Björn> When converting RFC1213-MIB to xml with smidump (libsmi 0.4.1), the Björn> status attribute values in the resulting xml file are always equal to Björn> "current", though they should equal "mandatory" since RFC-1213 refers Björn> to SMIv1 (RFC1155) and not to SMIv2 (RFC2578). And why is status an Björn> attribute while access is a child node?
Björn> Have I gotten something completely wrong?
No, your questions are definetely not stupid. :-) However, the answers are probably not completely helpful to you...
1. The xml output driver in smidump is no longer being developed. We came to a point where we thought, that XML Schema definitions are the right representation of MIBs in the XML world, since they describe not information per se, but a grammar that in turn describes management instance data. Hence, there might be some representations in the xml output that are not perfectly reasonable but also not further developed. Sorry for this bad news. However, we would be willing to accept diff-style patches that lead to a better XML represenation. :-)
2. (For what we had in mind) a generated XML representation should be reasonable for XML applications. We did not just want to have an XML representation of SMI MIB modules. If we would want to develop applications that handle SMI MIB module items, then we would simply use the libsmi API and not convert it to XML with `smidump -f xml' and develop an XML application that again parses the XML representation. Thus we intended to end up with a non-ambiguous XML representation, accepting the fact that SMIv1/v2 differences are not reflected.
-frank
PS: Please note that RFC 1213 is updated by newer SMIv2 MIBs and SMIv1 in general is obsoleted by SMIv2 which is the representative Full Standard these days.

=?ISO-8859-1?Q?Bj=F6rn Koseler?= writes:
Bjoern> I am rather new to this whole smi and mib stuff, so this Bjoern> question might be stupid: When converting RFC1213-MIB to xml Bjoern> with smidump (libsmi 0.4.1), the status attribute values in Bjoern> the resulting xml file are always equal to "current", though Bjoern> they should equal "mandatory" since RFC-1213 refers to SMIv1 Bjoern> (RFC1155) and not to SMIv2 (RFC2578).
When we did the XML backend, we decided that SMIv2 is the formal IETF standard format and we did not pay too much attention to add support for SMIv1. Looking at the output today, I agree that the status values should be retained for SMIv1 input since we also indicate the SMIv2 input version in the module element. I have changed the code in the CVS to fix this bug. But in general, you should be using SMIv2 MIBs. (Note that almost all stuff of RFC1213-MIB has been republished in SMIv2 format.)
Bjoern> And why is status an attribute while access is a child node?
I recall that we hacked the original code for this backend driver in March 2000 on a train trip back from Twente to Braunschweig and that we had an endless debate what should be an entity and what should be an attribute. Looking back and in the light of the Internet Draft <draft-hollenbeck-ietf-xml-guidelines-07.txt>, I would probably do some things different today. On the other hand, since there are already multiple implementations relying on this format, changing it just to make it a bit nicer is probably not really a good idea.
Anyway, if you are really serious about turning the status attribute into an element, this would be a rather trivial programming excercise and it should be not too hard to add an option to the XML backend driver. Please send patches in unified diff format. ;-)
/js
participants (3)
-
Björn Koseler
-
Frank Strauss
-
Juergen Schoenwaelder