|
|
Structure to hold MD5 key information.
static const uint32_t KEY_BYTES | KEY_BYTES |
MD5Key (uint8_t id,
const string& key,
uint32_t start_secs,
XorpTimer to)
| MD5Key |
inline uint8_t id ()
| id |
[const]
Get the id associated with the key.
const char* key_data ()
| key_data |
[const]
Get pointer to key data. The data is of size KEY_BYTES.
inline uint32_t key_data_bytes ()
| key_data_bytes |
[const]
Get the size of the key data in bytes.
string key ()
| key |
[const]
inline uint32_t start_secs ()
| start_secs |
[const]
Get the start time of the key.
uint32_t end_secs ()
| end_secs |
[const]
Get the end time of the key. If the end time is the same as the start time, the key is persistent and never expires.
bool persistent ()
| persistent |
[const]
Get indication of whether key is persistent.
inline bool id_matches (uint8_t o)
| id_matches |
[const]
Get whether id matches a particular value (convenient for STL algorithms).
bool valid_at (uint32_t when_secs)
| valid_at |
[const]
Get key validity status of key at a particular time.
Parameters:
when_secs | time in seconds since midnight 1 Jan 1970. |
inline bool packets_received ()
| packets_received |
[const]
Indicate whether valid packets have been received with this key id.
inline uint32_t last_seqno_recv ()
| last_seqno_recv |
[const]
Get last received sequence number
Returns: last sequence number seen. Value may be garbage if no packets have been received (check first with packets_received())
inline void set_last_seqno_recv (uint32_t sno)
| set_last_seqno_recv |
Set last sequence number received. This method implicitly set packets received to true.
inline uint32_t next_seqno_out ()
| next_seqno_out |
Get next sequence number for outbound packets. The counter is automatically updated with each call of this method.
uint8_t _id | _id |
[protected]
char _key_data[KEY_BYTES] | _key_data[KEY_BYTES] |
[protected]
uint32_t _start_secs | _start_secs |
[protected]
bool _pkts_recv | _pkts_recv |
[protected]
uint32_t _lr_sno | _lr_sno |
[protected]
uint32_t _o_sno | _o_sno |
[protected]
XorpTimer _to | _to |
[protected]
friend class MD5AuthHandler | MD5AuthHandler |
[protected]