class MD5Key

Class to hold MD5 key information. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Methods

Protected Members


Detailed Description

Class to hold MD5 key information.

 MD5Key (uint8_t key_id, const string& key, const TimeVal& start_timeval, const TimeVal& end_timeval, const TimeVal& max_time_drift, XorpTimer start_timer, XorpTimer end_timer)

MD5Key

Construct an MD5 Key.

Parameters:

key_idunique ID associated with key.
keyphrase used for MD5 digest computation.
start_timevalstart time when key becomes valid.
end_timevalend time when key becomes invalid.
max_time_driftthe maximum time drift among all routers.
start_timerthe timer to mark when the key becomes valid.
end_timerthe timer to mark when the key becomes invalid.
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]

Get key data as a string.

const TimeVal&  start_timeval ()

start_timeval

[const]

Get the start time of the key.

const TimeVal&  end_timeval ()

end_timeval

[const]

Get the end time of the key.

const TimeVal&  max_time_drift ()

max_time_drift

[const]

Get the maximum time drift among all routers.

bool  is_persistent ()

is_persistent

[const]

Get indication of whether key is persistent.

void  set_persistent (bool v)

set_persistent

Set the flag whether the key is persistent.

Parameters:

vif true the 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 (const TimeVal& when)

valid_at

[const]

Get key validity status of key at a particular time.

Parameters:

whenthe time to test whether the key is valid.
void  reset ()

reset

Reset the key for all sources.

void  reset (const IPv4& src_addr)

reset

Reset the key for a particular source.

Parameters:

src_addrthe source address.
bool  packets_received (const IPv4& src_addr)

packets_received

[const]

Indicate whether valid packets have been received from a source with this key ID.

Parameters:

src_addrthe source address.

Returns: true if a packet has been received from the source, otherwise false.

uint32_t  last_seqno_recv (const IPv4& src_addr)

last_seqno_recv

[const]

Get last received sequence number from a source.

Parameters:

src_addrthe source address.

Returns: last sequence number seen from the source. Value may be garbage if no packets have been received (check first with packets_received()).

void  set_last_seqno_recv (const IPv4& src_addr, uint32_t seqno)

set_last_seqno_recv

Set last sequence number received from a source. This method implicitly set packets received to true.

Parameters:

src_addrthe source address.
seqnothe last sequence number received from the source.
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.

static const uint32_t KEY_BYTES

KEY_BYTES

[protected]

uint8_t _id

_id

[protected]

char _key_data[KEY_BYTES]

_key_data[KEY_BYTES]

[protected]

TimeVal _start_timeval

_start_timeval

[protected]

TimeVal _end_timeval

_end_timeval

[protected]

TimeVal _max_time_drift

_max_time_drift

[protected]

bool _is_persistent

_is_persistent

[protected]

map<IPv4, bool> _pkts_recv

_pkts_recv

[protected]

map<IPv4, uint32_t> _lr_seqno

_lr_seqno

[protected]

uint32_t _o_seqno

_o_seqno

[protected]

XorpTimer _start_timer

_start_timer

[protected]

XorpTimer _stop_timer

_stop_timer

[protected]

friend class MD5AuthHandler

MD5AuthHandler

[protected]


Generated by: pavlin on possum.icir.org on Wed Aug 2 15:36:38 2006, using kdoc $.