spfquery.c File Reference

#include "libreplace/win32_config.h"
#include "libreplace/getopt.h"
#include "spf.h"
#include "spf_dns.h"
#include "spf_dns_null.h"
#include "spf_dns_test.h"
#include "spf_dns_cache.h"
#include "spf_dns_resolv.h"

Include dependency graph for spfquery.c:

Go to the source code of this file.

Data Structures

struct  SPF_client_options_t
struct  SPF_client_request_t

Defines

#define SPF_TEST_VERSION   "3.0"
#define TRUE   1
#define FALSE   0
#define FREE(x, f)   do { if ((x)) (f)((x)); (x) = NULL; } while(0)
#define FREE_REQUEST(x)   FREE((x), SPF_request_free)
#define FREE_RESPONSE(x)   FREE((x), SPF_response_free)
#define CONTINUE_ERROR   do { res = 255; continue; } while(0)
#define WARN_ERROR   do { res = 255; } while(0)
#define FAIL_ERROR   do { res = 255; goto error; } while(0)
#define RESIZE_RESULT(n)
#define APPEND_RESULT(n)
#define X_OR_EMPTY(x)   ((x) ? (x) : "")

Functions

int main (int argc, char *argv[])


Define Documentation

#define APPEND_RESULT (  ) 

Value:

do {         partial_result = SPF_strresult(n);         RESIZE_RESULT(strlen(partial_result));         strcat(result, partial_result); } while(0)

Definition at line 136 of file spfquery.c.

Referenced by main().

#define CONTINUE_ERROR   do { res = 255; continue; } while(0)

Definition at line 121 of file spfquery.c.

Referenced by main().

#define FAIL_ERROR   do { res = 255; goto error; } while(0)

Definition at line 123 of file spfquery.c.

Referenced by main().

#define FALSE   0

Definition at line 115 of file spfquery.c.

#define FREE ( x,
 )     do { if ((x)) (f)((x)); (x) = NULL; } while(0)

Definition at line 117 of file spfquery.c.

#define FREE_REQUEST (  )     FREE((x), SPF_request_free)

Definition at line 118 of file spfquery.c.

#define FREE_RESPONSE (  )     FREE((x), SPF_response_free)

Definition at line 119 of file spfquery.c.

#define RESIZE_RESULT (  ) 

Value:

do {         if (result == NULL) {                 result_len = 256 + n;                 result = malloc(result_len);                 result[0] = '\0';         }         else if (strlen(result) + n >= result_len) {                 result_len = result_len + (result_len >> 1) + 8 + n;                 result = realloc(result, result_len);         } } while(0)

Definition at line 125 of file spfquery.c.

#define SPF_TEST_VERSION   "3.0"

Definition at line 47 of file spfquery.c.

Referenced by main().

#define TRUE   1

Definition at line 114 of file spfquery.c.

#define WARN_ERROR   do { res = 255; } while(0)

Definition at line 122 of file spfquery.c.

Referenced by main().

#define X_OR_EMPTY (  )     ((x) ? (x) : "")

Definition at line 142 of file spfquery.c.

Referenced by main().


Function Documentation

int main ( int  argc,
char *  argv[] 
)

Definition at line 332 of file spfquery.c.

References APPEND_RESULT, CONTINUE_ERROR, SPF_client_options_t::debug, SPF_client_options_t::explanation, FAIL_ERROR, SPF_client_options_t::fallback, FALSE, FREE, FREE_REQUEST, FREE_RESPONSE, getopt_long_only(), SPF_client_request_t::helo, SPF_client_request_t::ip, SPF_client_options_t::localpolicy, SPF_client_options_t::max_lookup, NULL, optarg, optind, SPF_client_request_t::rcpt_to, SPF_client_options_t::rec_dom, SPF_client_options_t::sanitize, SPF_client_request_t::sender, SPF_DNS_CACHE, SPF_get_lib_version(), SPF_LIB_VERSION_MAJOR, SPF_LIB_VERSION_MINOR, SPF_LIB_VERSION_PATCH, SPF_request_new(), SPF_request_query_fallback(), SPF_request_query_mailfrom(), SPF_request_query_rcptto(), SPF_request_set_env_from(), SPF_request_set_helo_dom(), SPF_request_set_ipv4_str(), SPF_request_set_ipv6_str(), SPF_response_combine(), SPF_response_get_header_comment(), SPF_response_get_received_spf(), SPF_response_get_smtp_comment(), SPF_response_result(), SPF_RESULT_PASS, SPF_server_free(), SPF_server_new(), SPF_server_set_explanation(), SPF_server_set_localpolicy(), SPF_server_set_rec_dom(), SPF_server_set_sanitize(), SPF_TEST_VERSION, TRUE, usage(), SPF_client_options_t::use_trusted, WARN_ERROR, and X_OR_EMPTY.

Here is the call graph for this function:


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