The engine id table is used to store known engine ids with corresponding hostadress and port.
More...
The engine id table is used to store known engine ids with corresponding hostadress and port.
Definition at line 426 of file mp_v3.h.
◆ EngineIdTable()
| v3MP::EngineIdTable::EngineIdTable |
( |
int |
initial_size = 10 | ) |
|
◆ ~EngineIdTable()
| v3MP::EngineIdTable::~EngineIdTable |
( |
| ) |
|
◆ add_entry()
| int v3MP::EngineIdTable::add_entry |
( |
const OctetStr & |
engine_id, |
|
|
const OctetStr & |
host, |
|
|
int |
port |
|
) |
| |
Add an entry to the table.
- Parameters
-
| engine_id | - The engineID |
| host | - The numerical IP address |
| port | - The port |
- Returns
- - SNMPv3_MP_ERROR, SNMPv3_MP_OK
◆ delete_entry() [1/2]
| int v3MP::EngineIdTable::delete_entry |
( |
const OctetStr & |
engine_id | ) |
|
Remove the given engine id from the table.
- Parameters
-
| engine_id | - The engine id to remove |
- Returns
- - SNMPv3_MP_NOT_INITIALIZED, SNMPv3_MP_ERROR, SNMPv3_MP_OK
◆ delete_entry() [2/2]
| int v3MP::EngineIdTable::delete_entry |
( |
const OctetStr & |
host, |
|
|
int |
port |
|
) |
| |
Remove the entry for the given address/port from the table.
- Parameters
-
| host | - Numeric IP address |
| port | - listen port of the snmp entity |
- Returns
- - SNMPv3_MP_NOT_INITIALIZED, SNMPv3_MP_ERROR, SNMPv3_MP_OK
◆ get_cache_size_limit()
| int v3MP::EngineIdTable::get_cache_size_limit |
( |
| ) |
|
|
inline |
Get the upper limit of the number of entries in this engine ID cache.
- Returns
- - the cache size upper limit (50.000 by default).
Definition at line 502 of file mp_v3.h.
◆ get_entry() [1/2]
| int v3MP::EngineIdTable::get_entry |
( |
OctetStr & |
engine_id, |
|
|
const OctetStr & |
hostport |
|
) |
| const |
Get the engine_id of the SNMP entity at the given host/port.
- Parameters
-
| engine_id | - OUT: The engineID |
| hostport | - The numerical IP address and port (syntax: a.b.c.d/port) |
- Returns
- - SNMPv3_MP_NOT_INITIALIZED, SNMPv3_MP_ERROR, SNMPv3_MP_OK
◆ get_entry() [2/2]
| int v3MP::EngineIdTable::get_entry |
( |
OctetStr & |
engine_id, |
|
|
const OctetStr & |
host, |
|
|
int |
port |
|
) |
| const |
Get the engineID of the SNMP entity at the given host/port.
- Parameters
-
| engine_id | - OUT: The engineID |
| host | - The numerical IP address |
| port | - The port |
- Returns
- - SNMPv3_MP_NOT_INITIALIZED, SNMPv3_MP_ERROR, SNMPv3_MP_OK
◆ initialize_table()
| bool v3MP::EngineIdTable::initialize_table |
( |
const int |
size | ) |
|
|
private |
◆ reset()
| int v3MP::EngineIdTable::reset |
( |
| ) |
|
Remove all entries from the engine id table.
- Returns
- - SNMPv3_MP_NOT_INITIALIZED, SNMPv3_MP_ERROR, SNMPv3_MP_OK
◆ set_cache_size_limit()
| void v3MP::EngineIdTable::set_cache_size_limit |
( |
int |
size_upper_limit | ) |
|
|
inline |
Set the upper limit of the number of entries in this engine ID cache.
Calls of this method with a cache size of 0 or less are ignored.
- Parameters
-
| size_upper_limit | the upper limit of the engine ID cache size (50.000 by default). |
Definition at line 510 of file mp_v3.h.
◆ entries
| int v3MP::EngineIdTable::entries |
|
private |
the current amount of entries
Definition at line 526 of file mp_v3.h.
◆ lock
◆ max_entries
| int v3MP::EngineIdTable::max_entries |
|
private |
the maximum number of entries
Definition at line 524 of file mp_v3.h.
◆ table
| struct Entry_T* v3MP::EngineIdTable::table |
|
private |
◆ upper_limit_entries
| int v3MP::EngineIdTable::upper_limit_entries |
|
private |
the upper most number of entries to keep
Definition at line 525 of file mp_v3.h.
The documentation for this class was generated from the following file: