|
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 i
Length: 10221 (0x27ed) Types: TextFile Names: »inter-print.c«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0 └─⟦dc59850a2⟧ »EurOpenD22/pp5.0/pp-5.tar.Z« └─⟦e5a54fb17⟧ └─⟦this⟧ »pp-5.0/Src/qmgr/inter-print.c«
/* inter-print.c: print out structures */ # ifndef lint static char Rcsid[] = "@(#)$Header: /cs/research/pp/hubris/pp-beta/Src/qmgr/RCS/inter-print.c,v 5.0 90/09/20 16:21:06 pp Exp Locker: pp $"; # endif /* * $Header: /cs/research/pp/hubris/pp-beta/Src/qmgr/RCS/inter-print.c,v 5.0 90/09/20 16:21:06 pp Exp Locker: pp $ * * $Log: inter-print.c,v $ * Revision 5.0 90/09/20 16:21:06 pp * rcsforce : 5.0 public release * */ #include <stdio.h> #include "Qmgr-types.h" #define DISP_INDENT 2 int level = 0; static void display (s) char *s; { printf("%*s%s\n",level * DISP_INDENT, "", s); } /* misc print routines */ static void pint (n, s) int n; char *s; { static char buf[512]; sprintf (buf, "%s: %d", s, n); display (buf); } static void pqbuf (qb, s) struct qbuf *qb; char *s; { char buf[512]; sprintf (buf, "%s: %s", s, qb2str (qb)); display (buf); } static void ptime (ti, s) struct type_UNIV_UTCTime *ti; char *s; { char buf[512]; sprintf (buf, "%s: %s", s, qb2str (ti)); display (buf); } static void pcontent (cont) struct type_Qmgr_ContentType *cont; { display ("ContentType"); level ++; pqbuf (cont, "content type"); level --; } static void puser (user, str) struct type_Qmgr_User *user; char *str; { pqbuf(user, str); } static void ppriority (prio) struct type_Qmgr_Priority *prio; { pint (prio -> parm, "priority"); } static void peit (eit) struct type_Qmgr_EncodedInformationTypes *eit; { display ("EncodedInformationTypes"); level++; level--; } static void preadmessageargument (arg) struct type_Qmgr_ReadMessageArgument *arg; { display("Read Message Argument"); level++; pfilterlist(arg->filters); ptime(arg->interval,"interval"); level--; } static void pmsglist (list) struct type_Qmgr_MsgList *list; { display("Message List"); level++; pmsgstructlist(list->msgs); pqidlist(list->deleted); level--; } pmsgstructlist (msgs) struct type_Qmgr_MsgStructList *msgs; { display("Messages"); level++; for (; msgs; msgs = msgs->next) pmsgstruct(msgs->MsgStruct); level--; } pqidlist (qids) struct type_Qmgr_QidList *qids; { display("Deleted"); level++; for (; qids; qids = qids->next) pqbuf(qids->QID,"message"); level--; } pprocmsg (msg) struct type_Qmgr_ProcMsg *msg; { display("Process Message"); level++; pqbuf(msg->qid,"queue id"); puserlist(msg->users); pqbuf(msg->channel,"channel"); level--; } puserlist (users) struct type_Qmgr_UserList *users; { display("Recipients"); level++; for(;users;users = users->next) pint(users->RecipientId->parm,"recipient id"); level--; } pcontrol (control) struct type_Qmgr_Control *control; { switch (control->offset) { case type_Qmgr_Control_stop: display("stop"); break; case type_Qmgr_Control_start: display("start"); break; case type_Qmgr_Control_cacheClear: display("cache clear"); break; case type_Qmgr_Control_cacheAdd: ptime(control->un.cacheAdd, "cache add"); break; } level--; } pchannelcontrol (chancontrol) struct type_Qmgr_ChannelControl *chancontrol; { display("Channel Control"); level++; pqbuf(chancontrol->channel,"channel"); pcontrol(chancontrol->control); level--; } pmtacontrol (mtacontrol) struct type_Qmgr_MtaControl *mtacontrol; { display("Mta Control"); level++; pqbuf(mtacontrol->channel,"channel"); pqbuf(mtacontrol->mta,"mta"); pcontrol(mtacontrol->control); level--; } pmsgcontrol (msgcontrol) struct type_Qmgr_MsgControl *msgcontrol; { display("Msg Control"); level++; pqbuf(msgcontrol->qid,"queue id"); puserlist(msgcontrol->users); pcontrol(msgcontrol->control); level--; } pmsgstruct (msg) struct type_Qmgr_MsgStruct *msg; { display ("Msg"); level ++; ppermessageinfo (msg -> messageinfo); precipientlist (msg -> recipientlist); level --; } precipientlist (list) struct type_Qmgr_RecipientList *list; { display ("Recipients"); level++; for (;list;list = list->next) precipientinfo(list->RecipientInfo); level--; } ppermessageinfo (info) struct type_Qmgr_PerMessageInfo *info; { display ("PerMessageInfo"); level ++; pqbuf (info -> queueid, "queueid"); pmpduidentifier(info->mpduiden); puser (info -> originator, "originator"); pcontent (info -> contenttype); peit (info -> eit); ppriority (info -> priority); pint (info -> size, "size"); ptime (info -> age, "age"); pint (info -> warnInterval, "warnInterval"); pint (info -> numberWarningsSent, "numberWarningsSent"); ptime (info -> expiryTime, "expiryTime"); ptime (info -> deferredTime, "deferredTime"); pqbuf (info -> uaContentId, "contentid"); level --; } pprocstatus (stat) struct type_Qmgr_ProcStatus *stat; { display("Process status"); level++; pint (stat->active,"active"); ptime (stat->lastAttempt,"last attempt"); ptime (stat->cachedUntil,"cached until"); level--; } precipientinfo (ri) struct type_Qmgr_RecipientInfo *ri; { display ("RecipientInfo"); level ++; puser (ri->user, "recipient"); pint (ri->id, "id"); pqbuf (ri->mta, "Mta"); pchannellist(ri->channelList); pint (ri->channelsDone,"channels done"); level --; } pchannellist (list) struct type_Qmgr_ChannelList *list; { display("Channel list"); level++; for (;list;list = list->next) pqbuf(list->Channel,"channel"); level--; } pfilterlist(list) struct type_Qmgr_FilterList *list; { display("Filter list"); level++; for (;list;list = list->next) pfilter(list->Filter); level--; } pfilter (flt) struct type_Qmgr_Filter *flt; { display("Filter"); level++; pqbuf(flt->queueid, "queueid"); puser(flt->originator,"originator"); puser(flt->recipient,"recipient"); pqbuf(flt->mta, "Mta"); pqbuf(flt->channel,"channel"); pqbuf(flt->uaContentId, "contentid"); pcontent(flt->contenttype); peit(flt->eit); ppriority(flt->priority); ptime(flt->moreRecentThan,"More recent than"); ptime(flt->earlierThan,"Earlier than"); pint(flt->maxSize,"Maximum size"); pmpduidentifier(flt->mpduiden); level--; } pprioritisedchannellist (list) struct type_Qmgr_PrioritisedChannelList *list; { display("Prioritised channel list"); level++; for (;list;list = list->next) pprioritisedchannel(list->PrioritisedChannel); level--; } pprioritisedchannel (chan) struct type_Qmgr_PrioritisedChannel *chan; { display("Prioritised channel"); level++; pchannelinfo(chan->channel); ppriority(chan->priority); level--; } pchannelinfo (chan) struct type_Qmgr_ChannelInfo *chan; { display("Channel"); level++; pqbuf(chan->channel, "channel"); pqbuf(chan->channelDescription,"description"); ptime(chan->oldestMessage,"Oldest message"); pint(chan->numberMessages,"number of messages"); pint(chan->volumeMessages,"volume of messages"); pint(chan->numberActiveProcesses,"number of active processes"); pprocstatus(chan->status); level--; } pmtaread(mta) struct type_Qmgr_MtaRead *mta; { display("Mta read"); level++; pqbuf(mta->channel,"channel"); ptime(mta->time,"time"); } pprioritisedmtalist (list) struct type_Qmgr_PrioritisedMtaList *list; { display("Prioritised Mta list"); level++; for(;list;list = list->next) pprioritisedmta(list->PrioritisedMta); level--; } pprioritisedmta (mta) struct type_Qmgr_PrioritisedMta *mta; { display("Prioritised Mta"); level++; pmtainfo(mta->mta); ppriority(mta->priority); level--; } pmtainfo (mta) struct type_Qmgr_MtaInfo *mta; { display("Mta info"); level++; pqbuf(mta->channel,"channel"); pqbuf(mta->mta,"mta"); ptime(mta->oldestMessage,"oldest message"); pint(mta->numberMessage,"number of message"); pint(mta->volumeMessages,"volume of messages"); pprocstatus(mta->status); level--; } pdeliverystatus (status) struct type_Qmgr_DeliveryStatus *status; { display("Delivery status"); level++; if (status == NULL) display("Complete failure"); else { struct type_Qmgr_DeliveryStatus *ix = status; while (ix != NULL) { pindividualdeliverystatus(ix->IndividualDeliveryStatus); ix = ix->next; } } level--; } pindividualdeliverystatus(status) struct type_Qmgr_IndividualDeliveryStatus *status; { pint(status->recipient->parm,"Recipient "); display("Result"); level++; switch (status->status) { case int_Qmgr_status_success: display("success"); break; case int_Qmgr_status_permanentFailure: display("permanent failure"); break; case int_Qmgr_status_messageFailure: display("message failure"); break; case int_Qmgr_status_mtaFailure: display("mta failure"); break; case int_Qmgr_status_mtaAndMessageFailure: display("mta and message failure"); break; default: display("unknown"); break; } level--; } pmpduidentifier (mpdu) struct type_QmgrP1_MPDUIdentifier *mpdu; { display("MPDU identifier"); level++; pglobaldomainidentifier(mpdu->global); pqbuf(mpdu->local,"string"); level--; } pglobaldomainidentifier (gdi) struct type_QmgrP1_GlobalDomainIdentifier *gdi; { display("Global domain identifier"); level++; pcountryname(gdi->country); padministrationdomainname(gdi->admd); pprivatedomainidentifier(gdi->prmd); } pcountryname (country) struct type_QmgrP1_CountryName *country; { display("Country name"); level++; switch (country->offset) { case type_QmgrP1_CountryName_numeric: pqbuf(country->un.numeric,"numeric country name"); break; case type_QmgrP1_CountryName_printable: pqbuf(country->un.printable,"country name"); break; } level--; } padministrationdomainname (addom) struct type_QmgrP1_AdministrationDomainName *addom; { display("Administration Domain Name"); level++; switch (addom->offset) { case type_QmgrP1_AdministrationDomainName_numeric: pqbuf(addom->un.numeric,"numeric administration name"); break; case type_QmgrP1_AdministrationDomainName_printable: pqbuf(addom->un.printable,"administration name"); break; } level--; } pprivatedomainidentifier(pdid) struct type_QmgrP1_PrivateDomainIdentifier *pdid; { display("Private Domain Identifier"); level++; switch (pdid->offset) { case type_QmgrP1_PrivateDomainIdentifier_numeric: pqbuf(pdid->un.numeric,"numeric private domain identifier"); break; case type_QmgrP1_PrivateDomainIdentifier_printable: pqbuf(pdid->un.printable,"private domain identifier"); break; } level--; }