OpenDNSSEC-signer
1.4.8.2
|
Go to the source code of this file.
Data Structures | |
struct | duration_struct |
Typedefs | |
typedef struct duration_struct | duration_type |
Functions | |
duration_type * | duration_create (void) |
int | duration_compare (duration_type *d1, duration_type *d2) |
duration_type * | duration_create_from_string (const char *str) |
char * | duration2string (duration_type *duration) |
time_t | duration2time (duration_type *duration) |
time_t | ods_rand (time_t mod) |
time_t | time_minimum (time_t a, time_t b) |
time_t | time_maximum (time_t a, time_t b) |
void | time_itoa (time_t n, char *s) |
uint32_t | time_datestamp (time_t tt, const char *format, char **str) |
time_t | time_now (void) |
void | duration_cleanup (duration_type *duration) |
typedef struct duration_struct duration_type |
Durations. Duration.
Definition at line 45 of file duration.h.
char* duration2string | ( | duration_type * | duration | ) |
Convert a duration to a string.
[in] | duration | duration to be converted |
Convert a duration to a string.
Definition at line 229 of file duration.c.
References duration_struct::days, duration_struct::hours, duration_struct::minutes, duration_struct::months, ods_log_error(), duration_struct::seconds, duration_struct::weeks, and duration_struct::years.
Referenced by duration2time(), signconf_log(), and signconf_print().
time_t duration2time | ( | duration_type * | duration | ) |
Convert a duration to a time.
[in] | duration | duration to be converted |
Convert a duration to a time.
Definition at line 371 of file duration.c.
References duration_struct::days, duration2string(), duration_struct::hours, duration_struct::minutes, duration_struct::months, ods_log_warning(), duration_struct::seconds, duration_struct::weeks, and duration_struct::years.
Referenced by tools_signconf(), zone_publish_dnskeys(), zone_publish_nsec3param(), and zone_recover2().
void duration_cleanup | ( | duration_type * | duration | ) |
Clean up duration.
[in] | duration | duration to be cleaned up |
Clean up duration.
Definition at line 600 of file duration.c.
References duration_struct::allocator, allocator_cleanup(), and allocator_deallocate().
Referenced by duration_create_from_string(), and signconf_cleanup().
int duration_compare | ( | duration_type * | d1, |
duration_type * | d2 | ||
) |
Compare durations.
[in] | d1 | one duration |
[in] | d2 | another duration |
Compare durations.
Definition at line 83 of file duration.c.
References duration_struct::days, duration_struct::hours, duration_struct::minutes, duration_struct::months, duration_struct::seconds, duration_struct::weeks, and duration_struct::years.
Referenced by signconf_compare_denial().
duration_type* duration_create | ( | void | ) |
Create a new 'instant' duration.
Create a new 'instant' duration.
Definition at line 49 of file duration.c.
References duration_struct::allocator, allocator_alloc(), allocator_cleanup(), allocator_create(), duration_struct::days, duration_struct::hours, duration_struct::minutes, duration_struct::months, ods_log_error(), duration_struct::seconds, duration_struct::weeks, and duration_struct::years.
Referenced by duration_create_from_string().
duration_type* duration_create_from_string | ( | const char * | str | ) |
Create a duration from string.
[in] | str | string-format duration |
Create a duration from string.
Definition at line 123 of file duration.c.
References duration_struct::days, duration_cleanup(), duration_create(), duration_struct::hours, duration_struct::minutes, duration_struct::months, ods_log_error(), duration_struct::seconds, duration_struct::weeks, and duration_struct::years.
Referenced by backup_read_duration(), parse_sc_dnskey_ttl(), parse_sc_nsec3param_ttl(), parse_sc_sig_inception_offset(), parse_sc_sig_jitter(), parse_sc_sig_refresh_interval(), parse_sc_sig_resign_interval(), parse_sc_sig_validity_default(), parse_sc_sig_validity_denial(), parse_sc_soa_min(), and parse_sc_soa_ttl().
time_t ods_rand | ( | time_t | mod | ) |
Return a random time.
[in] | mod | modulo |
Return a random time.
Definition at line 422 of file duration.c.
uint32_t time_datestamp | ( | time_t | tt, |
const char * | format, | ||
char ** | str | ||
) |
Return time in datestamp.
[in] | tt | time |
[in] | format | stamp format |
[out] | str | store string |
copycode: This code is based on the EXAMPLE in the strftime manual.
Definition at line 531 of file duration.c.
References ods_log_error(), and time_now().
Referenced by namedb_update_serial(), zone_load_signconf(), and zonelist_update().
void time_itoa | ( | time_t | n, |
char * | s | ||
) |
Convert time into string.
[in] | n | time |
[in] | s | string |
Convert time into string.
Definition at line 582 of file duration.c.
time_t time_maximum | ( | time_t | a, |
time_t | b | ||
) |
Return the longest time.
[in] | a | one time |
[in] | b | another time |
Return the longest time.
Definition at line 411 of file duration.c.
time_t time_minimum | ( | time_t | a, |
time_t | b | ||
) |
Return the shortest time.
[in] | a | one time |
[in] | b | another time |
Return the shortest time.
Definition at line 401 of file duration.c.
time_t time_now | ( | void | ) |
Return the time since Epoch, measured in seconds. If the timeshift is enabled, return the environment variable.
Return the time since Epoch, measured in seconds.
Definition at line 513 of file duration.c.
Referenced by axfr(), engine_update_zones(), ixfr(), namedb_update_serial(), schedule_pop_task(), soa_request(), time_datestamp(), tsig_rr_lookup(), tsig_rr_sign(), xfrhandler_start(), xfrhandler_time(), and zone_reschedule_task().