OpenDNSSEC-signer
1.4.6
|
#include "config.h"
#include "shared/file.h"
#include "shared/log.h"
#include "shared/util.h"
#include <fcntl.h>
#include <ldns/ldns.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <time.h>
#include <unistd.h>
Go to the source code of this file.
Functions | |
int | util_is_dnssec_rr (ldns_rr *rr) |
int | util_serial_gt (uint32_t serial_new, uint32_t serial_old) |
int | util_soa_compare_rdata (ldns_rr *rr1, ldns_rr *rr2) |
int | util_soa_compare (ldns_rr *rr1, ldns_rr *rr2) |
ldns_status | util_dnssec_rrs_compare (ldns_rr *rr1, ldns_rr *rr2, int *cmp) |
ldns_status | util_dnssec_rrs_add_rr (ldns_dnssec_rrs *rrs, ldns_rr *rr) |
int | util_check_pidfile (const char *pidfile) |
int | util_write_pidfile (const char *pidfile, pid_t pid) |
ods_status | util_rr_print (FILE *fd, const ldns_rr *rr) |
size_t | util_b64_pton_calculate_size (size_t srcsize) |
size_t util_b64_pton_calculate_size | ( | size_t | srcsize | ) |
Calculates the size needed to store the result of b64_pton.
Definition at line 416 of file util.c.
Referenced by tsig_key_create().
int util_check_pidfile | ( | const char * | pidfile | ) |
Check process id file.
If the file exists then either we didn't shutdown cleanly or a signer daemon is already running: in either case shutdown.
The pidfile exists already
Consider stale pidfile
Consider state pidfile
All good, carry on
Definition at line 283 of file util.c.
References ods_log_crit(), ods_log_error(), and ods_log_warning().
Referenced by engine_start().
ldns_status util_dnssec_rrs_add_rr | ( | ldns_dnssec_rrs * | rrs, |
ldns_rr * | rr | ||
) |
A more efficient ldns_dnssec_rrs_add_rr(), get rid of ldns_rr_compare().
Definition at line 182 of file util.c.
References ods_log_warning(), util_dnssec_rrs_add_rr(), and util_dnssec_rrs_compare().
Referenced by util_dnssec_rrs_add_rr().
ldns_status util_dnssec_rrs_compare | ( | ldns_rr * | rr1, |
ldns_rr * | rr2, | ||
int * | cmp | ||
) |
Compare RRs only on RDATA.
Definition at line 140 of file util.c.
Referenced by rrset_lookup_rr(), and util_dnssec_rrs_add_rr().
int util_is_dnssec_rr | ( | ldns_rr * | rr | ) |
ods_status util_rr_print | ( | FILE * | fd, |
const ldns_rr * | rr | ||
) |
Print an LDNS RR, check status.
Definition at line 378 of file util.c.
References ODS_STATUS_ASSERT_ERR, ODS_STATUS_FWRITE_ERR, ODS_STATUS_MALLOC_ERR, and ODS_STATUS_OK.
Referenced by nsec3params_backup(), and rrset_print().
int util_serial_gt | ( | uint32_t | serial_new, |
uint32_t | serial_old | ||
) |
Compare SERIALs.
Definition at line 72 of file util.c.
References DNS_SERIAL_GT.
Referenced by ixfr(), and namedb_update_serial().
int util_soa_compare | ( | ldns_rr * | rr1, |
ldns_rr * | rr2 | ||
) |
int util_soa_compare_rdata | ( | ldns_rr * | rr1, |
ldns_rr * | rr2 | ||
) |
Compare SOA RDATAs.
Definition at line 83 of file util.c.
References SE_SOA_RDATA_MINIMUM, and SE_SOA_RDATA_SERIAL.
Referenced by util_soa_compare().
int util_write_pidfile | ( | const char * | pidfile, |
pid_t | pid | ||
) |
Write process id to file.
Definition at line 333 of file util.c.
References ods_fclose(), ods_fopen(), ods_log_assert, ods_log_debug(), and ods_log_error().