axfr.h File Reference
`#include "config.h"`
`#include "daemon/engine.h"`
`#include "wire/query.h"`
`#include <ldns/ldns.h>`

Go to the source code of this file.

## Macros

#define | MAX_COMPRESSION_OFFSET 16383 /* Compression pointers are 14 bit. */
#define | AXFR_MAX_MESSAGE_LEN MAX_COMPRESSION_OFFSET

## Functions

query_state | soa_request (query_type *q, engine_type *engine)
query_state | axfr (query_type *q, engine_type *engine, int fallback)
query_state | ixfr (query_type *q, engine_type *engine)

## Macro Definition Documentation

## AXFR_MAX_MESSAGE_LEN

#define AXFR_MAX_MESSAGE_LEN MAX_COMPRESSION_OFFSET

Definition at line 43 of file axfr.h.

Referenced by axfr(), and ixfr().

## MAX_COMPRESSION_OFFSET

#define MAX_COMPRESSION_OFFSET 16383 /* Compression pointers are 14 bit. */

AXFR.

Definition at line 42 of file axfr.h.

## Function Documentation

## axfr()

query_state axfr | ( | query_type * | q,
|  | engine_type * | engine,
|  | int | fallback )

extern

Do AXFR.

Parameters

  [in] | q | axfr request
  [in] | engine | signer engine
  [in] | fallback | fallback from ixfr?

Returns
  query_state state of the query

Do AXFR.

Definition at line 152 of file axfr.c.

References addns_read_rr(), query_struct::axfr_fd, query_struct::axfr_is_done, AXFR_MAX_MESSAGE_LEN, axfr_str, AXFR_TSIG_SIGN_EVERY_NTH, query_struct::buffer, buffer_pkt_ancount(), BUFFER_PKT_HEADER_SIZE, buffer_pkt_set_aa(), buffer_pkt_set_ancount(), buffer_pkt_set_arcount(), buffer_pkt_set_nscount(), buffer_pkt_set_qdcount(), buffer_pkt_set_rcode(), buffer_position(), buffer_set_limit(), buffer_set_position(), EDNS_NOT_PRESENT, query_struct::edns_rr, query_struct::maxlen, zone_struct::name, query_add_rr(), QUERY_AXFR, query_prepare(), QUERY_PROCESSED, SE_ADFILE_MAXLINE, xfrd_struct::serial_xfr_acquired, edns_rr_struct::status, tsig_rr_struct::status, query_struct::tcp, TSIG_OK, query_struct::tsig_prepare_it, query_struct::tsig_rr, query_struct::tsig_sign_it, query_struct::tsig_update_it, tsig_rr_struct::update_since_last_prepare, zone_struct::xfrd, and query_struct::zone.

Referenced by ixfr(), and sock_handle_tcp_write().

## ixfr()

query_state ixfr | ( | query_type * | q,
|  | engine_type * | engine )

extern

Do IXFR.

Parameters

  [in] | q | ixfr request
  [in] | engine | signer engine

Returns
  query_state state of the query

Do IXFR (equal to AXFR for now).

Definition at line 389 of file axfr.c.

References addns_read_rr(), axfr(), query_struct::axfr_fd, query_struct::axfr_is_done, AXFR_MAX_MESSAGE_LEN, axfr_str, AXFR_TSIG_SIGN_EVERY_NTH, query_struct::buffer, buffer_pkt_ancount(), BUFFER_PKT_HEADER_SIZE, buffer_pkt_set_ancount(), buffer_pkt_set_arcount(), buffer_pkt_set_nscount(), buffer_pkt_set_qdcount(), buffer_pkt_set_rcode(), buffer_position(), buffer_set_limit(), buffer_set_position(), query_struct::maxlen, zone_struct::name, query_add_rr(), QUERY_IXFR, query_prepare(), QUERY_PROCESSED, SE_ADFILE_MAXLINE, query_struct::serial, xfrd_struct::serial_xfr_acquired, query_struct::startpos, tsig_rr_struct::status, query_struct::tcp, TSIG_OK, query_struct::tsig_prepare_it, query_struct::tsig_rr, query_struct::tsig_sign_it, query_struct::tsig_update_it, tsig_rr_struct::update_since_last_prepare, zone_struct::xfrd, and query_struct::zone.

Referenced by ixfr_add_rr(), ixfr_cleanup(), ixfr_del_rr(), ixfr_print(), ixfr_purge(), and sock_handle_tcp_write().

## soa_request()

query_state soa_request | ( | query_type * | q,
|  | engine_type * | engine )

extern

Handle SOA request.

Parameters

  [in] | q | soa request
  [in] | engine | signer engine

Returns
  query_state state of the query

Handle SOA request.

Definition at line 53 of file axfr.c.

References addns_read_rr(), axfr_str, query_struct::buffer, buffer_pkt_ancount(), buffer_pkt_set_aa(), buffer_pkt_set_ancount(), buffer_pkt_set_arcount(), buffer_pkt_set_nscount(), buffer_pkt_set_rcode(), zone_struct::name, query_add_rr(), QUERY_PROCESSED, SE_ADFILE_MAXLINE, xfrd_struct::serial_xfr_acquired, tsig_rr_struct::status, TSIG_OK, query_struct::tsig_rr, query_struct::tsig_sign_it, zone_struct::xfrd, and query_struct::zone.