In the case of any discrepancies between the examples and the specification of the algorithms, the specification is to be regarded as definitive.
ASN1Types.idl and ASN1Limits.idl are required by all implementations. OSIMgmt.idl is specific to OSI implementations, and the SNMP files SNMPMgmt.idl and SNMPv1Trap.idl are both specific to SNMP implementations.
//
// ASN1Types.idl
//
#ifndef _ASN1TYPES_IDL_
#define _ASN1TYPES_IDL_
// ASN.1 base types
// Null type
typedef char ASN1_Null;
const ASN1_Null ASN1_NullValue = '\x00';
typedef boolean ASN1_Boolean;
// unsigned integers
typedef unsigned short ASN1_Unsigned16;
typedef unsigned long ASN1_Unsigned;
typedef unsigned long ASN1_Unsigned64[2];
// integers
typedef short ASN1_Integer16;
typedef long ASN1_Integer;
typedef long ASN1_Integer64[2];
// others
typedef double ASN1_Real;
typedef sequence<octet> ASN1_BitString; // PIDL defined
typedef sequence<octet> ASN1_OctetString;
typedef string ASN1_ObjectIdentifier;
typedef any ASN1_Any;
typedef any ASN1_DefinedAny;
struct ASN1_External {
ASN1_ObjectIdentifier syntax;
ASN1_DefinedAny data_value; // by syntax
};
// ASN.1 strings (which may not contain binary zeros)
typedef string ASN1_IA5String;
typedef string ASN1_NumericString;
typedef string ASN1_PrintableString;
typedef string ASN1_TeletexString;
typedef string ASN1_T61String;
typedef string ASN1_VideotexString;
typedef string ASN1_VisibleString;
typedef string ASN1_ISO646String;
// PIDL defined
typedef ASN1_VisibleString ASN1_GeneralizedTime;
typedef ASN1_VisibleString ASN1_UTCTime;
// ASN.1 strings of octets (which may contain binary zeros)
typedef sequence<octet> ASN1_GeneralString;
typedef sequence<octet> ASN1_GraphicString;
// ASN.1 strings of wide characters (which may contain binary zeros)
typedef sequence<unsigned short> ASN1_BMPString;
typedef sequence<unsigned long> ASN1_UniversalString;
typedef ASN1_GraphicString ASN1_ObjectDescriptor;
// define constants for ASN.1 Real infinity
#include<ASN1Limits.idl>
#endif /* _ASN1TYPES_IDL_ */
//
// ASN1Limits.idl
//
#ifndef _ASN1LIMITS_IDL_
#define _ASN1LIMITS_IDL_
// Substitute <MAX> and <MIN> by the max and min (lowest negative) float values your
// machine can hold for IDL interfaces.
const ASN1_Real plus_infinity = <MAX>;
const ASN1_Real minus_infinity = <MIN>;
#endif /* _ASN1LIMITS_IDL_ */
//
// OSIMgmt.idl
//
#ifndef _OSIMGMT_IDL_
#define _OSIMGMT_IDL_
// include all needed data types
#include <ASN1Types.idl> // base ASN1 types
#include <X711CMI.idl> // the types defined in the CMIP ASN.1 module
module OSIMgmt
{
// OSIMgmt::exceptions
// Corba User exceptions based on ROSE and CMIS.
// ROSE originated exceptions
exception ROSEerror { X711CMI::InvokeProblemType errorInfo; };
// CMIS originated exceptions
exception AccessDenied { };
exception ClassInstanceConflict { X711CMI::BaseManagedObjectIdType errorInfo; };
exception ComplexityLimitation { X711CMI::ComplexityLimitationType errorInfo; };
exception GetListError { X711CMI::GetListErrorType errorInfo; };
exception InvalidArgumentValue { X711CMI::InvalidArgumentValueType errorInfo; };
exception InvalidFilter { X711CMI::CMISFilterType errorInfo; };
exception InvalidScope { X711CMI::ScopeType errorInfo; };
exception InvalidObjectInstance { X711CMI::ObjectInstanceType errorInfo; };
exception NoSuchAction { X711CMI::NoSuchActionType errorInfo; };
exception NoSuchArgument { X711CMI::NoSuchArgumentType errorInfo; };
exception NoSuchAttribute { X711CMI::AttributeIdType errorInfo; };
exception NoSuchObjectClass { X711CMI::ObjectClassType errorInfo; };
exception NoSuchObjectInstance { X711CMI::ObjectInstanceType errorInfo; };
exception NoSuchReferenceObject { X711CMI::ObjectInstanceType errorInfo; };
exception ProcessingFailure { X711CMI::ProcessingFailureType errorInfo; };
exception SetListError { X711CMI::SetListErrorType errorInfo; };
exception SyncNotSupported { X711CMI::CMISSyncType errorInfo; };
//
// ManagedObject
// the base interface for all generated managed object class interfaces
// Its visible attributes and methods will be defined during the
// Interaction Translation specification phase of the NMF-X/Open JIDM working
// group.
//
interface ManagedObject
{
// to be defined in the Interaction Translation Specification
};
// exception for multiple replies to actions
exception UsingMR{ /* to de defined in Interaction Translation */ };
};
// macros for use in the 'raises' clause of interface methods:
#define ACTION_ERRORS OSIMgmt::ROSEerror, \
OSIMgmt::AccessDenied, OSIMgmt::ClassInstanceConflict, \
OSIMgmt::ComplexityLimitation, OSIMgmt::InvalidScope, \
OSIMgmt::InvalidArgumentValue, OSIMgmt::InvalidFilter, \
OSIMgmt::NoSuchAction, OSIMgmt::NoSuchArgument, \
OSIMgmt::NoSuchObjectClass, OSIMgmt::NoSuchObjectInstance, \
OSIMgmt::ProcessingFailure, OSIMgmt::SyncNotSupported
#define ATTRIBUTE_ERRORS OSIMgmt::ROSEerror, \
OSIMgmt::AccessDenied, OSIMgmt::ClassInstanceConflict, \
OSIMgmt::ComplexityLimitation, OSIMgmt::GetListError, \
OSIMgmt::SetListError, OSIMgmt::InvalidScope, \
OSIMgmt::InvalidFilter, OSIMgmt::NoSuchObjectClass, \
OSIMgmt::NoSuchObjectInstance, OSIMgmt::ProcessingFailure, \
OSIMgmt::SyncNotSupported
#define UsingMR OSIMgmt::UsingMR
#endif /* _OSIMGMT_IDL_ */
//
// SNMPMgmt.idl
//
#ifndef _SNMPMGMT_IDL_
#define _SNMPMGMT_IDL_
#include <SNMPv2_TC.idl>
module SNMPMgmt
{
interface SmiEntry
{
// Note that no attribute or operations are defined.
};
struct SNMPv2_NotificationInfo {
// to be sent when using untyped event channel
ASN1_ObjectIdentifier src_party;
ASN1_ObjectIdentifier snmp_context;
ASN1_ObjectIdentifier event_type; // Repository ID of event
SNMPv2TC::TimeStampType event_time; any notification_info;
};
interface SNMPv2_Notification {
void snmp_notification (
in ASN1_ObjectIdentifier src_party,
in ASN1_ObjectIdentifier snmp_context,
in ASN1_ObjectIdentifier event_type, // Repository ID of event
in SNMPv2TC::TimeStampType event_time,
in any notification_info
);
};
interface PullSNMPv2_Notification {
boolean try_snmp_notification (
out ASN1_ObjectIdentifier src_party,
out ASN1_ObjectIdentifier snmp_context,
out ASN1_ObjectIdentifier event_type,
out SNMPv2TC::TimeStampType event_time,
out any notification_info
);
void pull_snmp_notification (
out ASN1_ObjectIdentifier src_party,
out ASN1_ObjectIdentifier snmp_context,
out ASN1_ObjectIdentifier event_type,
out SNMPv2TC::TimeStampType event_time,
out any notification_info
);
};
}; /* End of Module */
#endif /* !_SNMPMgmt_idl_ */
//
// SNMPv1Trap.idl
//
#ifndef _SNMPv1Trap_idl_
#define _SNMPv1Trap_idl_
#include <SNMPMgmt.idl>
#include <RFC1155_SMI.idl>
module SNMPMv1Trap
{
struct SNMPv1_TrapInfo { // to be sent when using untyped event channel
string agent_ip_address;
string community_name;
ASN1_ObjectIdentifier event_type; // <enterprise-oid>.Traps.trap-id>
RFC1155_SMI::TimeTicksType event_time;
any notification_info;
};
/*
Example: (in the form of ASN.1 value in string)
SNMPv1_TrapInfo : {
agent_ip_address 999.00.60.14,
community_name public,
event_type 1.3.6.1.4.1.3.1.1,
event_time 0,
notification_info LinkUpType : {
ifIndex {
var_name "::RFC1213_MIB::ifEntry::ifIndex",
var_index "1",
var_value 1
}
}
}
*/
interface SNMPv1_Notifications {
void snmpv1_trap(
in string agent_ip_address,
in string community_name,
in ASN1_ObjectIdentifier event_type,
in RFC1155_SMI::TimeTicksType event_time,
in any notification_info
);
};
interface PullSNMPv1_Notifications {
boolean try_snmpv1_trap(
out string agent_ip_address,
out string community_name,
out ASN1_ObjectIdentifier event_type,
out RFC1155_SMI::TimeTicksType event_time,
out any notification_info
);
void pull_snmpv1_trap(
out string agent_ip_address,
out string community_name,
out ASN1_ObjectIdentifier event_type,
out RFC1155_SMI::TimeTicksType event_time,
out any notification_info
);
};
}; /* End of SNMPMv1Trap Module */
#endif /* !_SNMPv1Trap_idl_ */
Contents | Next section | Index |