"Fossies" - the Fresh Open Source Software Archive 
Member "libspf2-1.2.10/src/include/spf_request.h" (28 Jan 2012, 3049 Bytes) of package /linux/privat/libspf2-1.2.10.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
For more information about "spf_request.h" see the
Fossies "Dox" file reference documentation.
1 /*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of either:
4 *
5 * a) The GNU Lesser General Public License as published by the Free
6 * Software Foundation; either version 2.1, or (at your option) any
7 * later version,
8 *
9 * OR
10 *
11 * b) The two-clause BSD license.
12 *
13 * These licenses can be found with the distribution in the file LICENSES
14 */
15
16 #ifndef INC_SPF_REQUEST
17 #define INC_SPF_REQUEST
18
19 typedef struct SPF_request_struct SPF_request_t;
20
21 #include "spf_server.h"
22
23 struct SPF_request_struct {
24 /* Structure variables */
25 SPF_server_t *spf_server; /* The server. */
26
27 /* Input client-end variables */
28 int client_ver; /* AF_INET/AF_INET6 */
29 struct in_addr ipv4; /* client (sending) MTA IP addr */
30 struct in6_addr ipv6; /* client (sending) MTA IP addr */
31 char *env_from; /* envelope-from/MAIL FROM: */
32 char *helo_dom; /* domain name from HELO cmd */
33 char *rcpt_to_dom; /* RCPT TO: domain for 2mx */
34
35 #if 0
36 /* Input server-end variables */
37 char *rec_dom; /* receiving MTA domain name */
38 #endif
39
40 /* Per-request configuration variables */
41 char use_local_policy;
42 char use_helo;
43
44 /* State/derived variables */
45 char *env_from_lp; /* Local part of env_from */
46 char *env_from_dp; /* Domain part of env_from */
47 char *client_dom; /* Verified domain from client IP */
48
49 /* I'm not sure whether this should be in here. */
50 const char *cur_dom; /* "current domain" of SPF spec */
51 };
52
53 SPF_request_t *SPF_request_new(SPF_server_t *spf_server);
54 void SPF_request_free(SPF_request_t *sr);
55 SPF_errcode_t SPF_request_set_ipv4(SPF_request_t *sr,
56 struct in_addr addr);
57 SPF_errcode_t SPF_request_set_ipv6(SPF_request_t *sr,
58 struct in6_addr addr);
59 SPF_errcode_t SPF_request_set_ipv4_str(SPF_request_t *sr,
60 const char *astr);
61 SPF_errcode_t SPF_request_set_ipv6_str(SPF_request_t *sr,
62 const char *astr);
63 SPF_errcode_t SPF_request_set_helo_dom(SPF_request_t *sr,
64 const char *dom);
65 int SPF_request_set_env_from(SPF_request_t *sr,
66 const char *from);
67 const char *SPF_request_get_rec_dom(SPF_request_t *sr);
68
69 const char *SPF_request_get_client_dom(SPF_request_t *sr);
70 int SPF_request_is_loopback(SPF_request_t *sr);
71
72 SPF_errcode_t SPF_request_query_mailfrom(SPF_request_t *spf_request,
73 SPF_response_t **spf_responsep);
74 SPF_errcode_t SPF_request_query_rcptto(SPF_request_t *spf_request,
75 SPF_response_t **spf_responsep,
76 const char *rcpt_to);
77 SPF_errcode_t SPF_request_query_fallback(SPF_request_t *spf_request,
78 SPF_response_t **spf_responsep,
79 const char *record);
80
81
82 /* In spf_get_exp.c */
83 SPF_errcode_t SPF_request_get_exp(SPF_server_t *spf_server,
84 SPF_request_t *spf_request,
85 SPF_response_t *spf_response,
86 SPF_record_t *spf_record,
87 char **bufp, size_t *buflenp);
88
89 /* In spf_interpret.c - this is a kludge */
90
91 SPF_errcode_t SPF_i_done(SPF_response_t *spf_response,
92 SPF_result_t result, SPF_reason_t reason,
93 SPF_errcode_t err);
94
95
96 #endif