diff --git a/s-messages b/s-messages new file mode 100644 index 0000000..e69de29 diff --git a/src/messages.cc b/src/messages.cc new file mode 100644 index 0000000..9f3f479 --- /dev/null +++ b/src/messages.cc @@ -0,0 +1,29 @@ +// File created from src/messages.mes on Thu Feb 27 2020 11:21 + +#include +#include +#include + +extern const isc::log::MessageID RUNSCRIPT_EXEC_FAILED = "RUNSCRIPT_EXEC_FAILED"; +extern const isc::log::MessageID RUNSCRIPT_FORK_FAILED = "RUNSCRIPT_FORK_FAILED"; +extern const isc::log::MessageID RUNSCRIPT_MISSING_PARAM = "RUNSCRIPT_MISSING_PARAM"; +extern const isc::log::MessageID RUNSCRIPT_MISTYPED_PARAM = "RUNSCRIPT_MISTYPED_PARAM"; +extern const isc::log::MessageID RUNSCRIPT_WAITING_SCRIPT = "RUNSCRIPT_WAITING_SCRIPT"; +extern const isc::log::MessageID RUNSCRIPT_WAITPID_FAILED = "RUNSCRIPT_WAITPID_FAILED"; + +namespace { + +const char* values[] = { + "RUNSCRIPT_EXEC_FAILED", "exec() failed, please check that the script exists and is executable. Error: %1", + "RUNSCRIPT_FORK_FAILED", "fork() failed with error: %1", + "RUNSCRIPT_MISSING_PARAM", "required parameter \"%1\" missing in configuration", + "RUNSCRIPT_MISTYPED_PARAM", "parameter \"%1\" in configuration has wrong type", + "RUNSCRIPT_WAITING_SCRIPT", "the user-defined script is running, and the main process is currently waiting", + "RUNSCRIPT_WAITPID_FAILED", "waitpid() failed with error: %1", + NULL +}; + +const isc::log::MessageInitializer initializer(values); + +} // Anonymous namespace + diff --git a/src/messages.h b/src/messages.h new file mode 100644 index 0000000..6be71b1 --- /dev/null +++ b/src/messages.h @@ -0,0 +1,15 @@ +// File created from src/messages.mes on Thu Feb 27 2020 11:21 + +#ifndef MESSAGES_H +#define MESSAGES_H + +#include + +extern const isc::log::MessageID RUNSCRIPT_EXEC_FAILED; +extern const isc::log::MessageID RUNSCRIPT_FORK_FAILED; +extern const isc::log::MessageID RUNSCRIPT_MISSING_PARAM; +extern const isc::log::MessageID RUNSCRIPT_MISTYPED_PARAM; +extern const isc::log::MessageID RUNSCRIPT_WAITING_SCRIPT; +extern const isc::log::MessageID RUNSCRIPT_WAITPID_FAILED; + +#endif // MESSAGES_H