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
| ) |  |

Export the zonelist from the database to an XML file.

Parameters

  [in] | sockfd | a socket.
  [in] | connection | a db_connection_t pointer.
  [in] | filename | the filename to write to.
  [in] | comment | if 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.