OpenDNSSEC-enforcer 2.1.13
Macros | Functions
zonelist_export.h File Reference
#include "db/db_connection.h"

Go to the source code of this file.

Macros

#define ZONELIST_EXPORT_OK   0
 
#define ZONELIST_EXPORT_ERR_ARGS   1
 
#define ZONELIST_EXPORT_ERR_XML   2
 
#define ZONELIST_EXPORT_ERR_DATABASE   3
 
#define ZONELIST_EXPORT_ERR_MEMORY   4
 
#define ZONELIST_EXPORT_ERR_FILE   5
 

Functions

int zonelist_export (int sockfd, db_connection_t *connection, const char *filename, int comment)
 

Macro Definition Documentation

◆ ZONELIST_EXPORT_ERR_ARGS

#define ZONELIST_EXPORT_ERR_ARGS   1

Indicates an error with the arguments provided to zonelist_export().

Definition at line 41 of file zonelist_export.h.

◆ ZONELIST_EXPORT_ERR_DATABASE

#define ZONELIST_EXPORT_ERR_DATABASE   3

Indicates an error with the database like reading, updating or creating.

Definition at line 49 of file zonelist_export.h.

◆ ZONELIST_EXPORT_ERR_FILE

#define ZONELIST_EXPORT_ERR_FILE   5

Indicates an error when handing files.

Definition at line 57 of file zonelist_export.h.

◆ ZONELIST_EXPORT_ERR_MEMORY

#define ZONELIST_EXPORT_ERR_MEMORY   4

Indicates a memory allocation error or generic internal error.

Definition at line 53 of file zonelist_export.h.

◆ ZONELIST_EXPORT_ERR_XML

#define ZONELIST_EXPORT_ERR_XML   2

Indicates an error with the zonelist XML like parsing, validating or content.

Definition at line 45 of file zonelist_export.h.

◆ ZONELIST_EXPORT_OK

#define ZONELIST_EXPORT_OK   0

Indicates a successful zonelist export.

Definition at line 37 of file zonelist_export.h.

Function Documentation

◆ zonelist_export()

int zonelist_export ( int  sockfd,
db_connection_t connection,
const char *  filename,
int  comment 
)
extern

Export the zonelist from the database to an XML file.

Parameters
[in]sockfda socket.
[in]connectiona db_connection_t pointer.
[in]filenamethe filename to write to.
[in]commentif non-zero include a comment about the zonelist file.
Returns
ZONELIST_EXPORT_ERR_* on error otherwise ZONELIST_EXPORT_OK.

Definition at line 47 of file zonelist_export.c.

References check_zonelist(), db_value_cmp(), policy_free(), policy_id(), policy_name(), zone_db_get_policy(), zone_db_input_adapter_type(), zone_db_input_adapter_uri(), zone_db_name(), zone_db_output_adapter_type(), zone_db_output_adapter_uri(), zone_db_policy_id(), zone_db_signconf_path(), zone_list_db_free(), zone_list_db_get(), zone_list_db_new(), zone_list_db_next(), ZONELIST_EXPORT_ERR_ARGS, ZONELIST_EXPORT_ERR_DATABASE, ZONELIST_EXPORT_ERR_FILE, ZONELIST_EXPORT_ERR_MEMORY, ZONELIST_EXPORT_ERR_XML, and ZONELIST_EXPORT_OK.