Main Page | Data Structures | Directories | File List | Data Fields | Globals

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_struct

Typedefs

typedef SPF_dns_rr_struct SPF_dns_rr_t

Functions

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)


Typedef Documentation

typedef struct SPF_dns_rr_struct SPF_dns_rr_t
 

A DNS packet.

This structure does not semantically match the DNS packet structure. It assumes that only one RR type was of interest, and that all RRs in the packet are of that type.

This is also used in spf_dns_zone.c


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_struct::rr, SPF_dns_rr_struct::rr_buf_len, SPF_dns_rr_struct::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_struct::domain, SPF_dns_rr_struct::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_struct::num_rr, SPF_dns_rr_data_t::ptr, SPF_dns_rr_struct::rr, SPF_dns_rr_struct::rr_type, SPF_dns_rr_struct::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_struct::ttl, SPF_dns_rr_data_t::txt, and SPF_dns_rr_struct::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_struct::domain, SPF_dns_rr_struct::hook, SPF_dns_rr_struct::rr, and SPF_dns_rr_struct::rr_buf_len.

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_struct::domain, SPF_dns_rr_struct::domain_buf_len, SPF_dns_rr_struct::herrno, HOST_NOT_FOUND, ns_t_invalid, NULL, SPF_dns_rr_struct::num_rr, SPF_dns_rr_struct::rr_type, SPF_dns_rr_struct::ttl, and SPF_dns_rr_struct::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_struct::domain, SPF_dns_rr_struct::domain_buf_len, SPF_dns_rr_struct::herrno, NULL, SPF_dns_rr_struct::rr_type, SPF_dns_rr_struct::source, SPF_dns_rr_free(), SPF_dns_rr_new(), and SPF_dns_rr_struct::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 Fri Jun 25 18:30:05 2010 for libspf2 by  doxygen 1.4.4