AGENT++  4.0.3
Public Member Functions | Static Public Attributes | List of all members
snmpNotifyEntry Class Reference

snmpNotifyType More...

#include <snmp_notification_mib.h>

Inheritance diagram for snmpNotifyEntry:
StorageTable MibTable MibEntry MibTableVoter ThreadManager Synchronized

Public Member Functions

 snmpNotifyEntry ()
 
virtual ~snmpNotifyEntry ()
 
MibTableRowadd_entry (const NS_SNMP OctetStr &, const NS_SNMP OctetStr &, const int)
 Add a new entry to the reciever.
 
- Public Member Functions inherited from StorageTable
 StorageTable (const StorageTable &)
 Copy constructor.
 
 StorageTable (const Oidx &)
 Constructor with object identifier with single index object like string or oid with implied length.
 
 StorageTable (const Oidx &, unsigned int)
 Constructor with object identifier and single index object's index length (meassured in subidentifiers).
 
 StorageTable (const Oidx &, unsigned int, bool)
 Constructor with object identifier and given fixed index length.
 
 StorageTable (const Oidx &, const index_info *, unsigned int)
 Constructor with object identifier and given index structure.
 
virtual ~StorageTable ()
 Destructor.
 
virtual void add_storage_col (StorageType *)
 Add the StorageType column to the table.
 
void set_storage_type (MibTableRow *, int)
 Set storage type of the specified row.
 
virtual void reset ()
 Removes all rows that are not permanent and not read-only.
 
- Public Member Functions inherited from MibTable
 MibTable (const MibTable &)
 Copy constructor.
 
 MibTable (const Oidx &)
 Constructor with object identifier with single index object like string or oid with implied length.
 
 MibTable (const Oidx &, int)
 Constructor with object identifier and single index object's index length (meassured in subidentifiers).
 
 MibTable (const Oidx &, int, bool)
 Constructor with object identifier and given fixed index length.
 
 MibTable (const Oidx &, const index_info *, unsigned int)
 Constructor with object identifier and given index structure.
 
virtual ~MibTable ()
 Destructor.
 
mib_type type () const
 Return the type of the receiver.
 
virtual MibEntryPtr clone ()
 Clone the receiver object.
 
virtual void add_col (MibLeaf *)
 Add a column to the receiver table.
 
virtual void add_col (snmpRowStatus *)
 Add a row status column to the receiver table.
 
virtual void replace_col (unsigned int, MibLeaf *)
 Replace a column of the table.
 
virtual bool serialize (char *&, int &)
 Serialize the values of the receiver table.
 
virtual bool deserialize (char *, int &)
 Read the value of the receiver from a byte stream.
 
virtual OidxPtr max_key ()
 Return the immediate successor of the greatest object identifier within the receiver's scope.
 
virtual void update (Request *)
 This method is called by a Mib instance whenever it needs to know how many rows the receiver contains.
 
virtual bool is_empty ()
 Return whether the table is empty or not.
 
virtual int set_value (Request *, int)
 Set a value of column in a row of the receiver table.
 
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 &)
 Free any resources allocated for a SET request (i.e., undo information).
 
virtual bool ready_for_service (Vbx *pvbs, int sz)
 Check whether the specified row is ready to set in service.
 
virtual MibTableRowadd_row (const Oidx &)
 Add a row with the given index to the table.
 
virtual MibTableRowinit_row (const Oidx &, Vbx *)
 Initialize a row with values.
 
virtual void remove_row (const Oidx &)
 Remove a row with the given index from the table and call row_delete before.
 
virtual void row_init (MibTableRow *, const Oidx &, MibTable *t=0)
 Is called after a new row has been initialized (i.e., after it has been loaded from persistent storage)
 
virtual void row_added (MibTableRow *, const Oidx &, MibTable *t=0)
 Is called after a new row has been created and automatic index generation has taken place.
 
virtual void row_delete (MibTableRow *, const Oidx &, MibTable *t=0)
 Is called before a row is deleted by MibTable.
 
virtual void row_activated (MibTableRow *, const Oidx &, MibTable *t=0)
 Is called when a row is activated by a SET request setting the row�s snmpRowStatus object to active(1).
 
virtual void row_deactivated (MibTableRow *, const Oidx &, MibTable *t=0)
 Is called when a row is deactivated by a SET request setting the row�s snmpRowStatus object to notInService(2).
 
virtual Oidx get_next_avail_index () const
 Return the next available index value for the receiver table, that can be used be a manager to create a new row.
 
MibTableRowfind_index (const Oidx &) const
 Find the row within the receiver table with a given index.
 
