Previous section.

Inter-domain Management: Specification Translation

Inter-domain Management: Specification Translation
Copyright © 1997 The Open Group

SNMPv2 to CORBA-IDL Translation

Outline of the Translation Algorithm

The basic scheme for translation of a SNMP MIB specification to CORBA-IDL specification is as follows:

  1. Map an SNMP Information module (SMI document) into an IDL module:

  2. Map each ASN.1 type into IDL type using the translation scheme defined in ASN.1 Type to CORBA-IDL Translation . A complex ASN.1 data type (used to describe PDUs for SNMP) may generate more than one IDL data type.

  3. Map the value-specification of SYNTAX clause of TEXTUAL-CONVENTION macro, such as DisplayString, into an IDL type:

  4. Map the value of the invocation of the MODULE-IDENTITY macros into a constant IDL literal of type string.

  5. Map the value of the invocation of the OBJECT-IDENTITY macros into a constant IDL literal of type string.

  6. Map the value of the invocation of the OBJECT-TYPE macros into a constant IDL literal of type ASN1_ObjectIdentifier.

  7. Each group is mapped with one IDL interface generated for the group (G in Mapping of SNMP Information Module to IDL ), and one IDL interface (T in Mapping of SNMP Information Module to IDL ), generated for entries of the each of the tables in the group:

  8. Map the value of the invocation of the NOTIFICATION-TYPE macros into a constant IDL literal of type ASN1_ObjectIdentifier:

  9. Assign the OIDs of macros as RepositoryId (using #pragma ID declaration) to all IDL identifiers that corresponds to macro descriptor.

  10. Ignore the macros related to MODULE-COMPLIANCE rules.

See SNMPv2 Information Module Macros for the mapping of each clause of the SNMPv2 macros.


Figure: Mapping of SNMP Information Module to IDL

SNMPv2 Application-specific Type Translation

Mapping of SNMP ASN.1 Types describes the mapping of SNMPv2 application-specific ASN.1 types to IDL types.

For detailed description on mapping of ASN.1 type to IDL types including all primitive types, see ASN.1 Type to CORBA-IDL Translation .


SNMPv2 IDL
Integer32 typedef long Integer32;
IpAddress typedef sequence<octet, 4> IpAddressType;
Counter32 typedef unsigned long Counter32Type;
Gauge32 typedef unsigned long Gauge32Type;
TimeTicks typedef unsigned long TimeTicksType;
Opaque typedef sequence<octet> OpaqueType;
NsapAddress typedef ASN1_OctetString NsapAddressType;
Counter64 typedef long Counter64Type [2];
UInteger32 typedef unsigned long UInteger32Type;


Table: Mapping of SNMP ASN.1 Types

Why not acquire a nicely bound hard copy?
Click here to return to the publication details or order a copy of this publication.

Contents Next section Index