Changeset View
Changeset View
Standalone View
Standalone View
contrib/ldns/ldns/util.h.in
Show First 20 Lines • Show All 268 Lines • ▼ Show 20 Lines | |||||
* \return the seconds since epoch | * \return the seconds since epoch | ||||
*/ | */ | ||||
time_t ldns_mktime_from_utc(const struct tm *tm); | time_t ldns_mktime_from_utc(const struct tm *tm); | ||||
time_t mktime_from_utc(const struct tm *tm); | time_t mktime_from_utc(const struct tm *tm); | ||||
/** | /** | ||||
* The function interprets time as the number of seconds since epoch | * The function interprets time as the number of seconds since epoch | ||||
* with respect to now using serial arithmitics (rfc1982). | * with respect to now using serial arithmetics (rfc1982). | ||||
* That number of seconds is then converted to broken-out time information. | * That number of seconds is then converted to broken-out time information. | ||||
* This is especially useful when converting the inception and expiration | * This is especially useful when converting the inception and expiration | ||||
* fields of RRSIG records. | * fields of RRSIG records. | ||||
* | * | ||||
* \param[in] time number of seconds since epoch (midnight, January 1st, 1970) | * \param[in] time number of seconds since epoch (midnight, January 1st, 1970) | ||||
* to be intepreted as a serial arithmitics number relative to now. | * to be interpreted as a serial arithmetics number relative to now. | ||||
* \param[in] now number of seconds since epoch (midnight, January 1st, 1970) | * \param[in] now number of seconds since epoch (midnight, January 1st, 1970) | ||||
* to which the time value is compared to determine the final value. | * to which the time value is compared to determine the final value. | ||||
* \param[out] result the struct with the broken-out time information | * \param[out] result the struct with the broken-out time information | ||||
* \return result on success or NULL on error | * \return result on success or NULL on error | ||||
*/ | */ | ||||
struct tm * ldns_serial_arithmitics_gmtime_r(int32_t time, time_t now, struct tm *result); | struct tm * ldns_serial_arithmetics_gmtime_r(int32_t time, time_t now, struct tm *result); | ||||
/* previously used wrong spelling */ | |||||
#define ldns_serial_arithmitics_gmtime_r ldns_serial_arithmetics_gmtime_r | |||||
/** | /** | ||||
* Seed the random function. | * Seed the random function. | ||||
* If the file descriptor is specified, the random generator is seeded with | * If the file descriptor is specified, the random generator is seeded with | ||||
* data from that file. If not, /dev/urandom is used. | * data from that file. If not, /dev/urandom is used. | ||||
* | * | ||||
* applications should call this if they need entropy data within ldns | * applications should call this if they need entropy data within ldns | ||||
* If openSSL is available, it is automatically seeded from /dev/urandom | * If openSSL is available, it is automatically seeded from /dev/urandom | ||||
▲ Show 20 Lines • Show All 96 Lines • Show Last 20 Lines |