|
xorp
|
Base clase for OSPFv2 authentication mechanisms. More...
#include <auth.hh>
Public Member Functions | |
| virtual const char * | effective_name () const =0 |
| Get the effective name of the authentication scheme. | |
| virtual void | reset ()=0 |
| Reset the authentication state. | |
| virtual uint32_t | additional_payload () const =0 |
| Additional bytes that will be added to the payload. | |
| virtual bool | authenticate_inbound (const vector< uint8_t > &packet, const IPv4 &src_addr, bool new_peer)=0 |
| Inbound authentication method. | |
| virtual bool | authenticate_outbound (vector< uint8_t > &packet)=0 |
| Outbound authentication method. | |
| const string & | error () const |
| Get textual description of last error. | |
| virtual | ~AuthHandlerBase () |
| Virtual destructor. | |
| virtual const char * | effective_name () const =0 |
| Get the effective name of the authentication scheme. | |
| virtual void | reset ()=0 |
| Reset the authentication state. | |
| virtual uint32_t | head_entries () const =0 |
| Get number of routing entries used by authentication scheme at the head of the RIP packet. | |
| virtual uint32_t | max_routing_entries () const =0 |
| Get maximum number of non-authentication scheme use routing entries in a RIP packet. | |
| virtual bool | authenticate_inbound (const uint8_t *packet, size_t packet_bytes, const uint8_t *&entries_ptr, uint32_t &n_entries, const IPv4 &src_addr, bool new_peer)=0 |
| Inbound authentication method. | |
| virtual bool | authenticate_outbound (RipPacket< IPv4 > &packet, list< RipPacket< IPv4 > * > &auth_packets, size_t &n_routes)=0 |
| Outbound authentication method. | |
| const string & | error () const |
| Get textual description of last error. | |
Protected Member Functions | |
| void | reset_error () |
| Reset textual description of last error. | |
| void | set_error (const string &error_msg) |
| Set textual description of latest error. | |
| void | reset_error () |
| Reset textual description of last error. | |
| void | set_error (const string &err) |
| Set textual description of latest error. | |
Private Attributes | |
| string | _error |
| string | _err |
Base clase for OSPFv2 authentication mechanisms.
Base clase for RIPv2 authentication mechanisms.
The AuthHandlerBase class defines the interfaces for OSPFv2 authentication handlers. Handlers are responsible for authenticating inbound datagrams and adding authentication data to outbound datagrams.
Error during authentication set an error buffer that clients may query using the error() method.
The AuthHandlerBase class defines the interfaces for RIPv2 authentication handlers. Handlers are responsible for authenticating inbound datagrams and adding authentication data to outbound datagrams.
Error during authentication set an error buffer that clients may query using the error() method.
| virtual uint32_t AuthHandlerBase::additional_payload | ( | ) | const [pure virtual] |
Additional bytes that will be added to the payload.
Implemented in NullAuthHandler, PlaintextAuthHandler, and MD5AuthHandler.
| virtual bool AuthHandlerBase::authenticate_inbound | ( | const vector< uint8_t > & | packet, |
| const IPv4 & | src_addr, | ||
| bool | new_peer | ||
| ) | [pure virtual] |
Inbound authentication method.
| packet | the packet to verify. |
| src_addr | the source address of the packet. |
| new_peer | true if this is a new peer. |
Implemented in NullAuthHandler, PlaintextAuthHandler, and MD5AuthHandler.
| virtual bool AuthHandlerBase::authenticate_inbound | ( | const uint8_t * | packet, |
| size_t | packet_bytes, | ||
| const uint8_t *& | entries_ptr, | ||
| uint32_t & | n_entries, | ||
| const IPv4 & | src_addr, | ||
| bool | new_peer | ||
| ) | [pure virtual] |
Inbound authentication method.
| packet | pointer to first byte of RIP packet. |
| packet_bytes | number of bytes in RIP packet. |
| entries_ptr | output variable set to point to first entry in packet. Set to NULL if there are no entries, or on authentication failure. |
| n_entries | number of entries in the packet. |
| src_addr | the source address of the packet. |
| new_peer | true if this is a new peer. |
Implemented in NullAuthHandler, PlaintextAuthHandler, and MD5AuthHandler.
| virtual bool AuthHandlerBase::authenticate_outbound | ( | vector< uint8_t > & | packet | ) | [pure virtual] |
Outbound authentication method.
| packet | the packet to authenticate. |
Implemented in NullAuthHandler, PlaintextAuthHandler, and MD5AuthHandler.
| virtual bool AuthHandlerBase::authenticate_outbound | ( | RipPacket< IPv4 > & | packet, |
| list< RipPacket< IPv4 > * > & | auth_packets, | ||
| size_t & | n_routes | ||
| ) | [pure virtual] |
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.
| packet | the RIP packet to authenticate. |
| auth_packets | a return-by-reference list with the authenticated RIP packets (one for each valid authentication key). |
| n_routes | the return-by-reference number of routes in the packet. |
Implemented in NullAuthHandler, PlaintextAuthHandler, and MD5AuthHandler.
| virtual const char* AuthHandlerBase::effective_name | ( | ) | const [pure virtual] |
Get the effective name of the authentication scheme.
Implemented in NullAuthHandler, PlaintextAuthHandler, MD5AuthHandler, NullAuthHandler, PlaintextAuthHandler, and MD5AuthHandler.
| virtual uint32_t AuthHandlerBase::head_entries | ( | ) | const [pure virtual] |
Get number of routing entries used by authentication scheme at the head of the RIP packet.
Implemented in NullAuthHandler, PlaintextAuthHandler, and MD5AuthHandler.