Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

v3MP::Cache Class Reference

Collaboration diagram for v3MP::Cache:
[legend]
List of all members.

Detailed Description

Holds cache entries for currently processed requests.

Definition at line 426 of file mp_v3.h.

Public Member Functions

 Cache ()
 ~Cache ()
int add_entry (int msg_id, unsigned long req_id, const OctetStr &sec_engine_id, int sec_model, const OctetStr &sec_name, int sec_level, const OctetStr &context_engine_id, const OctetStr &context_name, struct SecurityStateReference *sec_state_ref, int error_code, bool local_request)
 Add an entry to the cache.

int get_entry (int msg_id, bool local_request, int *error_code, struct SecurityStateReference **sec_state_ref)
 Search the cache for a message id, return the error code and the sec_state_ref and delete the entry from the cache.

void delete_entry (unsigned long req_id, bool local_request)
 Delete the entry with the given request id from the cache.

int get_entry (int searchedID, bool local_request, struct Cache::Entry_T *res)
 Search the cache for a message id, return the whole entry and delete the entry from the cache.

void delete_content (struct Cache::Entry_T &ce)
void set_usm (USM *usm_to_use)

Private Attributes

SnmpSynchronized _cachesync
Entry_Ttable
 whole table

int max_entries
 the maximum number of entries

int entries
 the current amount of entries

USMusm


Constructor & Destructor Documentation

v3MP::Cache::Cache  ) 
 

v3MP::Cache::~Cache  ) 
 


Member Function Documentation

int v3MP::Cache::add_entry int  msg_id,
unsigned long  req_id,
const OctetStr sec_engine_id,
int  sec_model,
const OctetStr sec_name,
int  sec_level,
const OctetStr context_engine_id,
const OctetStr context_name,
struct SecurityStateReference *  sec_state_ref,
int  error_code,
bool  local_request
 

Add an entry to the cache.

Parameters:
msg_id - The message id of the message
req_id - The request id of the message
sec_engine_id - The authoritative engineID
sec_model - The security model used for this message
sec_name - The name of the user
sec_level - The security level used for this message
context_engine_id - The context_engine_id
context_name - The context_name
sec_state_ref - The reference of the USM
error_code - The code of the error that occured while parsing the received message
Returns:
- SNMPv3_MP_OK, SNMPv3_MP_ERROR or SNMPv3_DOUBLED_MESSAGE (an entry with the given values is already in the cache)

void v3MP::Cache::delete_content struct Cache::Entry_T ce  ) 
 

void v3MP::Cache::delete_entry unsigned long  req_id,
bool  local_request
 

Delete the entry with the given request id from the cache.

This function is used in eventlist.cpp when a request has timed out.

Parameters:
req_id - The request id.

int v3MP::Cache::get_entry int  searchedID,
bool  local_request,
struct Cache::Entry_T res
 

Search the cache for a message id, return the whole entry and delete the entry from the cache.

Parameters:
searchedID - Search for this message id
res - IN: Pointer to an empy structure OUT: The filled structure
Returns:
- SNMPv3_MP_ERROR, SNMPv3_MP_OK

int v3MP::Cache::get_entry int  msg_id,
bool  local_request,
int *  error_code,
struct SecurityStateReference **  sec_state_ref
 

Search the cache for a message id, return the error code and the sec_state_ref and delete the entry from the cache.

Parameters:
msg_id - Search for this message id
error_code - OUT: The error code of the received message
sec_state_ref - IN: Pointer to a pointer of the structure OUT: The structure as received by the USM when the message was parsed.
Returns:
- SNMPv3_MP_ERROR, SNMPv3_MP_OK

void v3MP::Cache::set_usm USM usm_to_use  )  [inline]
 

Definition at line 513 of file mp_v3.h.


Member Data Documentation

SnmpSynchronized v3MP::Cache::_cachesync [private]
 

Definition at line 517 of file mp_v3.h.

int v3MP::Cache::entries [private]
 

the current amount of entries

Definition at line 521 of file mp_v3.h.

int v3MP::Cache::max_entries [private]
 

the maximum number of entries

Definition at line 520 of file mp_v3.h.

struct Entry_T* v3MP::Cache::table [private]
 

whole table

Definition at line 519 of file mp_v3.h.

USM* v3MP::Cache::usm [private]
 

Definition at line 522 of file mp_v3.h.


The documentation for this class was generated from the following file:
Generated on Tue Jan 4 22:42:22 2005 for SNMP++ by doxygen 1.3.2