Oidx index (const Oidx &) const
 Returns the index part of a given oid (relative to the receiver).
 
virtual bool is_index_valid (const Oidx &) const
 Check whether the given index is a valid index for the receiver table.
 
Oidx base (const Oidx &)
 Returns the base of an oid.
 
virtual void get_contents (Vbx **&, int &, int &, int=rowActive)
 Return all (active) rows as a two dimensional array of Vbx objects.
 
OidList< MibTableRow > * rows ()
 Return a pointer to the internal list of rows.
 
virtual List< MibTableRow > * get_rows (int=rowActive)
 Return all (active) rows as a list of pointers to the corresponding MibTableRow instances.
 
virtual List< MibTableRow > * get_rows_cloned (int=rowActive)
 Return all (active) rows as a list of pointers to the corresponding MibTableRow instances.
 
virtual List< MibTableRow > * get_rows_cloned (const Oidx *, int=rowActive)
 Return those (active) rows as a list of pointers to the corresponding MibTableRow instances, of which the index starts with the given prefix.
 
virtual int size ()
 Return the size of the table meassured in rows.
 
virtual void add_voter (MibTableVoter *)
 Add a MibTableVoter instance that listens for row status transition events and votes for or against commiting such a transition.
 
virtual void remove_voter (MibTableVoter *)
 Remove a MibTableVoter listener.
 
virtual void add_listener (MibTable *)
 Add a listener that will be informed about row additions or deletions.
 
virtual void remove_listener (MibTable *)
 Remove a listener that no longer wants to be informed about row additions or deletions.
 
void fire_row_changed (int, MibTableRow *, const Oidx &)
 Fire the row changed event to the receiver and all its listeners.
 
ListCursor< MibTable > * get_listeners ()
 Gets a cursor on the listeners for this table's row events.
 
bool has_listeners () const
 Checks whether this table has any listeners for row events.
 
virtual void clear ()
 Removes all rows from this table.
 
