spf_dns_rr.h File Reference

#include "spf_dns.h"

Include dependency graph for spf_dns_rr.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

union  SPF_dns_rr_data_t
struct  SPF_dns_rr_t


SPF_dns_rr_tSPF_dns_rr_new (void)
void SPF_dns_rr_free (SPF_dns_rr_t *spfrr)
SPF_dns_rr_tSPF_dns_rr_new_init (SPF_dns_server_t *spf_dns_server, const char *domain, ns_type rr_type, int ttl, SPF_dns_stat_t herrno)
SPF_dns_rr_tSPF_dns_rr_new_nxdomain (SPF_dns_server_t *spf_dns_server, const char *domain)
SPF_errcode_t SPF_dns_rr_buf_realloc (SPF_dns_rr_t *spfrr, int idx, size_t len)
SPF_errcode_t SPF_dns_rr_dup (SPF_dns_rr_t **dstp, SPF_dns_rr_t *src)

Function Documentation

SPF_errcode_t SPF_dns_rr_buf_realloc ( SPF_dns_rr_t spfrr,
int  idx,
size_t  len 

Definition at line 134 of file spf_dns_rr.c.

References NULL, SPF_dns_rr_t::rr, SPF_dns_rr_t::rr_buf_len, SPF_dns_rr_t::rr_buf_num, SPF_E_NO_MEMORY, and SPF_E_SUCCESS.

SPF_errcode_t SPF_dns_rr_dup ( SPF_dns_rr_t **  dstp,
SPF_dns_rr_t src 

This function may return both an error code and an rr, or one, or neither.

This function generates a valgrind error because strlen always reads in blocks of 4 bytes, and can overrun the end of the allocated buffers.

Definition at line 189 of file spf_dns_rr.c.

References SPF_dns_rr_data_t::a, SPF_dns_rr_data_t::aaaa, SPF_dns_rr_t::domain, SPF_dns_rr_t::herrno, SPF_dns_rr_data_t::mx, ns_t_a, ns_t_aaaa, ns_t_mx, ns_t_ptr, ns_t_spf, ns_t_txt, NULL, SPF_dns_rr_t::num_rr, SPF_dns_rr_data_t::ptr, SPF_dns_rr_t::rr, SPF_dns_rr_t::rr_type, SPF_dns_rr_t::source, SPF_ASSERT_NOTNULL, SPF_dns_rr_new_init(), SPF_DNS_RR_REALLOC, SPF_E_NO_MEMORY, SPF_E_SUCCESS, SPF_warningf, SPF_dns_rr_t::ttl, SPF_dns_rr_data_t::txt, and SPF_dns_rr_t::utc_ttl.

Here is the call graph for this function:

void SPF_dns_rr_free ( SPF_dns_rr_t spfrr  ) 

Definition at line 114 of file spf_dns_rr.c.

References SPF_dns_rr_t::domain, SPF_dns_rr_t::hook, SPF_dns_rr_t::rr, SPF_dns_rr_t::rr_buf_len, and SPF_dns_rr_t::rr_buf_num.

Referenced by main(), SPF_dns_get_client_dom(), SPF_dns_rr_new_init(), SPF_record_interpret(), SPF_request_get_exp(), and SPF_server_get_record().

SPF_dns_rr_t* SPF_dns_rr_new ( void   ) 

Definition at line 93 of file spf_dns_rr.c.

References SPF_dns_rr_t::domain, SPF_dns_rr_t::domain_buf_len, SPF_dns_rr_t::herrno, HOST_NOT_FOUND, ns_t_invalid, NULL, SPF_dns_rr_t::num_rr, SPF_dns_rr_t::rr_type, SPF_dns_rr_t::ttl, and SPF_dns_rr_t::utc_ttl.

Referenced by SPF_dns_rr_new_init().

SPF_dns_rr_t* SPF_dns_rr_new_init ( SPF_dns_server_t spf_dns_server,
const char *  domain,
ns_type  rr_type,
int  ttl,
SPF_dns_stat_t  herrno 

Definition at line 61 of file spf_dns_rr.c.

References SPF_dns_rr_t::domain, SPF_dns_rr_t::domain_buf_len, SPF_dns_rr_t::herrno, NULL, SPF_dns_rr_t::rr_type, SPF_dns_rr_t::source, SPF_dns_rr_free(), SPF_dns_rr_new(), and SPF_dns_rr_t::ttl.

Referenced by SPF_dns_rr_dup(), SPF_dns_rr_new_nxdomain(), SPF_dns_zone_add_str(), and SPF_dns_zone_new().

Here is the call graph for this function:

SPF_dns_rr_t* SPF_dns_rr_new_nxdomain ( SPF_dns_server_t spf_dns_server,
const char *  domain 

Definition at line 53 of file spf_dns_rr.c.

References HOST_NOT_FOUND, ns_t_any, and SPF_dns_rr_new_init().

Here is the call graph for this function:

Generated on Tue Nov 4 13:27:41 2008 for libspf2 by  doxygen 1.5.4