The SMIv2 module is mapped to a file named SNMPv2_SMI.idl . Since SMIv2 is used as basis of most of the SMIv2 specific MIB information module, the SNMPv2_SMI.idl file is provided as part of this specification.
#ifndef _SNMPv2_SMI_IDL_
#define _SNMPv2_SMI_IDL_
#include <ASN1Types.idl>
module SNMPv2_SMI {
const ASN1_ObjectIdentifier org= "::SNMPv2_SMI::org";
const ASN1_ObjectIdentifier dod= "::SNMPv2_SMI::dod";
const ASN1_ObjectIdentifier internet= "::SNMPv2_SMI::internet";
const ASN1_ObjectIdentifier directory= "::SNMPv2_SMI::directory";
const ASN1_ObjectIdentifier mgmt= "::SNMPv2_SMI::mgmt";
const ASN1_ObjectIdentifier mib_2= "::SNMPv2_SMI::mib_2";
const ASN1_ObjectIdentifier transmission= "::SNMPv2_SMI::transmission";
const ASN1_ObjectIdentifier experimental= "::SNMPv2_SMI::experimental";
const ASN1_ObjectIdentifier private= "::SNMPv2_SMI::private";
const ASN1_ObjectIdentifier enterprises= "::SNMPv2_SMI::enterprises";
const ASN1_ObjectIdentifier security= "::SNMPv2_SMI::security";
const ASN1_ObjectIdentifier snmpV2= "::SNMPv2_SMI::snmpV2";
const ASN1_ObjectIdentifier snmpDomains= "::SNMPv2_SMI::snmpDomains";
const ASN1_ObjectIdentifier snmpProxys= "::SNMPv2_SMI::snmpProxys";
const ASN1_ObjectIdentifier snmpModules= "::SNMPv2_SMI::snmpModules";
typedef ASN1_ObjectIdentifier ObjectNameType;
typedef ASN1_ObjectIdentifier NotificationNameType;
enum SimpleSyntaxTypeChoice {
integer_valueChoice,
string_valueChoice,
objectID_valueChoice,
bit_valueChoice
};
union SimpleSyntaxType switch (SimpleSyntaxTypeChoice) {
case integer_valueChoice: ASN1_Integer integer_value;
case string_valueChoice: sequence<octet,65535> string_value;
case objectID_valueChoice: ASN1_ObjectIdentifier objectID_value;
case bit_valueChoice : ASN1_BitString bit_value;
};
typedef sequence<octet,4> IpAddressType;
typedef ASN1_Unsigned Counter32Type;
typedef ASN1_Unsigned TimeTicksType;
typedef ASN1_OctetString OpaqueType;
typedef ASN1_Unsigned64 Counter64Type;
typedef ASN1_Unsigned Unsigned32Type;
typedef ASN1_Integer Integer32Type;
typedef ASN1_Unsigned Gauge32Type;
enum ApplicationSyntaxTypeChoice {
ipAddress_valueChoice,
counter_valueChoice,
timeticks_valueChoice,
arbitrary_valueChoice,
big_counter_valueChoice,
unsigned_integer_valueChoice,
// Following three lines are added after the MIB-->IDL mapping.
gauge_valueChoice,
arbitary_valueChoice,
nsapAddress_valueChoice
};
union ApplicationSyntaxType switch (ApplicationSyntaxTypeChoice) {
case ipAddress_valueChoice: IpAddressType ipAddress_value;
case counter_valueChoice: Counter32Type counter_value;
case timeticks_valueChoice: TimeTicksType timeticks_value;
case arbitrary_valueChoice: OpaqueType arbitrary_value;
case big_counter_valueChoice: Counter64Type big_counter_value;
case unsigned_integer_valueChoice: Unsigned32Type unsigned_integer_value;
// Following two lines are added after the MIB-->IDL mapping.
case gauge_valueChoice : Gauge32Type gauge_value;
case arbitary_valueChoice : OpaqueType arbitary_value;
case nsapAddress_valueChoice : NsapAddressType nsapAddress_value;
};
enum ObjectSyntaxTypeChoice {
simpleChoice,
application_wideChoice
};
union ObjectSyntaxType switch (ObjectSyntaxTypeChoice) {
case simpleChoice: SimpleSyntaxType simple;
case application_wideChoice: ApplicationSyntaxType application_wide;
};
};
#endif /* !_SNMPv2_SMI_IDL_ */
The SNMPv2_TC.idl file contains the following IDL types and interfaces as translated from RFC2579.
#ifndef _SNMPv2_TC_IDL_
#define _SNMPv2_TC_IDL_
#include <ASN1Types.idl>
#include <SNMPMgmt.idl>
#include <SNMPv2_SMI.idl>
#include "SNMPv2_SMI.idl"
module SNMPv2_TC {
typedef SNMPv2_SMI::ObjectSyntaxType ObjectSyntaxType;
typedef SNMPv2_SMI::TimeTicksType TimeTicksType;
typedef sequence<octet,255> DisplayStringType;
typedef ASN1_OctetString PhysAddressType;
typedef sequence<octet,6> MacAddressType;
typedef ASN1_Integer TruthValueType;
const TruthValueType true = 1;
const TruthValueType false = 2;
typedef ASN1_Unsigned TestAndIncrType;
typedef ASN1_ObjectIdentifier AutonomousTypeType;
typedef ASN1_ObjectIdentifier VariablePointerType;
typedef ASN1_ObjectIdentifier RowPointerType;
typedef ASN1_Integer RowStatusType;
const RowStatusType active = 1;
const RowStatusType notInService = 2;
const RowStatusType notReady = 3;
const RowStatusType createAndGo = 4;
const RowStatusType createAndWait = 5;
const RowStatusType destroy = 6;
typedef TimeTicksType TimeStampType;
typedef ASN1_Unsigned TimeIntervalType;
typedef sequence<octet,11> DateAndTimeType;
typedef ASN1_Integer StorageTypeType;
const StorageTypeType other = 1;
const StorageTypeType volatile = 2;
const StorageTypeType nonVolatile = 3;
const StorageTypeType permanent = 4;
const StorageTypeType readOnly = 5;
typedef ASN1_ObjectIdentifier TDomainType;
typedef sequence<octet,255> TAddressType;
interface TextualConventions {
/**
DISPLAY_HINT:"255a"
"Represents textual information taken from the NVT ASCII character set, as defined in
pages 4, 10_11 of RFC 854. To summarize RFC 854, the NVT ASCII repertoire specifies:
_ the use of character codes 0_127 (decimal)
_ the graphics characters (32_126) are interpreted as US ASCII
_ NUL, LF, CR, BEL, BS, HT, VT and FF have the special meanings specified in RFC 854
_ the other 25 codes have no standard interpretation
_ the sequence ‘CR LF’ means newline
_ the sequence ‘CR NUL’ means carriage_return
_ an ‘LF’ not preceded by a ‘CR’ means moving to the same column on the next line.
_ the sequence ‘CR x’ for any x other than LF or NUL is illegal. (Note that this also means
that a string may end with either ‘CR LF’ or ‘CR NUL’, but not with CR.)
Any object defined using this syntax may not exceed 255
characters in length."
*/
string DisplayStringToString(in DisplayStringType value);
DisplayStringType DisplayStringFromString(in string str);
/**
DISPLAY_HINT:"1x:"
"Represents media_ or physical_level addresses."
*/
string PhysAddressToString(in PhysAddressType value);
PhysAddressType PhysAddressFromString(in string str);
/**
DISPLAY_HINT:"1x:"
"Represents an 802 MAC address represented in the canonical order defined by IEEE 802.1a,
i.e., as if it were transmitted least significant bit first, even though 802.5
(in contrast to other 802.x protocols) requires MAC addresses to be transmitted most
significant bit first."
*/
string MacAddressToString(in MacAddressType value);
MacAddressType MacAddressFromString(in string str);
/**
"Represents a boolean value."
*/
string TruthValueToString(in TruthValueType value);
TruthValueType TruthValueFromString(in string str);
/**
"Represents integer_valued information used for atomic operations. When the management
protocol is used to specify that an object instance having this syntax is to be
modified, the new value supplied via the management protocol must precisely match
the value presently held by the instance. If not, the management protocol set
operation fails with an error of `inconsistentValue'. Otherwise, if the current value
is the maximum value of 2^31_1 (2147483647 decimal), then the value held by the
instance is wrapped to zero; otherwise, the value held by the instance is incremented
by one. (Note that regardless of whether the management protocol set operation succeeds,
the variable_ binding in the request and response PDUs are identical.) The value
of the ACCESS clause for objects having this syntax is either `read_write' or
`read_create'. When an instance of a columnar object having this syntax is created,
any value may be supplied via the management protocol. When the network management
portion of the system is re_ initialized, the value of every object instance having
this syntax must either be incremented from its value prior to the re_initialization,
or (if the value prior to the re_ initialization is unknown) be set to a
pseudo_randomly generated value."
*/
string TestAndIncrToString(in TestAndIncrType value);
TestAndIncrType TestAndIncrFromString(in string str);
/**
"Represents an independently extensible type identification value. It may, for example,
indicate a particular sub_tree with further MIB definitions, or define a particular
type of protocol or hardware."
*/
string AutonomousTypeToString(in AutonomousTypeType value);
AutonomousTypeType AutonomousTypeFromString(in string str);
/**
"A pointer to a specific object instance. For example, sysContact.0 or ifInOctets.3."
*/
string VariablePointerToString(in VariablePointerType value);
VariablePointerType VariablePointerFromString(in string str);
/**
"Represents a pointer to a conceptual row. The value is the name of the instance
of the first accessible columnar object in the conceptual row. For example,
ifIndex.3 would point to the 3rd row in the ifTable (note that if ifIndex were
not_accessible, then ifDescr.3 would be used instead)."
*/
string RowPointerToString(in RowPointerType value);
RowPointerType RowPointerFromString(in string str);
/**
"The RowStatus textual convention is used to manage the creation and deletion of
conceptual rows, and is used as the value of the SYNTAX clause for the status column
of a conceptual row (as described in Section 7.7.1 of [2].) The status column
has six defined values:
_ `active', which indicates that the conceptual row is available for use by the
managed device;
_ `notInService', which indicates that the conceptual row exists in the agent, but
is unavailable for use by the managed device (see NOTE below);
_ `notReady', which indicates that the conceptual row exists in the agent, but is
missing information necessary in order to be available for use by the managed device;
_ `createAndGo', which is supplied by a management station wishing to create a new
instance of a conceptual row and to have its status automatically set to active,
making it available for use by the managed device;
_ `createAndWait', which is supplied by a management station wishing to create
a new instance of a conceptual row (but not make it available for use by the
managed device);
_ `destroy', which is supplied by a management station wishing to delete all of
the instances associated with an existing conceptual row."
*/
string RowStatusToString(in RowStatusType value);
RowStatusType RowStatusFromString(in string str);
/**
"The value of the sysUpTime object at which a specific occurrence happened.
The specific occurrence must be defined in the description of any object defined
using this type."
*/
string TimeStampToString(in TimeStampType value);
TimeStampType TimeStampFromString(in string str);
/**
"A period of time, measured in units of 0.01 seconds."
*/
string TimeIntervalToString(in TimeIntervalType value);
TimeIntervalType TimeIntervalFromString(in string str);
/**
DISPLAY_HINT:"2d_1d_1d,1d:1d:1d.1d,1a1d:1d"
"A date_time specification.
field
octets
contents
range
1
1_2
year
0..65536
2
3
month
1..12
3
4
day
1..31
4
5
hour
0..23
5
6
minutes
0..59
6
7
seconds
0..60 (use 60 for leap_second)
7
8
deci_seconds
0..9
8
9
direction from UTC
+ / -
9
10
hours from UTC
0..11
10
11
minutes from UTC
0..59
For example, Tuesday May 26, 1992 at 1:30:15 PM EDT would be displayed as:
1992_5_26,13:30:15.0,_4:0
Note that if only local time is known, then timezone information (fields 8_10) is not present."
*/
string DateAndTimeToString(in DateAndTimeType value);
DateAndTimeType DateAndTimeFromString(in string str);
/**
"Describes the memory realization of a conceptual row. A row which is volatile(2) is
lost upon reboot. A row which is either nonVolatile(3), permanent(4) or readOnly(5),
is backed up by stable storage. A row which is permanent(4) can be changed but not
deleted. A row which is readOnly(5) cannot be changed nor deleted. If the value of
an object with this syntax is either permanent(4) or readOnly(5), it cannot be modified.
Conversely, if the value is either other(1), volatile(2) or nonVolatile(3), it cannot
be modified to be permanent(4) or readOnly(5). Every usage of this textual convention
is required to specify the columnar objects which a permanent(4) row must at a minimum
allow to be writable."
*/
string StorageTypeToString(in StorageTypeType value);
StorageTypeType StorageTypeFromString(in string str);
/**
"Denotes a kind of transport service. Some possible values, such as snmpUDPDomain,
` are defined in `Transport Mappings for Version 2 of the Simple Network Management Protocol
(SNMPv2)'."
*/
string TDomainToString(in TDomainType value);
TDomainType TDomainFromString(in string str);
/**
"Denotes a transport service address. For snmpUDPDomain, a TAddress is 6 octets long,
the initial 4 octets containing the IP_address in network_byte order and the last 2
containing the UDP port in network_byte order. Consult `Transport Mappings for Version 2
of the Simple Network Management Protocol (SNMPv2)' for further information on
snmpUDPDomain."
*/
string TAddressToString(in TAddressType value);
TAddressType TAddressFromString(in string str);
};
};
#endif /**!_SNMPv2_TC_IDL_ */
Contents | Next section | Index |