AgentXNode Class Reference

#include <agentx_node.h>

List of all members.

Public Member Functions

 AgentXNode (AgentXRegEntry *, const AgentXRegion &)
 Create an AgentX registration.
 AgentXNode (const AgentXNode &)
 Copy constructor.
virtual ~AgentXNode ()
 Destructor.
virtual void add_registration (AgentXRegEntry *)
 Add a registration for the same region but with different priority.
virtual boolean remove_registration (const AgentXRegEntry &)
 Remove a registration for the same region but with different priority.
virtual boolean shrink (const Oidx &)
 Shrink the registered region.
virtual boolean expand (const Oidx &)
 Expand the registered region.
virtual mib_type type () const
 Return the type of the receiver MIB node.
virtual MibEntryPtr clone ()
 Return a clone of the receiver.
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 &)
 Let the receiver undo a SNMP SET subrequest.
virtual void cleanup_set_request (Request *, int &)
 Set the receiver's value and backup its old value for a later undo.
virtual boolean is_empty ()
 Check whether the reciever node contains any instance of a managed object.
virtual OidxPtr max_key ()
 Return the maximum object identifier the receiver is responsible for.
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.
u_int registration_count ()
 Get the number of registrations for this region.
AgentXRegEntryactive_registration ()
 Get active registration.
AgentXRegion get_region ()
 Get the region registered by this node.

Static Public Member Functions

static boolean is_agentx (const MibEntry &)
 Check whether a MibEntry is a AgentX entry or not.

Protected Member Functions

void set_region (const AgentXRegion &)
 Set the region of the receiver.
virtual void get_request (Request *, int, u_char)
 Let the receiver process a SNMP GET subrequest.
virtual void set_request (Request *, int, u_char)
 Let the receiver process a SNMP GET subrequest.
void set_back_reference (MasterAgentXMib *)
 Set back reference to MasterAgentXMib holding the receiver.

Protected Attributes

OrderedList< AgentXRegEntryorigReg
AgentXRegion region
boolean singleInstance
MasterAgentXMibbackReference

Friends

class MasterAgentXMib


Constructor & Destructor Documentation

AgentXNode::AgentXNode ( AgentXRegEntry ,
const AgentXRegion  
)

Create an AgentX registration.

Parameters:
regEntry the first registration entry associated with this region (includes the session that registrates the region)
region the region to registrate - can differ from the original region registration contained in regEntry (region splitting)

AgentXNode::AgentXNode ( const AgentXNode  ) 

Copy constructor.

Parameters:
other another AgentXNode instane.

virtual AgentXNode::~AgentXNode (  )  [virtual]

Destructor.


Member Function Documentation

virtual void AgentXNode::add_registration ( AgentXRegEntry  )  [virtual]

Add a registration for the same region but with different priority.

Parameters:
regEntry a registration entry that also registrates exactly the receiver region

virtual boolean AgentXNode::remove_registration ( const AgentXRegEntry  )  [virtual]

Remove a registration for the same region but with different priority.

Parameters:
regEntry a registration entry
Returns:
TRUE if there are no more registrations left for the receiver, FALSE otherwise.

virtual boolean AgentXNode::shrink ( const Oidx &   )  [virtual]

Shrink the registered region.

Parameters:
newUpperBound an object identifier that denotes the new upper bound of the region
Returns:
TRUE if (key() <= newUpperBound <= max_key()), FALSE otherwise

virtual boolean AgentXNode::expand ( const Oidx &   )  [virtual]

Expand the registered region.

Parameters:
newUpperBound an object identifier that denotes the new upper bound of the region
Returns:
TRUE if (key() <= newUpperBound >= max_key()), FALSE otherwise

virtual mib_type AgentXNode::type (  )  const [virtual]

Return the type of the receiver MIB node.

Returns:
One of the following types: NONE, SHADOW, PROXY, LEAF, TABLE, GROUP, or COMPLEX.

virtual MibEntryPtr AgentXNode::clone (  )  [virtual]

Return a clone of the receiver.

Returns:
A pointer to a clone of the MibEntry object.

virtual void AgentXNode::get_request ( Request *  ,
int   
) [virtual]

Let the receiver process a SNMP GET subrequest.

Parameters:
req - A pointer to the whole SNMP GET request.
ind - The index of the subrequest to be processed.

virtual void AgentXNode::get_next_request ( Request *  ,
int   
) [virtual]

Let the receiver process a SNMP GETNEXT subrequest.

Parameters:
req - A pointer to the whole SNMP GETNEXT request.
ind - The index of the subrequest to be processed.

