Prototype void RTClearStatus(int index, int count); Prototype void RTUpdateStatus(int slot, const char *ctl, ...); Prototype pid_t ForkPipe(int *pfd, void (*task)(int fd, const char *id), const char *description); Prototype int NumReaderForks; Prototype int ThisReaderFork; Prototype int FeedOnlyServer; Prototype int CoreDebugOpt; Prototype int FastCopyOpt; Prototype pid_t *ReaderPids; Prototype char *RTStatus; Prototype char *MyGroupHome; Prototype struct vserver *VServerConfig; Prototype ForkDesc *AddThread(const char *id, int fd, pid_t pid, int type, int slot, int pri); Prototype ForkDesc *FindThread(int fd, pid_t pid); Prototype ForkDesc *FindLeastUsedThread(int type, int maxCount, int minPri, int *prand, int nopass, int (*callBack)(void *cbData, void *data), void *cbData); Prototype ForkDesc *FindThreadId(int type, const char *id); Prototype void ScanThreads(int type, void (*func)(ForkDesc *desc)); Prototype void DelThread(ForkDesc *desc); Prototype void ResetThreads(void); Prototype void DumpThreads(void); Prototype void AddTimer(ForkDesc *desc, int ms, int flags); Prototype void DelTimer(Timer *t); Prototype void NextTimeout(struct timeval *tv, int maxMs); Prototype int ScanTimers(int doRun, int maxMs); Prototype fd_set SFds; Prototype fd_set RFds; Prototype fd_set WFds; Prototype int MaxFds; Prototype struct timeval CurTime; Prototype void ReaderTask(int fd, const char *id); Prototype void NNCommand(Connection *conn); Prototype void NNCommand2(Connection *conn); Prototype void NNBadCommandUse(Connection *conn); Prototype void NNUnknownCommand(Connection *conn); Prototype void NNTerminate(Connection *conn); Prototype void NNAuthDone(Connection *conn); Prototype void NNWriteHello(Connection *conn); Prototype void NNWaitThread(Connection *conn); Prototype void NNTPHelp(Connection *conn, char **pptr); Prototype Connection *InitConnection(ForkDesc *desc, DnsRes *dres); Prototype void DeleteConnection(Connection *conn); Prototype void StatusUpdate(Connection *conn, const char *ctl, ...); Prototype void LogCmd(Connection *conn, char dir, char *msg); Prototype void GroupStats(Connection *conn); Prototype KPDB *KDBActive; Prototype void DnsTask(int fd, const char *id); Prototype void InstallAccessCache(void); Prototype int ReadAccessCache(void); Prototype void UpdateAuthDetails(ForkDesc *desc); Prototype void SetAuthDetails(DnsRes *dres, char *which); Prototype void PrintAuthDetails(DnsRes *dres); Prototype void ClearOldAccessMap(void); Prototype void MBFlush(Connection *conn, MBufHead *mh); Prototype void MBFree(MBufHead *mh); Prototype void MBPoll(MBufHead *mh); Prototype void MBInit(MBufHead *mh, int fd, MemPool **mpool, MemPool **bpool); Prototype void MBWrite(MBufHead *mh, const void *data, int len); Prototype void MBWriteDecode(MBufHead *mh, const char *data, int len); Prototype void MBCopy(MBufHead *m1, MBufHead *m2); Prototype void MBPrintf(MBufHead *mh, const char *ctl, ...); Prototype void MBLogPrintf(Connection *conn, MBufHead *mh, const char *ctl, ...); Prototype int MBRead(MBufHead *mh, void *data, int len); Prototype int MBReadLine(MBufHead *mh, char **pptr); Prototype char *MBNormalize(MBufHead *mh, int *plen); Prototype char *parseword(char **pptr, char *toks); Prototype void SetCurrentGroup(Connection *conn, const char *group); Prototype int shash(const char *s); Prototype int SetTimeRestrict(TimeRestrict *tr, const char *yymmdd, const char *hhmmss, const char *gmt); Prototype void GenerateMessageID(Connection *conn); Prototype void dumpConnectionInfo(Connection *conn); Prototype void NNTPList(Connection *conn, char **pptr); Prototype void NNTPListActive(Connection *conn, char **pptr); Prototype void NNTPListActiveTimes(Connection *conn, char **pptr); Prototype void NNTPListNewsgroups(Connection *conn, char **pptr); Prototype void NNTPListExtensions(Connection *conn, char **pptr); Prototype void NNTPListDistributions(Connection *conn, char **pptr); Prototype void NNTPListDistribPats(Connection *conn, char **pptr); Prototype void NNTPListOverviewFmt(Connection *conn, char **pptr); Prototype void NNTPListSubscriptions(Connection *conn, char **pptr); Prototype void NNTPListModerators(Connection *conn, char **pptr); Prototype void NNTPListGroup(Connection *conn, char **pptr); Prototype void NNTPNewgroups(Connection *conn, char **pptr); Prototype void NNTPXGTitle(Connection *conn, char **pptr); Prototype int ActiveCacheReadLock(void); Prototype void ActiveCacheReadUnlock(void); Prototype int ActiveCacheWriteLock(void); Prototype void ActiveCacheWriteUnlock(void); Prototype void ActiveCacheFreeMain(void); Prototype GroupList *ListActiveGroups(Connection *conn, char *pat); Prototype void NNTPMode(Connection *conn, char **pptr); Prototype void NNTPIHave(Connection *conn, char **pptr); Prototype void NNTPCheck(Connection *conn, char **pptr); Prototype void NNTPTakeThis(Connection *conn, char **pptr); Prototype void NNTPPost(Connection *conn, char **pptr); Prototype int ValidXRef(const char *buf, int len); Prototype void NNTPNewNews(Connection *conn, char **pptr); Prototype void NNTPXHdr(Connection *conn, char **pptr); Prototype void NNTPXOver(Connection *conn, char **pptr); Prototype void NNTPXPat(Connection *conn, char **pptr); Prototype void NNTPXPath(Connection *conn, char **pptr); Prototype char *OverViewFmt; Prototype void NNTPQuit(Connection *conn, char **pptr); Prototype void NNTPAuthInfo(Connection *conn, char **pptr); Prototype void NNTPArticle(Connection *conn, char **pptr); Prototype void NNTPHead(Connection *conn, char **pptr); Prototype void NNTPBody(Connection *conn, char **pptr); Prototype void NNTPDate(Connection *conn, char **pptr); Prototype void NNTPGroup(Connection *conn, char **pptr); Prototype void NNTPLast(Connection *conn, char **pptr); Prototype void NNTPNext(Connection *conn, char **pptr); Prototype void NNTPStat(Connection *conn, char **pptr); Prototype void NNExecuteOnRange(Connection *conn, const char *artid, int mode); Prototype int GoodRC(Connection *conn); Prototype const char *GoodResId(Connection *conn); Prototype void DumpOVHeaders(Connection *conn, const char *ovdata, int ovlen); Prototype void NNTPSlave(Connection *conn, char **pptr); Prototype void NNTPNewNews(Connection *conn, char **pptr); Prototype void NNTPDate(Connection *conn, char **pptr); Prototype void NNPostBuffer(Connection *conn); Prototype void NNPostCommand1(Connection *conn); Prototype void CheckServerConfig(time_t t, int force); Prototype void LogServerInfo(Connection *conn, int fd); Prototype void NNArticleRetrieveByMessageId(Connection *conn, const char *msgid, int grouphint, int TimeRcvd, int grpIter, int endNo); Prototype void NNServerIdle(Connection *conn); Prototype void NNServerTerminate(Connection *conn); Prototype void NNFinishSReq(Connection *conn, const char *ctl, int requeue); Prototype void NNServerRequest(Connection *conn, const char *grp, const char *msgid, int req, int TimeRcvd, int grpIter, int endNo); Prototype int ServersTerminated; Prototype int NReadServers; Prototype int NReadServAct; Prototype int NWriteServers; Prototype int NWriteServAct; Prototype void NNFeedOverview(Connection *conn); Prototype void FlushOverCache(void); Prototype OverInfo *GetOverInfo(const char *group); Prototype void PutOverInfo(OverInfo *ov); Prototype const char *GetOverRecord(OverInfo *ov, int artno, int *plen, int *aleno, TimeRestrict *tr, int *TimeRcvd); Prototype OverInfo *FindCanceledMsg(const char *group, const char *msgid, int *partNo, int *pvalidGroups); Prototype int CancelOverArt(OverInfo *ov, int artNo); Prototype int NNTestOverview(Connection *conn); Prototype const char *NNRetrieveHead(Connection *conn, int *povlen, const char **pmsgid, int *TimeRcvd, int *grpIter, int *endNo); Prototype void NNSpoolCommand1(Connection *conn); Prototype int OpenCache(const char *msgid, int *pcfd, int *psize); Prototype void CreateCache(Connection *conn); Prototype void AbortCache(int fd, const char *msgid, int closefd); Prototype void CommitCache(Connection *conn, int closefd); Prototype void DumpArticleFromCache(Connection *conn, const char *map, int size, int grpIter, int endNo); Prototype void OpenCacheHits(void); Prototype void RTStatusOpen(const char *fileName, int slotBase, int numSlots); Prototype void RTStatusBase(int slot, const char *ctl, ...); Prototype void RTStatusUpdate(int slot, const char *ctl, ...); Prototype void ExecuteControl(Connection *conn, const char *ctl, const char *art, int artLen); Prototype void FreeControl(Connection *conn); Prototype void ExecuteSupersedes(Connection *conn, const char *supers, const char *art, int artLen); Prototype int WildOrCmp(const char *wild, const char *str); Prototype void InitCancelCache(void); Prototype void EnterCancelCache(const char *msgid); Prototype int FindCancelCache(const char *msgid); Prototype int ckaddress(char *addr); Prototype void HeaderCleanFrom(char *from); Prototype int SendMsg(int to_fd, int send_fd, DnsRes *dres); Prototype int RecvMsg(int from_fd, int *recv_fd, DnsRes *dres); Prototype DirectFileAccess* NewDFA(Connection *conn, int lf, int offset, int size); Prototype void DelDFA(Connection *conn); Prototype void NNSendLocalArticle(Connection *conn); Prototype void AIOBlockSignal(void); Prototype void AIOUnblockSignal(void);