virtual MibTableRowget_columns ()
 Gets the columns (a.k.a.
 
MibLeaffind (const Oidx &) const
 Find a MibLeaf object of the receiver with a given oid.
 
virtual MibLeaffind_next (const Oidx &)
 Find the lexicographical successor MibLeaf object to a given oid.
 
MibLeaffind_prev (const Oidx &)
 Find the lexicographical predessor MibLeaf object to a given oid.
 
MibLeafget (int, int)
 Return the MibLeaf object of the receiver at a given position.
 
virtual void reinit ()
 Reinitialize the table.
 
- Public Member Functions inherited from MibEntry
 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 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 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 mib_access get_access ()
 Return the maximum access rights for the managed object represented by the receiver node.
 
virtual bool is_volatile ()
 Check whether the entry is volatile or not.
 
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
 
- Public Member Functions inherited from ThreadManager
 ThreadManager ()
 Default constructor.
 
virtual ~ThreadManager ()
 Destructor.
 
void start_synch ()
 Start synchronized execution.
 
void end_synch ()
 End synchronized execution.
 
- Public Member Functions inherited from Synchronized
 Synchronized ()
 
 ~Synchronized ()
 
void wait ()
 Causes current thread to wait until another thread invokes the notify() method or the notifyAll() method for this object.
 
bool wait (unsigned long timeout)
 Causes current thread to wait until either another thread invokes the notify() method or the notifyAll() method for this object, or a specified amount of time has elapsed.
 
void notify ()
 Wakes up a single thread that is waiting on this object's monitor.
 
void notify_all ()
 Wakes up all threads that are waiting on this object's monitor.
 
bool lock ()
 Enter a critical section.
 
TryLockResult trylock ()
 Try to enter a critical section.
 
bool unlock ()
 Leave a critical section.
 
- Public Member Functions inherited from MibTableVoter
 MibTableVoter ()
 
virtual ~MibTableVoter ()
 
virtual int is_transition_ok (MibTable *, MibTableRow *, const Oidx &, int, int)
 Check whether a transition from an old to a new RowStatus value is allowed.
 

Static Public Attributes

static snmpNotifyEntryinstance
 

Additional Inherited Members

- Public Types inherited from Synchronized
enum  TryLockResult { LOCKED = 1, BUSY = 0, OWNED = -1 }
 
- Static Public Member Functions inherited from ThreadManager
static void start_global_synch ()
 Start global synchronized execution.
 
static void end_global_synch ()
 End global synchronized execution.
 
- Protected Member Functions inherited from StorageTable
virtual bool is_persistent (MibTableRow *)
 Check whether the given row should be serialized or not.
 
- Protected Attributes inherited from MibTable
Oidx upper
 
MibTableRow generator
 
OidList< MibTableRowcontent
 
unsigned int index_len
 
index_infoindex_struc
 
snmpRowStatusrow_status
 
Timer row_timeout
 
OrderedList< MibTableRownotready_rows
 
OrderedList< MibTableRowdelete_rows
 
List< MibTablelisteners
 
List< MibTableVotervoters
 

Detailed Description

snmpNotifyType

"This object determines the type of notification to be generated for entries in the snmpTargetAddrTable selected by the corresponding instance of snmpNotifyTag. This value is only used when generating notifications, and is ignored when using the snmpTargetAddrTable for other purposes.

If the value of this object is trap(1), then any messages generated for selected rows will contain Unconfirmed-Class PDUs.

If the value of this object is inform(2), then any messages generated for selected rows will contain Confirmed-Class PDUs.

Note that if an SNMP entity only supports generation of Unconfirmed-Class PDUs (and not Confirmed-Class PDUs), then this object may be read-only." snmpNotifyRowStatus

"The status of this conceptual row.

To create a row in this table, a manager must set this object to either createAndGo(4) or createAndWait(5)." snmpNotifyFilterProfileName

"The name of the filter profile to be used when generating notifications using the corresponding entry in the snmpTargetAddrTable." snmpNotifyFilterProfileRowStatus

"The status of this conceptual row.

To create a row in this table, a manager must set this object to either createAndGo(4) or createAndWait(5).

Until instances of all corresponding columns are appropriately configured, the value of the corresponding instance of the snmpNotifyFilterProfileRowStatus column is 'notReady'.

In particular, a newly created row cannot be made active until the corresponding instance of snmpNotifyFilterProfileName has been set." snmpNotifyFilterMask

"The bit mask which, in combination with the corresponding instance of snmpNotifyFilterSubtree, defines a family of subtrees which are included in or excluded from the filter profile.

Each bit of this bit mask corresponds to a sub-identifier of snmpNotifyFilterSubtree, with the most significant bit of the i-th octet of this octet string value (extended if necessary, see below) corresponding to the (8*i - 7)-th sub-identifier, and the least significant bit of the i-th octet of this octet string corresponding to the (8*i)-th sub-identifier, where i is in the range 1 through 16.

Each bit of this bit mask specifies whether or not the corresponding sub-identifiers must match when determining if an OBJECT IDENTIFIER matches this family of filter subtrees; a '1' indicates that an exact match must occur; a '0' indicates 'wild card', i.e., any sub-identifier value matches.

Thus, the OBJECT IDENTIFIER X of an object instance is contained in a family of filter subtrees if, for each sub-identifier of the value of snmpNotifyFilterSubtree, either:

the i-th bit of snmpNotifyFilterMask is 0, or

the i-th sub-identifier of X is equal to the i-th sub-identifier of the value of snmpNotifyFilterSubtree.

If the value of this bit mask is M bits long and there are more than M sub-identifiers in the corresponding instance of snmpNotifyFilterSubtree, then the bit mask is extended with 1's to be the required length.

Note that when the value of this object is the zero-length string, this extension rule results in a mask of all-1's being used (i.e., no 'wild card'), and the family of filter subtrees is the one subtree uniquely identified by the corresponding instance of snmpNotifyFilterSubtree." snmpNotifyFilterType

"This object indicates whether the family of filter subtrees defined by this entry are included in or excluded from a filter. A more detailed discussion of the use of this object can be found in section 6. of [SNMP-APPL]." snmpNotifyFilterRowStatus

"The status of this conceptual row.

To create a row in this table, a manager must set this object to either createAndGo(4) or createAndWait(5)." snmpNotifyEntry

An entry in this table selects a set of management targets which should receive notifications, as well as the type of notification which should be sent to each selected management target.

Entries in the snmpNotifyTable are created and deleted using the snmpNotifyRowStatus object.

Version
3.4

Constructor & Destructor Documentation

snmpNotifyEntry::snmpNotifyEntry ( )
virtual snmpNotifyEntry::~snmpNotifyEntry ( )
virtual

Member Function Documentation

MibTableRow* snmpNotifyEntry::add_entry ( const NS_SNMP OctetStr &  ,
const NS_SNMP OctetStr &  ,
const int   
)

Add a new entry to the reciever.

The new entry is used to specify target addresses to send notifications to.

Parameters
namea unique identifier used to index this table.
taga tag value used to select entries in snmpTargetAddrTable.
typespecifies whether to generate a Trap PDU (1) or an Inform-PDU (2).
Returns
a pointer to the newly created entry or 0 if a row with index name already exists.

Member Data Documentation

snmpNotifyEntry* snmpNotifyEntry::instance
static

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