#include <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"
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 | _GNU_SOURCE |
#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 _GNU_SOURCE |
Definition at line 89 of file spfquery.c.
#define APPEND_RESULT | ( | n | ) |
do { \ partial_result = SPF_strresult(n); \ RESIZE_RESULT(strlen(partial_result)); \ strcat(result, partial_result); \ } while(0)
Definition at line 131 of file spfquery.c.
Referenced by main().
#define CONTINUE_ERROR do { res = 255; continue; } while(0) |
Definition at line 116 of file spfquery.c.
#define FAIL_ERROR do { res = 255; goto error; } while(0) |
Definition at line 118 of file spfquery.c.
#define FALSE 0 |
Definition at line 110 of file spfquery.c.
#define FREE | ( | x, | ||
f | ||||
) | do { if ((x)) (f)((x)); (x) = NULL; } while(0) |
Definition at line 112 of file spfquery.c.
Referenced by main().
#define FREE_REQUEST | ( | x | ) | FREE((x), SPF_request_free) |
Definition at line 113 of file spfquery.c.
Referenced by main().
#define FREE_RESPONSE | ( | x | ) | FREE((x), SPF_response_free) |
Definition at line 114 of file spfquery.c.
Referenced by main().
#define RESIZE_RESULT | ( | n | ) |
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 120 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 109 of file spfquery.c.
Referenced by main().
#define WARN_ERROR do { res = 255; } while(0) |
Definition at line 117 of file spfquery.c.
#define X_OR_EMPTY | ( | x | ) | ((x) ? (x) : "") |
Definition at line 137 of file spfquery.c.
Referenced by main().
int main | ( | int | argc, | |
char * | argv[] | |||
) |
Definition at line 327 of file spfquery.c.
References APPEND_RESULT, SPF_client_options_t::debug, SPF_client_options_t::explanation, SPF_client_options_t::fallback, FREE, FREE_REQUEST, FREE_RESPONSE, SPF_client_request_t::helo, SPF_client_request_t::ip, SPF_client_options_t::localpolicy, SPF_client_options_t::max_lookup, NULL, 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, and X_OR_EMPTY.