struct MD5Key

Structure to hold MD5 key information. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Methods

Public Members

Protected Members


Detailed Description

Structure to hold MD5 key information.

static const uint32_t KEY_BYTES

KEY_BYTES

 MD5Key (uint8_t key_id, const string& key, uint32_t start_secs, XorpTimer to)

MD5Key

Construct an MD5 Key.

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.

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_secstime in seconds since midnight 1 Jan 1970.
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.

uint8_t _id

_id

[protected]

char _key_data[KEY_BYTES]

_key_data[KEY_BYTES]

[protected]

uint32_t _start_secs

_start_secs

[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 _to

_to

[protected]

friend class MD5AuthHandler

MD5AuthHandler

[protected]


Generated by: pavlin on possum.icir.org on Thu Mar 9 04:43:44 2006, using kdoc $.