OpenDNSSEC-enforcer
2.0.3
|
Go to the source code of this file.
Data Structures | |
struct | task_struct |
Typedefs | |
typedef enum task_id_enum | task_id |
typedef struct task_struct | task_type |
typedef task_type *(* | how_type) (task_type *task) |
Enumerations | |
enum | task_id_enum { TASK_NONE = 0, TASK_SIGNCONF, TASK_READ, TASK_NSECIFY, TASK_SIGN, TASK_AUDIT, TASK_WRITE, TASK_DYNAMIC_FIRST = 1000 } |
Functions | |
task_id | task_register (const char *short_name, const char *long_name, how_type how) |
task_type * | task_create (task_id what_id, time_t when, const char *who, const char *what, void *context, how_type clean_context) |
void | task_cleanup (task_type *task) |
int | task_compare (const void *a, const void *b) |
int | task_compare_name (const void *a, const void *b) |
char * | task2str (task_type *task, char *buftask) |
const char * | task_what2str (int taskid) |
const char * | task_who2str (const char *who) |
void | task_log (task_type *task) |
task_type * | task_perform (task_type *task) |
bool | task_id_from_long_name (const char *long_name, task_id *pwhat) |
typedef enum task_id_enum task_id |
typedef struct task_struct task_type |
enum task_id_enum |
char* task2str | ( | task_type * | task, |
char * | buftask | ||
) |
Convert task to string.
[in] | task | task |
[out] | buffer | to store string-based task in |
Convert task to string.
Definition at line 254 of file task.c.
References task_struct::flush, task_what2str(), task_who2str(), task_struct::what, task_struct::when, and task_struct::who.
void task_cleanup | ( | task_type * | task | ) |
Clean up task.
[in] | task | task |
Clean up task.
Definition at line 147 of file task.c.
References task_struct::clean_context, task_struct::context, task_struct::dname, and task_struct::who.
Referenced by schedule_purge(), and task_perform().
int task_compare | ( | const void * | a, |
const void * | b | ||
) |
Compare tasks.
[in] | a | one task |
[in] | b | another task |
Compare tasks.
Definition at line 170 of file task.c.
References task_struct::dname, task_struct::flush, and task_struct::when.
int task_compare_name | ( | const void * | a, |
const void * | b | ||
) |
Compare tasks by name.
[in] | a | one task |
[in] | b | another task |
Compare tasks by name
Definition at line 195 of file task.c.
References task_struct::dname.
task_type* task_create | ( | task_id | what_id, |
time_t | when, | ||
const char * | who, | ||
const char * | what, | ||
void * | context, | ||
how_type | clean_context | ||
) |
Create a new task.
[in] | what | task identifier |
[in] | when | scheduled time |
[in] | who | context name e.g. a dns name like "example.com" |
[in] | context | pointer to context |
Create a new task.
Definition at line 110 of file task.c.
References ods_log_error().
bool task_id_from_long_name | ( | const char * | long_name, |
task_id * | pwhat | ||
) |
Definition at line 53 of file task.c.
Referenced by flush_enforce_task(), and flush_resalt_task().
void task_log | ( | task_type * | task | ) |
Log task.
[in] | task | task |
Actually perform the task.
[in] | task | task |
Perform task.
Definition at line 292 of file task.c.
References task_struct::how, and task_cleanup().
Register a task type with a task name and a named how function. This registry is used when restoring a task from a backup.
[in] | short_name | short name for what the task does |
[in] | long_name | unique name identifying the how function |
[in] | how | the function that performs the task |
Definition at line 82 of file task.c.
Referenced by hsm_key_factory_schedule_generate_all(), hsm_key_factory_schedule_generate_policy(), keystate_ds_retract_task(), keystate_ds_submit_task(), policy_resalt_task(), and signconf_task().
const char* task_what2str | ( | int | what | ) |
String-format of who.
[in] | what | task identifier |
String-format of what.
Definition at line 212 of file task.c.
References TASK_AUDIT, TASK_NONE, TASK_NSECIFY, TASK_READ, TASK_SIGN, TASK_SIGNCONF, and TASK_WRITE.
Referenced by task2str().
const char* task_who2str | ( | const char * | who | ) |
String-format of who.
[in] | what | task owner |
String-format of who.
Definition at line 240 of file task.c.
Referenced by task2str().