|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T t
Length: 5307 (0x14bb) Types: TextFile Names: »types.h«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0 └─⟦dc59850a2⟧ »EurOpenD22/pp5.0/pp-5.tar.Z« └─⟦e5a54fb17⟧ └─⟦this⟧ »pp-5.0/Src/qmgr/types.h«
/* types.h: queue manager general purpose type definitions */ /* * @(#) $Header: /cs/research/pp/hubris/pp-beta/Src/qmgr/RCS/types.h,v 5.0 90/09/20 16:22:06 pp Exp Locker: pp $ * * $Log: types.h,v $ * Revision 5.0 90/09/20 16:22:06 pp * rcsforce : 5.0 public release * * */ #ifndef _H_QMGR_TYPES #define _H_QMGR_TYPES #include <stdio.h> #include "Qmgr-types.h" #include "table.h" #include "chan.h" #include "list_bpt.h" #include "list_rchan.h" #include "mta.h" #define HASHSIZE 101 #define DISP_INDENT 2 #define LOAD_RETRY_INTERVAL ((time_t)(6 * 60 * 60)) /* every hour or so */ #define TRASH_START_DELAY ((time_t)(3 * 60)) /* wait 3 mins */ #define TRASH_RETRY_INTERVAL ((time_t)(3 * 60 * 60)) /* every 3 hours */ #define TIMEOUT_START_DELAY ((time_t)(30 * 60)) /* wait 30 mins */ #define TIMEOUT_RETRY_INTERVAL ((time_t)(12 * 60 * 60)) /* every 12 hours */ #define MAX_SLEEP ((time_t)(1 * 24 * 60 * 60)) /* 1 day */ #define CHAN_TIMEOUT ((time_t)(60 * 5)) /* 5 mins */ #define MAXCHANSRUNNING 3 /* --- Cache structure - general purpose. --- */ typedef struct cache { time_t cachetime; int cacheplus; #define CACHE_TIME (5*60) /* 5 minutes retry time */ #define CACHE_MAX (10) /* 50 mins max */ } Cache; /* --- Recipient list - internal form --- */ typedef struct Reciplist { struct Reciplist *rp_next; int id; char *user; char *mta; char *realmta; LIST_RCHAN *chans; int chans_done; /* --- non protocol stuff --- */ enum rstatus { st_normal, st_dr, st_delete, st_timeout } status; unsigned int msg_enabled:1, msg_locked:1; Cache cache; } Reciplist; #define NULLRL ((Reciplist *)0) /* --- Msg information - internal form --- */ typedef struct MsgStruct { struct MsgStruct *ms_forw; int count; char *queid; MPDUid *mpduid; char *originator; char *contenttype; LIST_BPT *eit; int priority; int size; time_t age; int warninterval; int numberwarns; time_t expirytime; time_t defferedtime; char *uacontent; int m_locked:1, m_timeout:1; int nerrors; CHAN *inchan; Reciplist *recips; } MsgStruct; #define NULLMS ((MsgStruct *)0) /* --- Msg list - as associated with an MTA --- */ typedef struct mlist { struct mlist *ml_forw; struct mlist *ml_back; MsgStruct *ms; char *info; Reciplist **recips; int rcount; } Mlist; #define NULLMLIST ((Mlist *)0) /* --- List of MTA's associated with channel --- */ typedef struct Mtalist { struct Mtalist *mta_forw; struct Mtalist *mta_back; char *mtaname; Cache cache; time_t oldest; time_t lastattempt; time_t lastsuccess; time_t nextevent; int num_msgs; int num_drs; long volume; int nactive; char *info; unsigned int mta_enabled:1, mta_changed:1, mta_waiting:1; Mlist *msgs; } Mtalist; #define NULLMTALIST ((Mtalist *)0) /* --- Channel list --- */ typedef struct chanlist { Mtalist *mtas; CHAN *chan; char *channame; Cache cache; time_t lastattempt; time_t lastsuccess; time_t laststart; time_t oldest; time_t nextevent; float averaget; int num_msgs; int num_drs; int volume; int nactive; int nmtas; unsigned int chan_special:1, chan_enabled:1, chan_update:1; } Chanlist; #define NULLCHANLIST ((Chanlist *)0) /* --- Internal 'compiled' filter type --- */ typedef struct Filter { char *cont; LIST_BPT *eit; int priority; time_t morerecent; time_t earlier; int maxsize; char *orig; char *recip; CHAN *channel; char *mta; char *queid; MPDUid *mpduid; char *uacontent; struct Filter *next; } Filter; #define NULLFL ((Filter *)0) enum cb_type { cb_channel, cb_special, cb_responder, cb_timer } cb_type; struct connblk { struct connblk *cb_forw; struct connblk *cb_back; int cb_fd; int cb_id; enum cb_type cb_type; union { struct { Chanlist *cb_un_clp; char *cb_un_mta; Mlist *cb_un_ml; time_t cb_un_ttl; enum { cb_idle, cb_conn_request1, cb_conn_request2, cb_conn_established, cb_init_sent, cb_active, cb_proc_sent, cb_close_sent } cb_un_state; } cb_chan; #define cb_state un.cb_chan.cb_un_state #define cb_mta un.cb_chan.cb_un_mta #define cb_ml un.cb_chan.cb_un_ml #define cb_clp un.cb_chan.cb_un_clp #define cb_ttl un.cb_chan.cb_un_ttl struct { IFP cb_un_proc; time_t cb_un_reload; } cb_timer; #define cb_proc un.cb_timer.cb_un_proc #define cb_reload un.cb_timer.cb_un_reload struct { int cb_un_authenticated; } cb_responder; #define cb_authenticated un.cb_responder.cb_un_authenticated } un; }; typedef struct connblk Connblk; #define NULLCB ((Connblk *)0) void freecblk(); Connblk *findcblk(), *newcblk(); /* --- misc external things --- */ extern char *myname; extern MsgStruct *msg_hash[]; extern Chanlist **chan_list; extern int nchanlist; extern Chanlist *delete_chan, *loader_chan, *trash_chan, *timeout_chan; extern time_t current_time; extern time_t debris_time, load_time, cache_time, timeout_time; extern int maxchansrunning, submission_disabled, opmode; #define OP_SHUTDOWN 1 #define OP_RESTART 2 extern void advise(), adios(), acs_advise(), ros_advise(), ros_adios(); extern time_t time(), utc2time_t(), utcqb2time_t(); extern char *chan2mta(); #endif