|
|
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.
~AuthHandlerBase ()
| ~AuthHandlerBase |
[virtual]
bool authenticate_inbound (const vector<uint8_t>& packet,
const IPv4& src_addr,
bool new_peer)
| authenticate_inbound |
[pure virtual]
Inbound authentication method.
Parameters:
packet | the packet to verify. |
src_addr | the source address of the packet. |
new_peer | true if this is a new peer. |
Returns: true if packet passes authentication checks, false otherwise.
bool authenticate_outbound (vector<uint8_t>& packet)
| authenticate_outbound |
[pure virtual]
Outbound authentication method.
Parameters:
packet | the packet to authenticate. |
Returns: true if packet was successfully authenticated, false when no valid keys are present.
const char* name ()
| name |
[const pure virtual]
Get the name of the authentication scheme.
Returns: the name of the authentication scheme.
void reset ()
| reset |
[pure virtual]
Reset the authentication state.
uint32_t additional_payload ()
| additional_payload |
[const pure virtual]
Additional bytes that will be added to the payload.
Returns: the number of additional bytes that need to be added to the payload.
const string& error ()
| error |
[const]
Get textual description of last error.
inline void reset_error ()
| reset_error |
[protected]
Reset textual description of last error.
inline void set_error (const string& error_msg)
| set_error |
[protected]
Set textual description of latest error.