#include <mib_entry.h>
Public Member Functions | |
MibEntry () | |
Default constructor. | |
MibEntry (const Oidx &, mib_access) | |
Construct a MibEntry instance with a given object identifier and maximum access rights. | |
MibEntry (const MibEntry &) | |
Copy constructor. | |
virtual | ~MibEntry () |
Destructor. | |
virtual mib_type | type () const |
Return the type of the receiver MIB node. | |
virtual MibEntry * | clone () |
Return a clone of the receiver. | |
virtual Oidx | find_succ (const Oidx &, Request *req=0) |
Return the successor of a given object identifier within the receiver's scope and the context of a given Request. | |
virtual void | get_request (Request *, int) |
Let the receiver process a SNMP GET subrequest. | |
virtual void | get_next_request (Request *, int) |
Let the receiver process a SNMP GETNEXT subrequest. | |
virtual int | commit_set_request (Request *, int) |
Let the receiver commit a SNMP SET subrequest. | |
virtual int | prepare_set_request (Request *, int &) |
Let the receiver prepare a SNMP SET subrequest. | |
virtual int | undo_set_request (Request *, int &) |
Clean up resources used for performing (or undoing) set requests. | |
virtual void | cleanup_set_request (Request *, int &) |
Set the receiver's value and backup its old value for a later undo. | |
virtual void | load_from_file (const char *) |
Load the value(s) of the receiver node from a file. | |
virtual void | save_to_file (const char *) |
Save the value(s) of the receiver node to a file. | |
virtual boolean | serialize (char *&, int &) |
Serialize the value of the receiver. | |
virtual boolean | deserialize (char *, int &) |
Read the value of the receiver from a byte stream. | |
virtual boolean | is_empty () |
Check whether the receiver node contains any instance of a managed object. | |
virtual void | notify_change (const Oidx &, mib_change) |
Notify all registered nodes of changes to an object managed by the receiver node. | |
virtual void | register_for_notifications (MibEntry *) |
Register an MibEntry object to receive notifications about changes of the receiver node. | |
virtual void | add_change_notification (MibEntry *e) |
Wrapper function for register_for_notifications. | |
virtual void | change_notification (const Oidx &, mib_change) |
Receive a notification about changes to a managed object. | |
OidxPtr | key () |
Return a pointer to the key (object identifier) of the receiver. | |
virtual OidxPtr | max_key () |
Return the immediate successor of the greatest object identifier within the receiver's scope. | |
virtual mib_access | get_access () |
Return the maximum access rights for the managed object represented by the receiver node. | |
virtual boolean | is_volatile () |
Check whether the entry is volatile or not. | |
virtual void | reset () |
Resets (clears) the content of this entry. | |
comparison operators | |
int | operator< (const MibEntry &) const |
int | operator> (const MibEntry &) const |
int | operator== (const MibEntry &) const |
int | operator< (const Oidx &) const |
int | operator> (const Oidx &) const |
int | operator<= (const Oidx &) const |
int | operator>= (const Oidx &) const |
int | operator== (const Oidx &) const |
Protected Member Functions | |
void | set_oid (const Oidx &) |
Set the object identifier of the receiver node. | |
Protected Attributes | |
Oidx | oid |
mib_access | access |
List< MibEntry > | notifies |
Friends | |
class | Mib |
MibEntry::MibEntry | ( | ) |
Default constructor.
MibEntry::MibEntry | ( | const Oidx & | , | |
mib_access | ||||
) |
Construct a MibEntry instance with a given object identifier and maximum access rights.
o | - An object identifier. | |
a | - The maximum access of the receiver. |
virtual MibEntry::~MibEntry | ( | ) | [virtual] |
Destructor.
virtual mib_type MibEntry::type | ( | ) | const [virtual] |
Return the type of the receiver MIB node.
Reimplemented in MibLeaf, MibTable, MibComplexEntry, MibGroup, and MibProxy.
virtual MibEntry* MibEntry::clone | ( | ) | [virtual] |
Return a clone of the receiver.
Reimplemented in MibLeaf, snmpRowStatus, MibTable, MibComplexEntry, MibStaticTable, MibProxy, SimMibLeaf, SimRowStatus, snmpTargetAddrTDomain, snmpTargetAddrTAddress, snmpTargetAddrParams, SnmpDisplayString, SnmpEngineID, SnmpTagValue, SnmpTagList, StorageType, SnmpInt32MinMax, OctetStrMinMax, SnmpSecurityModel, SnmpSecurityLevel, SnmpMessageProcessingModel, SnmpAdminString, TimeStamp, DateAndTime, VacmAccessTableStatus, and VacmViewTreeFamilyTableStatus.
Return the successor of a given object identifier within the receiver's scope and the context of a given Request.
oid | an object identifier | |
request | a pointer to a Request instance. |
Reimplemented in MibTable, MibComplexEntry, MibStaticTable, and MibProxy.
virtual void MibEntry::get_request | ( | Request * | , | |
int | ||||
) | [inline, virtual] |
Let the receiver process a SNMP GET subrequest.
req | - A pointer to the whole SNMP GET request. | |
ind | - The index of the subrequest to be processed. |
Reimplemented in MibLeaf, MibTable, MibComplexEntry, MibStaticTable, MibProxy, simSysUpTime, snmpInPkts, snmpOutPkts, snmpInBadVersions, snmpInBadCommunityNames, snmpInBadCommunityUses, snmpInASNParseErrs, snmpInTooBigs, snmpInNoSuchNames, snmpInBadValues, snmpInReadOnlys, snmpInGenErrs, snmpInTotalReqVars, snmpInTotalSetVars, snmpInGetRequests, snmpInGetNexts, snmpInSetRequests, snmpInGetResponses, snmpInTraps, snmpOutTooBigs, snmpOutNoSuchNames, snmpOutBadValues, snmpOutGenErrs, snmpOutGetRequests, snmpOutGetNexts, snmpOutSetRequests, snmpOutGetResponses, snmpOutTraps, snmpSilentDrops, snmpProxyDrops, and sysUpTime.
virtual void MibEntry::get_next_request | ( | Request * | , | |
int | ||||
) | [inline, virtual] |
Let the receiver process a SNMP GETNEXT subrequest.
The OID of the subrequest identified by the given index is already set to the next OID found. In other words, the OID of the current subrequest is different from the OID in the original request. So the implementation of this method does not need to search the appropriate "next" OID.
req | - A pointer to the whole SNMP GETNEXT request. | |
ind | - The index of the subrequest to be processed. |
Reimplemented in MibLeaf, MibTable, MibComplexEntry, MibStaticTable, and MibProxy.
virtual int MibEntry::commit_set_request | ( | Request * | , | |
int | ||||
) | [inline, virtual] |
Let the receiver commit a SNMP SET subrequest.
req | - A pointer to the whole SNMP SET request. | |
ind | - The index of the subrequest to be processed. |
Reimplemented in agentppSimDeleteRow, agentppSimDeleteTableContents, MibLeaf, MibTable, MibComplexEntry, and MibProxy.
virtual int MibEntry::prepare_set_request | ( | Request * | , | |
int & | ||||
) | [inline, virtual] |
Let the receiver prepare a SNMP SET subrequest.
req | - A pointer to the whole SNMP SET request. | |
ind | - The index of the subrequest to be processed. |
Reimplemented in agentppSimDeleteRow, agentppSimDeleteTableContents, MibLeaf, snmpRowStatus, MibTable, MibComplexEntry, MibProxy, snmpTargetAddrTAddress, snmpTargetAddrParams, SnmpDisplayString, SnmpEngineID, SnmpTagValue, TestAndIncr, and OctetStrMinMax.
virtual int MibEntry::undo_set_request | ( | Request * | , | |
int & | ||||
) | [inline, virtual] |
Clean up resources used for performing (or undoing) set requests.
req | - A pointer to the whole SNMP SET request. | |
ind | - The index of the subrequest to be processed. |
Reimplemented in MibLeaf, MibTable, and MibComplexEntry.
virtual void MibEntry::cleanup_set_request | ( | Request * | , | |
int & | ||||
) | [inline, virtual] |
Set the receiver's value and backup its old value for a later undo.
vb | - The variable binding that holds the new value. |
Reimplemented in MibLeaf, MibTable, and MibComplexEntry.
virtual void MibEntry::load_from_file | ( | const char * | ) | [virtual] |
Load the value(s) of the receiver node from a file.
fname | - A file name. |
Reimplemented in MibGroup.
virtual void MibEntry::save_to_file | ( | const char * | ) | [virtual] |
Save the value(s) of the receiver node to a file.
fname | - A file name. |
Reimplemented in MibGroup.
virtual boolean MibEntry::serialize | ( | char *& | , | |
int & | ||||
) | [virtual] |
Serialize the value of the receiver.
buf | - A pointer to byte stream buffer returned. | |
sz | - The size of the buffer returned. |
Reimplemented in MibLeaf, MibTable, and MibComplexEntry.
virtual boolean MibEntry::deserialize | ( | char * | , | |
int & | ||||
) | [virtual] |
Read the value of the receiver from a byte stream.
buf | a pointer to the input byte stream. | |
sz | the size of the input buffer. On output it contains the size remaining unread in the input buffer. |
Reimplemented in MibLeaf, MibTable, and MibComplexEntry.
virtual boolean MibEntry::is_empty | ( | ) | [inline, virtual] |
Check whether the receiver node contains any instance of a managed object.
Reimplemented in MibTable, MibComplexEntry, and MibProxy.
virtual void MibEntry::notify_change | ( | const Oidx & | , | |
mib_change | ||||
) | [virtual] |
Notify all registered nodes of changes to an object managed by the receiver node.
o | - The object identifier of the object changed. | |
change | - The type of the change (REMOVE, CREATE, CHANGE, or UPDATE) |
virtual void MibEntry::register_for_notifications | ( | MibEntry * | ) | [virtual] |
virtual void MibEntry::add_change_notification | ( | MibEntry * | e | ) | [inline, virtual] |
Wrapper function for register_for_notifications.
virtual void MibEntry::change_notification | ( | const Oidx & | , | |
mib_change | ||||
) | [inline, virtual] |
Receive a notification about changes to a managed object.
This method will be called for all registered objects of an object that called notify_change().
o | - The object identifier of the object changed. | |
change | - The type of the change (REMOVE, CREATE, CHANGE, or UPDATE) |
OidxPtr MibEntry::key | ( | ) |
Return a pointer to the key (object identifier) of the receiver.
virtual OidxPtr MibEntry::max_key | ( | ) | [virtual] |
Return the immediate successor of the greatest object identifier within the receiver's scope.
Reimplemented in MibLeaf, MibTable, MibComplexEntry, and MibProxy.
virtual mib_access MibEntry::get_access | ( | ) | [virtual] |
Return the maximum access rights for the managed object represented by the receiver node.
Reimplemented in SimMibLeaf, and SimRowStatus.
virtual boolean MibEntry::is_volatile | ( | ) | [virtual] |
Check whether the entry is volatile or not.
Reimplemented in snmpInPkts, snmpOutPkts, snmpInBadVersions, snmpInBadCommunityNames, snmpInBadCommunityUses, snmpInASNParseErrs, snmpInTooBigs, snmpInNoSuchNames, snmpInBadValues, snmpInReadOnlys, snmpInGenErrs, snmpInTotalReqVars, snmpInTotalSetVars, snmpInGetRequests, snmpInGetNexts, snmpInSetRequests, snmpInGetResponses, snmpInTraps, snmpOutTooBigs, snmpOutNoSuchNames, snmpOutBadValues, snmpOutGenErrs, snmpOutGetRequests, snmpOutGetNexts, snmpOutSetRequests, snmpOutGetResponses, snmpOutTraps, snmpSilentDrops, snmpProxyDrops, TestAndIncr, TimeStamp, DateAndTime, sysUpTime, sysORLastChange, and sysOREntry.
virtual void MibEntry::reset | ( | ) | [inline, virtual] |
Resets (clears) the content of this entry.
Reimplemented in MibTable, StorageTable, and VacmViewTreeFamilyTable.
int MibEntry::operator< | ( | const MibEntry & | ) | const |
int MibEntry::operator> | ( | const MibEntry & | ) | const |
int MibEntry::operator== | ( | const MibEntry & | ) | const |
int MibEntry::operator< | ( | const Oidx & | ) | const |
int MibEntry::operator> | ( | const Oidx & | ) | const |
int MibEntry::operator<= | ( | const Oidx & | ) | const |
int MibEntry::operator>= | ( | const Oidx & | ) | const |
int MibEntry::operator== | ( | const Oidx & | ) | const |
void MibEntry::set_oid | ( | const Oidx & | ) | [protected] |
Set the object identifier of the receiver node.
o | - An object identifier. |
friend class Mib [friend] |
Reimplemented in MibTable, MibComplexEntry, MibGroup, and StorageTable.
Oidx MibEntry::oid [protected] |
mib_access MibEntry::access [protected] |
List<MibEntry> MibEntry::notifies [protected] |