1 /**
2  * @file
3  * Support of Mixmaster anonymous remailer
4  *
5  * @authors
6  * Copyright (C) 1999-2000 Thomas Roessler <roessler@does-not-exist.org>
7  *
8  * @copyright
9  * This program is free software: you can redistribute it and/or modify it under
10  * the terms of the GNU General Public License as published by the Free Software
11  * Foundation, either version 2 of the License, or (at your option) any later
12  * version.
13  *
14  * This program is distributed in the hope that it will be useful, but WITHOUT
15  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16  * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
17  * details.
18  *
19  * You should have received a copy of the GNU General Public License along with
20  * this program.  If not, see <http://www.gnu.org/licenses/>.
21  */
22 
23 #ifndef MUTT_REMAILER_H
24 #define MUTT_REMAILER_H
25 
26 #include <stddef.h>
27 #include <stdint.h>
28 
29 struct Email;
30 struct ListHead;
31 
32 /* Mixmaster's maximum chain length.  Don't change this. */
33 #define MAX_MIXES 19
34 
35 typedef uint8_t MixCapFlags;       ///< Flags, e.g. #MIX_CAP_NO_FLAGS
36 #define MIX_CAP_NO_FLAGS        0  ///< No flags are set
37 #define MIX_CAP_COMPRESS  (1 << 0)
38 #define MIX_CAP_MIDDLEMAN (1 << 1)
39 #define MIX_CAP_NEWSPOST  (1 << 2)
40 #define MIX_CAP_NEWSMAIL  (1 << 3)
41 
42 /**
43  * struct Remailer - A Mixmaster remailer
44  */
45 struct Remailer
46 {
47   int num;          ///< Index number
48   char *shortname;  ///< Short name of remailer host
49   char *addr;       ///< Address of host
50   char *ver;        ///< Version of host
51   MixCapFlags caps; ///< Capabilities of host
52 };
53 
54 /**
55  * struct MixChain - A Mixmaster chain
56  */
57 struct MixChain
58 {
59   size_t cl;         ///< Length of chain
60   int ch[MAX_MIXES]; ///< Indexes of chain hosts
61 };
62 
63 int mix_send_message(struct ListHead *chain, const char *tempfile);
64 int mix_check_message(struct Email *e);
65 void dlg_select_mixmaster_chain(struct ListHead *chainhead);
66 
67 #endif /* MUTT_REMAILER_H */
68