ba6232cc8c07d3833e93a3f6b30fe556316ceb18
[citadel.git] / citadel / serv_network.h
1 /*
2  * $Id$
3  */
4
5 typedef struct namelist namelist;
6
7 struct namelist {
8         namelist *next;
9         char name[SIZ];
10 };
11
12 typedef struct maplist maplist;
13
14 struct maplist {
15         struct maplist *next;
16         char remote_nodename[SIZ];
17         char remote_roomname[SIZ];
18 };
19
20 typedef struct SpoolControl SpoolControl;
21
22 struct SpoolControl {
23         long lastsent;
24         namelist *listrecps;
25         namelist *digestrecps;
26         namelist *participates;
27         maplist *ignet_push_shares;
28         char *misc;
29         FILE *digestfp;
30         int num_msgs_spooled;
31 };
32
33
34 typedef struct NetMap NetMap;
35
36 struct  NetMap {
37         NetMap *next;
38         char nodename[SIZ];
39         time_t lastcontact;
40         char nexthop[SIZ];
41 };
42
43 typedef struct FilterList FilterList;
44
45 struct FilterList {
46         FilterList *next;
47         char fl_user[SIZ];
48         char fl_room[SIZ];
49         char fl_node[SIZ];
50 };
51 extern FilterList *filterlist;
52
53 void free_spoolcontrol_struct(SpoolControl **scc);
54 int writenfree_spoolcontrol_file(SpoolControl **scc, char *filename);
55 int read_spoolcontrol_file(SpoolControl **scc, char *filename);
56
57 int is_recipient(SpoolControl *sc, const char *Name);
58
59
60 void network_queue_room(struct ctdlroom *, void *);
61 void destroy_network_queue_room(void);