zonelist_update.h File Reference
`#include "db/zone_db.h"`

Go to the source code of this file.

## Macros

#define | ZONELIST_UPDATE_OK 0
#define | ZONELIST_UPDATE_ERR_ARGS 1
#define | ZONELIST_UPDATE_ERR_XML 2
#define | ZONELIST_UPDATE_ERR_DATABASE 3
#define | ZONELIST_UPDATE_ERR_MEMORY 4
#define | ZONELIST_UPDATE_ERR_FILE 5

## Functions

int | zonelist_update_add (int sockfd, const char *filename, const zone_db_t *zone, int comment)
int | zonelist_update_delete (int sockfd, const char *filename, const zone_db_t *zone, int comment)

## Macro Definition Documentation

## ZONELIST_UPDATE_ERR_ARGS

#define ZONELIST_UPDATE_ERR_ARGS 1

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

Definition at line 41 of file zonelist_update.h.

## ZONELIST_UPDATE_ERR_DATABASE

#define ZONELIST_UPDATE_ERR_DATABASE 3

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

Definition at line 49 of file zonelist_update.h.

## ZONELIST_UPDATE_ERR_FILE

#define ZONELIST_UPDATE_ERR_FILE 5

Indicates an error when handing files.

Definition at line 57 of file zonelist_update.h.

## ZONELIST_UPDATE_ERR_MEMORY

#define ZONELIST_UPDATE_ERR_MEMORY 4

Indicates a memory allocation error or generic internal error.

Definition at line 53 of file zonelist_update.h.

## ZONELIST_UPDATE_ERR_XML

#define ZONELIST_UPDATE_ERR_XML 2

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

Definition at line 45 of file zonelist_update.h.

## ZONELIST_UPDATE_OK

#define ZONELIST_UPDATE_OK 0

Indicates a successful zonelist update.

Definition at line 37 of file zonelist_update.h.

## Function Documentation

## zonelist_update_add()

int zonelist_update_add | ( | int | sockfd,
|  | const char * | filename,
|  | const zone_db_t * | zone,
|  | int | comment )

extern

Update a zonelist and add the supplied zone to it.

Parameters

  [in] | sockfd | socket fd.
  [in] | filename | the zonelist filename to write to.
  [in] | zone | a zone_db_t pointer to the zone to add.
  [in] | comment | if non-zero include a comment about the zonelist file.

Returns
  ZONELIST_UPDATE_ERR_* on error otherwise ZONELIST_UPDATE_OK.

Definition at line 228 of file zonelist_update.c.

## zonelist_update_delete()

int zonelist_update_delete | ( | int | sockfd,
|  | const char * | filename,
|  | const zone_db_t * | zone,
|  | int | comment )

extern

Update a zonelist and remove the supplied zone from it.

Parameters

  [in] | sockfd | socket fd.
  [in] | filename | the zonelist filename to write to.
  [in] | zone | a zone_db_t pointer to the zone to remove.
  [in] | comment | if non-zero include a comment about the zonelist file.

Returns
  ZONELIST_UPDATE_ERR_* on error otherwise ZONELIST_UPDATE_OK.

Definition at line 232 of file zonelist_update.c.