main.c File Reference

#include "main.h"
#include "util.h"
#include "dns.h"
#include "macro.h"
#include "error.h"

Go to the source code of this file.

Functions

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 *peer_info)
SPF_RESULT SPF_policy_main (peer_info_t *peer_info)
SPF_RESULT SPF_policy_main_rec (peer_info_t *peer_info, int rec)
SPF_BOOL SPF_parse_policy (peer_info_t *peer_info, const char *policy)
char * SPF_result (peer_info_t *peer_info)
char * SPF_get_explain (peer_info_t *peer_info)
char * SPF_build_header (peer_info_t *peer_info)
SPF_BOOL SPF_smtp_helo (peer_info_t *peer_info, const char *s)
SPF_BOOL SPF_smtp_from (peer_info_t *peer_info, const char *s)

Variables

spf_config_t confg
u_int8_t spf_rlevel
int h_errno


Function Documentation

char* SPF_build_header peer_info_t peer_info  ) 
 

Definition at line 975 of file main.c.

References peer_info_s::cur_dom, peer_info_s::error, peer_info_s::from, peer_info_s::last_m, MAX_HEADER, peer_info_s::mta_hname, peer_info_s::r_ip, peer_info_s::RES, SPF_ERROR, SPF_H_FAIL, 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 peer_info  ) 
 

Definition at line 207 of file main.c.

References peer_info_s::cur_dom, peer_info_s::cur_eaddr, peer_info_s::explain, peer_info_s::from, peer_info_s::guess, peer_info_s::helo, peer_info_s::mta_hname, peer_info_s::ptr_mhost, peer_info_s::r_ip, peer_info_s::r_vhname, peer_info_s::trusted, xeprintf, and xfree.

Referenced by main().

char* SPF_get_explain peer_info_t peer_info  ) 
 

Definition at line 944 of file main.c.

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

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 69 of file main.c.

References peer_info_s::addr, peer_info_s::ALL, peer_info_s::cur_dom, peer_info_s::cur_eaddr, peer_info_s::ehlo, peer_info_s::error, peer_info_s::explain, FALSE, 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::last_m, peer_info_s::local_part, LOCAL_PART, MAX_ERROR, MAX_MECHANISM, 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, SPF_ERROR, SPF_GUESS, SPF_H_FAIL, SPF_NEUTRAL, SPF_NONE, SPF_PASS, peer_info_s::spf_result, SPF_S_FAIL, SPF_TRUSTED, SPF_UNKNOWN, SPF_UNMECH, peer_info_s::spf_ver, TRUE, peer_info_s::trusted, peer_info_s::use_guess, peer_info_s::use_trust, peer_info_s::utc_time, UTIL_assoc_prefix(), xeprintf, xfree, xmalloc, xprintf, xstrndup, and xvprintf.

Referenced by main().

SPF_BOOL SPF_parse_policy peer_info_t peer_info,
const char *  policy
 

Definition at line 375 of file main.c.

References A, policy_addr_s::addr, peer_info_s::addr, ALL, peer_info_s::ALL, peer_info_s::cur_dom, DEFAULT, DNS_query(), EXISTS, EXPLAIN, peer_info_s::explain, FALSE, INCLUDE, IP4, IP6, peer_info_s::last_m, MACRO_expand(), MAX_MECHANISM, MX, NO_POLICY, policy_addr_t, PTR, peer_info_s::r_ip, REDIRECT, peer_info_s::RES, peer_info_s::RES_P, SPF_BOOL, SPF_ERROR, SPF_H_FAIL, SPF_MECHANISM, SPF_NEUTRAL, SPF_NONE, SPF_PASS, SPF_policy_main(), SPF_RESULT, peer_info_s::spf_result, spf_rlevel, SPF_S_FAIL, SPF_UNKNOWN, SPF_UNMECH, peer_info_s::spf_ver, SPF_VERSION, TRUE, 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, xeprintf, xfree, xprintf, xstrndup, and xvprintf.

Referenced by SPF_policy_main_rec().

SPF_RESULT SPF_policy_main peer_info_t peer_info  ) 
 

Definition at line 247 of file main.c.

References SPF_policy_main_rec(), and SPF_RESULT.

Referenced by main(), and SPF_parse_policy().

SPF_RESULT SPF_policy_main_rec peer_info_t peer_info,
int  rec
 

Definition at line 268 of file main.c.

References peer_info_s::addr, peer_info_s::cur_dom, DNS_query(), peer_info_s::error, peer_info_s::explain, peer_info_s::guess, peer_info_s::last_m, MACRO_expand(), MAX_CNAME, MAX_ERROR, peer_info_s::RES, peer_info_s::rs, SPF_ERROR, SPF_EXPLAIN, SPF_NONE, SPF_parse_policy(), SPF_PASS, SPF_RECURSE, SPF_RESULT, spf_rlevel, SPF_UNKNOWN, TRUE, peer_info_s::trusted, peer_info_s::use_guess, peer_info_s::use_trust, UTIL_assoc_prefix(), UTIL_log_result(), xeprintf, xfree, xprintf, and xvprintf.

Referenced by SPF_policy_main().

char* SPF_result peer_info_t peer_info  ) 
 

Definition at line 886 of file main.c.

References peer_info_s::from, MAX_HEADER, MAX_SMTP_RES, 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_NEUTRAL, SPF_NONE, SPF_PASS, SPF_S_FAIL, SPF_UNKNOWN, SPF_UNMECH, xmalloc, and xprintf.

SPF_BOOL SPF_smtp_from peer_info_t peer_info,
const char *  s
 

Definition at line 1077 of file main.c.

References peer_info_s::cur_dom, FALSE, peer_info_s::from, peer_info_s::helo, LOCAL_PART, peer_info_s::local_part, SPF_BOOL, TRUE, xfree, xprintf, xstrdup, and xvprintf.

Referenced by main().

SPF_BOOL SPF_smtp_helo peer_info_t peer_info,
const char *  s
 

Definition at line 1043 of file main.c.

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

Referenced by main().


Variable Documentation

spf_config_t confg
 

Definition at line 51 of file main.c.

Referenced by _printf_dbg(), and main().

int h_errno
 

Definition at line 53 of file main.c.

Referenced by DNS_query().

u_int8_t spf_rlevel
 

Definition at line 52 of file main.c.

Referenced by SPF_parse_policy(), SPF_policy_main_rec(), UTIL_assoc_prefix(), UTIL_get_mech_prefix(), and UTIL_log_result().


Generated on Thu Jul 1 14:05:44 2004 for libspf v1.0 by doxygen 1.3.7