xorp

Auth Class Reference

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

#include <auth.hh>

List of all members.

Public Member Functions

 Auth (EventLoop &eventloop)
bool set_method (const string &method)
void generate (vector< uint8_t > &pkt)
 Apply the authentication scheme to the packet.
bool verify (vector< uint8_t > &pkt, const IPv4 &src_addr, bool new_peer)
 Verify that this packet has passed the authentication scheme.
bool verify (vector< uint8_t > &pkt, const IPv6 &src_addr, bool new_peer)
uint32_t additional_payload () const
 Additional bytes that will be added to the payload.
const string & error () const
void reset ()
 Called to notify authentication system to reset.
bool set_simple_authentication_key (const string &password, string &error_msg)
 Set a simple password authentication key.
bool delete_simple_authentication_key (string &error_msg)
 Delete a simple password authentication key.
bool set_md5_authentication_key (uint8_t key_id, const string &password, const TimeVal &start_timeval, const TimeVal &end_timeval, const TimeVal &max_time_drift, string &error_msg)
 Set an MD5 authentication key.
bool delete_md5_authentication_key (uint8_t key_id, string &error_msg)
 Delete an MD5 authentication key.

Private Attributes

EventLoop_eventloop
AuthHandlerBase_auth_handler

Detailed Description

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


Member Function Documentation

bool Auth::delete_md5_authentication_key ( uint8_t  key_id,
string &  error_msg 
)

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.
bool Auth::delete_simple_authentication_key ( string &  error_msg)

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 Auth::set_md5_authentication_key ( uint8_t  key_id,
const string &  password,
const TimeVal start_timeval,
const TimeVal end_timeval,
const TimeVal max_time_drift,
string &  error_msg 
)

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_timevalstart time when key becomes valid.
end_timevalend time when key becomes invalid.
max_time_driftthe maximum time drift among all routers.
theerror message (if error).
Returns:
true on success, otherwise false.
bool Auth::set_simple_authentication_key ( const string &  password,
string &  error_msg 
)

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.

The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations