main.c File Reference

#include "../../config.h"
#include "main.h"
#include "util.h"
#include "dns.h"
#include "macro.h"

Include dependency graph for main.c:

Include dependency graph

Go to the source code of this file.

Functions

SPF_BOOL _SPF_clear_holdbufs (peer_info_t *)
peer_info_tSPF_init (const char *local, const char *rip, const char *expl, const char *tf, const char *guess, u_int32_t use_trust, u_int32_t use_guess)
peer_info_tSPF_close (peer_info_t *p)
SPF_RESULT SPF_policy_main (peer_info_t *p)
SPF_RESULT SPF_policy_main_rec (peer_info_t *p)
SPF_BOOL SPF_parse_policy (peer_info_t *p, const char *policy)
char * SPF_result (peer_info_t *p)
char * SPF_get_explain (peer_info_t *p)
char * SPF_build_header (peer_info_t *p)
SPF_BOOL SPF_smtp_helo (peer_info_t *p, const char *s)
SPF_BOOL SPF_smtp_from (peer_info_t *p, const char *s)

Variables

spf_config_t confg
int h_errno


Function Documentation

SPF_BOOL _SPF_clear_holdbufs peer_info_t  )  [static]
 

Definition at line 1564 of file main.c.

References peer_info_s::cname_buf, peer_info_s::include_buf, peer_info_t, peer_info_s::redirect_buf, SPF_BOOL, SPF_FALSE, SPF_TRUE, xepprintf, and xfree.

Referenced by SPF_policy_main().

char* SPF_build_header peer_info_t p  ) 
 

Definition at line 1342 of file main.c.

References peer_info_s::current_domain, peer_info_s::error, peer_info_s::from, peer_info_s::last_m, peer_info_s::mta_hname, peer_info_t, peer_info_s::r_ip, peer_info_s::RES, SPF_ERROR, SPF_H_FAIL, SPF_MAX_HEADER, SPF_NEUTRAL, SPF_NONE, SPF_PASS, peer_info_s::spf_result, SPF_S_FAIL, SPF_UNKNOWN, SPF_UNMECH, xmalloc, and xvprintf.

peer_info_t* SPF_close peer_info_t p  ) 
 

Definition at line 313 of file main.c.

References peer_info_s::cur_eaddr, peer_info_s::current_domain, peer_info_s::explain, peer_info_s::from, peer_info_s::guess, peer_info_s::helo, peer_info_s::mta_hname, peer_info_t, peer_info_s::ptr_mhost, peer_info_s::r_ip, peer_info_s::r_vhname, peer_info_s::trusted, xepprintf, and xfree.

Referenced by SPF_init().

char* SPF_get_explain peer_info_t p  ) 
 

Definition at line 1310 of file main.c.

References peer_info_s::explain, MACRO_expand(), peer_info_t, SPF_EXPLAIN, and xprintf.

Here is the call graph for this function:

peer_info_t* SPF_init const char *  local,
const char *  rip,
const char *  expl,
const char *  tf,
const char *  guess,
u_int32_t  use_trust,
u_int32_t  use_guess
 

Definition at line 81 of file main.c.

References peer_info_s::addr, peer_info_s::ALL, peer_info_s::cur_eaddr, peer_info_s::current_domain, peer_info_s::ehlo, peer_info_s::explain, peer_info_s::from, peer_info_s::guess, HDR_ERROR, HDR_H_FAIL, HDR_NEUTRAL, HDR_NONE, HDR_PASS, HDR_S_FAIL, HDR_UNKNOWN, HDR_UNMECH, peer_info_s::helo, HR_ERROR, HR_H_FAIL, HR_NEUTRAL, HR_NONE, HR_PASS, HR_S_FAIL, HR_UNKNOWN, HR_UNMECH, peer_info_s::ip_ver, peer_info_s::mta_hname, peer_info_s::p, peer_info_t, peer_info_s::ptr_mhost, peer_info_s::r_ip, peer_info_s::r_vhname, SIZEOF, SPF_close(), SPF_ERROR, SPF_FALSE, SPF_GUESS, SPF_H_FAIL, SPF_MAX_DATETIME, SPF_MAX_IP_ADDR, SPF_MAX_LOCAL_PART, SPF_NEUTRAL, SPF_NONE, SPF_PASS, peer_info_s::spf_result, peer_info_s::spf_rlevel, SPF_S_FAIL, SPF_TRUE, SPF_TRUSTED, SPF_UNKNOWN, SPF_UNMECH, peer_info_s::spf_ver, peer_info_s::trusted, peer_info_s::use_guess, peer_info_s::use_trust, peer_info_s::utc_time, UTIL_assoc_prefix(), xepprintf, xfree, xmalloc, xprintf, xstrndup, and xvprintf.

Here is the call graph for this function:

SPF_BOOL SPF_parse_policy peer_info_t p,
const char *  policy
 

Definition at line 721 of file main.c.

References A, policy_addr_s::addr, peer_info_s::addr, ALL, peer_info_s::ALL, peer_info_s::current_domain, DEFAULT, DNS_query(), peer_info_s::error, EXISTS, EXPLAIN, peer_info_s::explain, INCLUDE, peer_info_s::include_buf, IP4, IP6, peer_info_s::last_m, MACRO_expand(), MX, NO_POLICY, peer_info_t, policy_addr_t, PTR, peer_info_s::r_ip, REDIRECT, peer_info_s::redirect_buf, peer_info_s::RES, peer_info_s::RES_P, SPF_BOOL, SPF_FALSE, SPF_H_FAIL, SPF_MAX_ERROR, SPF_MAX_MECHANISM, SPF_MAX_RECURSE, SPF_MAX_STR, SPF_MECHANISM, SPF_NEUTRAL, SPF_NONE, SPF_PASS, SPF_RESULT, peer_info_s::spf_result, peer_info_s::spf_rlevel, SPF_S_FAIL, SPF_TRUE, SPF_UNKNOWN, SPF_UNMECH, peer_info_s::spf_ver, SPF_VERSION, UNMECH, UTIL_a_cmp(), UTIL_assoc_prefix(), UTIL_cidr_cmp(), UTIL_expand_ip(), UTIL_get_mech_prefix(), UTIL_get_policy_mech(), UTIL_index(), UTIL_is_macro(), UTIL_is_spf_result(), UTIL_mx_cmp(), UTIL_ptr_cmp(), VERSION, xepprintf, xfree, xpprintf, xprintf, xstrndup, and xvprintf.

Referenced by SPF_policy_main_rec().

Here is the call graph for this function:

SPF_RESULT SPF_policy_main peer_info_t p  ) 
 

Definition at line 399 of file main.c.

References _SPF_clear_holdbufs(), peer_info_s::cname_buf, peer_info_s::current_domain, peer_info_s::include_buf, peer_info_t, peer_info_s::redirect_buf, SPF_MAX_RECURSE, SPF_NONE, SPF_PASS, SPF_policy_main_rec(), SPF_RESULT, peer_info_s::spf_rlevel, SPF_UNKNOWN, UTIL_assoc_prefix(), xepprintf, xpprintf, and xvprintf.

Here is the call graph for this function:

SPF_RESULT SPF_policy_main_rec peer_info_t p  ) 
 

Definition at line 570 of file main.c.

References peer_info_s::addr, peer_info_s::cname_buf, peer_info_s::current_domain, DNS_query(), peer_info_s::guess, peer_info_s::include_buf, peer_info_s::last_m, peer_info_t, peer_info_s::redirect_buf, peer_info_s::RES, peer_info_s::rs, SPF_ERROR, SPF_NEUTRAL, SPF_parse_policy(), SPF_PASS, SPF_RESULT, SPF_TRUE, peer_info_s::trusted, peer_info_s::use_guess, peer_info_s::use_trust, UTIL_assoc_prefix(), UTIL_log_result(), xepprintf, xfree, xpprintf, xprintf, and xvprintf.

Referenced by SPF_policy_main().

Here is the call graph for this function:

char* SPF_result peer_info_t p  ) 
 

Definition at line 1249 of file main.c.

References peer_info_s::from, peer_info_t, peer_info_s::r_ip, peer_info_s::RES, RES_ERROR, RES_H_FAIL, RES_NEUTRAL, RES_NONE, RES_PASS, RES_S_FAIL, RES_UNKNOWN, RES_UNMECH, SPF_ERROR, SPF_H_FAIL, SPF_MAX_HEADER, SPF_MAX_SMTP_RES, SPF_NEUTRAL, SPF_NONE, SPF_PASS, SPF_S_FAIL, SPF_UNKNOWN, SPF_UNMECH, xmalloc, and xprintf.

SPF_BOOL SPF_smtp_from peer_info_t p,
const char *  s
 

Definition at line 1456 of file main.c.

References peer_info_s::current_domain, peer_info_s::from, peer_info_s::helo, peer_info_s::local_part, peer_info_t, SPF_BOOL, SPF_FALSE, SPF_MAX_ENV_HELO, SPF_MAX_LOCAL_PART, SPF_MAX_STR, SPF_TRUE, xfree, xprintf, xstrndup, and xvprintf.

SPF_BOOL SPF_smtp_helo peer_info_t p,
const char *  s
 

Definition at line 1423 of file main.c.

References peer_info_s::ehlo, peer_info_s::helo, peer_info_t, SPF_BOOL, xfree, xprintf, and xstrdup.


Variable Documentation

spf_config_t confg
 

Definition at line 57 of file main.c.

Referenced by _pprintf_dbg(), and _printf_dbg().

int h_errno
 

Definition at line 59 of file main.c.

Referenced by DNS_cname_answer(), DNS_mx_answer(), DNS_ptr_answer(), DNS_query(), and DNS_txt_answer().


Generated on Thu Sep 16 18:10:49 2004 for libSPF v1.0 by doxygen 1.3.8