virtual int AgentXNode::commit_set_request ( Request *  ,
int   
) [virtual]

Let the receiver commit a SNMP SET subrequest.

Parameters:
req - A pointer to the whole SNMP SET request.
ind - The index of the subrequest to be processed.
Returns:
SNMP_ERROR_SUCCESS on success and SNMP_ERROR_COMITFAIL on failure.

virtual int AgentXNode::prepare_set_request ( Request *  ,
int &   
) [virtual]

Let the receiver prepare a SNMP SET subrequest.

Parameters:
req - A pointer to the whole SNMP SET request.
ind - The index of the subrequest to be processed.
Returns:
SNMP_ERROR_SUCCESS on success and SNMP_ERROR_WRONG_VALUE, SNMP_ERROR_WRONG_TYPE, or SNMP_ERROR_NO_ACCESS on failure.

virtual int AgentXNode::undo_set_request ( Request *  ,
int &   
) [virtual]

Let the receiver undo a SNMP SET subrequest.

Parameters:
req - A pointer to the whole SNMP SET request.
ind - The index of the subrequest to be processed.
Returns:
SNMP_ERROR_SUCCESS on success and SNMP_ERROR_UNDO_FAIL on failure.

virtual void AgentXNode::cleanup_set_request ( Request *  ,
int &   
) [virtual]

Set the receiver's value and backup its old value for a later undo.

Parameters:
vb - The variable binding that holds the new value.
Returns:
SNMP_ERROR_SUCCESS if the new value has been set, SNMP_ERROR_WRONG_TYPE or SNMP_ERROR_BAD_VALUE otherwise.

virtual boolean AgentXNode::is_empty (  )  [inline, virtual]

Check whether the reciever node contains any instance of a managed object.

Returns:
TRUE if the node currently manages an instance.

virtual OidxPtr AgentXNode::max_key (  )  [virtual]

Return the maximum object identifier the receiver is responsible for.

Returns:
A pointer to the maximum object identifier this object is responsible for.

virtual Oidx AgentXNode::find_succ ( const Oidx &  ,
Request *  req = 0 
) [virtual]

Return the successor of a given object identifier within the receiver's scope and the context of a given Request.

Parameters:
oid an object identifier
request a pointer to a Request instance.
Returns:
an object identifier if a successor could be found, otherwise (if no successor exists or is out of scope) a zero length oid is returned

static boolean AgentXNode::is_agentx ( const MibEntry &   )  [static]

Check whether a MibEntry is a AgentX entry or not.

Parameters:
entry a MIB entry
Returns:
TRUE if the given entry is an AgentX entry, FALSE otherwise

u_int AgentXNode::registration_count (  )  [inline]

Get the number of registrations for this region.

Returns:
an unsigned integer.

AgentXRegEntry* AgentXNode::active_registration (  )  [inline]

Get active registration.

Returns:
the registration entry with the lowest priority value.

AgentXRegion AgentXNode::get_region (  )  [inline]

Get the region registered by this node.

Returns:
a AgentXRegion instance.

void AgentXNode::set_region ( const AgentXRegion  )  [protected]

Set the region of the receiver.

Do not call this when the node has been registered within a MIB.

Parameters:
region the new region

virtual void AgentXNode::get_request ( Request *  ,
int  ,
u_char   
) [protected, virtual]

Let the receiver process a SNMP GET subrequest.

Parameters:
req - A pointer to the whole SNMP GET request.
ind - The index of the subrequest to be processed.
getType specifies if a GET, GETNEXT, or GETBULK request is processed.

virtual void AgentXNode::set_request ( Request *  ,
int  ,
u_char   
) [protected, virtual]

Let the receiver process a SNMP GET subrequest.

Parameters:
req - A pointer to the whole SNMP GET request.
ind - The index of the subrequest to be processed.
getType specifies if a TESTSET, COMMITSET, UNDOSET, or CLEANUPSET request is processed.

void AgentXNode::set_back_reference ( MasterAgentXMib  )  [protected]

Set back reference to MasterAgentXMib holding the receiver.

Parameters:
backReference a pointer to a MasterAgentXMib instance.


Friends And Related Function Documentation

friend class MasterAgentXMib [friend]


Member Data Documentation

OrderedList<AgentXRegEntry> AgentXNode::origReg [protected]

boolean AgentXNode::singleInstance [protected]


The documentation for this class was generated from the following file:

Generated on Tue May 26 23:32:15 2009 for AgentX++ by  doxygen 1.5.6