[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Examples of ASN.1 for SMIng.txt
Hi
Please find attached a partial translation of the RMON MIB in RFC 2021 into
the notation proposed in the "ASN.1 for SMIng" I-D.
I have rewritten the first part of the MIB, the "Protocol Directory Group",
the "Protocol Distribution Group", the "Address Map Group" and part of the
"Network Layer Matrix Group".
As you can see, the class declarations are completely separate from the
instance declarations. This addresses the objectives 4.1.27 "Attribute
Groups", 4.1.30 "Reusable vs. Final attribute groups" and 4.1.44 "Assign
OIDs in the Protocol Mappings". (This is also along the lines of the NMRG
proposal.)
You can also notice that the duplication in the definitions of
"nlMatrixSDTable" and "nlMatrixDSTable" is eliminated. Two "table" classes
are defined, but they share a common "row" class ("nlMatrixSDorDSEntry"),
thus eliminating the duplicated code.
There is also an example of two objects ("addressMapInserts" and
"addressMapDeletes") defined as two instances of the same class
("addressMapOperations"), which also reduces duplication.
Other benefits of the proposed notation (such as the ability to represent
complex data structures different from flat tables) could not be shown in
this example.
Alessandro Triglia
----- Original Message -----
From: "David T. Perkins" <dperkins@dsperkins.com>
To: <j.larmouth@salford.ac.uk>; <sming@ops.ietf.org>
Sent: Wednesday, December 05, 2001 4:50 PM
Subject: Re: Examples of ASN.1 for SMIng.txt
> HI,
>
> It would be useful for the MIB module in RFC 2021 to be rewritten
> in the form of the "Tiglia proposal". Of special interest is how
> the relationships between the tables in made clearer in the
> "Tiglia proposal" than in form of SMIv2, and how the duplication
> found in the tables nlMatrixSDTable and nlMatrixDSTable is
> reduced.
>
> Also, it would be useful for a short summarization of the
> benefits of the "Tiglia proposal".
>
> At 02:05 PM 12/5/2001 +0000, John Larmouth wrote:
> > I subscribed to this list in the expectation of some discussion of the
> > solution proposed by Alessandro Tiglia in this mail and his ealier
> > mailing of an Internet Draft, but there seems to have been little
> > comment.
> >
> > The solution appears to meet all requirements, and I understand that a
> > decision will be taken on rival options next week.
> >
> > Does silence on the mailing list mean assent, or simply that people are
> > too busy?
> >
> > John L
> >
> >--
> > Prof John Larmouth
> > Larmouth T&PDS Ltd
> > (Training and Protocol Development Services)
> > 1 Blueberry Road
> > Bowdon j.larmouth@salford.ac.uk
> > Cheshire WA14 3LS Tel: +44 161 928 1605
> > England Fax: +44 161 928 8069
>
> Regards,
> /david t. perkins
>
>
>
RMON2-MIB { mib-2 16 } DEFINITIONS AUTOMATIC TAGS ::= BEGIN
IMPORTS Integer32, SMICharacterString,
MODULE-INFO, ENTITY-CLASS, EVENT,
ENTITY-INSTANCE, NOTIFICATION,
NODE, NODE-GROUP, COMPLIANCE-STATEMENT
FROM ASN1-SMIng
mib-2, ifIndex
FROM RFC1213-MIB
OwnerString, statistics, history, hosts,
matrix, filter, etherStatsEntry, historyControlEntry,
hostControlEntry, matrixControlEntry, filterEntry,
channelEntry
FROM RMON-MIB
tokenRing, tokenRingMLStatsEntry, tokenRingPStatsEntry,
ringStationControlEntry, sourceRoutingStatsEntry
FROM TOKEN-RING-RMON-MIB;
module-info MODULE-INFO ::= {
ORGANIZATION "ACME MIB Writers Ltd"
CONTACT "Last Name First Name
My Street
My City
My State"
REVISIONS {
{ DATE "200111301240Z"
DESCRIPTION "Latest Revision - Aaa bb c ddddd" } |
{ DATE "200007030917Z"
DESCRIPTION "First Version" } }
DESCRIPTION "This is an example MIB module" }
rmon OBJECT IDENTIFIER ::= { mib-2 16 }
protocolDir OBJECT IDENTIFIER ::= { rmon 11 }
protocolDist OBJECT IDENTIFIER ::= { rmon 12 }
addressMap OBJECT IDENTIFIER ::= { rmon 13 }
nlHost OBJECT IDENTIFIER ::= { rmon 14 }
nlMatrix OBJECT IDENTIFIER ::= { rmon 15 }
alHost OBJECT IDENTIFIER ::= { rmon 16 }
alMatrix OBJECT IDENTIFIER ::= { rmon 17 }
usrHistory OBJECT IDENTIFIER ::= { rmon 18 }
probeConfig OBJECT IDENTIFIER ::= { rmon 19 }
rmonConformance OBJECT IDENTIFIER ::= { rmon 20 }
/* Basic Entity Classes
*/
zeroBasedCounter32 ENTITY-CLASS ::= {
SYNTAX Gauge32
STATUS current
DESCRIPTION
"Describes an object which counts events..." }
lastCreateTime ENTITY-CLASS ::= {
SYNTAX TimeStamp
STATUS current
DESCRIPTION
"Describes an object that stores the last..." }
timeFilter ENTITY-CLASS ::= {
SYNTAX TimeTicks
STATUS current
DESCRIPTION
"To be used for the index to a table..." }
dataSource ENTITY-CLASS ::= {
SYNTAX OBJECT IDENTIFIER
STATUS current
DESCRIPTION
"Identifies the source of the data..." }
/* Protocol Directory Group
Lists the inventory of protocols the probe has the capability of
monitoring and allows the addition, deletion, and configuration of
entries in this list.
*/
protocolDirLastChange ENTITY-CLASS ::= {
SYNTAX TimeStamp
STATUS current
DESCRIPTION
"The value of sysUpTime at the time..." }
protocolDirTable ENTITY-CLASS ::= {
SYNTAX SEQUENCE OF protocolDirEntry.&Syntax
INDEXING-ATTRIBUTES { {1}, {2} }
STATUS current
DESCRIPTION
"This table lists the protocols that this..." }
protocolDirEntry ENTITY-CLASS ::= {
SYNTAX SEQUENCE {
protocolDirID OCTET STRING,
protocolDirParameters OCTET STRING,
protocolDirLocalIndex Integer32(1..2147483647),
protocolDirDescr DisplayString(SIZE(1..64)),
protocolDirType BIT STRING
{ extensible(0), addressRecognitionCapable(1) },
protocolDirAddressMapConfig ENUMERATED
{ notSupported(1), supportedOff(2), supportedOn(3) },
protocolDirHostConfig ENUMERATED
{ notSupported(1), supportedOff(2), supportedOn(3) },
protocolDirMatrixConfig ENUMERATED
{ notSupported(1), supportedOff(2), supportedOn(3) },
protocolDirOwner OwnerString,
protocolDirStatus RowStatus }
ASSIGNED-ATTRIBUTE-IDS
{ {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10} }
/* These IDs would be assumed by default */
ATTRIBUTE-INFO {
{ ATTRIBUTE {1}
MAX-ACCESS notAccessible
STATUS current
DESCRIPTION
"A unique identifier for a particular..." } |
{ ATTRIBUTE {2}
MAX-ACCESS notAccessible
STATUS current
DESCRIPTION
"A set of parameters for the associated..." } |
{ ATTRIBUTE {3}
MAX-ACCESS readOnly
STATUS current
DESCRIPTION
"The locally arbitrary..." } |
{ ATTRIBUTE {4}
MAX-ACCESS readCreate
STATUS current
DESCRIPTION
"A textual description of the protocol..." } |
{ ATTRIBUTE {5}
MAX-ACCESS readOnly
STATUS current
DESCRIPTION
"This object describes 2 attributes..." } |
{ ATTRIBUTE {6}
MAX-ACCESS readCreate
STATUS current
DESCRIPTION
"This object describes and configures..." } |
{ ATTRIBUTE {7}
MAX-ACCESS readCreate
STATUS current
DESCRIPTION
"This object describes and configures..." } |
{ ATTRIBUTE {8}
MAX-ACCESS readCreate
STATUS current
DESCRIPTION
"This object describes and configures..." } |
{ ATTRIBUTE {9}
MAX-ACCESS readCreate
STATUS current
DESCRIPTION
"The entity that configured this entry..." } |
{ ATTRIBUTE {10}
MAX-ACCESS readCreate
STATUS current
DESCRIPTION
"The status of this entry..." } }
STATUS current
DESCRIPTION
"A conceptual row in the protocolDirTable..." }
/* Protocol Distribution Group
Collects the relative amounts of octets and packets for the
different protocols detected on a network segment.
*/
protocolDistControlTable ENTITY-CLASS ::= {
SYNTAX SEQUENCE OF protocolDistControlEntry.&Syntax
INDEXING-ATTRIBUTES { {1} }
STATUS current
DESCRIPTION
"Controls the setup of protocol type..." }
protocolDistControlEntry ENTITY-CLASS ::= {
SYNTAX SEQUENCE {
protocolDistControlIndex Integer32(1..65535),
protocolDistControlDataSource dataSource.&Syntax,
protocolDistControlDroppedFrames Counter32,
protocolDistControlCreateTime lastCreateTime.&Syntax,
protocolDistControlOwner OwnerString,
protocolDistControlStatus RowStatus }
ASSIGNED-ATTRIBUTE-IDS { {1}, {2}, {3}, {4}, {5}, {6} }
ATTRIBUTE-INFO {
{ ATTRIBUTE {1}
MAX-ACCESS notAccessible
STATUS current
DESCRIPTION
"A unique index for this..." } |
{ ATTRIBUTE {2}
MAX-ACCESS readCreate
STATUS current
DESCRIPTION
"The source of data for the this..." } |
{ ATTRIBUTE {3}
MAX-ACCESS readOnly
STATUS current
DESCRIPTION
"The total number of frames..." } |
{ ATTRIBUTE {4}
MAX-ACCESS readOnly
STATUS current
DESCRIPTION
"The value of sysUpTime when..." } |
{ ATTRIBUTE {5}
MAX-ACCESS readCreate
STATUS current
DESCRIPTION
"The entity that configured..." } |
{ ATTRIBUTE {6}
MAX-ACCESS readCreate
STATUS current
DESCRIPTION
"The status of this row..." } }
STATUS current
DESCRIPTION
"A conceptual row in the protocolDistControlTable..." }
protocolDistStatsTable ENTITY-CLASS ::= {
SYNTAX SEQUENCE OF protocolDistStatsEntry.&Syntax
INDEXING-ATTRIBUTES { {3}, {4} }
STATUS current
DESCRIPTION
"An entry is made in this table for every protocol..." }
protocolDistStatsEntry ENTITY-CLASS ::= {
SYNTAX SEQUENCE {
protocolDistControlIndex Integer32(1..65535),
protocolDirLocalIndex Integer32(1..2147483647),
protocolDistStatsPkts ZeroBasedCounter32,
protocolDistStatsOctets ZeroBasedCounter32 }
ASSIGNED-ATTRIBUTE-IDS { {3}, {4}, {1}, {2} }
ATTRIBUTE-INFO {
{ ATTRIBUTE {3}
MAX-ACCESS notAccessible
STATUS current
DESCRIPTION
"ProtocolDistControlIndex..." } |
{ ATTRIBUTE {4}
MAX-ACCESS notAccessible
STATUS current
DESCRIPTION
"ProtocolDirLocalIndex..." } |
{ ATTRIBUTE {1}
MAX-ACCESS readOnly
STATUS current
DESCRIPTION
"The number of packets..." } |
{ ATTRIBUTE {2}
MAX-ACCESS readOnly
STATUS current
DESCRIPTION
"The number of octets in packets..." } }
STATUS current
DESCRIPTION
"A conceptual row in the protocolDistStatsTable..." }
/* Address Map Group
Lists MAC address to network address bindings discovered by the
probe and what interface they were last seen on.
*/
addressMapOperations ENTITY-CLASS ::= {
SYNTAX Counter32
STATUS current
DESCRIPTION
"The number of times an address mapping entry has been
inserted or deleted into the addressMapTable...." }
addressMapMaxDesiredEntries ENTITY-CLASS ::= {
SYNTAX Integer32(-1..2147483647)
STATUS current
DESCRIPTION
"The maximum number of entries..." }
addressMapControlTable ENTITY-CLASS ::= {
SYNTAX SEQUENCE OF addressMapControlEntry.&Syntax
INDEXING-ATTRIBUTES { {1} }
STATUS current
DESCRIPTION
"A table to control the collection of..." }
addressMapControlEntry ENTITY-CLASS ::= {
SYNTAX SEQUENCE {
addressMapControlIndex Integer32,
addressMapControlDataSource dataSource.&Syntax,
addressMapControlDroppedFrames Counter32,
addressMapControlOwner OwnerString,
addressMapControlStatus RowStatus }
ASSIGNED-ATTRIBUTE-IDS { {1}, {2}, {3}, {4}, {5} }
ATTRIBUTE-INFO {
{ ATTRIBUTE {1}
MAX-ACCESS notAccessible
STATUS current
DESCRIPTION
"A unique index for this..." } |
{ ATTRIBUTE {2}
MAX-ACCESS readCreate
STATUS current
DESCRIPTION
"The source of data for this..." } |
{ ATTRIBUTE {3}
MAX-ACCESS readOnly
STATUS current
DESCRIPTION
"The total number of frames which..." } |
{ ATTRIBUTE {4}
MAX-ACCESS readCreate
STATUS current
DESCRIPTION
"The entity that configured this entry..." } |
{ ATTRIBUTE {5}
MAX-ACCESS readCreate
STATUS current
DESCRIPTION
"The status of this addressMap control..." } }
STATUS current
DESCRIPTION
"A conceptual row in the addressMapControlTable..." }
addressMapTable ENTITY-CLASS ::= {
SYNTAX SEQUENCE OF addressMapEntry.&Syntax
INDEXING-ATTRIBUTES { {1}, {6}, {2}, {3} }
STATUS current
DESCRIPTION
"A table of network layer address..." }
addressMapEntry ENTITY-CLASS ::= {
SYNTAX SEQUENCE {
addressMapTimeMark timeFilter.&Syntax,
protocolDirLocalIndex Integer32(1..2147483647),
addressMapNetworkAddress OCTET STRING,
addressMapSource OBJECT IDENTIFIER,
addressMapPhysicalAddress OCTET STRING,
addressMapLastChange TimeStamp }
ASSIGNED-ATTRIBUTE-IDS { {1}, {6}, {2}, {3}, {4}, {5} }
ATTRIBUTE-INFO {
{ ATTRIBUTE {1}
MAX-ACCESS notAccessible
STATUS current
DESCRIPTION
"A TimeFilter for this entry...." } |
{ ATTRIBUTE {6}
MAX-ACCESS notAccessible
STATUS current
DESCRIPTION
"ProtocolDirLocalIndex..." } |
{ ATTRIBUTE {2}
MAX-ACCESS notAccessible
STATUS current
DESCRIPTION
"The network address for this relation..." } |
{ ATTRIBUTE {3}
MAX-ACCESS notAccessible
STATUS current
DESCRIPTION
"The interface or port on..." } |
{ ATTRIBUTE {4}
MAX-ACCESS readOnly
STATUS current
DESCRIPTION
"The last source physical address..." } |
{ ATTRIBUTE {5}
MAX-ACCESS readOnly
STATUS current
DESCRIPTION
"The value of sysUpTime at the time..." } }
STATUS current
DESCRIPTION
"A conceptual row in the addressMapTable..." }
/* Network Layer Matrix Group
Counts the amount of traffic sent between each pair of network
addresses discovered by the probe.
Note that while the hlMatrixControlTable also has objects that
control optional alMatrixTables, implementation of the
alMatrixTables is not required to fully implement this group.
*/
hlMatrixControlTable ENTITY-CLASS ::= {
SYNTAX SEQUENCE OF hlMatrixControlEntry.&Syntax
INDEXING-ATTRIBUTES { {1} }
STATUS current
DESCRIPTION
"A list of higher layer (i.e. non-MAC) matrix..." }
hlMatrixControlEntry ENTITY-CLASS ::= {
SYNTAX SEQUENCE {
hlMatrixControlIndex Integer32(1..65535),
hlMatrixControlDataSource dataSource.&Syntax,
hlMatrixControlNlDroppedFrames Counter32,
hlMatrixControlNlInserts Counter32,
hlMatrixControlNlDeletes Counter32,
hlMatrixControlNlMaxDesiredEntries Integer32,
hlMatrixControlAlDroppedFrames Counter32,
hlMatrixControlAlInserts Counter32,
hlMatrixControlAlDeletes Counter32,
hlMatrixControlAlMaxDesiredEntries
Integer32(-1..2147483647),
hlMatrixControlOwner OwnerString,
hlMatrixControlStatus RowStatus }
ASSIGNED-ATTRIBUTE-IDS
{ {1}, {2}, {3}, {4}, {5}, {6},
{7}, {8}, {9}, {10}, {11}, {12} }
ATTRIBUTE-INFO {
{ ATTRIBUTE {1}
MAX-ACCESS notAccessible
STATUS current
DESCRIPTION
"An index that uniquely identifies...." } |
{ ATTRIBUTE {2}
MAX-ACCESS readCreate
STATUS current
DESCRIPTION
"The source of the data...." } |
{ ATTRIBUTE {3}
MAX-ACCESS readOnly
STATUS current
DESCRIPTION
"The total number of frames...." } |
{ ATTRIBUTE {4}
MAX-ACCESS readOnly
STATUS current
DESCRIPTION
"The number of times an nlMatrix entry..." } |
{ ATTRIBUTE {5}
MAX-ACCESS readOnly
STATUS current
DESCRIPTION
The number of times an nlMatrix entry..." } |
{ ATTRIBUTE {6}
MAX-ACCESS readCreate
STATUS current
DESCRIPTION
"The maximum number of entries..." } |
{ ATTRIBUTE {7}
MAX-ACCESS readOnly
STATUS current
DESCRIPTION
"The total number of frames...." } |
{ ATTRIBUTE {8}
MAX-ACCESS readOnly
STATUS current
DESCRIPTION
"The number of times an alMatrix..." } |
{ ATTRIBUTE {9}
MAX-ACCESS readOnly
STATUS current
DESCRIPTION
"The number of times an alMatrix entry..." } |
{ ATTRIBUTE {10}
MAX-ACCESS readCreate
STATUS current
DESCRIPTION
"The maximum number of entries...." } |
{ ATTRIBUTE {11}
MAX-ACCESS readCreate
STATUS current
DESCRIPTION
"The entity that configured this entry..." } |
{ ATTRIBUTE {12}
MAX-ACCESS readCreate
STATUS current
DESCRIPTION
"The status of this hlMatrixControlEntry..." } }
STATUS current
DESCRIPTION
"A conceptual row in the hlMatrixControlTable..." }
nlMatrixSDTable ENTITY-CLASS ::= {
SYNTAX SEQUENCE OF nlMatrixSDOrDSEntry.&Syntax
INDEXING-ATTRIBUTES { {7}, {1}, {8}, {2}, {3} }
STATUS current
DESCRIPTION
"A list of traffic matrix entries..." }
nlMatrixDSTable ENTITY-CLASS ::= {
SYNTAX SEQUENCE OF nlMatrixSDOrDSEntry.&Syntax
INDEXING-ATTRIBUTES { {7}, {1}, {8}, {3}, {2} }
STATUS current
DESCRIPTION
"A list of traffic matrix entries..." }
nlMatrixSDOrDSEntry ENTITY-CLASS ::= {
SYNTAX SEQUENCE {
hlMatrixControlIndex Integer32(1..65535),
nlMatrixSDOrDSTimeMark timeFilter.&Syntax,
protocolDirLocalIndex Integer32(1..2147483647),
nlMatrixSDOrDSSourceAddress OCTET STRING,
nlMatrixSDOrDSDestAddress OCTET STRING,
nlMatrixSDOrDSPkts ZeroBasedCounter32,
nlMatrixSDOrDSOctets ZeroBasedCounter32,
nlMatrixSDOrDSCreateTime lastCreateTime.&Syntax }
ASSIGNED-ATTRIBUTE-IDS
{ {7}, {1}, {8}, {2}, {3}, {4}, {5}, {6} }
ATTRIBUTE-INFO {
{ ATTRIBUTE {7}
MAX-ACCESS notAccessible
STATUS current
DESCRIPTION
"HlMatrixControlIndex...." } |
{ ATTRIBUTE {1}
MAX-ACCESS notAccessible
STATUS current
DESCRIPTION
"A TimeFilter for this entry...." } |
{ ATTRIBUTE {8}
MAX-ACCESS notAccessible
STATUS current
DESCRIPTION
"ProtocolDirLocalIndex...." } |
{ ATTRIBUTE {2}
MAX-ACCESS notAccessible
STATUS current
DESCRIPTION
"The network source address for this..." } |
{ ATTRIBUTE {3}
MAX-ACCESS notAccessible
STATUS current
DESCRIPTION
"The network destination address..." } |
{ ATTRIBUTE {4}
MAX-ACCESS readOnly
STATUS current
DESCRIPTION
"The number of packets without errors..." } |
{ ATTRIBUTE {5}
MAX-ACCESS readOnly
STATUS current
DESCRIPTION
"The number of octets transmitted..." } |
{ ATTRIBUTE {6}
MAX-ACCESS readOnly
STATUS current
DESCRIPTION
"The value of sysUpTime..." } }
STATUS current
DESCRIPTION
"An entity class serving as a conceptual row
for two tables..." }
/* Declaration of Instances of some Entity Classes defined above
*/
protocolDirLastChangeObj ENTITY-INSTANCE ::= {
OID { protocolDir 1 }
ENTITY-CLASS protocolDirLastChange
MAX-ACCESS readOnly }
protocolDirTableObj ENTITY-INSTANCE ::= {
OID { protocolDir 2 }
ENTITY-CLASS protocolDirTable
MAX-OPERATION createDelete }
protocolDistControlTableObj ENTITY-INSTANCE ::= {
OID { protocolDist 1 }
ENTITY-CLASS protocolDistControlTable
MAX-OPERATION createDelete }
protocolDistStatsTableObj ENTITY-INSTANCE ::= {
OID { protocolDist 2 }
ENTITY-CLASS protocolDistStatsTable }
addressMapInserts ENTITY-INSTANCE ::= {
OID { addressMap 1 }
ENTITY-CLASS addressMapOperations
MAX-ACCESS readOnly
DESCRIPTION
"The number of times an address mapping entry has been
inserted into the addressMapTable...." }
addressMapDeletes ENTITY-INSTANCE ::= {
OID { addressMap 2 }
ENTITY-CLASS addressMapOperations
MAX-ACCESS readOnly
DESCRIPTION
"The number of times an address mapping entry has been
deleted into the addressMapTable...." }
addressMapMaxDesiredEntriesObj ENTITY-INSTANCE ::= {
OID { addressMap 3 }
ENTITY-CLASS addressMapMaxDesiredEntries
MAX-ACCESS readWrite }
addressMapControlTableObj ENTITY-INSTANCE ::= {
OID { addressMap 4 }
ENTITY-CLASS addressMapControlTable
MAX-OPERATION createDelete }
addressMapTableObj ENTITY-INSTANCE ::= {
OID { addressMap 5 }
ENTITY-CLASS addressMapTable }
hlMatrixControlTableObj ENTITY-INSTANCE ::= {
OID { nlMatrix 1 }
ENTITY-CLASS hlMatrixControlTable
MAX-OPERATION createDelete }
nlMatrixSDTableObj ENTITY-INSTANCE ::= {
OID { nlMatrix 2 }
ENTITY-CLASS nlMatrixSDTable }
nlMatrixDSTableObj ENTITY-INSTANCE ::= {
OID { nlMatrix 3 }
ENTITY-CLASS nlMatrixDSTable }
END