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 long ASN1_Unsigned64;
// integers
typedef short ASN1_Integer16;
typedef long ASN1_Integer;
typedef long long ASN1_Integer64;
// 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 ExternalType {
ASN1_ObjectIdentifierOpt direct_reference;
ASN1_IntegerOpt indirect_reference;
ASN1_ObjectDescriptorOpt data_value_descriptor;
ExternalEncodingType encoding;
};
// 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_IA5String;
typedef sequence<octet> ASN1_VideotexString;
// ASN.1 strings of wide characters (which may contain binary zeros)
typedef sequence<unsigned short> ASN1_BMPString;
typedef sequence<unsigned long> ASN1_UniversalString;
// ASN.1 strings (which cannot contain binary zeros)
typedef string ASN1_NumericString;
typedef string ASN1_PrintableString;
typedef string ASN1_VisibleString;
typedef ASN1_VisibleString ASN1_ISO646String;
typedef string ASN1_GraphicString;
typedef ASN1_GraphicString ASN1_ObjectDescriptor;
typedef string ASN1_TeletexString;
typedef ASN1_TeletexString ASN1_T61String;
// 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_ */
// File: SNMPMgmt.idl
#ifndef _SNMPMGMT_IDL_
#define _SNMPMGMT_IDL_
#include <orb.idl>
#include <CosPropertyService.idl>
#include <ASN1Types.idl>
#include <JIDM.idl>
module SNMPMgmt {
const string ManagementDomainKeyId = "Internet Management";
const string ManagementDomainKeyKind = "XSM environment";
const string ProtocolVer = "Protocol Version";
const string TransportProtocol = "Transport Protocol";
const string DomainTitle = "Domain Title";
const string TransportAddress = "Transport Address";
const string TransportPort = "Transport Port";
const string CommunityName = "Community Name";
const string ContextEngineID = "Context EngineID";
const string ContextName = "Context Name";
// Redefinition of types
typedef CORBA::ScopedName ScopedName;
typedef CosLifeCycle::Criteria Criteria;
typedef CosPropertyService::PropertyName VarName;
typedef CosPropertyService::PropertyNames VarNameList;
typedef CosPropertyService::Property NameValuePair;
typedef CosPropertyService::Properties NVPairList;
typedef ASN1_ObjectIdentifier EntryIndex;
typedef sequence < EntryIndex > EntryIndexList;
typedef string TAddress; // Transport address of an agent
enum ProtocolVersion { snmpV1, snmpV2c, snmpV3 };
// SNMP Protocol specific exceptions
exception ProtocolError {
ASN1_Integer error_status;
ASN1_Integer error_index;
};
exception MultVarProtocolError {
ASN1_Integer error_status;
VarNameList error_var_list;
NVPairList result_var_list;
};
// SMI information module specific exceptions.
exception NoSuchSmiModule { };
exception NoSuchSmiEntry { };
exception NoSuchVariable { };
// MIB entry specific exceptions
exception NoSuchHost { };
exception NoSuchObject { };
exception AlreadyExists { };
interface SmiEntry : CosLifeCycle::LifeCycleObject, CosPropertyService::PropertySet {
readonly attribute ASN1_ObjectIdentifier entry_name;
};
typedef sequence < SmiEntry > SmiEntryList;
interface SmiTableIterator {
boolean next_one_entry( out SmiEntry smi_entry );
boolean next_n_entries (
in unsigned long how_many, out SmiEntryList smi_entry_list
);
void destroy();
};
interface GenericFactory : CosLifeCycle::GenericFactory {
SmiEntry create_mib_entry (
in ScopedName t_entry_type,
in ASN1_ObjectIdentifier entry_index,
in Criteria create_criteria
) raises ( NoSuchSmiEntry, AlreadyExists );
SmiEntry create_mib_entry_with_auto_name (
in ScopedName t_entry_type,
in Criteria create_criteria
) raises ( NoSuchSmiEntry, AlreadyExists );
};
interface GetNextEntryIterator {
// Get the next entry index accroding to lexical ordering rule
// of SNMP OIDs -- follows SNMP get-next traversal rule
boolean next_one_entry ( out EntryIndex entry_index );
boolean next_n_entries (
in unsigned long how_many,
out EntryIndexList entry_index_list
);
void destroy();
};
// NamingContext extends CosNaming::NamingContext to provide
// navigating the SNMP name space in the lexicographic order
// and SNMP specific name and context resolution
interface NamingContext : CosNaming::NamingContext {
string get_next_entry( in string entry_name )
raises (
CosNaming::NamingContext::InvalidName,
CosNaming::NamingContext::NotFound,
CosNaming::NamingContext::CannotProceed
);
GetNextEntryIterator get_nc_entry_iterator( in string initial_entry_name )
raises (
CosNaming::NamingContext::InvalidName,
CosNaming::NamingContext::NotFound
);
};
interface NameDirectory : NamingContext {
NamingContext resolve_domain_context( in TAddress p_host_name )
raises (
NoSuchHost, CosNaming::NamingContext::InvalidName,
CosNaming::NamingContext::NotFound,
CosNaming::NamingContext::CannotProceed
);
NamingContext resolve_smi_module(
in TAddress p_host_name, in string p_smi_module_name
) raises (
NoSuchHost, NoSuchSmiModule,
CosNaming::NamingContext::InvalidName,
CosNaming::NamingContext::NotFound
);
NamingContext resolve_smi_entry(
in TAddress p_host_name,
in ScopedName p_entry_type
) raises (
NoSuchHost, NoSuchSmiEntry,
CosNaming::NamingContext::InvalidName,
CosNaming::NamingContext::NotFound,
CosNaming::NamingContext::CannotProceed
);
SmiEntry resolve_mib_entry(
in TAddress p_host_name, in ScopedName p_entry_type,
in string p_entry_index
) raises (
NoSuchHost, NoSuchSmiEntry, CosNaming::NamingContext::InvalidName,
CosNaming::NamingContext::NotFound,
CosNaming::NamingContext::CannotProceed
);
void list_smi_entries(
in TAddress p_host_name, in ScopedName p_entry_type,
in unsigned long how_many, out SmiEntryList ol, out SmiTableIterator sti
) raises (
NoSuchHost, NoSuchSmiEntry, CosNaming::NamingContext::InvalidName,
CosNaming::NamingContext::NotFound,
CosNaming::NamingContext::CannotProceed
);
};
// ProxyAgent
interface ProxyAgent : JIDM::ProxyAgent {
ASN1_Any get_a_variable (
in TAddress p_host_name, in ScopedName p_var_scoped_name,
in EntryIndex p_var_index
) raises ( NoSuchHost, NoSuchVariable, NoSuchObject, ProtocolError );
NVPairList get_variables (
in TAddress p_host_name, in ScopedName p_entry_scoped_name,
in VarNameList p_var_name_list, in EntryIndex p_var_index
) raises ( NoSuchHost, NoSuchSmiEntry, NoSuchObject, MultVarProtocolError );
void set_a_variable (
in TAddress p_host_name, in ScopedName p_var_scoped_name,
in EntryIndex p_var_index, in ASN1_Any p_var_new_value
) raises ( NoSuchHost, NoSuchVariable, NoSuchObject, ProtocolError );
void set_variables (
in TAddress p_host_name, in ScopedName p_entry_scoped_name,
in NVPairList p_var_nvp_list, in EntryIndex p_var_index
) raises ( NoSuchHost, NoSuchSmiEntry, NoSuchObject, MultVarProtocolError );
void list_mib_entries(
in TAddress p_host_name, in ScopedName p_entry_scoped_name,
in long p_how_many, out EntryIndexList p_entry_index_list,
out GetNextEntryIterator p_entry_name_list_itr
) raises ( NoSuchHost, NoSuchSmiEntry, NoSuchObject, ProtocolError );
boolean is_mib_entry_exist (
in TAddress p_host_name, in ScopedName p_entry_scoped_name
) raises ( NoSuchHost, NoSuchSmiEntry, ProtocolError );
boolean is_mib_module_supported (
in TAddress p_host_name, in string p_smi_module_name
) raises ( NoSuchHost, NoSuchSmiModule, ProtocolError );
};
struct EntryVarBind {
ScopedName entry_type; // IDL scoped name of the interface for table-entry
string entry_index; // row index of an entry in the form of ObjectId string
CosPropertyService::Properties nvp_list;
};
typedef sequence<EntryVarBind> EntryVarBindList;
typedef EntryVarBindList NotificationVariableList;
typedef EntryVarBindList InformVariableList;
struct NotificationInfo { // to be sent when using untyped event channel
CosNaming::Name src_entry_name;
ScopedName event_type;
ASN1_GeneralizedTime event_time;
any notification_info;
};
struct InformInfo { // to be sent when using untyped event channel
string src_ip_address;
InformVariableList inform_info;
};
interface Notifications {
void snmp_notification (
in CosNaming::Name src_entry_name, in ScopedName event_type,
in ASN1_GeneralizedTime event_time, in any notification_info
);
void snmp_inform (
in CosNaming::Name src_obj_name, in InformVariableList inform_variables
);
void snmp_report (
in CosNaming::Name src_obj_name, in InformVariableList report_variables
);
};
interface PullNotifications {
boolean try_snmp_notification (
out CosNaming::Name src_entry_name, out ScopedName event_type,
out ASN1_GeneralizedTime event_time, out any notification_info
);
void pull_snmp_notification (
out CosNaming::Name src_entry_name, out ScopedName event_type,
out ASN1_GeneralizedTime event_time, out any notification_info
);
boolean try_snmp_inform (
out CosNaming::Name src_obj_name, out InformVariableList inform_variables
);
void pull_snmp_inform (
out CosNaming::Name src_obj_name, out InformVariableList inform_variables
);
boolean try_snmp_report (
out CosNaming::Name src_obj_name, out InformVariableList report_variables
);
void pull_snmp_report (
out CosNaming::Name src_obj_name, out InformVariableList report_variables
);
};
};
#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 |