![]() |
Kea 3.0.0
|
Functions | |
| void | clearConfiguration () |
| Clears stored configuration. | |
| void | parseAndStoreExpression (bool v6, const std::string &expr) |
| Parses expression provided as text. | |
| template<typename PacketType> | |
| void | retrieveFlexId (CalloutHandle &callout_handle, const Expression &expression, PacketType &pkt, std::vector< uint8_t > &id) |
| Retrieves flexible identifier from the context or computes it. | |
| void | storeConfiguration (bool v6, const std::string &expr, const bool apply_to_leases, const bool ignore_iaid) |
| Stores expression. | |
Variables | |
| isc::log::Logger | flex_id_logger ("flex-id-hooks") |
| Flexible Identifier Logger. | |
| void isc::flex_id::clearConfiguration | ( | ) |
Clears stored configuration.
This is mostly useful between tests.
Definition at line 74 of file callouts.cc.
Referenced by load().
| void isc::flex_id::parseAndStoreExpression | ( | bool | v6, |
| const std::string & | expr ) |
Parses expression provided as text.
| v6 | Indicates if the expression refers to IPv6 or IPv4 case. |
| expr | Expression in the textual form. |
Definition at line 52 of file callouts.cc.
References isc::eval::EvalContext::expression_, isc_throw, isc::eval::EvalContext::PARSER_STRING, isc::eval::EvalContext::parseString(), isc::dhcp::Option::V4, and isc::dhcp::Option::V6.
Referenced by storeConfiguration().
| void isc::flex_id::retrieveFlexId | ( | CalloutHandle & | callout_handle, |
| const Expression & | expression, | ||
| PacketType & | pkt, | ||
| std::vector< uint8_t > & | id ) |
Retrieves flexible identifier from the context or computes it.
| callout_handle | Callout handle. | |
| expression | Expression to be applied for evaluation against the packet. | |
| pkt | Packet against which expression should be evaluated. | |
| [out] | id | Reference to the storage into which the flexible identifier should be stored after evaluation. |
Definition at line 88 of file callouts.cc.
References isc::log::DBGLVL_TRACE_BASIC, isc::dhcp::evaluateString(), FLEX_ID_EXPRESSION_EVALUATED, FLEX_ID_EXPRESSION_EVALUATED_NP, FLEX_ID_EXPRESSION_HEX, flex_id_logger, isc::hooks::CalloutHandle::getContext(), isc::util::str::isPrintable(), LOG_DEBUG, LOG_INFO, isc::hooks::CalloutHandle::setContext(), and isc::dhcp::IdentifierType< min_size, max_size >::toText().
Referenced by host4_identifier(), host6_identifier(), pkt4_receive(), and pkt6_receive().
| void isc::flex_id::storeConfiguration | ( | bool | v6, |
| const std::string & | expr, | ||
| const bool | apply_to_leases, | ||
| const bool | ignore_iaid ) |
Stores expression.
| v6 | Indicates if the expression refers to IPv6 or IPv4 case. |
| expr | Expression in textual form. |
| apply_to_leases | Indicates if flexible identifier should be used to replace client supplied client identifier or DUID. |
| ignore_iaid | Indicates if IAID should be ignored. |
Definition at line 64 of file callouts.cc.
References parseAndStoreExpression().
Referenced by load().
| isc::log::Logger isc::flex_id::flex_id_logger | ( | "flex-id-hooks" | ) |
Flexible Identifier Logger.
Define the logger used to log messages. We could define it in multiple modules, but defining in a single module and linking to it saves time and space.
Definition at line 22 of file flex_id_log.h.
Referenced by load(), pkt4_receive(), pkt4_send(), pkt6_receive(), pkt6_send(), retrieveFlexId(), and unload().