92 std::fstream::out | std::fstream::app);
96 const char* errmsg = strerror(errno);
99 <<
" reason: " << errmsg);
102 catch (
const std::exception& ex) {
123 }
catch (
const std::exception& ex) {
A generic exception that is thrown when an unexpected error condition occurs.
Provides a UserDataSource implementation for JSON text files.
Embodies an update-able, searchable list of unique users This class provides the means to create and ...
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
const char * registry_fname
User registry input file name.
int load(LibraryHandle &)
Called by the Hooks library manager when the library is loaded.
const char * query_user_id_label
Text label of user id in the inbound query in callout context.
const char * user_chk_output_fname
User check outcome file name.
std::fstream user_chk_output
Output filestream for recording user check outcomes.
UserRegistryPtr user_registry
Pointer to the registry instance.
const char * default_user4_id_str
Text id used to identify the default IPv4 user in the registry The format is a string containing an e...
const char * registered_user_label
Text label of registered user pointer in callout context.
int unload()
Called by the Hooks library manager when the library is unloaded.
const char * default_user6_id_str
Text id used to identify the default IPv6 user in the registry The format is a string containing an e...
#define LOG_ERROR(LOGGER, MESSAGE)
Macro to conveniently test error output and log it.
Defines the logger used by the user check hooks library.
boost::shared_ptr< UserRegistry > UserRegistryPtr
Define a smart pointer to a UserRegistry.
boost::shared_ptr< UserDataSource > UserDataSourcePtr
Defines a smart pointer to a UserDataSource.
isc::log::Logger user_chk_logger("user_chk")
User Check Logger.
const isc::log::MessageID USER_CHK_HOOK_LOAD_ERROR
const isc::log::MessageID USER_CHK_HOOK_UNLOAD_ERROR
Defines the class, UserFile, which implements the UserDataSource interface for text files.
Defines the class, UserRegistry.