
Hi!
I have a problem parsing a mib that uses the UNITS definition for an object. eg.
mem-avail OBJECT-TYPE SYNTAX Integer32 MAX-ACCESS read-only STATUS current UNITS MB DESCRIPTION "Physical memory available" ::= { memory-usage 1 }
This node is parsed fine if I remove the line "UNITS MB". Is there any way to make this work? The documentation for the tool generating this MIB says that it is ASN.1 compliant.
Thanks and regards, Mayank.
-- !! 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.

mayagarwal writes:
Mayank> This node is parsed fine if I remove the line "UNITS MB". Is Mayank> there any way to make this work?
The format must be UNITS "MB" as per RFC 2578. So smilint correctly rejects this as an error.
Mayank> The documentation for the tool generating this MIB says that Mayank> it is ASN.1 compliant.
MIBs are written in SMIv2 not ASN.1. So the tool should (if at all) claim compliance with SMIv2. Anyway, the tool generates illegal UNITS clauses.
/js
-- !! 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!
mayagarwal> I have a problem parsing a mib that uses the UNITS mayagarwal> definition for an object. eg.
mayagarwal> mem-avail OBJECT-TYPE mayagarwal> SYNTAX Integer32 mayagarwal> MAX-ACCESS read-only mayagarwal> STATUS current mayagarwal> UNITS MB mayagarwal> DESCRIPTION mayagarwal> "Physical memory available" mayagarwal> ::= { memory-usage 1 }
mayagarwal> This node is parsed fine if I remove the line "UNITS mayagarwal> MB". Is there any way to make this work? The mayagarwal> documentation for the tool generating this MIB says that mayagarwal> it is ASN.1 compliant.
We should talk about SMIv2 rather than ASN.1. The argument to the SMIv2 UNITS subclause has to be a text enclosed in double quotes. Hence, your example above is not valid SMIv2. It has to be
UNITS "MB"
instead of
UNITS MB
This change should make libsmi behave as you probably expect.
-frank -- !! 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.
participants (3)
-
Frank Strauss
-
Juergen Schoenwaelder
-
mayagarwal@hss.hns.com