|
|
Class to check inbound MD5 authenticated packets and add authentication data to outbound RIP packets. The RIP MD5 authentication scheme is described in RFC 2082.
MD5Key (struct) | MD5Key |
Structure to hold MD5 key information.
typedef list<MD5Key> KeyChain | KeyChain |
KeyChain::const_iterator key_at (uint32_t when_secs)
| key_at |
[const]
Get iterator pointing at first key valid at a particular time.
Parameters:
when_secs | time in seconds since midnight 1 Jan 1970. |
MD5AuthHandler (EventLoop& e, uint32_t timing_slack_secs = 3600)
| MD5AuthHandler |
Constructor
Parameters:
e | the EventLoop instance to used for time reference. |
timing_slack_secs | the amount of slack in time comparisons, eg the amount of time a key is accepted before or after it's validity period. |
bool authenticate (const uint8_t* packet,
size_t packet_bytes,
const PacketRouteEntry<IPv4>*& entries_start,
uint32_t& n_entries
)
| authenticate |
Reimplemented from AuthHandlerBase.
uint32_t authenticate (const uint8_t* packet,
size_t packet_bytes,
PacketRouteEntry<IPv4>* first_entry,
vector<uint8_t>& trailer_data)
| authenticate |
Reimplemented from AuthHandlerBase.
uint32_t head_entries ()
| head_entries |
[const]
Reimplemented from AuthHandlerBase.
uint32_t max_routing_entries ()
| max_routing_entries |
[const]
Reimplemented from AuthHandlerBase.
const char* name ()
| name |
[const]
Reimplemented from AuthHandlerBase.
bool add_key (uint8_t id,
const string& key,
uint32_t start_secs,
uint32_t end_secs)
| add_key |
Add key to MD5 key chain. If key already exists, it is updated with new settings. If the start and end times are the same the key is treated as persistant and will not expire.
Parameters:
key_id | unique id associated with key. |
key | phrase used for MD5 digest computation. |
start_secs | start time in seconds since midnight 1 Jan 1970. |
end_secs | start time in seconds since midnight 1 Jan 1970. |
Returns: true on success, false if end time is less than start time or key has already expired.
void remove_key (uint8_t id)
| remove_key |
Remove key from MD5 key chain.
Parameters:
key_id | unique id of key to be removed. |
uint16_t currently_active_key ()
| currently_active_key |
[const]
Get currently active key.
Returns: key id in range 0-255 if key exists, value outside valid range otherwise 256-65535.
inline const KeyChain& key_chain ()
| key_chain |
[const]
Get all keys managed by MD5AuthHandler.
Returns: list of keys.
KeyChain::iterator key_at (uint32_t when_secs)
| key_at |
[protected]
Get iterator pointing at first key valid at a particular time.
Parameters:
when_secs | time in seconds since midnight 1 Jan 1970. |
EventLoop& _e | _e |
[protected]
KeyChain _key_chain | _key_chain |
[protected]
uint32_t _slack_secs | _slack_secs |
[protected]
Generated by: pavlin on possum.icir.org on Thu Aug 28 12:52:20 2003, using kdoc 2.0a54+XORP. |