Holds cache entries for currently processed requests.
More...
|
| 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. More...
|
|
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. More...
|
|
void | delete_entry (unsigned long req_id, bool local_request) |
| Delete the entry with the given request id from the cache. More...
|
|
void | delete_entry (unsigned long req_id, int msg_id, bool local_request) |
| Delete the entry with the given request and message id from the cache. More...
|
|
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. More...
|
|
void | delete_content (struct Cache::Entry_T &ce) |
|
void | set_usm (USM *usm_to_use) |
|
Holds cache entries for currently processed requests.
Definition at line 533 of file mp_v3.h.
◆ Cache()
◆ ~Cache()
◆ add_entry()
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)
◆ delete_content()
◆ delete_entry() [1/2]
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
-
◆ delete_entry() [2/2]
void v3MP::Cache::delete_entry |
( |
unsigned long |
req_id, |
|
|
int |
msg_id, |
|
|
bool |
local_request |
|
) |
| |
Delete the entry with the given request and message id from the cache.
- Parameters
-
req_id | - The request id. |
msg_id | - The message id. |
◆ get_entry() [1/2]
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
◆ get_entry() [2/2]
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
◆ set_usm()
void v3MP::Cache::set_usm |
( |
USM * |
usm_to_use | ) |
|
|
inline |
◆ entries
the current amount of entries
Definition at line 637 of file mp_v3.h.
◆ lock
◆ max_entries
int v3MP::Cache::max_entries |
|
private |
the maximum number of entries
Definition at line 636 of file mp_v3.h.
◆ table
whole table
Definition at line 635 of file mp_v3.h.
◆ usm
The documentation for this class was generated from the following file: