Der Algorithmus für die Übersetzung einer Internet MIB in eine GDMO MIB setzt sich aus folgenden Regeln zusammen:
-- groups in MIB-II
...
system OBJECT IDENTIFIER ::= { mib-2 1 }
...
Übersetzte GDMO-Klasse ,,internetSystem``:
internetSystem MANAGED OBJECT CLASS
DERIVED FROM
"CCITT Rec. X.721 (1992) |
ISO/IEC 10165-2 : 1992": top;
CHARACTERIZED BY internetSystemPkg PACKAGE
BEHAVIOUR
internetSystemPkgBehaviour BEHAVIOUR
DEFINED AS
!BEGINPARSE
REFERENCE
!!This managed object class maps to the
Internet system group with object id
{mib-2 1} in RFC 1213.!!;
DESCRIPTION
!!If an agent is not configured to have a
value for any of these variables, a string
of length 0 is returned.
[...]
ENDPARSE!;;
ATTRIBUTES
internetSystemId GET,
sysDescr GET,
sysObjectID GET,
sysUpTime GET,
sysContact GET-REPLACE,
sysName GET-REPLACE,
sysLocation GET-REPLACE,
sysServices GET;
NOTIFICATIONS
"IIMC MIB Translation":internetAlarm;;;
REGISTERED AS
{1 2 124 360501 14 1 1 3 6 1 2 1 1};
Dieses Beispiel zeigt zusätzlich, daß bei der Übersetzung Namenskonflikte
auftreten können: Im Internet-Registrierungsbaum wird eine SNMP-Gruppe mit dem
Namen ,,system`` definiert (siehe 2.3.1). Ebenso existiert als Root-Objekt für die
Enthaltenseins-Hierarchie eine OSI-Klasse mit dem Namen ,,system``
...
ipAddrEntry OBJECT-TYPE
SYNTAX IpAddrEntry
ACCESS not-accessible
STATUS mandatory
DESCRIPTION
"The addressing information for one of this
entity's IP addresses."
INDEX { ipAdEntAddr }
::= { ipAddrTable 1 }
IpAddrEntry ::=
SEQUENCE {
ipAdEntAddr
IpAddress,
ipAdEntIfIndex
INTEGER,
ipAdEntNetMask
IpAddress,
ipAdEntBcastAddr
INTEGER,
ipAdEntReasmMaxSize
INTEGER (0..65535)
}
...
Übersetzte GDMO-Klasse ,,ipAddrEntry``:
ipAddrEntry MANAGED OBJECT CLASS
DERIVED FROM
"CCITT Rec. X.721 (1992) |
ISO/IEC 10165-2 : 1992": top;
CHARACTERIZED BY ipAddrEntryPkg PACKAGE
BEHAVIOUR
ipAddrEntryPkgBehaviour BEHAVIOUR
DEFINED AS
!BEGINPARSE
REFERENCE
!!This managed object class maps to the
ipAddrEntry object with object id {ipAddrTable 1}
in RFC 1213.!!;
DESCRIPTION
!!The addressing information for one of this
entity's IP addresses.!!;
INDEX RFC1213-MIB.ipAdEntAddr;
ENDPARSE!;;
ATTRIBUTES
ipAddrEntryId GET,
ipAdEntAddr GET,
ipAdEntIfIndex GET,
ipAdEntNetMask GET,
ipAdEntBcastAddr GET,
ipAdEntReasmMaxSize GET;;;
REGISTERED AS
{ 1 2 124 360501 14 1 1 3 6 1 2 1 4 20 1};
[...]
sysContact OBJECT-TYPE
SYNTAX DisplayString (SIZE (0..255))
ACCESS read-write
STATUS mandatory
DESCRIPTION
"The textual identification of the
contact person for this managed node,
together with information on how to
contact this person."
::= { system 4 }
[...]
Übersetztes GDMO-Attribut ,,sysContact``:
sysContact ATTRIBUTE
WITH ATTRIBUTE SYNTAX
IIMCRFC12131354ASN1.DisplayString;
BEHAVIOUR
sysContactBehaviour BEHAVIOUR
DEFINED AS
!BEGINPARSE
REFERENCE
!!This attribute maps to sysContact with
object id {system 4} in RFC1213.!!;
DESCRIPTION
!!The textual identification of the
contact person for this managed node,
together with information
on how to contact this person.!!;
ENDPARSE!;;
REGISTERED AS
{1 2 124 360501 14 1 1 3 6 1 2 1 1 4};
internetSystem-mib2NB NAME BINDING
SUBORDINATE OBJECT CLASS
internetSystem AND SUBCLASSES;
NAMED BY SUPERIOR OBJECT CLASS
mib2;
WITH ATTRIBUTE internetSystemId;
BEHAVIOUR
internetSystem-systemNBBehaviour BEHAVIOUR
DEFINED AS
!BEGINPARSE
INDEX NULL;
ENDPARSE!;;
REGISTERED AS
{1 2 124 360501 14 4 1 3 6 1 2 1 1 };