6 #define MAX_COMMAND 2048
7 #define MAX_RESPONSE 2048
8 #define MAX_XREFLINE 5120
10 #define SESAMEFILE "/etc/news/sesame"
13 struct permission *next;
19 struct serverinfo *next; /* only used during setup */
26 FILE *rfile, *wfile, *tempfile;
30 struct serverinfo *readfrom;
31 struct serverinfo *postto[10];
33 struct permission *restrictto, *readonlyto;
38 void (*call)(char *arg, const struct cmdinfo*);
42 void cmd_post(char *arg, const struct cmdinfo *cip);
44 void die(const char *msg);
46 void readconfig(void);
47 struct groupinfo *findgroup(const char *groupname);
48 struct permission *findpermit(const char *name);
50 void *xmalloc(size_t);
51 char *xstrdup(const char *);
53 void closeserver(struct serverinfo *server);
54 int stripcommand(char *buf);
55 int decoderesponse(char response[MAX_RESPONSE+3], unsigned long *rvp,
56 struct serverinfo *server);
57 int servercommand(struct serverinfo *server,
58 const char command[], char response[MAX_RESPONSE+3],
60 void serverdataerr(struct serverinfo *si);
61 int copydatafile(FILE *from, FILE *to);
62 int stillrestricted(struct permission **pip);
64 extern struct permission *permissions, *restrictpost;
65 extern struct serverinfo *servers;
66 struct sockaddr_in peername;
68 extern char *myfqdn, *myxref, *lastdoneauth;
69 extern const char *theirfqdn;
71 #endif /* NNTP_MERGE_H */