AGENT++
4.0.3
|
The class SimMib can be used to create simulation agents from real agents. More...
#include <sim_mib.h>
Public Member Functions | |
SimMib () | |
Default Constructor. | |
virtual | ~SimMib () |
Desctructor. | |
Public Member Functions inherited from Mib | |
Mib () | |
Default Constructor. | |
Mib (const NS_SNMP OctetStr &) | |
Constructor with path where persistent MIB objects should be stored to and loaded from. | |
virtual | ~Mib () |
Destructor. | |
void | set_request_list (RequestList *) |
Set the RequestList to be used for answering request. | |
RequestList * | get_request_list () |
Gets the request list associated with all Mib instances. | |
virtual void | process_request (Request *) |
Process a request. | |
virtual int | notify (const NS_SNMP OctetStr &, const Oidx &, Vbx *, int, unsigned int=0) |
Send a notification. | |
void | set_notification_sender (NotificationSender *) |
Sets the notification sender to be used by this Mib. | |
NotificationSender * | get_notification_sender () const |
Gets the currently set NotificationSender. | |
virtual void | cleanup () |
Clean up MIB. | |
virtual MibEntry * | add (MibEntry *) |
Register a MIB object for the default context. | |
virtual MibEntry * | add (const NS_SNMP OctetStr &, MibEntry *) |
Register a MIB object within a given context. | |
virtual MibContext * | add_context (const NS_SNMP OctetStr &) |
Add a new context with a given name to the receiver. | |
virtual void | remove_context (const NS_SNMP OctetStr &) |
Remove a given context from the receiver. | |
virtual bool | add_agent_caps (const NS_SNMP OctetStr &, const Oidx &, const NS_SNMP OctetStr &) |
Add Agent Capabilities to a context. | |
virtual void | remove_agent_caps (const NS_SNMP OctetStr &, const Oidx &) |
Remove Agent Capabilities from a context. | |
virtual bool | remove (const Oidx &) |
Unregister a MIB object from the agent�s MIB. | |
virtual bool | remove (const NS_SNMP OctetStr &, const Oidx &) |
Unregister a MIB object from the agent�s MIB. | |
virtual bool | init () |
Initialize all contexts. | |
virtual void | save_all () |
Save all persistent MIB objects to disk. | |
virtual bool | save (unsigned int, const NS_SNMP OctetStr &) |
Save all persistent MIB objects in the supplied format to the supplied path. | |
virtual bool | load (unsigned int, const NS_SNMP OctetStr &) |
Load all persistent MIB objects in the supplied format from the supplied path. | |
virtual MibEntryPtr | get (const Oidx &) |
Get the MIB object with a given object id. | |
virtual MibEntryPtr | get (const NS_SNMP OctetStr &, const Oidx &) |
Get the MIB object with a given object id. | |
virtual MibGroup * | find_group_of (const NS_SNMP OctetStr &, const Oidx &) |
Find the MibGroup that contains a MibEntry with a given object ID. | |
virtual NS_SNMP OctetStr | get_persistent_objects_path () const |
Get path where persistent MIB objects are stored. | |
virtual void | set_persistent_objects_path (const NS_SNMP OctetStr *str) |
Set the path where persistent MIB objects are stored. | |
bool | is_persistency_activated () const |
Checks whether a persistent objects path has been set. | |
virtual bool | is_complex_node (const MibEntryPtr &) |
Check whether a node (a MIB object) is complex, i.e. | |
bool | is_table_node (const MibEntryPtr &e) |
Check whether a node (a MIB object) is a table. | |
bool | is_leaf_node (const MibEntryPtr &e) |
Check whether a node (a MIB object) is a leaf node. | |
void | lock_mib () |
Lock the receiver's registration. | |
void | unlock_mib () |
Release the lock on the receiver's registration. | |
virtual MibContext * | get_context (const NS_SNMP OctetStr &) |
Get a context. | |
MibContext * | get_default_context () |
Get the default context. | |
virtual int | find_next (MibContext *, const Oidx &oid, MibEntryPtr &, Request *req, const int, Oidx &nextOid) |
Find the next MIB entry which has an oid greater than the given oid. | |
virtual int | find_managing_object (MibContext *, const Oidx &, MibEntryPtr &, Request *) |
Find the MIB object (i.e., MibTable, MibLeaf, etc.) that is responsible for the managed object identified by a given oid within a given context. | |
virtual void | do_process_request (Request *) |
Internally process a request (typically within its own thread). | |
virtual void | process_set_request (Request *) |
Process a set request. | |
virtual int | process_prepare_set_request (Request *) |
Process the prepare phase of a set request. | |
virtual int | process_commit_set_request (Request *) |
Process the commit phase of a set request. | |
virtual int | process_undo_set_request (Request *) |
Process the undo phase of a set request. | |
virtual void | process_cleanup_set_request (Request *) |
Process the clean up phase of a set request. | |
virtual void | process_get_bulk_request (Request *) |
Process a get bulk request. | |
MibConfigFormat * | add_config_format (unsigned int format, MibConfigFormat *) |
Adds a config format to this Mib instance. | |
MibConfigFormat * | get_config_format (unsigned int format) |
Returns the config format for the specified format ID. | |
Additional Inherited Members | |
Public Attributes inherited from Mib | |
RequestList * | requestList |
Pointer to the RequestList used for answering requests. | |
Static Public Attributes inherited from Mib | |
static Mib * | instance |
Protected Member Functions inherited from Mib | |
virtual bool | process_request (Request *, int) |
Process a subrequest. | |
virtual void | finalize (Request *) |
Finalize a request. | |
virtual void | delete_request (Request *req) |
Deletes the the supplied request. | |
Static Protected Member Functions inherited from Mib | |
static bool | set_exception_vb (Request *, int, int) |
Set the exception status for the supplied sub-request. | |
Protected Attributes inherited from Mib | |
OidList< MibContext > | contexts |
MibContext * | defaultContext |
NotificationSender * | notificationSender |
NS_SNMP OctetStr * | persistent_objects_path |
ThreadManager | mibLock |
Array< MibConfigFormat > | configFormats |
The class SimMib can be used to create simulation agents from real agents.
Simply use SimMib instead of Mib and add MIB objects like MibLeaf and MibTable to it. Then the content of the MIB can be cloned from a SNMPv1/v2c agent.
SimMib::SimMib | ( | ) |
Default Constructor.
|
virtual |
Desctructor.