class PlaintextAuthHandler

RIPv2 Authentication handler for plaintext scheme. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Methods

Public Static Methods

Protected Members


Detailed Description

const char*  effective_name ()

effective_name

[const]

Get the effective name of the authentication scheme.

Reimplemented from AuthHandlerBase.

const char*  auth_type_name ()

auth_type_name

[static]

Get the method-specific name of the authentication scheme.

Returns: the method-specific name of the authentication scheme.

void  reset ()

reset

Reset the authentication state.

Reimplemented from AuthHandlerBase.

uint32_t  head_entries ()

head_entries

[const]

Get number of routing entries used by authentication scheme at the head of the RIP packet.

Returns: the number of routing entries used by the authentication scheme at the head of the RIP packet: 0 for unauthenticated packets, 1 otherwise.

Reimplemented from AuthHandlerBase.

uint32_t  max_routing_entries ()

max_routing_entries

[const]

Get maximum number of non-authentication scheme use routing entries in a RIP packet.

Reimplemented from AuthHandlerBase.

bool  authenticate_inbound (const uint8_t* packet, size_t packet_bytes, const PacketRouteEntry<IPv4>*& entries_start, uint32_t& n_entries, const IPv4& src_addr, bool new_peer)

authenticate_inbound

Inbound authentication method.

Parameters:

packetpointer to first byte of RIP packet.
packet_bytesnumber of bytes in RIP packet.
entries_startoutput variable set to point to first entry in packet. Set to 0 if there are no entries, or on authentication failure.
n_entriesnumber of entries in the packet.
src_addrthe source address of the packet.
new_peertrue if this is a new peer.

Returns: true if packet passes authentication checks, false otherwise.

Reimplemented from AuthHandlerBase.

bool  authenticate_outbound (RipPacket<IPv4>& packet, list<RipPacket<IPv4> *>& auth_packets, size_t& n_routes)

authenticate_outbound

Outbound authentication method.

Create a list of authenticated packets (one for each valid authentication key). Note that the original packet is also modified and authenticated with the first valid key.

Parameters:

packetthe RIP packet to authenticate.
auth_packetsa return-by-reference list with the authenticated RIP packets (one for each valid authentication key).
n_routesthe return-by-reference number of routes in the packet.

Returns: true if packet was successfully authenticated, false when no valid keys are present.

Reimplemented from AuthHandlerBase.

const string&  key ()

key

[const]

Get the authentication key.

Returns: the authentication key.

void  set_key (const string& plaintext_key)

set_key

Set the authentication key.

Parameters:

plaintext_keythe plain-text key.
string _key

_key

[protected]


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