class Auth

This is the class that should be instantiated to access authentication. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Methods


Detailed Description

This is the class that should be instantiated to access authentication.

 Auth (EventLoop& eventloop)

Auth

bool  set_method (const string& method)

set_method

void  generate (vector<uint8_t>& pkt)

generate

Apply the authentication scheme to the packet.

bool  verify (vector<uint8_t>& pkt, const IPv4& src_addr, bool new_peer)

verify

Verify that this packet has passed the authentication scheme.

bool  verify (vector<uint8_t>& pkt, const IPv6& src_addr, bool new_peer)

verify

uint32_t  additional_payload ()

additional_payload

[const]

Additional bytes that will be added to the payload.

const string&  error ()

error

[const]

void  reset ()

reset

Called to notify authentication system to reset.

bool  set_simple_authentication_key (const string& password, string& error_msg)

set_simple_authentication_key

Set a simple password authentication key.

Note that the current authentication handler is replaced with a simple password authentication handler.

Parameters:

passwordthe password to set.
theerror message (if error).

Returns: true on success, otherwise false.

bool  delete_simple_authentication_key (string& error_msg)

delete_simple_authentication_key

Delete a simple password authentication key.

Note that after the deletion the simple password authentication handler is replaced with a Null authentication handler.

Parameters:

theerror message (if error).

Returns: true on success, otherwise false.

bool  set_md5_authentication_key (uint8_t key_id, const string& password, uint32_t start_secs, uint32_t end_secs, string& error_msg)

set_md5_authentication_key

Set an MD5 authentication key.

Note that the current authentication handler is replaced with an MD5 authentication handler.

Parameters:

key_idunique ID associated with key.
passwordphrase used for MD5 digest computation.
start_secsstart time in seconds since midnight 1 Jan 1970.
end_secsstart time in seconds since midnight 1 Jan 1970.
theerror message (if error).

Returns: true on success, otherwise false.

bool  delete_md5_authentication_key (uint8_t key_id, string& error_msg)

delete_md5_authentication_key

Delete an MD5 authentication key.

Note that after the deletion if there are no more valid MD5 keys, the MD5 authentication handler is replaced with a Null authentication handler.

Parameters:

key_idthe ID of the key to delete.
theerror message (if error).

Returns: true on success, otherwise false.


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