1 /* $Id$ */
2 
3 /*****************************************************************************
4  * HPT --- FTN NetMail/EchoMail Tosser
5  *****************************************************************************
6  * Copyright (C) 1997-1999
7  *
8  * Matthias Tichy
9  *
10  * Fido:     2:2433/1245 2:2433/1247 2:2432/605.14
11  * Internet: mtt@tichy.de
12  *
13  * Grimmestr. 12         Buchholzer Weg 4
14  * 33098 Paderborn       40472 Duesseldorf
15  * Germany               Germany
16  *
17  * This file is part of HPT.
18  *
19  * HPT is free software; you can redistribute it and/or modify it
20  * under the terms of the GNU General Public License as published by the
21  * Free Software Foundation; either version 2, or (at your option) any
22  * later version.
23  *
24  * HPT is distributed in the hope that it will be useful, but
25  * WITHOUT ANY WARRANTY; without even the implied warranty of
26  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
27  * General Public License for more details.
28  *
29  * You should have received a copy of the GNU General Public License
30  * along with HPT; see the file COPYING.  If not, write to the Free
31  * Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
32  *****************************************************************************/
33 #ifndef TOSS_H
34 #define TOSS_H
35 #include <pkt.h>
36 #include <seenby.h>
37 
38 struct statToss {
39    int arch, pkts, msgs;
40    int saved, passthrough, exported, CC;
41    int echoMail, netMail;
42    int dupes, bad, empty;
43    int inBytes;
44 /*    time_t startTossing; */
45    time_t realTime;
46 };
47 typedef struct statToss s_statToss;
48 
49 enum tossSecurity {secLocalInbound, secProtInbound, secInbound};
50 typedef enum tossSecurity e_tossSecurity;
51 
52 
53 int  processEMMsg(s_message *msg, hs_addr pktOrigAddr, int dontdocc, dword forceattr);
54 int  processNMMsg(s_message *msg, s_pktHeader *pktHeader, s_area *area, int dontdocc, dword forceattr);
55 int  processMsg(s_message *msg, s_pktHeader *pktHeader, int secure);
56 int  processPkt(char *fileName, e_tossSecurity sec);
57 int  putMsgInArea(s_area *echo, s_message *msg, int strip, dword forceattr);
58 void makeMsgToSysop(char *areaName, hs_addr fromAddr, hs_addr *uplinkAddr);
59 void toss(void);
60 void tossTempOutbound(char *directory);
61 void arcmail(s_link *link);
62 void tossFromBadArea(char force);
63 void writeMsgToSysop(void);
64 void forwardToLinks(s_message *msg, s_area *echo, s_arealink **newLinks,
65 					s_seenBy **seenBys, UINT *seenByCount,
66 					s_seenBy **path, UINT *pathCount);
67 void forwardMsgToLinks(s_area *echo, s_message *msg, hs_addr pktOrigAddr);
68 int  carbonCopy(s_message *msg, XMSG *xmsg, s_area *echo);
69 void closeOpenedPkt(void);
70 int  isArcMail(char *fname);
71 
72 s_message* MessForCC(s_message *msg);
73 
74 #define REC_HDR 0x0001
75 #define REC_TXT 0x0002
76 
77 #endif
78