1/* Status codes, exceptions and other constants for Mailfromd.  -*- mfl -*-
2   Copyright (C) 2007-2021 Sergey Poznyakoff
3
4   This program is free software; you can redistribute it and/or modify
5   it under the terms of the GNU General Public License as published by
6   the Free Software Foundation; either version 3, or (at your option)
7   any later version.
8
9   This program is distributed in the hope that it will be useful,
10   but WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12   GNU General Public License for more details.
13
14   You should have received a copy of the GNU General Public License
15   along with this program.  If not, see <http://www.gnu.org/licenses/>. */
16
17module 'status'.
18
19/* Earlier versions would fail on dclex statements below */
20#pragma prereq 7.0.94
21
22/* This prefix will be prepended to each const identifier below when
23   creating a corresponding C define. */
24#prefix _MFL_
25
26# Socket families
27
28const FAMILY_STDIO 0
29const FAMILY_UNIX  1
30const FAMILY_INET  2
31const FAMILY_INET6 3
32
33# Access modes
34const R_OK  4               /* Test for read permission. */
35const W_OK  2               /* Test for write permission. */
36const X_OK  1               /* Test for execute permission. */
37const F_OK  0               /* Test for existence. */
38
39# Shutdown modes
40const SHUT_RD   0
41const SHUT_WR   1
42const SHUT_RDWR 2
43
44# Burst error actions
45const BURST_ERR_FAIL   0
46const BURST_ERR_IGNORE 1
47const BURST_ERR_BODY   2
48const BURST_ERR_MASK   0x0f
49const BURST_DECODE     0x10
50
51# DKIM verification codes
52const DKIM_VERIFY_OK       0
53const DKIM_VERIFY_PERMFAIL 1
54const DKIM_VERIFY_TEMPFAIL 2
55
56# DKIM explanatory codes
57const DKIM_EXPL_OK               0
58const DKIM_EXPL_NO_SIG           1
59const DKIM_EXPL_INTERNAL_ERROR   2
60const DKIM_EXPL_SIG_SYNTAX       3
61const DKIM_EXPL_SIG_MISS	 4
62const DKIM_EXPL_DOMAIN_MISMATCH  5
63const DKIM_EXPL_BAD_VERSION      6
64const DKIM_EXPL_BAD_ALGORITHM    7
65const DKIM_EXPL_BAD_QUERY        8
66const DKIM_EXPL_FROM             9
67const DKIM_EXPL_EXPIRED         10
68const DKIM_EXPL_DNS_UNAVAIL     11
69const DKIM_EXPL_DNS_NOTFOUND    12
70const DKIM_EXPL_KEY_SYNTAX      13
71const DKIM_EXPL_KEY_REVOKED     14
72const DKIM_EXPL_BAD_BODY        15
73const DKIM_EXPL_BAD_BASE64      16
74const DKIM_EXPL_BAD_SIG         17
75
76# Exception codes
77
78dclex e_success
79dclex e_not_found
80dclex e_failure
81dclex e_temp_failure
82dclex e_ston_conv
83dclex e_divzero
84dclex e_regcomp
85dclex e_invip
86dclex e_invcidr
87dclex e_invtime
88dclex e_dbfailure
89dclex e_range
90dclex e_url
91dclex e_noresolve
92dclex e_io
93dclex e_macroundef
94dclex e_eof
95dclex e_exists
96dclex e_format
97dclex e_badmmq
98
99# `Status' definitions
100const success      e_success
101const not_found    e_not_found
102const failure      e_failure
103const temp_failure e_temp_failure
104