#include "util.h"
#include "dns.h"
Include dependency graph for util.c:
Go to the source code of this file.
Functions | |
void | _pprintf_dbg (u_int8_t level, const char *func, const char *file, const size_t line, const char *s) |
void | _printf_dbg (u_int8_t level, const char *func, const char *file, const size_t line, const char *format,...) |
void | _dummy_debug (const u_int8_t level, const char *func, const char *file, const size_t line, const char *format,...) |
void | _dummy_pdebug (const u_int8_t level, const char *func, const char *file, const size_t line, const char *s) |
char * | UTIL_get_date (void) |
void | UTIL_log_result (peer_info_t *p) |
char * | UTIL_strndup (const char *s, const size_t n) |
char * | UTIL_strdup (const char *s) |
void * | UTIL_malloc (const int32_t n, const char *file, int32_t line, const char *func) |
void * | UTIL_realloc (void *p, const int32_t n, const char *file, const int32_t line, const char *func) |
void | UTIL_free (void *p, const char *file, const int32_t line, const char *func) |
int16_t | UTIL_index (const char *s, const char c) |
char * | UTIL_split_str (const char *s, const char c, const u_int8_t num) |
char * | UTIL_split_strr (const char *s, const char c, const u_int8_t num) |
u_int8_t | UTIL_count_delim (const char *s, const char c) |
SPF_BOOL | UTIL_is_spf_delim (const char c) |
SPF_BOOL | UTIL_is_spf_result (const char c) |
SPF_BOOL | UTIL_is_macro (const char *s) |
SPF_BOOL | UTIL_mx_cmp (peer_info_t *p, const char *s, const int8_t cidr) |
SPF_BOOL | UTIL_a_cmp (peer_info_t *p, const char *s, const int8_t cidr) |
SPF_BOOL | UTIL_ptr_cmp (peer_info_t *p, const char *s) |
SPF_MECHANISM | UTIL_get_policy_mech (const char *s) |
SPF_BOOL | UTIL_assoc_prefix (peer_info_t *p, SPF_RESULT res, const char *s) |
SPF_RESULT | UTIL_get_mech_prefix (peer_info_t *p, const char *s) |
policy_addr_t * | UTIL_expand_ip (const char *s) |
SPF_BOOL | UTIL_is_ip (const char *id) |
char * | UTIL_rev_addr (const char *s) |
char * | UTIL_get_dname (const char *s) |
SPF_BOOL | UTIL_cidr_cmp (const policy_addr_t *policy_addr, const struct in_addr *peer_addr) |
SPF_BOOL | UTIL_validate_ptr (peer_info_t *p) |
SPF_BOOL | UTIL_validate_hostname (peer_info_t *p, const char *s, const int8_t cidr) |
char * | UTIL_url_encode (const char *s) |
char * | UTIL_reverse (const char *s, const char delim) |
SPF_BOOL | UTIL_addnode (split_str_t *master, const char *s, SPF_BOOL last) |
void | _UTIL_pthread_mutex (void *mutex, SPF_BOOL action) |
Variables | |
void * | util_mutex |
int | errno |
|
|
|
Definition at line 97 of file util.c. References confg, f_bit_set, FL_D, FL_F, spf_config_s::level, SPF_MAX_DEBUG, xfree, and xmalloc. |
|
Definition at line 154 of file util.c. References confg, DEBUG_LOG_FILE, f_bit_set, FL_E, spf_config_s::level, SPF_MAX_DEBUG, util_mutex, xmalloc, xpthread_mutex_lock, and xpthread_mutex_unlock. |
|
|
Definition at line 980 of file util.c. References peer_info_s::addr, peer_info_s::current_domain, peer_info_t, policy_addr_t, SIZEOF, SPF_BOOL, SPF_FALSE, SPF_MAX_GHBNR_DBUF, SPF_MAX_HNAME, SPF_PASS, SPF_TRUE, UTIL_assoc_prefix(), UTIL_cidr_cmp(), UTIL_index(), xepprintf, xeprintf, xfree, xgethostbyname, xgethostbyname_free, xmalloc, xstrndup, and xvprintf. Referenced by SPF_parse_policy(). Here is the call graph for this function: ![]() |
|
Definition at line 2421 of file util.c. References split_str_s::elements, split_str_s::head, split_str_node_s::len, split_str_node_s::next, split_str_node_s::s, SIZEOF, SPF_BOOL, SPF_FALSE, SPF_TRUE, split_str_node_t, split_str_t, split_str_s::tail, xepprintf, xmalloc, xpprintf, and xvprintf. Referenced by UTIL_reverse(). |
|
Definition at line 1309 of file util.c. References peer_info_s::error, peer_info_s::last_m, peer_info_t, peer_info_s::RES, peer_info_s::rs, spf_result_t::s, SPF_BOOL, SPF_ERROR, SPF_FALSE, SPF_H_FAIL, SPF_MAX_ERROR, SPF_NEUTRAL, SPF_NONE, SPF_PASS, SPF_RESULT, peer_info_s::spf_result, SPF_S_FAIL, SPF_TRUE, SPF_UNKNOWN, SPF_UNMECH, UTIL_index(), xepprintf, and xvprintf. Referenced by DNS_query(), SPF_init(), SPF_parse_policy(), SPF_policy_main(), SPF_policy_main_rec(), UTIL_a_cmp(), UTIL_mx_cmp(), and UTIL_validate_hostname(). Here is the call graph for this function: ![]() |
|
Definition at line 1961 of file util.c. References policy_addr_s::addr, policy_addr_s::cidr, policy_addr_t, SPF_BOOL, SPF_FALSE, SPF_MAX_IP_ADDR, SPF_TRUE, xepprintf, xfree, xstrndup, and xvprintf. Referenced by SPF_parse_policy(), UTIL_a_cmp(), and UTIL_validate_hostname(). |
|
Definition at line 751 of file util.c. References SPF_MAX_DELIM, xepprintf, and xvprintf. Referenced by MACRO_eatmore(), and UTIL_get_dname(). |
|
Definition at line 1694 of file util.c. References policy_addr_s::addr, policy_addr_s::cidr, policy_addr_t, SIZEOF, UTIL_index(), xepprintf, xfree, xmalloc, xstrndup, and xvprintf. Referenced by SPF_parse_policy(). Here is the call graph for this function: ![]() |
|
Definition at line 522 of file util.c. References xvprintf. |
|
Definition at line 282 of file util.c. References SPF_MAX_DATETIME, util_mutex, xmalloc, xpthread_mutex_lock, and xpthread_mutex_unlock. Referenced by UTIL_log_result(). |
|
Definition at line 1906 of file util.c. References UTIL_count_delim(), UTIL_split_str(), xepprintf, xprintf, xstrndup, and xvprintf. Here is the call graph for this function: ![]() |
|
Definition at line 1555 of file util.c. References peer_info_s::ALL, peer_info_s::last_m, peer_info_t, peer_info_s::RES_P, SPF_ERROR, SPF_H_FAIL, SPF_MAX_HNAME, SPF_NEUTRAL, SPF_PASS, SPF_RESULT, SPF_S_FAIL, SPF_TRUE, UTIL_index(), xepprintf, xprintf, and xvprintf. Referenced by SPF_parse_policy(). Here is the call graph for this function: ![]() |
|
Definition at line 1198 of file util.c. References A, ALL, DEFAULT, EXISTS, EXPLAIN, INCLUDE, IP4, IP6, MX, NO_POLICY, PTR, REDIRECT, SPF_MECHANISM, UNMECH, VERSION, xepprintf, xpprintf, and xvprintf. Referenced by SPF_parse_policy(). |
|
Definition at line 564 of file util.c. References xepprintf, xpprintf, and xvprintf. Referenced by MACRO_expand(), SPF_parse_policy(), UTIL_a_cmp(), UTIL_assoc_prefix(), UTIL_expand_ip(), and UTIL_get_mech_prefix(). |
|
Definition at line 1793 of file util.c. References SPF_BOOL, SPF_FALSE, SPF_TRUE, xepprintf, xpprintf, and xvprintf. |
|
Definition at line 869 of file util.c. References SPF_BOOL, SPF_FALSE, SPF_TRUE, xepprintf, xpprintf, and xvprintf. Referenced by SPF_parse_policy(). |
|
Definition at line 790 of file util.c. References SPF_BOOL, SPF_FALSE, SPF_TRUE, xepprintf, xpprintf, and xvprintf. Referenced by MACRO_eatmore(). |
|
Definition at line 832 of file util.c. References SPF_BOOL, SPF_FALSE, SPF_TRUE, xpprintf, and xvprintf. Referenced by SPF_parse_policy(). |
|
Definition at line 326 of file util.c. References peer_info_s::error, peer_info_s::from, OUTPUT_LOG_FILE, peer_info_t, peer_info_s::r_ip, peer_info_s::RES, SPF_MAX_DEBUG, peer_info_s::spf_result, peer_info_s::spf_rlevel, peer_info_s::spf_ver, SPF_VERSION, UTIL_get_date(), util_mutex, xfree, xmalloc, xpthread_mutex_lock, and xpthread_mutex_unlock. Referenced by SPF_policy_main_rec(). Here is the call graph for this function: ![]() |
|
Definition at line 447 of file util.c. References xvprintf. Referenced by UTIL_realloc(). |
|
Definition at line 914 of file util.c. References peer_info_s::addr, DNS_query(), peer_info_s::from, peer_info_t, SPF_BOOL, SPF_FALSE, SPF_PASS, SPF_TRUE, UTIL_assoc_prefix(), UTIL_validate_hostname(), xfree, xpprintf, xstrndup, and xvprintf. Referenced by SPF_parse_policy(). Here is the call graph for this function: ![]() |
|
Definition at line 1135 of file util.c. References peer_info_s::current_domain, DNS_query(), peer_info_s::error, peer_info_t, peer_info_s::r_ip, peer_info_s::rs, SPF_BOOL, SPF_FALSE, SPF_MAX_HNAME, SPF_TRUE, UTIL_rev_addr(), xepprintf, xfree, xstrndup, and xvprintf. Referenced by SPF_parse_policy(). Here is the call graph for this function: ![]() |
|
Definition at line 486 of file util.c. References UTIL_malloc(), and xvprintf. Here is the call graph for this function: ![]() |
|
Definition at line 1843 of file util.c. References xepprintf, xfree, xmalloc, xprintf, xstrndup, and xvprintf. Referenced by DNS_check_client_reverse(), UTIL_ptr_cmp(), and UTIL_validate_ptr(). |
|
Definition at line 2331 of file util.c. References split_str_s::elements, split_str_s::head, split_str_node_s::len, split_str_node_s::next, split_str_node_s::s, SIZEOF, SPF_FALSE, SPF_TRUE, split_str_node_t, split_str_t, split_str_s::tail, UTIL_addnode(), xepprintf, xfree, xmalloc, xstrndup, and xvprintf. Referenced by MACRO_eatmore(). Here is the call graph for this function: ![]() |
|
Definition at line 615 of file util.c. References SPF_MAX_STR, xepprintf, xfree, xstrndup, and xvprintf. Referenced by UTIL_get_dname(). |
|
Definition at line 684 of file util.c. References xepprintf, xstrdup, and xvprintf. Referenced by MACRO_eatmore(). |
|
|
|
Definition at line 2272 of file util.c. References urlchr_test, xepprintf, xmalloc, and xvprintf. |
|
Definition at line 2100 of file util.c. References peer_info_s::addr, peer_info_t, policy_addr_t, peer_info_s::r_ip, SIZEOF, SPF_BOOL, SPF_FALSE, SPF_MAX_GHBNR_DBUF, SPF_MAX_IP_ADDR, SPF_PASS, SPF_TRUE, UTIL_assoc_prefix(), UTIL_cidr_cmp(), xepprintf, xfree, xgethostbyname, xgethostbyname_free, xmalloc, xpprintf, xstrndup, and xvprintf. Referenced by DNS_check_client_reverse(), DNS_ptr_answer(), and UTIL_mx_cmp(). Here is the call graph for this function: ![]() |
|
Definition at line 2038 of file util.c. References peer_info_s::current_domain, DNS_query(), peer_info_s::error, peer_info_t, peer_info_s::r_ip, peer_info_s::r_vhname, peer_info_s::rs, SPF_BOOL, SPF_FALSE, SPF_MAX_HNAME, SPF_TRUE, UTIL_rev_addr(), xepprintf, xfree, xstrndup, and xvprintf. Here is the call graph for this function: ![]() |
|
|
|
Definition at line 66 of file util.c. Referenced by _printf_dbg(), UTIL_get_date(), and UTIL_log_result(). |