Functions

/build/buildd-opendnssec_1.3.2-1~bpo60+1-sparc-g2IJWF/opendnssec-1.3.2/signer/src/signer/backup.h File Reference

#include "config.h"
#include "shared/duration.h"
#include "shared/file.h"
#include <ldns/ldns.h>
Include dependency graph for backup.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

char * backup_read_token (FILE *in)
int backup_read_check_str (FILE *in, const char *str)
int backup_read_str (FILE *in, const char **str)
int backup_read_time_t (FILE *in, time_t *v)
int backup_read_duration (FILE *in, duration_type **v)
int backup_read_rr_type (FILE *in, ldns_rr_type *v)
int backup_read_int (FILE *in, int *v)
int backup_read_size_t (FILE *in, size_t *v)
int backup_read_uint8_t (FILE *in, uint8_t *v)
int backup_read_uint16_t (FILE *in, uint16_t *v)
int backup_read_uint32_t (FILE *in, uint32_t *v)

Function Documentation

int backup_read_check_str ( FILE *  in,
const char *  str 
)

Read and match a string from backup file.

Parameters:
[in] in input file descriptor
[in] str string to match
Returns:
1 if string was read and matched, 0 otherwise

Read and match a string from backup file.

Definition at line 74 of file backup.c.

References backup_read_token(), ods_log_debug(), and ods_strcmp().

Referenced by domain_recover(), key_recover(), nsec3params_recover_from_backup(), signconf_recover_from_backup(), task_recover_from_backup(), zone_recover(), and zonedata_recover().

int backup_read_duration ( FILE *  in,
duration_type **  v 
)

Read duration from backup file.

Parameters:
[in] in input file descriptor
[out] v duration storage
Returns:
1 on success, 0 otherwise

Read duration from backup file.

Definition at line 128 of file backup.c.

References backup_read_token(), duration_create_from_string(), and ods_log_debug().

Referenced by signconf_recover_from_backup(), and zone_recover().

int backup_read_int ( FILE *  in,
int *  v 
)

Read integer from backup file.

Parameters:
[in] in input file descriptor
[out] v integer storage
Returns:
1 on success, 0 otherwise

Read integer from backup file.

Definition at line 162 of file backup.c.

References backup_read_token(), and ods_log_debug().

Referenced by key_recover(), signconf_recover_from_backup(), task_recover_from_backup(), zone_recover(), and zonedata_recover().

int backup_read_rr_type ( FILE *  in,
ldns_rr_type *  v 
)

Read rr type from backup file.

Parameters:
[in] in input file descriptor
[out] v rr type storage
Returns:
1 on success, 0 otherwise

Read rr type from backup file.

Definition at line 145 of file backup.c.

References backup_read_token(), and ods_log_debug().

Referenced by signconf_recover_from_backup(), and zone_recover().

int backup_read_size_t ( FILE *  in,
size_t *  v 
)

Read size type from backup file.

Parameters:
[in] in input file descriptor
[out] v integer storage
Returns:
1 on success, 0 otherwise

Read size type from backup file.

Definition at line 179 of file backup.c.

References backup_read_token(), and ods_log_debug().

int backup_read_str ( FILE *  in,
const char **  str 
)

Read a string from backup file.

Parameters:
[in] in input file descriptor
[out] string storage
Returns:
1 on success, 0 otherwise

Read a string from backup file.

Definition at line 94 of file backup.c.

References backup_read_token(), and ods_log_debug().

Referenced by domain_recover(), key_recover(), nsec3params_recover_from_backup(), signconf_recover_from_backup(), task_recover_from_backup(), zone_recover(), and zonedata_recover().

int backup_read_time_t ( FILE *  in,
time_t *  v 
)

Read time from backup file.

Parameters:
[in] in input file descriptor
[out] v time_t storage
Returns:
1 on success, 0 otherwise

Read time from backup file.

Definition at line 111 of file backup.c.

References backup_read_token(), and ods_log_debug().

Referenced by signconf_recover_from_backup(), task_recover_from_backup(), and zone_recover().

char* backup_read_token ( FILE *  in  ) 

Recover from backup. Read token from backup file.

Parameters:
[in] in input file descriptor
Returns:
char* read token

Read token from backup file.

Definition at line 50 of file backup.c.

Referenced by backup_read_check_str(), backup_read_duration(), backup_read_int(), backup_read_rr_type(), backup_read_size_t(), backup_read_str(), backup_read_time_t(), backup_read_uint16_t(), backup_read_uint32_t(), and backup_read_uint8_t().

int backup_read_uint16_t ( FILE *  in,
uint16_t *  v 
)

Read 16bit unsigned integer from backup file.

Parameters:
[in] in input file descriptor
[out] v uint16_t storage
Returns:
1 on success, 0 otherwise

Read 16bit unsigned integer from backup file.

Definition at line 213 of file backup.c.

References backup_read_token(), and ods_log_debug().

Referenced by nsec3params_recover_from_backup().

int backup_read_uint32_t ( FILE *  in,
uint32_t *  v 
)

Read 32bit unsigned integer from backup file.

Parameters:
[in] in input file descriptor
[out] v uint32_t storage
Returns:
1 on success, 0 otherwise

Read 32bit unsigned integer from backup file.

Definition at line 230 of file backup.c.

References backup_read_token(), and ods_log_debug().

Referenced by domain_recover(), key_recover(), and zone_recover().

int backup_read_uint8_t ( FILE *  in,
uint8_t *  v 
)

Read 8bit unsigned integer from backup file.

Parameters:
[in] in input file descriptor
[out] v uint8_t storage
Returns:
1 on success, 0 otherwise

Read 8bit unsigned integer from backup file.

Definition at line 196 of file backup.c.

References backup_read_token(), and ods_log_debug().

Referenced by key_recover(), and nsec3params_recover_from_backup().