soa.c File Reference

#include <config.h>
#include <string.h>
#include <isc/buffer.h>
#include <isc/util.h>
#include <dns/rdata.h>
#include <dns/rdatastruct.h>
#include <dns/soa.h>

Go to the source code of this file.

Functions

static isc_uint32_t decode_uint32 (unsigned char *p)
static void encode_uint32 (isc_uint32_t val, unsigned char *p)
static isc_uint32_t soa_get (dns_rdata_t *rdata, int offset)
isc_result_t dns_soa_buildrdata (dns_name_t *origin, dns_name_t *contact, dns_rdataclass_t rdclass, isc_uint32_t serial, isc_uint32_t refresh, isc_uint32_t retry, isc_uint32_t expire, isc_uint32_t minimum, unsigned char *buffer, dns_rdata_t *rdata)
 Build the rdata of an SOA record.
isc_uint32_t dns_soa_getserial (dns_rdata_t *rdata)
isc_uint32_t dns_soa_getrefresh (dns_rdata_t *rdata)
isc_uint32_t dns_soa_getretry (dns_rdata_t *rdata)
isc_uint32_t dns_soa_getexpire (dns_rdata_t *rdata)
isc_uint32_t dns_soa_getminimum (dns_rdata_t *rdata)
static void soa_set (dns_rdata_t *rdata, isc_uint32_t val, int offset)
void dns_soa_setserial (isc_uint32_t val, dns_rdata_t *rdata)
void dns_soa_setrefresh (isc_uint32_t val, dns_rdata_t *rdata)
void dns_soa_setretry (isc_uint32_t val, dns_rdata_t *rdata)
void dns_soa_setexpire (isc_uint32_t val, dns_rdata_t *rdata)
void dns_soa_setminimum (isc_uint32_t val, dns_rdata_t *rdata)


Detailed Description

Definition in file soa.c.


Function Documentation

static isc_uint32_t decode_uint32 ( unsigned char *  p  )  [inline, static]

Definition at line 33 of file soa.c.

static void encode_uint32 ( isc_uint32_t  val,
unsigned char *  p 
) [inline, static]

Definition at line 41 of file soa.c.

static isc_uint32_t soa_get ( dns_rdata_t rdata,
int  offset 
) [static]

Definition at line 49 of file soa.c.

References dns_rdata::data, decode_uint32(), INSIST, dns_rdata::length, and dns_rdata::type.

Referenced by dns_soa_getexpire(), dns_soa_getminimum(), dns_soa_getrefresh(), dns_soa_getretry(), and dns_soa_getserial().

isc_result_t dns_soa_buildrdata ( dns_name_t origin,
dns_name_t contact,
dns_rdataclass_t  rdclass,
isc_uint32_t  serial,
isc_uint32_t  refresh,
isc_uint32_t  retry,
isc_uint32_t  expire,
isc_uint32_t  minimum,
unsigned char *  buffer,
dns_rdata_t rdata 
)

Build the rdata of an SOA record.

Requires:

Ensures:

Definition at line 67 of file soa.c.

References dns_name_clone(), dns_name_init(), dns_rdata_fromstruct(), DNS_SOA_BUFFERSIZE, isc_buffer_init, and REQUIRE.

Referenced by add_soa().

isc_uint32_t dns_soa_getserial ( dns_rdata_t rdata  ) 

Definition at line 100 of file soa.c.

References soa_get().

Referenced by check_soa_increment(), dns_journal_writediff(), ns_xfr_start(), read_one_rr(), receive_secure_serial(), setsoaserial(), update_soa_serial(), xfr_rr(), and xfrin_send_request().

isc_uint32_t dns_soa_getrefresh ( dns_rdata_t rdata  ) 

Definition at line 104 of file soa.c.

References soa_get().

isc_uint32_t dns_soa_getretry ( dns_rdata_t rdata  ) 

Definition at line 108 of file soa.c.

References soa_get().

isc_uint32_t dns_soa_getexpire ( dns_rdata_t rdata  ) 

Definition at line 112 of file soa.c.

References soa_get().

isc_uint32_t dns_soa_getminimum ( dns_rdata_t rdata  ) 

Definition at line 116 of file soa.c.

References soa_get().

Referenced by get_soa_ttls(), and load_text().

static void soa_set ( dns_rdata_t rdata,
isc_uint32_t  val,
int  offset 
) [static]

Definition at line 121 of file soa.c.

References dns_rdata::data, encode_uint32(), INSIST, dns_rdata::length, and dns_rdata::type.

Referenced by dns_soa_setexpire(), dns_soa_setminimum(), dns_soa_setrefresh(), dns_soa_setretry(), and dns_soa_setserial().

void dns_soa_setserial ( isc_uint32_t  val,
dns_rdata_t rdata 
)

Definition at line 129 of file soa.c.

References soa_set().

Referenced by receive_secure_serial(), setsoaserial(), and update_soa_serial().

void dns_soa_setrefresh ( isc_uint32_t  val,
dns_rdata_t rdata 
)

Definition at line 133 of file soa.c.

References soa_set().

void dns_soa_setretry ( isc_uint32_t  val,
dns_rdata_t rdata 
)

Definition at line 137 of file soa.c.

References soa_set().

void dns_soa_setexpire ( isc_uint32_t  val,
dns_rdata_t rdata 
)

Definition at line 141 of file soa.c.

References soa_set().

void dns_soa_setminimum ( isc_uint32_t  val,
dns_rdata_t rdata 
)

Definition at line 145 of file soa.c.

References soa_set().


Generated on Tue Apr 28 17:41:13 2015 by Doxygen 1.5.4 for BIND9 Internals 9.11.0pre-alpha