libSPF v1.0: main.h File Reference

Main Page | Data Structures | File List | Data Fields | Globals | Search for

# main.h File Reference

`#include <stdio.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include <stdarg.h>`
`#include "../../config.h"`
`#include "spf.h"`

Include dependency graph for main.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Defines
#define | _MAIN_H 1
#define | FL_A 2
#define | FL_B 4
#define | FL_C 8
#define | FL_D 16
#define | FL_E 32
#define | FL_F 64
#define | FL_G 128
#define | SPF_MAX_RECURSE 20
#define | RES_PASS "domain of %s designates %s as permitted sender\r\n"
#define | RES_NONE
#define | RES_S_FAIL
#define | RES_H_FAIL
#define | RES_ERROR
#define | RES_NEUTRAL
#define | RES_UNKNOWN "error in processing during lookup of %s\r\n"
#define | RES_UNMECH
#define | HDR_PASS
#define | HDR_NONE
#define | HDR_S_FAIL
#define | HDR_H_FAIL
#define | HDR_ERROR
#define | HDR_NEUTRAL
#define | HDR_UNKNOWN
#define | HDR_UNMECH
## Functions
peer_info_t * | SPF_init (const char *, const char *, const char *, const char *, const char *, u_int32_t, u_int32_t)
peer_info_t * | SPF_close (peer_info_t *)
SPF_RESULT | SPF_policy_main (peer_info_t *)
SPF_RESULT | SPF_policy_main_rec (peer_info_t *)
SPF_BOOL | SPF_parse_policy (peer_info_t *, const char *)
char * | SPF_result (peer_info_t *)
SPF_BOOL | SPF_smtp_from (peer_info_t *, const char *)
SPF_BOOL | SPF_smtp_helo (peer_info_t *, const char *)
char * | SPF_build_header (peer_info_t *)
char * | SPF_get_explain (peer_info_t *)

## Define Documentation

#define _MAIN_H 1

| Definition at line 47 of file main.h.

#define FL_A 2

| Definition at line 70 of file main.h.

#define FL_B 4

| Definition at line 71 of file main.h.

#define FL_C 8

| Definition at line 72 of file main.h.

#define FL_D 16

| Definition at line 73 of file main.h. Referenced by _pprintf_dbg().

#define FL_E 32

| Definition at line 74 of file main.h. Referenced by _printf_dbg().

#define FL_F 64

| Definition at line 75 of file main.h. Referenced by _pprintf_dbg().

#define FL_G 128

| Definition at line 76 of file main.h.

#define HDR_ERROR

| Value:
    "Received-SPF: error (%s: error in processing " \
                        "during lookup of %s: %s)"
Definition at line 114 of file main.h. Referenced by SPF_init().

#define HDR_H_FAIL

| Value:
    "Received-SPF: fail (%s: domain of %s does not " \
                        "designate %s as permitted sender) receiver=%s; " \
                        "client_ip=%s; envelope-from=%s;"
Definition at line 110 of file main.h. Referenced by SPF_init().

#define HDR_NEUTRAL

| Value:
    "Received-SPF: neutral (%s: domain of %s is " \
                        "neutral about designating %s as permitted sender)"
Definition at line 117 of file main.h. Referenced by SPF_init().

#define HDR_NONE

| Value:
    "Received-SPF: none (%s: domain of %s does not " \
                        "designate permitted sender hosts)"
Definition at line 102 of file main.h. Referenced by SPF_init().

#define HDR_PASS

| Value:
    "Received-SPF: pass (%s: domain of %s designates " \
                        "%s as permitted sender) receiver=%s; client_ip=%s; " \
                        "envelope-from=%s;"
Definition at line 98 of file main.h. Referenced by SPF_init().

#define HDR_S_FAIL

| Value:
    "Received-SPF: softfail (%s: domain of " \
                        "transitioning %s does not designate %s as " \
                        "permitted sender) receiver=%s; client_ip=%s; " \
                        "envelope-from=%s;"
Definition at line 105 of file main.h. Referenced by SPF_init().

#define HDR_UNKNOWN

| Value:
    "Received-SPF: unknown (%s: domain of %s " \
                        "encountered an error while parsing (check SPF " \
                        "record %s for errors))"
Definition at line 120 of file main.h. Referenced by SPF_init().

#define HDR_UNMECH

| Value:
    "Received-SPF: unknown -extension:%s (%s: domain of " \
                        "%s uses a mechanism not recognized by this client)"
Definition at line 124 of file main.h. Referenced by SPF_init().

#define RES_ERROR

| Value:
    "encountered temporary error during SPF processing " \
                        "of %s\r\n"
Definition at line 89 of file main.h. Referenced by SPF_result().

#define RES_H_FAIL

| Value:
    "domain of %s does not designate %s as permitted " \
                        "sender\r\n"
Definition at line 87 of file main.h. Referenced by SPF_result().

#define RES_NEUTRAL

| Value:
    "%s is neither permitted nor denied by domain of " \
                        "%s\r\n"
Definition at line 91 of file main.h. Referenced by SPF_result().

#define RES_NONE

| Value:
    "domain of %s does not designate permitted sender " \
                        "hosts\r\n"
Definition at line 83 of file main.h. Referenced by SPF_result().

#define RES_PASS "domain of %s designates %s as permitted sender\r\n"

| Definition at line 82 of file main.h. Referenced by SPF_result().

#define RES_S_FAIL

| Value:
    "transitioning domain of %s does not designate %s " \
                        "as permitted sender\r\n"
Definition at line 85 of file main.h. Referenced by SPF_result().

#define RES_UNKNOWN "error in processing during lookup of %s\r\n"

| Definition at line 93 of file main.h. Referenced by SPF_result().

#define RES_UNMECH

| Value:
    "encountered unrecognized mechanism during SPF " \
                        "processing of domain of %s\r\n"
Definition at line 94 of file main.h. Referenced by SPF_result().

#define SPF_MAX_RECURSE 20

| Definition at line 79 of file main.h. Referenced by SPF_parse_policy(), and SPF_policy_main().

## Function Documentation

char* SPF_build_header | ( | peer_info_t * |  | ) |

| Definition at line 1342 of file main.c.

peer_info_t* SPF_close | ( | peer_info_t * |  | ) |

| Definition at line 313 of file main.c.

char* SPF_get_explain | ( | peer_info_t * |  | ) |

| Definition at line 1310 of file main.c.

peer_info_t* SPF_init | ( | const char * | ,
|  | const char * | ,
|  | const char * | ,
|  | const char * | ,
|  | const char * | ,
|  | u_int32_t | ,
|  | u_int32_t |
| ) |

| Definition at line 81 of file main.c.

SPF_BOOL SPF_parse_policy | ( | peer_info_t * | ,
|  | const char * |
| ) |

| Definition at line 721 of file main.c.

SPF_RESULT SPF_policy_main | ( | peer_info_t * |  | ) |

| Definition at line 399 of file main.c.

SPF_RESULT SPF_policy_main_rec | ( | peer_info_t * |  | ) |

| Definition at line 570 of file main.c.

char* SPF_result | ( | peer_info_t * |  | ) |

| Definition at line 1249 of file main.c.

SPF_BOOL SPF_smtp_from | ( | peer_info_t * | ,
|  | const char * |
| ) |

| Definition at line 1456 of file main.c.

SPF_BOOL SPF_smtp_helo | ( | peer_info_t * | ,
|  | const char * |
| ) |

| Definition at line 1423 of file main.c.