spf_dns.c File Reference

#include "spf_sys_config.h"
#include "spf.h"
#include "spf_dns.h"
#include "spf_internal.h"
#include "spf_dns_internal.h"

Include dependency graph for spf_dns.c:

Go to the source code of this file.

Functions

void SPF_dns_free (SPF_dns_server_t *spf_dns_server)
SPF_dns_rr_tSPF_dns_lookup (SPF_dns_server_t *spf_dns_server, const char *domain, ns_type rr_type, int should_cache)
SPF_dns_rr_tSPF_dns_rlookup (SPF_dns_server_t *spf_dns_server, struct in_addr ipv4, ns_type rr_type, int should_cache)
SPF_dns_rr_tSPF_dns_rlookup6 (SPF_dns_server_t *spf_dns_server, struct in6_addr ipv6, ns_type rr_type, int should_cache)
char * SPF_dns_get_client_dom (SPF_dns_server_t *spf_dns_server, SPF_request_t *sr)


Function Documentation

void SPF_dns_free ( SPF_dns_server_t spf_dns_server  ) 

Definition at line 116 of file spf_dns.c.

References SPF_dns_server_struct::destroy, SPF_dns_server_struct::layer_below, NULL, SPF_ASSERT_NOTNULL, and SPF_dns_free().

Referenced by SPF_dns_free(), and SPF_server_free().

Here is the call graph for this function:

char* SPF_dns_get_client_dom ( SPF_dns_server_t spf_dns_server,
SPF_request_t sr 
)

This may return NULL if the strdup() fails.

This ought to be refactored with the PTR code in the interpreter.

Definition at line 206 of file spf_dns.c.

References SPF_dns_rr_data_t::a, SPF_dns_rr_data_t::aaaa, SPF_request_struct::client_ver, FALSE, SPF_request_struct::ipv4, SPF_request_struct::ipv6, ns_t_a, ns_t_aaaa, ns_t_ptr, SPF_dns_rr_t::num_rr, SPF_dns_rr_data_t::ptr, SPF_dns_rr_t::rr, SPF_ASSERT_NOTNULL, SPF_dns_lookup(), SPF_dns_rlookup(), SPF_dns_rlookup6(), SPF_dns_rr_free(), and SPF_MAX_DNS_PTR.

Referenced by SPF_request_get_client_dom().

Here is the call graph for this function:

SPF_dns_rr_t* SPF_dns_lookup ( SPF_dns_server_t spf_dns_server,
const char *  domain,
ns_type  rr_type,
int  should_cache 
)

Definition at line 133 of file spf_dns.c.

References SPF_dns_server_struct::lookup, NULL, SPF_ASSERT_NOTNULL, and SPF_error.

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

SPF_dns_rr_t* SPF_dns_rlookup ( SPF_dns_server_t spf_dns_server,
struct in_addr  ipv4,
ns_type  rr_type,
int  should_cache 
)

Definition at line 150 of file spf_dns.c.

References SPF_dns_lookup().

Referenced by main(), SPF_dns_get_client_dom(), and SPF_record_interpret().

Here is the call graph for this function:

SPF_dns_rr_t* SPF_dns_rlookup6 ( SPF_dns_server_t spf_dns_server,
struct in6_addr  ipv6,
ns_type  rr_type,
int  should_cache 
)

Definition at line 171 of file spf_dns.c.

References SPF_dns_lookup().

Referenced by SPF_dns_get_client_dom(), and SPF_record_interpret().

Here is the call graph for this function:


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