19namespace flex_option {
49 if (status == CalloutHandle::NEXT_STEP_DROP) {
64 if (status == CalloutHandle::NEXT_STEP_SKIP) {
69 impl->process<
Pkt4Ptr>(Option::V4, query, response);
70 }
catch (
const std::exception& ex) {
72 .arg(query->getLabel())
90 if (status == CalloutHandle::NEXT_STEP_DROP) {
99 if (status == CalloutHandle::NEXT_STEP_SKIP) {
110 impl->process<
Pkt6Ptr>(Option::V6, query, response);
111 }
catch (
const std::exception& ex) {
113 .arg(query->getLabel())
127 uint16_t family = CfgMgr::instance().getFamily();
128 const std::string& proc_name = Daemon::getProcName();
129 if (family == AF_INET) {
130 if (proc_name !=
"kea-dhcp4") {
132 <<
", expected kea-dhcp4");
135 if (proc_name !=
"kea-dhcp6") {
137 <<
", expected kea-dhcp6");
143 impl->configure(options);
144 }
catch (
const std::exception& ex) {
A generic exception that is thrown if a function is called in a prohibited way.
A generic exception that is thrown when an unexpected error condition occurs.
Flex Option implementation.
Per-packet callout handle.
CalloutNextStep
Specifies allowed next steps.
CalloutNextStep getStatus() const
Returns the next processing step.
void getArgument(const std::string &name, T &value) const
Get argument.
isc::data::ConstElementPtr getParameter(const std::string &name)
Returns configuration parameter for the library.
This file contains several functions and constants that are used for handling commands and responses ...
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
int multi_threading_compatible()
This function is called to retrieve the multi-threading compatibility.
int pkt6_send(CalloutHandle &handle)
This callout is called at the "pkt6_send" hook.
int pkt4_send(CalloutHandle &handle)
This callout is called at the "pkt4_send" hook.
int unload()
This function is called when the library is unloaded.
int load(LibraryHandle &handle)
This function is called when the library is loaded.
const isc::log::MessageID FLEX_OPTION_PROCESS_ERROR
const isc::log::MessageID FLEX_OPTION_LOAD_ERROR
const isc::log::MessageID FLEX_OPTION_UNLOAD
#define LOG_ERROR(LOGGER, MESSAGE)
Macro to conveniently test error output and log it.
#define LOG_INFO(LOGGER, MESSAGE)
Macro to conveniently test info output and log it.
boost::shared_ptr< const Element > ConstElementPtr
boost::shared_ptr< Pkt4 > Pkt4Ptr
A pointer to Pkt4 object.
boost::shared_ptr< Pkt6 > Pkt6Ptr
A pointer to Pkt6 packet.
isc::log::Logger flex_option_logger("flex-option-hooks")
boost::shared_ptr< FlexOptionImpl > FlexOptionImplPtr
The type of shared pointers to Flex Option implementations.
Defines the logger used by the top-level component of kea-lfc.