home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / pp / pp-6.0 / doc / manual / volume2 / channels.tex < prev    next >
LaTeX Document  |  1991-11-19  |  25.3 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: LaTeX Document (document/latex).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
1% dexvert Corel 10 Texture (image/corel10Texture) ext Unsupported
1% dexvert Text File (text/txt) fallback Supported
100% file LaTeX document text default
99% file C source text default
98% file C source, ASCII text default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/281 LaTeX (Subdocument) default
100% detectItEasy Format: Plain text[LF] default
100% xdgMime text/x-matlab default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 25 20 2d 2a 2d 20 4c 61 | 54 65 58 20 2d 2a 2d 0a |% -*- La|TeX -*-.|
|00000010| 5c 63 68 61 70 74 65 72 | 20 7b 43 68 61 6e 6e 65 |\chapter| {Channe|
|00000020| 6c 73 7d 0a 0a 5c 73 65 | 63 74 69 6f 6e 20 7b 4f |ls}..\se|ction {O|
|00000030| 76 65 72 76 69 65 77 7d | 0a 0a 54 68 69 73 20 63 |verview}|..This c|
|00000040| 68 61 70 74 65 72 20 64 | 65 73 63 72 69 62 65 73 |hapter d|escribes|
|00000050| 20 74 68 65 20 69 6e 74 | 65 72 66 61 63 65 20 77 | the int|erface w|
|00000060| 68 69 63 68 20 70 72 6f | 76 69 64 65 73 20 74 68 |hich pro|vides th|
|00000070| 65 20 6d 65 73 73 61 67 | 65 0a 64 65 6c 69 76 65 |e messag|e.delive|
|00000080| 72 79 20 61 73 70 65 63 | 74 73 20 6f 66 20 74 68 |ry aspec|ts of th|
|00000090| 65 20 6d 65 73 73 61 67 | 65 20 74 72 61 6e 73 66 |e messag|e transf|
|000000a0| 65 72 20 61 62 73 74 72 | 61 63 74 20 73 65 72 76 |er abstr|act serv|
|000000b0| 69 63 65 20 61 6e 64 20 | 4d 54 41 0a 61 62 73 74 |ice and |MTA.abst|
|000000c0| 72 61 63 74 20 73 65 72 | 76 69 63 65 2e 20 20 54 |ract ser|vice. T|
|000000d0| 68 65 20 6d 61 6a 6f 72 | 20 63 6f 6d 70 6f 6e 65 |he major| compone|
|000000e0| 6e 74 20 6f 66 20 74 68 | 69 73 20 69 73 20 61 20 |nt of th|is is a |
|000000f0| 73 65 74 20 6f 66 20 72 | 6f 75 74 69 6e 65 73 0a |set of r|outines.|
|00000100| 66 6f 72 20 61 63 63 65 | 73 73 69 6e 67 20 74 68 |for acce|ssing th|
|00000110| 65 20 50 50 20 71 75 65 | 75 65 2e 20 20 41 73 20 |e PP que|ue. As |
|00000120| 74 68 65 73 65 20 72 6f | 75 74 69 6e 65 73 20 61 |these ro|utines a|
|00000130| 72 65 20 75 73 75 61 6c | 6c 79 20 75 73 65 64 20 |re usual|ly used |
|00000140| 69 6e 20 74 68 65 0a 63 | 6f 6e 74 65 78 74 20 6f |in the.c|ontext o|
|00000150| 66 20 61 20 63 68 61 6e | 6e 65 6c 20 70 72 6f 63 |f a chan|nel proc|
|00000160| 65 73 73 2c 20 74 68 65 | 69 72 20 75 73 61 67 65 |ess, the|ir usage|
|00000170| 20 69 73 20 69 6c 6c 75 | 73 74 72 61 74 65 64 20 | is illu|strated |
|00000180| 69 6e 20 76 61 72 69 6f | 75 73 0a 74 79 70 65 73 |in vario|us.types|
|00000190| 20 6f 66 20 63 68 61 6e | 6e 65 6c 2e 20 20 54 68 | of chan|nel. Th|
|000001a0| 65 72 65 20 61 72 65 20 | 61 6c 73 6f 20 61 64 64 |ere are |also add|
|000001b0| 69 74 69 6f 6e 61 6c 20 | 66 75 6e 63 74 69 6f 6e |itional |function|
|000001c0| 73 20 74 6f 20 66 61 63 | 69 6c 69 74 61 74 65 0a |s to fac|ilitate.|
|000001d0| 72 65 66 6f 72 6d 61 74 | 74 69 6e 67 2f 63 6f 6e |reformat|ting/con|
|000001e0| 76 65 72 73 69 6f 6e 2e | 0a 0a 54 68 65 20 66 6f |version.|..The fo|
|000001f0| 6c 6c 6f 77 69 6e 67 20 | 74 79 70 65 73 20 6f 66 |llowing |types of|
|00000200| 20 63 68 61 6e 6e 65 6c | 20 61 72 65 20 73 75 70 | channel| are sup|
|00000210| 70 6f 72 74 65 64 3a 0a | 0a 5c 62 65 67 69 6e 7b |ported:.|.\begin{|
|00000220| 69 74 65 6d 69 7a 65 7d | 0a 5c 69 74 65 6d 20 50 |itemize}|.\item P|
|00000230| 72 6f 74 6f 63 6f 6c 20 | 6f 75 74 62 6f 75 6e 64 |rotocol |outbound|
|00000240| 20 63 68 61 6e 6e 65 6c | 20 28 4d 54 41 20 41 53 | channel| (MTA AS|
|00000250| 20 64 65 6c 69 76 65 72 | 79 29 2e 0a 0a 5c 69 74 | deliver|y)...\it|
|00000260| 65 6d 20 4c 6f 63 61 6c | 20 64 65 6c 69 76 65 72 |em Local| deliver|
|00000270| 79 20 63 68 61 6e 6e 65 | 6c 20 28 4d 54 20 41 53 |y channe|l (MT AS|
|00000280| 20 64 65 6c 69 76 65 72 | 79 29 2e 0a 0a 5c 69 74 | deliver|y)...\it|
|00000290| 65 6d 20 4c 6f 63 61 6c | 20 70 69 63 6b 75 70 20 |em Local| pickup |
|000002a0| 63 68 61 6e 6e 65 6c 20 | 28 4d 54 20 41 53 20 64 |channel |(MT AS d|
|000002b0| 65 6c 69 76 65 72 79 29 | 2e 0a 0a 5c 69 74 65 6d |elivery)|...\item|
|000002c0| 20 52 65 6d 6f 74 65 20 | 54 57 41 20 63 68 61 6e | Remote |TWA chan|
|000002d0| 6e 65 6c 20 28 4d 54 41 | 20 41 53 20 64 65 6c 69 |nel (MTA| AS deli|
|000002e0| 76 65 72 79 29 2e 0a 0a | 5c 69 74 65 6d 20 52 65 |very)...|\item Re|
|000002f0| 66 6f 72 6d 61 74 74 65 | 72 73 2e 0a 5c 65 6e 64 |formatte|rs..\end|
|00000300| 7b 69 74 65 6d 69 7a 65 | 7d 0a 0a 5c 73 65 63 74 |{itemize|}..\sect|
|00000310| 69 6f 6e 20 7b 54 68 65 | 20 51 75 65 75 65 20 49 |ion {The| Queue I|
|00000320| 6e 74 65 72 66 61 63 65 | 7d 0a 0a 5c 73 75 62 73 |nterface|}..\subs|
|00000330| 65 63 74 69 6f 6e 20 7b | 4d 61 6a 6f 72 20 53 74 |ection {|Major St|
|00000340| 72 75 63 74 75 72 65 73 | 7d 0a 0a 54 68 65 20 6d |ructures|}..The m|
|00000350| 61 6a 6f 72 20 73 74 72 | 75 63 74 75 72 65 73 20 |ajor str|uctures |
|00000360| 69 6e 20 75 73 65 20 66 | 6f 72 20 72 65 61 64 69 |in use f|or readi|
|00000370| 6e 67 20 74 68 65 20 71 | 75 65 75 65 20 61 72 65 |ng the q|ueue are|
|00000380| 20 74 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 3a 2d | the fol|lowing:-|
|00000390| 0a 5c 62 65 67 69 6e 7b | 69 74 65 6d 69 7a 65 7d |.\begin{|itemize}|
|000003a0| 0a 5c 69 74 65 6d 20 54 | 68 65 20 70 61 72 61 6d |.\item T|he param|
|000003b0| 65 74 65 72 20 73 74 72 | 75 63 74 75 72 65 20 64 |eter str|ucture d|
|000003c0| 65 73 63 72 69 62 65 64 | 20 69 6e 20 46 69 67 75 |escribed| in Figu|
|000003d0| 72 65 7e 5c 72 65 66 7b | 70 72 6d 3a 73 74 72 75 |re~\ref{|prm:stru|
|000003e0| 63 74 7d 20 6f 6e 0a 70 | 61 67 65 7e 5c 70 61 67 |ct} on.p|age~\pag|
|000003f0| 65 72 65 66 7b 70 72 6d | 3a 73 74 72 75 63 74 7d |eref{prm|:struct}|
|00000400| 2e 0a 0a 5c 69 74 65 6d | 20 54 68 65 20 71 75 65 |...\item| The que|
|00000410| 75 65 20 73 74 72 75 63 | 74 75 72 65 20 64 65 73 |ue struc|ture des|
|00000420| 63 72 69 62 65 64 20 69 | 6e 20 46 69 67 75 72 65 |cribed i|n Figure|
|00000430| 7e 5c 72 65 66 7b 71 3a | 73 74 72 75 63 74 7d 20 |~\ref{q:|struct} |
|00000440| 6f 6e 0a 70 61 67 65 7e | 5c 70 61 67 65 72 65 66 |on.page~|\pageref|
|00000450| 7b 71 3a 73 74 72 75 63 | 74 7d 2e 0a 0a 5c 69 74 |{q:struc|t}...\it|
|00000460| 65 6d 20 54 68 65 20 61 | 64 64 72 65 73 73 20 73 |em The a|ddress s|
|00000470| 74 72 75 63 74 75 72 65 | 20 64 65 73 63 72 69 62 |tructure| describ|
|00000480| 65 64 20 69 6e 20 46 69 | 67 75 72 65 7e 5c 72 65 |ed in Fi|gure~\re|
|00000490| 66 7b 61 64 72 3a 73 74 | 72 75 63 74 7d 20 6f 6e |f{adr:st|ruct} on|
|000004a0| 0a 70 61 67 65 7e 5c 70 | 61 67 65 72 65 66 7b 61 |.page~\p|ageref{a|
|000004b0| 64 72 3a 73 74 72 75 63 | 74 7d 2e 0a 0a 5c 65 6e |dr:struc|t}...\en|
|000004c0| 64 7b 69 74 65 6d 69 7a | 65 7d 0a 0a 54 68 65 72 |d{itemiz|e}..Ther|
|000004d0| 65 20 69 73 20 61 6c 73 | 6f 20 61 20 73 65 70 61 |e is als|o a sepa|
|000004e0| 72 61 74 65 20 73 65 74 | 20 6f 66 20 72 6f 75 74 |rate set| of rout|
|000004f0| 69 6e 65 73 20 61 6e 64 | 20 73 74 72 75 63 74 75 |ines and| structu|
|00000500| 72 65 73 20 66 6f 72 0a | 69 6e 74 65 72 61 63 74 |res for.|interact|
|00000510| 69 6e 67 20 77 69 74 68 | 20 74 68 65 20 71 75 65 |ing with| the que|
|00000520| 75 65 20 6d 61 6e 61 67 | 65 72 2e 20 54 68 69 73 |ue manag|er. This|
|00000530| 20 69 6e 74 65 72 66 61 | 63 65 20 6d 61 6b 65 73 | interfa|ce makes|
|00000540| 20 75 73 65 20 6f 66 20 | 74 68 65 0a 73 74 72 75 | use of |the.stru|
|00000550| 63 74 75 72 65 73 20 64 | 65 66 69 6e 65 64 20 69 |ctures d|efined i|
|00000560| 6e 0a 46 69 67 75 72 65 | 7e 5c 72 65 66 7b 73 74 |n.Figure|~\ref{st|
|00000570| 72 75 63 74 3a 71 6d 67 | 72 69 66 7d 2e 5c 69 6e |ruct:qmg|rif}.\in|
|00000580| 64 65 78 7b 74 79 70 65 | 5c 5f 51 6d 67 72 5c 5f |dex{type|\_Qmgr\_|
|00000590| 44 65 6c 69 76 65 72 79 | 53 74 61 74 75 73 7d 0a |Delivery|Status}.|
|000005a0| 5c 69 6e 64 65 78 7b 74 | 79 70 65 5c 5f 51 6d 67 |\index{t|ype\_Qmg|
|000005b0| 72 5c 5f 43 68 61 6e 6e | 65 6c 7d 5c 69 6e 64 65 |r\_Chann|el}\inde|
|000005c0| 78 7b 74 79 70 65 5c 5f | 51 6d 67 72 5c 5f 50 72 |x{type\_|Qmgr\_Pr|
|000005d0| 6f 63 4d 73 67 7d 5c 69 | 6e 64 65 78 7b 74 79 70 |ocMsg}\i|ndex{typ|
|000005e0| 65 5c 5f 51 6d 67 72 5c | 5f 51 49 44 7d 0a 5c 69 |e\_Qmgr\|_QID}.\i|
|000005f0| 6e 64 65 78 7b 74 79 70 | 65 5c 5f 51 6d 67 72 5c |ndex{typ|e\_Qmgr\|
|00000600| 5f 52 65 63 69 70 69 65 | 6e 74 49 64 7d 0a 5c 74 |_Recipie|ntId}.\t|
|00000610| 61 67 72 69 6e 64 5b 68 | 62 74 70 5d 7b 71 6d 67 |agrind[h|btp]{qmg|
|00000620| 72 69 66 7d 7b 43 68 61 | 6e 6e 65 6c 20 2f 20 51 |rif}{Cha|nnel / Q|
|00000630| 75 65 75 65 20 4d 61 6e | 61 67 65 72 20 49 6e 74 |ueue Man|ager Int|
|00000640| 65 72 66 61 63 65 20 53 | 74 72 75 63 74 75 72 65 |erface S|tructure|
|00000650| 73 7d 0a 7b 73 74 72 75 | 63 74 3a 71 6d 67 72 69 |s}.{stru|ct:qmgri|
|00000660| 66 7d 0a 0a 54 68 65 73 | 65 20 73 74 72 75 63 74 |f}..Thes|e struct|
|00000670| 75 72 65 73 20 61 72 65 | 20 64 65 72 69 76 65 64 |ures are| derived|
|00000680| 20 66 72 6f 6d 20 74 68 | 65 20 71 75 65 75 65 20 | from th|e queue |
|00000690| 6d 61 6e 61 67 65 72 20 | 52 4f 53 20 73 70 65 63 |manager |ROS spec|
|000006a0| 69 66 69 63 61 74 69 6f | 6e 0a 67 69 76 65 6e 20 |ificatio|n.given |
|000006b0| 69 6e 20 41 70 70 65 6e | 64 69 78 7e 46 20 6f 66 |in Appen|dix~F of|
|000006c0| 20 56 6f 6c 75 6d 65 7e | 31 2e 0a 0a 5c 73 75 62 | Volume~|1...\sub|
|000006d0| 73 65 63 74 69 6f 6e 20 | 7b 42 61 73 69 63 20 41 |section |{Basic A|
|000006e0| 63 63 65 73 73 7d 0a 0a | 54 68 65 20 62 61 73 69 |ccess}..|The basi|
|000006f0| 63 20 61 63 63 65 73 73 | 20 70 72 6f 76 69 64 65 |c access| provide|
|00000700| 64 20 74 6f 20 74 68 65 | 20 71 75 65 75 65 20 69 |d to the| queue i|
|00000710| 73 20 74 68 72 6f 75 67 | 68 20 61 20 73 65 74 20 |s throug|h a set |
|00000720| 6f 66 20 6c 69 62 72 61 | 72 79 0a 63 61 6c 6c 73 |of libra|ry.calls|
|00000730| 2e 20 20 54 68 65 72 65 | 20 61 72 65 20 73 65 76 |. There| are sev|
|00000740| 65 72 61 6c 20 63 6c 61 | 73 73 65 73 20 6f 66 20 |eral cla|sses of |
|00000750| 72 6f 75 74 69 6e 65 73 | 20 77 68 69 63 68 20 63 |routines| which c|
|00000760| 61 6e 20 62 65 20 64 69 | 76 69 64 65 64 20 75 70 |an be di|vided up|
|00000770| 0a 69 6e 74 6f 20 71 75 | 65 75 65 20 6d 61 6e 61 |.into qu|eue mana|
|00000780| 67 65 72 20 69 6e 74 65 | 72 61 63 74 69 6f 6e 2c |ger inte|raction,|
|00000790| 20 61 64 64 72 65 73 73 | 20 66 69 6c 65 20 70 72 | address| file pr|
|000007a0| 6f 63 65 73 73 69 6e 67 | 20 72 6f 75 74 69 6e 65 |ocessing| routine|
|000007b0| 73 20 61 6e 64 0a 6d 65 | 73 73 61 67 65 20 62 6f |s and.me|ssage bo|
|000007c0| 64 79 20 72 6f 75 74 69 | 6e 65 73 2e 20 4d 6f 73 |dy routi|nes. Mos|
|000007d0| 74 20 6f 66 20 74 68 65 | 20 6f 70 65 72 61 74 69 |t of the| operati|
|000007e0| 6f 6e 73 20 64 65 73 63 | 72 69 62 65 64 20 68 65 |ons desc|ribed he|
|000007f0| 72 65 20 61 72 65 20 6f | 6e 6c 79 0a 75 73 65 66 |re are o|nly.usef|
|00000800| 75 6c 20 66 6f 72 20 6f | 75 74 62 6f 75 6e 64 20 |ul for o|utbound |
|00000810| 63 68 61 6e 6e 65 6c 73 | 2e 0a 0a 5c 73 75 62 73 |channels|...\subs|
|00000820| 75 62 73 65 63 74 69 6f | 6e 7b 51 75 65 75 65 20 |ubsectio|n{Queue |
|00000830| 4d 61 6e 61 67 65 72 20 | 49 6e 74 65 72 61 63 74 |Manager |Interact|
|00000840| 69 6f 6e 7d 0a 0a 54 68 | 65 20 71 75 65 75 65 20 |ion}..Th|e queue |
|00000850| 6d 61 6e 61 67 65 72 20 | 69 6e 74 65 72 61 63 74 |manager |interact|
|00000860| 69 6f 6e 20 69 73 20 6e | 6f 72 6d 61 6c 6c 79 20 |ion is n|ormally |
|00000870| 68 61 6e 64 6c 65 64 20 | 62 79 20 61 20 73 69 6e |handled |by a sin|
|00000880| 67 6c 65 0a 70 72 6f 63 | 65 64 75 72 65 2c 20 0a |gle.proc|edure, .|
|00000890| 5c 6c 69 6e 65 62 72 65 | 61 6b 0a 5c 76 65 72 62 |\linebre|ak.\verb|
|000008a0| 7c 63 68 61 6e 6e 65 6c | 5f 63 6f 6e 74 72 6f 6c ||channel|_control|
|000008b0| 7c 2c 20 77 68 69 63 68 | 20 6d 61 6e 61 67 65 73 ||, which| manages|
|000008c0| 20 74 68 65 20 73 65 73 | 73 69 6f 6e 20 77 69 74 | the ses|sion wit|
|000008d0| 68 20 74 68 65 0a 51 4d | 47 52 20 61 6e 64 20 63 |h the.QM|GR and c|
|000008e0| 61 6c 6c 73 20 74 68 65 | 20 61 70 70 72 6f 70 72 |alls the| appropr|
|000008f0| 69 61 74 65 20 72 6f 75 | 74 69 6e 65 73 20 6f 6e |iate rou|tines on|
|00000900| 20 72 65 63 65 69 70 74 | 20 6f 66 20 52 4f 53 20 | receipt| of ROS |
|00000910| 6f 70 65 72 61 74 69 6f | 6e 73 2e 0a 0a 5c 62 65 |operatio|ns...\be|
|00000920| 67 69 6e 7b 71 75 6f 74 | 65 7d 5c 69 6e 64 65 78 |gin{quot|e}\index|
|00000930| 7b 63 68 61 6e 6e 65 6c | 5c 5f 63 6f 6e 74 72 6f |{channel|\_contro|
|00000940| 6c 7d 5c 62 65 67 69 6e | 7b 76 65 72 62 61 74 69 |l}\begin|{verbati|
|00000950| 6d 7d 0a 69 6e 74 20 63 | 68 61 6e 6e 65 6c 5f 63 |m}.int c|hannel_c|
|00000960| 6f 6e 74 72 6f 6c 20 28 | 61 72 67 63 2c 20 61 72 |ontrol (|argc, ar|
|00000970| 67 76 2c 20 69 6e 69 74 | 66 6e 78 2c 20 0a 20 20 |gv, init|fnx, . |
|00000980| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000990| 20 20 20 70 72 6f 63 66 | 6e 78 2c 20 65 6e 64 66 | procf|nx, endf|
|000009a0| 6e 78 29 0a 69 6e 74 20 | 20 20 20 61 72 67 63 3b |nx).int | argc;|
|000009b0| 0a 63 68 61 72 20 20 20 | 2a 2a 61 72 67 76 3b 0a |.char |**argv;.|
|000009c0| 49 46 50 20 20 20 20 69 | 6e 69 74 66 6e 78 3b 0a |IFP i|nitfnx;.|
|000009d0| 73 74 72 75 63 74 20 74 | 79 70 65 5f 51 6d 67 72 |struct t|ype_Qmgr|
|000009e0| 5f 44 65 6c 69 76 65 72 | 79 53 74 61 74 75 73 20 |_Deliver|yStatus |
|000009f0| 20 20 2a 28 2a 70 72 6f | 63 66 6e 78 29 28 29 3b | *(*pro|cfnx)();|
|00000a00| 0a 49 46 50 20 20 20 20 | 65 6e 64 66 6e 78 3b 0a |.IFP |endfnx;.|
|00000a10| 5c 65 6e 64 7b 76 65 72 | 62 61 74 69 6d 7d 5c 65 |\end{ver|batim}\e|
|00000a20| 6e 64 7b 71 75 6f 74 65 | 7d 0a 0a 54 68 65 20 61 |nd{quote|}..The a|
|00000a30| 72 67 75 6d 65 6e 74 73 | 20 61 72 65 20 61 73 20 |rguments| are as |
|00000a40| 66 6f 6c 6c 6f 77 73 3a | 0a 5c 62 65 67 69 6e 7b |follows:|.\begin{|
|00000a50| 64 65 73 63 72 69 62 65 | 7d 0a 5c 69 74 65 6d 5b |describe|}.\item[|
|00000a60| 5c 76 65 72 62 7c 61 72 | 67 63 7c 2f 5c 76 65 72 |\verb|ar|gc|/\ver|
|00000a70| 62 7c 61 72 67 76 7c 3a | 5d 09 54 68 65 20 61 72 |b|argv|:|].The ar|
|00000a80| 67 75 6d 65 6e 74 20 63 | 6f 75 6e 74 20 61 6e 64 |gument c|ount and|
|00000a90| 20 76 65 63 74 6f 72 2c | 20 6e 6f 72 6d 61 6c 6c | vector,| normall|
|00000aa0| 79 0a 63 6f 70 69 65 64 | 20 66 72 6f 6d 20 74 68 |y.copied| from th|
|00000ab0| 65 20 5c 76 65 72 62 7c | 6d 61 69 6e 7c 20 70 72 |e \verb||main| pr|
|00000ac0| 6f 63 65 64 75 72 65 2e | 20 54 68 65 73 65 20 61 |ocedure.| These a|
|00000ad0| 72 65 20 75 73 65 64 20 | 74 6f 20 72 65 63 61 70 |re used |to recap|
|00000ae0| 74 75 72 65 20 74 68 65 | 0a 73 74 61 74 65 20 6f |ture the|.state o|
|00000af0| 66 20 74 68 65 20 61 73 | 73 6f 63 69 61 74 69 6f |f the as|sociatio|
|00000b00| 6e 20 61 73 20 6f 75 74 | 62 6f 75 6e 64 20 63 68 |n as out|bound ch|
|00000b10| 61 6e 6e 65 6c 73 20 61 | 72 65 20 6e 6f 72 6d 61 |annels a|re norma|
|00000b20| 6c 6c 79 20 72 75 6e 20 | 75 6e 64 65 72 0a 74 68 |lly run |under.th|
|00000b30| 65 20 5c 6d 61 6e 20 70 | 70 74 73 61 70 64 20 28 |e \man p|ptsapd (|
|00000b40| 38 29 20 64 61 65 6d 6f | 6e 2e 0a 0a 5c 69 74 65 |8) daemo|n...\ite|
|00000b50| 6d 5b 5c 76 65 72 62 7c | 69 6e 69 74 66 6e 78 7c |m[\verb||initfnx||
|00000b60| 3a 5d 09 41 6e 20 69 6e | 69 74 69 61 6c 69 73 61 |:].An in|itialisa|
|00000b70| 74 69 6f 6e 20 66 75 6e | 63 74 69 6f 6e 2e 20 54 |tion fun|ction. T|
|00000b80| 68 69 73 20 69 73 20 63 | 61 6c 6c 65 64 20 74 6f |his is c|alled to|
|00000b90| 0a 69 6e 69 74 69 61 6c | 69 73 65 20 74 68 65 20 |.initial|ise the |
|00000ba0| 63 68 61 6e 6e 65 6c 20 | 61 6e 64 20 69 6e 66 6f |channel |and info|
|00000bb0| 72 6d 20 69 74 20 6f 66 | 20 69 74 73 20 6e 61 6d |rm it of| its nam|
|00000bc0| 65 2e 0a 0a 5c 69 74 65 | 6d 5b 5c 76 65 72 62 7c |e...\ite|m[\verb||
|00000bd0| 70 72 6f 63 66 6e 78 7c | 3a 5d 09 41 20 66 75 6e |procfnx||:].A fun|
|00000be0| 63 74 69 6f 6e 20 63 61 | 6c 6c 65 64 20 66 6f 72 |ction ca|lled for|
|00000bf0| 20 65 61 63 68 20 51 4d | 47 52 20 70 72 6f 63 65 | each QM|GR proce|
|00000c00| 73 73 0a 6d 65 73 73 61 | 67 65 20 6f 70 65 72 61 |ss.messa|ge opera|
|00000c10| 74 69 6f 6e 2e 0a 0a 5c | 69 74 65 6d 5b 5c 76 65 |tion...\|item[\ve|
|00000c20| 72 62 7c 65 6e 64 66 6e | 78 7c 3a 5d 20 41 20 66 |rb|endfn|x|:] A f|
|00000c30| 75 6e 63 74 69 6f 6e 20 | 63 61 6c 6c 65 64 20 77 |unction |called w|
|00000c40| 68 65 6e 20 74 68 65 20 | 73 65 73 73 69 6f 6e 20 |hen the |session |
|00000c50| 77 69 74 68 20 74 68 65 | 20 51 4d 47 52 0a 69 73 |with the| QMGR.is|
|00000c60| 20 74 65 72 6d 69 6e 61 | 74 65 64 2e 20 54 68 65 | termina|ted. The|
|00000c70| 20 63 6f 6e 73 74 61 6e | 74 20 5c 76 65 72 62 7c | constan|t \verb||
|00000c80| 4e 55 4c 4c 49 46 50 7c | 20 6d 61 79 20 62 65 20 |NULLIFP|| may be |
|00000c90| 75 73 65 64 20 69 66 20 | 74 68 69 73 20 66 75 6e |used if |this fun|
|00000ca0| 63 74 69 6f 6e 0a 69 73 | 20 6e 6f 74 20 72 65 71 |ction.is| not req|
|00000cb0| 75 69 72 65 64 2e 0a 5c | 65 6e 64 7b 64 65 73 63 |uired..\|end{desc|
|00000cc0| 72 69 62 65 7d 0a 54 68 | 65 20 5c 76 65 72 62 7c |ribe}.Th|e \verb||
|00000cd0| 63 68 61 6e 6e 65 6c 5f | 63 6f 6e 74 72 6f 6c 7c |channel_|control||
|00000ce0| 20 66 75 6e 63 74 69 6f | 6e 20 69 6e 76 6f 6b 65 | functio|n invoke|
|00000cf0| 73 20 69 74 73 20 6f 77 | 6e 20 65 72 72 6f 72 20 |s its ow|n error |
|00000d00| 68 61 6e 64 6c 65 72 73 | 0a 61 6e 64 20 64 6f 65 |handlers|.and doe|
|00000d10| 73 20 6e 6f 74 20 6e 6f | 72 6d 61 6c 6c 79 20 72 |s not no|rmally r|
|00000d20| 65 74 75 72 6e 2e 0a 0a | 0a 54 68 65 20 74 77 6f |eturn...|.The two|
|00000d30| 20 66 75 6e 63 74 69 6f | 6e 73 20 5c 76 65 72 62 | functio|ns \verb|
|00000d40| 7c 69 6e 69 74 66 6e 78 | 7c 20 61 6e 64 20 5c 76 ||initfnx|| and \v|
|00000d50| 65 72 62 7c 70 72 6f 63 | 66 6e 78 7c 20 73 68 6f |erb|proc|fnx| sho|
|00000d60| 77 6e 20 61 62 6f 76 65 | 20 61 72 65 20 74 68 65 |wn above| are the|
|00000d70| 20 6b 65 79 20 74 6f 20 | 74 68 65 20 63 68 61 6e | key to |the chan|
|00000d80| 6e 65 6c 73 0a 6f 70 65 | 72 61 74 69 6f 6e 2e 20 |nels.ope|ration. |
|00000d90| 54 68 65 20 69 6e 69 74 | 69 61 6c 69 73 61 74 69 |The init|ialisati|
|00000da0| 6f 6e 20 66 75 6e 63 74 | 69 6f 6e 20 73 68 6f 75 |on funct|ion shou|
|00000db0| 6c 64 20 62 65 20 64 65 | 66 69 6e 65 64 20 69 6e |ld be de|fined in|
|00000dc0| 20 74 68 65 0a 66 6f 6c | 6c 6f 77 69 6e 67 20 77 | the.fol|lowing w|
|00000dd0| 61 79 3a 0a 5c 62 65 67 | 69 6e 7b 71 75 6f 74 65 |ay:.\beg|in{quote|
|00000de0| 7d 5c 62 65 67 69 6e 7b | 76 65 72 62 61 74 69 6d |}\begin{|verbatim|
|00000df0| 7d 0a 69 6e 74 20 20 20 | 69 6e 69 74 66 6e 78 20 |}.int |initfnx |
|00000e00| 28 61 72 67 29 0a 73 74 | 72 75 63 74 20 74 79 70 |(arg).st|ruct typ|
|00000e10| 65 5f 51 6d 67 72 5f 43 | 68 61 6e 6e 65 6c 20 2a |e_Qmgr_C|hannel *|
|00000e20| 61 72 67 3b 0a 5c 65 6e | 64 7b 76 65 72 62 61 74 |arg;.\en|d{verbat|
|00000e30| 69 6d 7d 5c 65 6e 64 7b | 71 75 6f 74 65 7d 0a 0a |im}\end{|quote}..|
|00000e40| 54 68 65 20 66 75 6e 63 | 74 69 6f 6e 20 73 68 6f |The func|tion sho|
|00000e50| 75 6c 64 20 74 68 65 6e | 20 64 65 63 69 64 65 20 |uld then| decide |
|00000e60| 77 68 65 74 68 65 72 20 | 74 68 65 20 67 69 76 65 |whether |the give|
|00000e70| 6e 20 63 68 61 6e 6e 65 | 6c 20 61 72 67 75 6d 65 |n channe|l argume|
|00000e80| 6e 74 20 69 73 0a 73 65 | 6e 73 69 62 6c 65 20 66 |nt is.se|nsible f|
|00000e90| 6f 72 20 74 68 69 73 20 | 63 68 61 6e 6e 65 6c 20 |or this |channel |
|00000ea0| 61 6e 64 20 72 65 74 75 | 72 6e 20 6f 6e 65 20 6f |and retu|rn one o|
|00000eb0| 66 20 74 68 65 20 63 6f | 6e 73 74 61 6e 74 73 20 |f the co|nstants |
|00000ec0| 5c 76 65 72 62 7c 4f 4b | 7c 20 6f 72 0a 5c 76 65 |\verb|OK|| or.\ve|
|00000ed0| 72 62 7c 4e 4f 54 4f 4b | 7c 2e 20 54 68 69 73 20 |rb|NOTOK||. This |
|00000ee0| 66 75 6e 63 74 69 6f 6e | 20 69 73 20 6e 6f 72 6d |function| is norm|
|00000ef0| 61 6c 6c 79 20 6f 6e 6c | 79 20 63 61 6c 6c 65 64 |ally onl|y called|
|00000f00| 20 6f 6e 63 65 20 62 79 | 20 74 68 65 20 51 4d 47 | once by| the QMG|
|00000f10| 52 2c 0a 62 75 74 20 69 | 6e 20 63 61 73 65 73 20 |R,.but i|n cases |
|00000f20| 77 68 65 72 65 20 74 68 | 65 20 73 61 6d 65 20 70 |where th|e same p|
|00000f30| 72 6f 67 72 61 6d 20 63 | 61 6e 20 72 75 6e 20 61 |rogram c|an run a|
|00000f40| 73 20 61 20 6e 75 6d 62 | 65 72 20 6f 66 20 63 68 |s a numb|er of ch|
|00000f50| 61 6e 6e 65 6c 73 20 69 | 74 0a 6d 61 79 20 62 65 |annels i|t.may be|
|00000f60| 20 63 61 6c 6c 65 64 20 | 73 75 62 73 65 71 75 65 | called |subseque|
|00000f70| 6e 74 6c 79 20 74 6f 20 | 72 65 69 6e 69 74 69 61 |ntly to |reinitia|
|00000f80| 6c 69 73 65 20 74 68 65 | 20 63 68 61 6e 6e 65 6c |lise the| channel|
|00000f90| 20 74 6f 20 61 20 64 69 | 66 66 65 72 65 6e 74 0a | to a di|fferent.|
|00000fa0| 6d 6f 64 65 20 6f 66 20 | 6f 70 65 72 61 74 69 6f |mode of |operatio|
|00000fb0| 6e 2e 0a 0a 54 68 65 20 | 70 72 6f 63 65 73 73 20 |n...The |process |
|00000fc0| 66 75 6e 63 74 69 6f 6e | 20 69 73 20 74 68 65 20 |function| is the |
|00000fd0| 6f 6e 65 20 74 68 61 74 | 20 64 6f 65 73 20 74 68 |one that| does th|
|00000fe0| 65 20 72 65 61 6c 20 77 | 6f 72 6b 20 6f 66 20 74 |e real w|ork of t|
|00000ff0| 68 65 0a 63 68 61 6e 6e | 65 6c 2e 20 49 74 20 73 |he.chann|el. It s|
|00001000| 68 6f 75 6c 64 20 62 65 | 20 64 65 66 69 6e 65 64 |hould be| defined|
|00001010| 20 6c 69 6b 65 20 74 68 | 69 73 3a 0a 5c 62 65 67 | like th|is:.\beg|
|00001020| 69 6e 7b 71 75 6f 74 65 | 7d 5c 62 65 67 69 6e 7b |in{quote|}\begin{|
|00001030| 76 65 72 62 61 74 69 6d | 7d 0a 73 74 72 75 63 74 |verbatim|}.struct|
|00001040| 20 74 79 70 65 5f 51 6d | 67 72 5f 44 65 6c 69 76 | type_Qm|gr_Deliv|
|00001050| 65 72 79 53 74 61 74 75 | 73 20 2a 70 72 6f 63 65 |eryStatu|s *proce|
|00001060| 73 73 6d 65 73 73 61 67 | 65 20 28 61 72 67 29 0a |ssmessag|e (arg).|
|00001070| 73 74 72 75 63 74 20 74 | 79 70 65 5f 51 6d 67 72 |struct t|ype_Qmgr|
|00001080| 5f 50 72 6f 63 4d 73 67 | 20 2a 61 72 67 3b 0a 5c |_ProcMsg| *arg;.\|
|00001090| 65 6e 64 7b 76 65 72 62 | 61 74 69 6d 7d 5c 65 6e |end{verb|atim}\en|
|000010a0| 64 7b 71 75 6f 74 65 7d | 0a 54 68 65 20 66 75 6e |d{quote}|.The fun|
|000010b0| 63 74 69 6f 6e 20 73 68 | 6f 75 6c 64 20 74 68 65 |ction sh|ould the|
|000010c0| 6e 20 61 74 74 65 6d 70 | 74 20 74 6f 20 70 72 6f |n attemp|t to pro|
|000010d0| 63 65 73 73 20 74 68 65 | 20 67 69 76 65 6e 20 6d |cess the| given m|
|000010e0| 65 73 73 61 67 65 20 66 | 6f 72 20 74 68 65 0a 67 |essage f|or the.g|
|000010f0| 69 76 65 6e 20 72 65 63 | 69 70 69 65 6e 74 73 2e |iven rec|ipients.|
|00001100| 20 54 68 69 73 20 75 73 | 75 61 6c 6c 79 20 69 6e | This us|ually in|
|00001110| 76 6f 6c 76 65 73 20 66 | 69 72 73 74 20 72 65 61 |volves f|irst rea|
|00001120| 64 69 6e 67 20 74 68 65 | 20 61 64 64 72 65 73 73 |ding the| address|
|00001130| 0a 63 6f 6e 74 72 6f 6c | 20 66 69 6c 65 20 67 69 |.control| file gi|
|00001140| 76 65 6e 20 61 73 20 70 | 61 72 74 20 6f 66 20 74 |ven as p|art of t|
|00001150| 68 65 20 73 74 72 75 63 | 74 75 72 65 20 70 61 73 |he struc|ture pas|
|00001160| 73 65 64 2e 0a 0a 57 68 | 65 6e 20 74 68 65 20 70 |sed...Wh|en the p|
|00001170| 72 6f 63 65 73 73 69 6e | 67 20 6f 66 20 74 68 65 |rocessin|g of the|
|00001180| 20 6d 65 73 73 61 67 65 | 20 68 61 73 20 66 69 6e | message| has fin|
|00001190| 69 73 68 65 64 2c 20 74 | 68 65 20 66 75 6e 63 74 |ished, t|he funct|
|000011a0| 69 6f 6e 20 73 68 6f 75 | 6c 64 0a 72 65 74 75 72 |ion shou|ld.retur|
|000011b0| 6e 20 61 20 70 6f 69 6e | 74 65 72 20 74 6f 20 61 |n a poin|ter to a|
|000011c0| 20 6c 69 73 74 20 6f 66 | 20 72 65 63 69 70 69 65 | list of| recipie|
|000011d0| 6e 74 20 6e 75 6d 62 65 | 72 73 20 74 6f 67 65 74 |nt numbe|rs toget|
|000011e0| 68 65 72 20 77 69 74 68 | 20 61 20 73 74 61 74 75 |her with| a statu|
|000011f0| 73 0a 66 69 65 6c 64 2e | 20 54 68 69 73 20 73 74 |s.field.| This st|
|00001200| 72 75 63 74 75 72 65 20 | 69 73 20 74 68 65 20 5c |ructure |is the \|
|00001210| 76 65 72 62 7c 74 79 70 | 65 5f 51 6d 67 72 5f 44 |verb|typ|e_Qmgr_D|
|00001220| 65 6c 69 76 65 72 79 53 | 74 61 74 75 73 7c 0a 73 |eliveryS|tatus|.s|
|00001230| 74 72 75 63 74 75 72 65 | 2e 20 54 68 69 73 20 73 |tructure|. This s|
|00001240| 70 65 63 69 66 69 65 73 | 20 66 6f 72 20 65 61 63 |pecifies| for eac|
|00001250| 68 20 72 65 63 69 70 69 | 65 6e 74 20 77 68 65 74 |h recipi|ent whet|
|00001260| 68 65 72 20 74 68 65 20 | 6f 70 65 72 61 74 69 6f |her the |operatio|
|00001270| 6e 20 77 61 73 0a 61 20 | 73 75 63 63 65 73 73 20 |n was.a |success |
|00001280| 6f 72 20 66 61 69 6c 75 | 72 65 2e 20 54 68 65 20 |or failu|re. The |
|00001290| 73 74 61 74 75 73 20 76 | 61 6c 75 65 73 20 61 72 |status v|alues ar|
|000012a0| 65 3a 0a 5c 62 65 67 69 | 6e 7b 64 65 73 63 72 69 |e:.\begi|n{descri|
|000012b0| 62 65 7d 0a 5c 69 74 65 | 6d 5b 5c 76 65 72 62 7c |be}.\ite|m[\verb||
|000012c0| 69 6e 74 5c 5f 51 6d 67 | 72 5c 5f 73 74 61 74 75 |int\_Qmg|r\_statu|
|000012d0| 73 5c 5f 73 75 63 63 65 | 73 73 7c 3a 5d 5c 69 6e |s\_succe|ss|:]\in|
|000012e0| 64 65 78 7b 73 74 61 74 | 75 73 5c 5f 73 75 63 63 |dex{stat|us\_succ|
|000012f0| 65 73 73 7d 0a 54 68 65 | 20 6f 70 65 72 61 74 69 |ess}.The| operati|
|00001300| 6f 6e 20 77 61 73 20 73 | 75 63 63 65 73 73 66 75 |on was s|uccessfu|
|00001310| 6c 2c 20 74 68 65 20 6e | 65 78 74 20 70 72 6f 63 |l, the n|ext proc|
|00001320| 65 73 73 69 6e 67 20 73 | 74 61 67 65 20 63 61 6e |essing s|tage can|
|00001330| 20 62 65 0a 63 6f 6e 73 | 69 64 65 72 65 64 2e 0a | be.cons|idered..|
|00001340| 0a 5c 69 74 65 6d 5b 5c | 76 65 72 62 7c 69 6e 74 |.\item[\|verb|int|
|00001350| 5c 5f 51 6d 67 72 5c 5f | 73 74 61 74 75 73 5c 5f |\_Qmgr\_|status\_|
|00001360| 6e 65 67 61 74 69 76 65 | 44 52 7c 3a 5d 5c 69 6e |negative|DR|:]\in|
|00001370| 64 65 78 7b 73 74 61 74 | 75 73 5c 5f 6e 65 67 61 |dex{stat|us\_nega|
|00001380| 74 69 76 65 44 52 7d 0a | 54 68 65 20 6d 65 73 73 |tiveDR}.|The mess|
|00001390| 61 67 65 20 68 61 73 20 | 66 61 69 6c 65 64 2c 20 |age has |failed, |
|000013a0| 61 6e 64 20 61 20 64 65 | 6c 69 76 65 72 79 20 72 |and a de|livery r|
|000013b0| 65 70 6f 72 74 20 7b 5c | 65 6d 20 6d 75 73 74 7d |eport {\|em must}|
|000013c0| 20 62 65 20 77 72 69 74 | 74 65 6e 2e 0a 0a 5c 69 | be writ|ten...\i|
|000013d0| 74 65 6d 5b 5c 76 65 72 | 62 7c 69 6e 74 5c 5f 51 |tem[\ver|b|int\_Q|
|000013e0| 6d 67 72 5c 5f 73 74 61 | 74 75 73 5c 5f 70 6f 73 |mgr\_sta|tus\_pos|
|000013f0| 69 74 69 76 65 44 52 7c | 3a 5d 0a 5c 69 6e 64 65 |itiveDR||:].\inde|
|00001400| 78 7b 73 74 61 74 75 73 | 5c 5f 70 6f 73 69 74 69 |x{status|\_positi|
|00001410| 76 65 44 52 7d 0a 54 68 | 65 20 6d 65 73 73 61 67 |veDR}.Th|e messag|
|00001420| 65 20 68 61 73 20 73 75 | 63 63 65 65 64 65 64 2c |e has su|cceeded,|
|00001430| 20 61 6e 64 20 61 20 63 | 6f 6e 66 69 72 6d 61 74 | and a c|onfirmat|
|00001440| 69 6f 6e 20 69 73 20 72 | 65 71 75 69 72 65 64 2e |ion is r|equired.|
|00001450| 20 54 68 69 73 20 7b 5c | 65 6d 0a 6d 75 73 74 7d | This {\|em.must}|
|00001460| 20 62 65 20 77 72 69 74 | 74 65 6e 20 6f 75 74 2e | be writ|ten out.|
|00001470| 0a 0a 5c 69 74 65 6d 5b | 5c 76 65 72 62 7c 69 6e |..\item[|\verb|in|
|00001480| 74 5c 5f 51 6d 67 72 5c | 5f 73 74 61 74 75 73 5c |t\_Qmgr\|_status\|
|00001490| 5f 73 75 63 63 65 73 73 | 53 68 61 72 65 64 44 52 |_success|SharedDR|
|000014a0| 7c 3a 5d 0a 5c 69 6e 64 | 65 78 7b 73 74 61 74 75 ||:].\ind|ex{statu|
|000014b0| 73 5c 5f 73 75 63 63 65 | 73 73 53 68 61 72 65 64 |s\_succe|ssShared|
|000014c0| 44 52 7d 0a 54 68 65 20 | 6d 65 73 73 61 67 65 20 |DR}.The |message |
|000014d0| 68 61 73 20 73 75 63 65 | 65 64 65 64 20 61 6e 64 |has suce|eded and|
|000014e0| 20 61 20 64 65 6c 69 76 | 65 72 79 20 72 65 70 6f | a deliv|ery repo|
|000014f0| 72 74 20 69 73 20 74 6f | 20 62 65 20 73 65 6e 74 |rt is to| be sent|
|00001500| 2e 20 48 6f 77 65 76 65 | 72 2c 0a 74 68 65 20 64 |. Howeve|r,.the d|
|00001510| 65 6c 69 76 65 72 79 20 | 72 65 70 6f 72 74 20 77 |elivery |report w|
|00001520| 69 6c 6c 20 62 65 20 73 | 65 6e 74 20 61 73 20 74 |ill be s|ent as t|
|00001530| 68 65 20 72 65 73 75 6c | 74 20 6f 66 20 70 72 6f |he resul|t of pro|
|00001540| 63 65 73 73 69 6e 67 20 | 61 6e 6f 74 68 65 72 0a |cessing |another.|
|00001550| 72 65 63 69 70 69 65 6e | 74 2e 0a 0a 5c 69 74 65 |recipien|t...\ite|
|00001560| 6d 5b 5c 76 65 72 62 7c | 69 6e 74 5c 5f 51 6d 67 |m[\verb||int\_Qmg|
|00001570| 72 5c 5f 73 74 61 74 75 | 73 5c 5f 66 61 69 6c 75 |r\_statu|s\_failu|
|00001580| 72 65 53 68 61 72 65 64 | 44 52 7c 3a 5d 0a 5c 69 |reShared|DR|:].\i|
|00001590| 6e 64 65 78 7b 73 74 61 | 74 75 73 5c 5f 66 61 69 |ndex{sta|tus\_fai|
|000015a0| 6c 75 72 65 53 68 61 72 | 65 64 44 52 7d 0a 54 68 |lureShar|edDR}.Th|
|000015b0| 65 20 6d 65 73 73 61 67 | 65 20 68 61 73 20 66 61 |e messag|e has fa|
|000015c0| 69 6c 65 64 2c 20 61 6e | 64 20 61 20 64 65 6c 69 |iled, an|d a deli|
|000015d0| 76 65 72 79 20 72 65 70 | 6f 72 74 20 73 68 6f 75 |very rep|ort shou|
|000015e0| 6c 64 20 62 65 20 73 65 | 6e 74 20 66 6f 72 0a 74 |ld be se|nt for.t|
|000015f0| 68 69 73 20 72 65 63 69 | 70 69 65 6e 74 2c 20 62 |his reci|pient, b|
|00001600| 75 74 20 74 68 69 73 20 | 77 69 6c 6c 20 62 65 20 |ut this |will be |
|00001610| 73 65 6e 74 20 61 73 20 | 74 68 65 20 72 65 73 75 |sent as |the resu|
|00001620| 6c 74 20 6f 66 20 61 6e | 6f 74 68 65 72 0a 72 65 |lt of an|other.re|
|00001630| 63 69 70 69 65 6e 74 73 | 20 61 63 74 69 6f 6e 73 |cipients| actions|
|00001640| 2e 0a 0a 5c 69 74 65 6d | 5b 5c 76 65 72 62 7c 69 |...\item|[\verb|i|
|00001650| 6e 74 5c 5f 51 6d 67 72 | 5c 5f 73 74 61 74 75 73 |nt\_Qmgr|\_status|
|00001660| 5c 5f 6d 65 73 73 61 67 | 65 46 61 69 6c 75 72 65 |\_messag|eFailure|
|00001670| 7c 3a 5d 0a 5c 69 6e 64 | 65 78 7b 73 74 61 74 75 ||:].\ind|ex{statu|
|00001680| 73 5c 5f 6d 65 73 73 61 | 67 65 46 61 69 6c 75 72 |s\_messa|geFailur|
|00001690| 65 7d 0a 54 68 65 20 6d | 65 73 73 61 67 65 20 68 |e}.The m|essage h|
|000016a0| 61 73 20 74 65 6d 70 6f | 72 61 72 69 6c 79 20 66 |as tempo|rarily f|
|000016b0| 61 69 6c 65 64 3b 20 6f | 74 68 65 72 20 6d 65 73 |ailed; o|ther mes|
|000016c0| 73 61 67 65 73 20 6f 6e | 20 74 68 65 20 73 61 6d |sages on| the sam|
|000016d0| 65 20 63 68 61 6e 6e 65 | 6c 0a 6d 61 79 20 73 75 |e channe|l.may su|
|000016e0| 63 63 65 65 64 20 61 6e | 64 20 74 68 69 73 20 6d |cceed an|d this m|
|000016f0| 65 73 73 61 67 65 20 6d | 61 79 20 73 75 63 63 65 |essage m|ay succe|
|00001700| 65 64 20 6c 61 74 65 72 | 20 61 74 20 61 20 73 65 |ed later| at a se|
|00001710| 63 6f 6e 64 20 61 74 74 | 65 6d 70 74 2e 0a 0a 5c |cond att|empt...\|
|00001720| 69 74 65 6d 5b 5c 76 65 | 72 62 7c 69 6e 74 5c 5f |item[\ve|rb|int\_|
|00001730| 51 6d 67 72 5c 5f 73 74 | 61 74 75 73 5c 5f 6d 74 |Qmgr\_st|atus\_mt|
|00001740| 61 46 61 69 6c 75 72 65 | 7c 3a 5d 0a 5c 69 6e 64 |aFailure||:].\ind|
|00001750| 65 78 7b 73 74 61 74 75 | 73 5c 5f 6d 74 61 46 61 |ex{statu|s\_mtaFa|
|00001760| 69 6c 75 72 65 7d 0a 54 | 68 65 20 72 65 6d 6f 74 |ilure}.T|he remot|
|00001770| 65 20 4d 54 41 20 69 73 | 20 6e 6f 74 20 72 65 73 |e MTA is| not res|
|00001780| 70 6f 6e 64 69 6e 67 3a | 20 74 68 65 20 61 74 74 |ponding:| the att|
|00001790| 65 6d 70 74 20 73 68 6f | 75 6c 64 20 62 65 20 72 |empt sho|uld be r|
|000017a0| 65 74 72 69 65 64 20 61 | 74 20 61 0a 6c 61 74 65 |etried a|t a.late|
|000017b0| 72 20 74 69 6d 65 2e 20 | 46 75 72 74 68 65 72 20 |r time. |Further |
|000017c0| 6d 65 73 73 61 67 65 73 | 20 6f 6e 20 74 68 69 73 |messages| on this|
|000017d0| 20 63 68 61 6e 6e 65 6c | 20 74 6f 20 74 68 69 73 | channel| to this|
|000017e0| 20 4d 54 41 20 73 68 6f | 75 6c 64 20 6e 6f 74 20 | MTA sho|uld not |
|000017f0| 62 65 0a 63 6f 6e 73 69 | 64 65 72 65 64 20 61 74 |be.consi|dered at|
|00001800| 20 74 68 69 73 20 61 74 | 74 65 6d 70 74 2e 0a 0a | this at|tempt...|
|00001810| 5c 69 74 65 6d 5b 5c 76 | 65 72 62 7c 69 6e 74 5c |\item[\v|erb|int\|
|00001820| 5f 51 6d 67 72 5c 5f 73 | 74 61 74 75 73 5c 5f 6d |_Qmgr\_s|tatus\_m|
|00001830| 74 61 41 6e 64 4d 65 73 | 73 61 67 65 46 61 69 6c |taAndMes|sageFail|
|00001840| 75 72 65 7c 3a 5d 0a 5c | 69 6e 64 65 78 7b 73 74 |ure|:].\|index{st|
|00001850| 61 74 75 73 5c 5f 6d 74 | 61 41 6e 64 4d 65 73 73 |atus\_mt|aAndMess|
|00001860| 61 67 65 46 61 69 6c 75 | 72 65 7d 0a 54 68 69 73 |ageFailu|re}.This|
|00001870| 20 69 73 20 61 6e 20 69 | 6e 64 69 63 61 74 69 6f | is an i|ndicatio|
|00001880| 6e 20 74 68 61 74 20 74 | 68 65 72 65 20 77 61 73 |n that t|here was|
|00001890| 20 61 20 66 61 69 6c 75 | 72 65 20 77 68 69 6c 73 | a failu|re whils|
|000018a0| 74 20 74 72 61 6e 73 66 | 65 72 72 69 6e 67 20 20 |t transf|erring |
|000018b0| 74 68 65 0a 6d 65 73 73 | 61 67 65 20 74 6f 20 74 |the.mess|age to t|
|000018c0| 68 65 20 4d 54 41 2e 20 | 54 68 69 73 20 63 68 61 |he MTA. |This cha|
|000018d0| 6e 6e 65 6c 20 73 68 6f | 75 6c 64 20 62 65 20 61 |nnel sho|uld be a|
|000018e0| 74 74 65 6d 70 74 65 64 | 20 61 67 61 69 6e 20 69 |ttempted| again i|
|000018f0| 6e 20 74 68 65 20 6e 65 | 61 72 0a 66 75 74 75 72 |n the ne|ar.futur|
|00001900| 65 2e 0a 5c 65 6e 64 7b | 64 65 73 63 72 69 62 65 |e..\end{|describe|
|00001910| 7d 0a 0a 54 6f 20 61 69 | 64 20 69 6e 20 73 65 74 |}..To ai|d in set|
|00001920| 74 69 6e 67 20 74 68 65 | 73 65 20 76 61 6c 75 65 |ting the|se value|
|00001930| 73 2c 20 61 20 73 65 74 | 20 6f 66 20 73 75 70 70 |s, a set| of supp|
|00001940| 6f 72 74 20 72 6f 75 74 | 69 6e 65 73 20 69 73 20 |ort rout|ines is |
|00001950| 70 72 6f 76 69 64 65 64 | 0a 69 6e 20 74 68 65 20 |provided|.in the |
|00001960| 6c 69 62 72 61 72 79 2e | 20 54 68 65 73 65 20 72 |library.| These r|
|00001970| 6f 75 74 69 6e 65 73 20 | 61 6c 6c 20 75 70 64 61 |outines |all upda|
|00001980| 74 65 20 74 68 65 20 67 | 6c 6f 62 61 6c 20 76 61 |te the g|lobal va|
|00001990| 72 69 61 62 6c 65 0a 5c | 76 65 72 62 7c 64 65 6c |riable.\|verb|del|
|000019a0| 69 76 65 72 79 73 74 61 | 74 65 7c 20 77 68 69 63 |iverysta|te| whic|
|000019b0| 68 20 69 73 20 73 75 69 | 74 61 62 6c 65 20 61 73 |h is sui|table as|
|000019c0| 20 61 20 72 65 74 75 72 | 6e 20 76 61 6c 75 65 20 | a retur|n value |
|000019d0| 66 6f 72 20 74 68 65 0a | 70 72 6f 63 65 73 73 20 |for the.|process |
|000019e0| 66 75 6e 63 74 69 6f 6e | 2e 20 4e 6f 74 65 2c 20 |function|. Note, |
|000019f0| 68 6f 77 65 76 65 72 2c | 20 74 68 61 74 20 74 68 |however,| that th|
|00001a00| 65 20 76 61 6c 75 65 20 | 6f 66 0a 5c 76 65 72 62 |e value |of.\verb|
|00001a10| 7c 69 6e 74 5f 51 6d 67 | 72 5f 73 74 61 74 75 73 ||int_Qmg|r_status|
|00001a20| 5f 70 65 72 6d 61 6e 65 | 6e 74 46 61 69 6c 75 72 |_permane|ntFailur|
|00001a30| 65 7c 20 69 73 20 60 60 | 73 74 69 63 6b 79 27 27 |e| is ``|sticky''|
|00001a40| 3b 20 74 68 69 73 20 76 | 61 6c 75 65 20 6d 61 79 |; this v|alue may|
|00001a50| 0a 62 65 20 73 65 74 2c | 20 62 75 74 20 6f 6e 63 |.be set,| but onc|
|00001a60| 65 20 73 65 74 20 63 61 | 6e 6e 6f 74 20 62 65 20 |e set ca|nnot be |
|00001a70| 6f 76 65 72 77 72 69 74 | 74 65 6e 20 62 79 20 74 |overwrit|ten by t|
|00001a80| 68 65 73 65 20 72 6f 75 | 74 69 6e 65 73 2e 20 54 |hese rou|tines. T|
|00001a90| 68 69 73 20 69 73 0a 62 | 65 63 61 75 73 65 20 6e |his is.b|ecause n|
|00001aa0| 6f 72 6d 61 6c 6c 79 20 | 77 68 65 6e 20 61 6e 20 |ormally |when an |
|00001ab0| 61 64 64 72 65 73 73 20 | 69 73 20 6d 61 72 6b 65 |address |is marke|
|00001ac0| 64 20 77 69 74 68 20 74 | 68 69 73 20 73 74 61 74 |d with t|his stat|
|00001ad0| 75 73 2c 20 61 0a 64 65 | 6c 69 76 65 72 79 20 72 |us, a.de|livery r|
|00001ae0| 65 70 6f 72 74 20 69 73 | 20 77 72 69 74 74 65 6e |eport is| written|
|00001af0| 20 6f 75 74 20 61 6e 64 | 20 74 68 65 20 6d 65 73 | out and| the mes|
|00001b00| 73 61 67 65 20 69 73 20 | 75 70 64 61 74 65 64 20 |sage is |updated |
|00001b10| 61 63 63 6f 72 64 69 6e | 67 6c 79 0a 28 73 65 65 |accordin|gly.(see|
|00001b20| 20 53 65 63 74 69 6f 6e | 7e 5c 72 65 66 7b 73 65 | Section|~\ref{se|
|00001b30| 74 3a 64 72 7d 20 66 6f | 72 20 72 6f 75 74 69 6e |t:dr} fo|r routin|
|00001b40| 65 73 20 74 6f 20 77 72 | 69 74 65 20 6f 75 74 20 |es to wr|ite out |
|00001b50| 64 65 6c 69 76 65 72 79 | 20 72 65 70 6f 72 74 73 |delivery| reports|
|00001b60| 29 2e 0a 54 6f 20 20 73 | 65 74 20 74 68 65 20 73 |)..To s|et the s|
|00001b70| 74 61 74 75 73 20 20 74 | 68 65 6e 20 74 6f 20 73 |tatus t|hen to s|
|00001b80| 6f 6d 65 74 68 69 6e 67 | 20 65 6c 73 65 20 77 6f |omething| else wo|
|00001b90| 75 6c 64 20 63 6f 6e 66 | 75 73 65 20 74 68 65 20 |uld conf|use the |
|00001ba0| 71 75 65 75 65 0a 6d 61 | 6e 61 67 65 72 2e 20 54 |queue.ma|nager. T|
|00001bb0| 68 65 20 72 6f 75 74 69 | 6e 65 73 20 61 72 65 20 |he routi|nes are |
|00001bc0| 61 73 20 66 6f 6c 6c 6f | 77 73 3a 0a 0a 5c 62 65 |as follo|ws:..\be|
|00001bd0| 67 69 6e 7b 71 75 6f 74 | 65 7d 5c 69 6e 64 65 78 |gin{quot|e}\index|
|00001be0| 7b 64 65 6c 69 76 65 72 | 79 5c 5f 69 6e 69 74 7d |{deliver|y\_init}|
|00001bf0| 5c 62 65 67 69 6e 7b 76 | 65 72 62 61 74 69 6d 7d |\begin{v|erbatim}|
|00001c00| 0a 73 74 72 75 63 74 20 | 74 79 70 65 5f 51 6d 67 |.struct |type_Qmg|
|00001c10| 72 5f 44 65 6c 69 76 65 | 72 79 53 74 61 74 75 73 |r_Delive|ryStatus|
|00001c20| 20 2a 64 65 6c 69 76 65 | 72 79 5f 69 6e 69 74 20 | *delive|ry_init |
|00001c30| 28 75 73 65 72 73 29 0a | 73 74 72 75 63 74 20 74 |(users).|struct t|
|00001c40| 79 70 65 5f 51 6d 67 72 | 5f 55 73 65 72 4c 69 73 |ype_Qmgr|_UserLis|
|00001c50| 74 20 2a 75 73 65 72 73 | 3b 0a 5c 65 6e 64 7b 76 |t *users|;.\end{v|
|00001c60| 65 72 62 61 74 69 6d 7d | 5c 65 6e 64 7b 71 75 6f |erbatim}|\end{quo|
|00001c70| 74 65 7d 0a 0a 54 68 69 | 73 20 72 6f 75 74 69 6e |te}..Thi|s routin|
|00001c80| 65 20 69 6e 69 74 69 61 | 6c 69 73 65 73 20 74 68 |e initia|lises th|
|00001c90| 65 20 73 74 72 75 63 74 | 75 72 65 2e 20 49 74 20 |e struct|ure. It |
|00001ca0| 64 6f 65 73 20 62 79 20 | 61 6c 6c 6f 63 61 74 69 |does by |allocati|
|00001cb0| 6e 67 20 61 6e 0a 65 6c | 65 6d 65 6e 74 20 66 6f |ng an.el|ement fo|
|00001cc0| 72 20 65 61 63 68 20 6f | 66 20 74 68 65 20 75 73 |r each o|f the us|
|00001cd0| 65 72 73 20 70 61 73 73 | 65 64 20 69 6e 20 74 68 |ers pass|ed in th|
|00001ce0| 65 20 61 72 67 75 6d 65 | 6e 74 2e 20 54 68 65 20 |e argume|nt. The |
|00001cf0| 73 69 6e 67 6c 65 0a 70 | 61 72 61 6d 65 74 65 72 |single.p|arameter|
|00001d00| 20 69 73 20 74 68 65 20 | 6c 69 73 74 20 6f 66 20 | is the |list of |
|00001d10| 75 73 65 72 73 20 70 61 | 73 73 65 64 20 6f 76 65 |users pa|ssed ove|
|00001d20| 72 20 62 79 20 74 68 65 | 20 51 4d 47 52 2e 0a 0a |r by the| QMGR...|
|00001d30| 5c 62 65 67 69 6e 7b 71 | 75 6f 74 65 7d 5c 69 6e |\begin{q|uote}\in|
|00001d40| 64 65 78 7b 64 65 6c 69 | 76 65 72 79 5c 5f 73 65 |dex{deli|very\_se|
|00001d50| 74 7d 5c 62 65 67 69 6e | 7b 76 65 72 62 61 74 69 |t}\begin|{verbati|
|00001d60| 6d 7d 0a 73 74 72 75 63 | 74 20 74 79 70 65 5f 51 |m}.struc|t type_Q|
|00001d70| 6d 67 72 5f 44 65 6c 69 | 76 65 72 79 53 74 61 74 |mgr_Deli|veryStat|
|00001d80| 75 73 20 0a 20 20 20 20 | 20 20 20 2a 64 65 6c 69 |us . | *deli|
|00001d90| 76 65 72 79 5f 73 65 74 | 73 74 61 74 65 20 28 72 |very_set|state (r|
|00001da0| 6e 6f 2c 20 76 61 6c 2c | 20 72 65 61 73 6f 6e 29 |no, val,| reason)|
|00001db0| 0a 69 6e 74 20 20 72 6e | 6f 2c 20 76 61 6c 3b 0a |.int rn|o, val;.|
|00001dc0| 63 68 61 72 20 2a 72 65 | 61 73 6f 6e 3b 0a 5c 65 |char *re|ason;.\e|
|00001dd0| 6e 64 7b 76 65 72 62 61 | 74 69 6d 7d 5c 65 6e 64 |nd{verba|tim}\end|
|00001de0| 7b 71 75 6f 74 65 7d 0a | 0a 54 68 69 73 20 72 6f |{quote}.|.This ro|
|00001df0| 75 74 69 6e 65 20 73 65 | 74 73 20 74 68 65 20 76 |utine se|ts the v|
|00001e00| 61 6c 75 65 20 6f 66 20 | 74 68 65 20 67 69 76 65 |alue of |the give|
|00001e10| 6e 20 72 65 63 69 70 69 | 65 6e 74 20 6e 75 6d 62 |n recipi|ent numb|
|00001e20| 65 72 20 74 6f 20 74 68 | 65 0a 69 6e 64 69 63 61 |er to th|e.indica|
|00001e30| 74 65 64 20 76 61 6c 75 | 65 20 69 6e 20 74 68 65 |ted valu|e in the|
|00001e40| 20 67 6c 6f 62 61 6c 20 | 73 74 72 75 63 74 75 72 | global |structur|
|00001e50| 65 20 28 77 69 74 68 20 | 74 68 65 20 61 62 6f 76 |e (with |the abov|
|00001e60| 65 20 70 72 6f 76 69 73 | 6f 29 2e 20 49 74 0a 61 |e provis|o). It.a|
|00001e70| 6c 73 6f 20 69 6e 63 6c | 75 64 65 73 20 61 20 73 |lso incl|udes a s|
|00001e80| 74 72 69 6e 67 20 69 6e | 64 69 63 61 74 69 6e 67 |tring in|dicating|
|00001e90| 20 74 68 65 20 72 65 61 | 73 6f 6e 20 66 6f 72 20 | the rea|son for |
|00001ea0| 66 61 69 6c 75 72 65 2c | 20 69 66 20 66 61 69 6c |failure,| if fail|
|00001eb0| 75 72 65 0a 6f 63 63 75 | 72 72 65 64 2e 20 54 68 |ure.occu|rred. Th|
|00001ec0| 69 73 20 73 74 72 69 6e | 67 20 69 73 20 70 61 73 |is strin|g is pas|
|00001ed0| 73 65 64 20 62 61 63 6b | 20 74 6f 20 74 68 65 20 |sed back| to the |
|00001ee0| 51 4d 47 52 20 66 6f 72 | 20 64 69 73 70 6c 61 79 |QMGR for| display|
|00001ef0| 20 62 79 0a 74 68 65 20 | 4d 54 41 63 6f 6e 73 6f | by.the |MTAconso|
|00001f00| 6c 65 2e 20 49 74 20 73 | 68 6f 75 6c 64 20 62 65 |le. It s|hould be|
|00001f10| 20 73 65 74 20 74 6f 20 | 74 68 65 20 63 6f 6e 73 | set to |the cons|
|00001f20| 74 61 6e 74 20 5c 76 65 | 72 62 7c 4e 55 4c 4c 43 |tant \ve|rb|NULLC|
|00001f30| 50 7c 0a 69 66 20 74 68 | 65 20 72 65 63 69 70 69 |P|.if th|e recipi|
|00001f40| 65 6e 74 20 77 61 73 20 | 68 61 6e 64 6c 65 64 20 |ent was |handled |
|00001f50| 73 75 63 63 65 73 73 66 | 75 6c 6c 79 20 6f 72 20 |successf|ully or |
|00001f60| 6e 6f 20 64 69 61 67 6e | 6f 73 74 69 63 20 72 65 |no diagn|ostic re|
|00001f70| 61 73 6f 6e 20 69 73 20 | 61 76 61 69 6c 61 62 6c |ason is |availabl|
|00001f80| 65 2e 0a 0a 5c 62 65 67 | 69 6e 7b 71 75 6f 74 65 |e...\beg|in{quote|
|00001f90| 7d 5c 69 6e 64 65 78 7b | 64 65 6c 69 76 65 72 79 |}\index{|delivery|
|00001fa0| 5c 5f 73 65 74 61 6c 6c | 7d 5c 62 65 67 69 6e 7b |\_setall|}\begin{|
|00001fb0| 76 65 72 62 61 74 69 6d | 7d 0a 73 74 72 75 63 74 |verbatim|}.struct|
|00001fc0| 20 74 79 70 65 5f 51 6d | 67 72 5f 44 65 6c 69 76 | type_Qm|gr_Deliv|
|00001fd0| 65 72 79 53 74 61 74 75 | 73 20 0a 20 20 20 20 20 |eryStatu|s . |
|00001fe0| 20 20 2a 64 65 6c 69 76 | 65 72 79 5f 73 65 74 61 | *deliv|ery_seta|
|00001ff0| 6c 6c 73 74 61 74 65 20 | 28 76 61 6c 2c 20 72 65 |llstate |(val, re|
|00002000| 61 73 6f 6e 29 0a 69 6e | 74 20 20 76 61 6c 3b 0a |ason).in|t val;.|
|00002010| 63 68 61 72 20 2a 72 65 | 61 73 6f 6e 3b 0a 5c 65 |char *re|ason;.\e|
|00002020| 6e 64 7b 76 65 72 62 61 | 74 69 6d 7d 5c 65 6e 64 |nd{verba|tim}\end|
|00002030| 7b 71 75 6f 74 65 7d 0a | 0a 54 68 69 73 20 72 6f |{quote}.|.This ro|
|00002040| 75 74 69 6e 65 20 73 65 | 74 73 20 61 6c 6c 20 75 |utine se|ts all u|
|00002050| 73 65 72 73 27 20 73 74 | 61 74 75 73 20 74 6f 20 |sers' st|atus to |
|00002060| 74 68 65 20 67 69 76 65 | 6e 20 76 61 6c 75 65 2e |the give|n value.|
|00002070| 20 54 68 69 73 20 69 73 | 20 75 73 65 66 75 6c 0a | This is| useful.|
|00002080| 77 68 65 6e 20 61 20 63 | 6f 6e 6e 65 63 74 69 6f |when a c|onnectio|
|00002090| 6e 20 63 61 6e 6e 6f 74 | 20 62 65 20 65 73 74 61 |n cannot| be esta|
|000020a0| 62 6c 69 73 68 65 64 2c | 20 66 6f 72 20 69 6e 73 |blished,| for ins|
|000020b0| 74 61 6e 63 65 2c 20 61 | 6e 64 20 61 6c 6c 20 72 |tance, a|nd all r|
|000020c0| 65 63 69 70 69 65 6e 74 | 73 0a 6d 75 73 74 20 62 |ecipient|s.must b|
|000020d0| 65 20 70 75 74 20 69 6e | 20 74 68 65 20 73 61 6d |e put in| the sam|
|000020e0| 65 20 73 74 61 74 65 20 | 28 61 67 61 69 6e 2c 20 |e state |(again, |
|000020f0| 74 68 65 20 61 62 6f 76 | 65 20 70 72 6f 76 69 73 |the abov|e provis|
|00002100| 6f 20 61 62 6f 75 74 20 | 64 65 6c 69 76 65 72 79 |o about |delivery|
|00002110| 0a 72 65 70 6f 72 74 73 | 20 68 6f 6c 64 73 29 2e |.reports| holds).|
|00002120| 20 54 68 65 20 72 65 61 | 73 6f 6e 20 66 69 65 6c | The rea|son fiel|
|00002130| 64 20 69 73 20 74 68 65 | 20 73 61 6d 65 20 61 73 |d is the| same as|
|00002140| 20 61 62 6f 76 65 2e 0a | 0a 4f 63 63 61 73 69 6f | above..|.Occasio|
|00002150| 6e 61 6c 6c 79 20 69 74 | 20 6d 61 79 20 6f 63 63 |nally it| may occ|
|00002160| 75 72 20 74 68 61 74 20 | 61 20 70 65 72 6d 61 6e |ur that |a perman|
|00002170| 65 6e 74 20 66 61 69 6c | 75 72 65 20 69 73 20 72 |ent fail|ure is r|
|00002180| 65 63 65 69 76 65 64 20 | 62 75 74 20 69 74 0a 69 |eceived |but it.i|
|00002190| 73 20 6e 6f 74 20 70 6f | 73 73 69 62 6c 65 20 74 |s not po|ssible t|
|000021a0| 6f 20 77 72 69 74 65 20 | 61 20 64 65 6c 69 76 65 |o write |a delive|
|000021b0| 72 79 20 72 65 70 6f 72 | 74 20 28 65 2e 67 2e 2c |ry repor|t (e.g.,|
|000021c0| 20 61 20 66 75 6c 6c 20 | 64 69 73 6b 29 2e 20 49 | a full |disk). I|
|000021d0| 6e 20 74 68 69 73 0a 63 | 61 73 65 20 74 68 65 20 |n this.c|ase the |
|000021e0| 61 64 64 72 65 73 73 20 | 66 69 6c 65 20 73 68 6f |address |file sho|
|000021f0| 75 6c 64 20 6e 6f 74 20 | 62 65 20 75 70 64 61 74 |uld not |be updat|
|00002200| 65 64 20 61 6e 64 20 74 | 68 65 20 44 52 20 73 74 |ed and t|he DR st|
|00002210| 61 74 75 73 20 73 68 6f | 75 6c 64 0a 62 65 20 73 |atus sho|uld.be s|
|00002220| 65 74 20 74 6f 20 6d 65 | 73 73 61 67 65 20 66 61 |et to me|ssage fa|
|00002230| 69 6c 75 72 65 20 28 74 | 68 65 20 6e 65 78 74 20 |ilure (t|he next |
|00002240| 72 65 74 72 79 20 73 68 | 6f 75 6c 64 20 61 6c 73 |retry sh|ould als|
|00002250| 6f 20 67 69 76 65 20 61 | 20 44 52 20 61 6e 64 0a |o give a| DR and.|
|00002260| 74 68 65 6e 20 68 6f 70 | 65 66 75 6c 6c 79 20 61 |then hop|efully a|
|00002270| 20 72 65 70 6f 72 74 20 | 63 61 6e 20 62 65 20 77 | report |can be w|
|00002280| 72 69 74 74 65 6e 29 2e | 20 54 6f 20 61 69 64 20 |ritten).| To aid |
|00002290| 69 6e 20 72 65 73 65 74 | 74 69 6e 67 20 74 68 65 |in reset|ting the|
|000022a0| 73 65 0a 76 61 72 69 61 | 62 6c 65 73 20 74 68 65 |se.varia|bles the|
|000022b0| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 70 72 6f 63 65 | followi|ng proce|
|000022c0| 64 75 72 65 20 69 73 20 | 75 73 65 66 75 6c 2e 0a |dure is |useful..|
|000022d0| 0a 5c 62 65 67 69 6e 7b | 71 75 6f 74 65 7d 5c 69 |.\begin{|quote}\i|
|000022e0| 6e 64 65 78 7b 64 65 6c | 69 76 65 72 79 5c 5f 72 |ndex{del|ivery\_r|
|000022f0| 65 73 65 74 44 52 73 7d | 5c 62 65 67 69 6e 7b 76 |esetDRs}|\begin{v|
|00002300| 65 72 62 61 74 69 6d 7d | 0a 73 74 72 75 63 74 20 |erbatim}|.struct |
|00002310| 74 79 70 65 5f 51 6d 67 | 72 5f 44 65 6c 69 76 65 |type_Qmg|r_Delive|
|00002320| 72 79 53 74 61 74 75 73 | 0a 20 20 20 20 20 20 20 |ryStatus|. |
|00002330| 2a 64 65 6c 69 76 65 72 | 79 5f 72 65 73 65 74 44 |*deliver|y_resetD|
|00002340| 52 73 20 28 76 61 6c 29 | 0a 69 6e 74 20 20 20 20 |Rs (val)|.int |
|00002350| 20 76 61 6c 3b 0a 5c 65 | 6e 64 7b 76 65 72 62 61 | val;.\e|nd{verba|
|00002360| 74 69 6d 7d 5c 65 6e 64 | 7b 71 75 6f 74 65 7d 0a |tim}\end|{quote}.|
|00002370| 0a 54 68 65 20 61 72 67 | 75 6d 65 6e 74 20 69 73 |.The arg|ument is|
|00002380| 20 74 68 65 20 73 74 61 | 74 65 20 74 6f 20 73 65 | the sta|te to se|
|00002390| 74 20 74 68 65 20 44 52 | 20 76 61 6c 75 65 73 20 |t the DR| values |
|000023a0| 74 6f 20 28 6e 65 61 72 | 6c 79 20 61 6c 77 61 79 |to (near|ly alway|
|000023b0| 73 0a 5c 6c 69 6e 65 62 | 72 65 61 6b 0a 5c 76 65 |s.\lineb|reak.\ve|
|000023c0| 72 62 7c 69 6e 74 5f 51 | 6d 67 72 5f 53 74 61 74 |rb|int_Q|mgr_Stat|
|000023d0| 75 73 5f 6d 65 73 73 61 | 67 65 46 61 69 6c 75 72 |us_messa|geFailur|
|000023e0| 65 7c 29 2e 0a 0a 0a 54 | 68 65 20 74 65 72 6d 69 |e|)....T|he termi|
|000023f0| 6e 61 74 69 6f 6e 20 66 | 75 6e 63 74 69 6f 6e 2c |nation f|unction,|
|00002400| 20 69 66 20 75 73 65 64 | 2c 20 73 68 6f 75 6c 64 | if used|, should|
|00002410| 20 62 65 20 64 65 66 69 | 6e 65 64 20 61 73 20 66 | be defi|ned as f|
|00002420| 6f 6c 6c 6f 77 73 2e 0a | 5c 62 65 67 69 6e 7b 71 |ollows..|\begin{q|
|00002430| 75 6f 74 65 7d 5c 62 65 | 67 69 6e 7b 76 65 72 62 |uote}\be|gin{verb|
|00002440| 61 74 69 6d 7d 0a 69 6e | 74 20 65 6e 64 66 75 63 |atim}.in|t endfuc|
|00002450| 74 69 6f 6e 20 28 29 0a | 5c 65 6e 64 7b 76 65 72 |tion ().|\end{ver|
|00002460| 62 61 74 69 6d 7d 5c 65 | 6e 64 7b 71 75 6f 74 65 |batim}\e|nd{quote|
|00002470| 7d 0a 0a 54 68 69 73 20 | 72 6f 75 74 69 6e 65 20 |}..This |routine |
|00002480| 69 73 20 75 73 65 64 20 | 74 6f 20 63 6c 6f 73 65 |is used |to close|
|00002490| 20 64 6f 77 6e 20 61 6e | 79 74 68 69 6e 67 20 72 | down an|ything r|
|000024a0| 65 71 75 69 72 65 64 20 | 62 65 66 6f 72 65 20 65 |equired |before e|
|000024b0| 78 69 74 69 6e 67 0a 74 | 68 65 20 70 72 6f 67 72 |xiting.t|he progr|
|000024c0| 61 6d 2e 20 54 68 65 20 | 63 61 6c 6c 69 6e 67 20 |am. The |calling |
|000024d0| 72 6f 75 74 69 6e 65 20 | 77 69 6c 6c 20 65 78 65 |routine |will exe|
|000024e0| 63 75 74 65 20 74 68 69 | 73 20 66 75 6e 63 74 69 |cute thi|s functi|
|000024f0| 6f 6e 20 62 65 66 6f 72 | 65 20 73 65 6e 64 69 6e |on befor|e sendin|
|00002500| 67 0a 74 68 65 20 66 69 | 6e 61 6c 20 64 69 73 63 |g.the fi|nal disc|
|00002510| 6f 6e 6e 65 63 74 20 74 | 6f 20 74 68 65 20 51 4d |onnect t|o the QM|
|00002520| 47 52 20 61 6e 64 20 65 | 78 69 74 69 6e 67 2e 0a |GR and e|xiting..|
|00002530| 0a 0a 5c 73 75 62 73 75 | 62 73 65 63 74 69 6f 6e |..\subsu|bsection|
|00002540| 7b 41 64 64 72 65 73 73 | 20 46 69 6c 65 20 52 6f |{Address| File Ro|
|00002550| 75 74 69 6e 65 73 7d 0a | 0a 54 68 65 20 61 64 64 |utines}.|.The add|
|00002560| 72 65 73 73 20 66 69 6c | 65 20 72 65 61 64 69 6e |ress fil|e readin|
|00002570| 67 20 69 73 20 75 73 75 | 61 6c 6c 79 20 74 68 65 |g is usu|ally the|
|00002580| 20 66 69 72 73 74 20 6f | 70 65 72 61 74 69 6f 6e | first o|peration|
|00002590| 20 61 20 63 68 61 6e 6e | 65 6c 20 64 6f 65 73 0a | a chann|el does.|
|000025a0| 6f 6e 20 72 65 63 65 69 | 76 69 6e 67 20 74 68 65 |on recei|ving the|
|000025b0| 20 69 6e 73 74 72 75 63 | 74 69 6f 6e 20 74 6f 20 | instruc|tion to |
|000025c0| 70 72 6f 63 65 73 73 20 | 61 20 6d 65 73 73 61 67 |process |a messag|
|000025d0| 65 2e 20 54 68 69 73 20 | 69 73 20 75 73 75 61 6c |e. This |is usual|
|000025e0| 6c 79 0a 61 63 68 69 65 | 76 65 64 20 62 79 20 66 |ly.achie|ved by f|
|000025f0| 69 72 73 74 20 62 75 69 | 6c 64 69 6e 67 20 75 70 |irst bui|lding up|
|00002600| 20 74 68 65 20 6e 61 6d | 65 20 6f 66 20 74 68 65 | the nam|e of the|
|00002610| 20 6d 65 73 73 61 67 65 | 20 66 69 6c 65 20 74 6f | message| file to|
|00002620| 20 62 65 20 72 65 61 64 | 0a 69 6e 20 66 72 6f 6d | be read|.in from|
|00002630| 20 74 68 65 20 71 75 65 | 75 65 20 69 64 2c 20 61 | the que|ue id, a|
|00002640| 6e 64 20 74 68 65 6e 20 | 69 6e 76 6f 6b 69 6e 67 |nd then |invoking|
|00002650| 20 74 68 65 20 70 72 6f | 63 65 64 75 72 65 20 5c | the pro|cedure \|
|00002660| 76 65 72 62 7c 72 64 5f | 6d 73 67 7c 2e 0a 5c 62 |verb|rd_|msg|..\b|
|00002670| 65 67 69 6e 7b 71 75 6f | 74 65 7d 5c 69 6e 64 65 |egin{quo|te}\inde|
|00002680| 78 7b 72 64 5c 5f 6d 73 | 67 7d 5c 62 65 67 69 6e |x{rd\_ms|g}\begin|
|00002690| 7b 76 65 72 62 61 74 69 | 6d 7d 0a 69 6e 74 20 72 |{verbati|m}.int r|
|000026a0| 64 5f 6d 73 67 20 28 6d | 73 67 2c 20 70 72 6d 2c |d_msg (m|sg, prm,|
|000026b0| 20 71 70 2c 20 61 64 5f | 73 6e 64 72 2c 20 61 64 | qp, ad_|sndr, ad|
|000026c0| 5f 72 65 63 69 70 2c 20 | 61 64 5f 63 6f 75 6e 74 |_recip, |ad_count|
|000026d0| 29 0a 63 68 61 72 20 20 | 2a 6d 73 67 3b 0a 73 74 |).char |*msg;.st|
|000026e0| 72 75 63 74 20 70 72 6d | 20 2a 70 72 6d 3b 0a 51 |ruct prm| *prm;.Q|
|000026f0| 5f 73 74 72 75 63 74 20 | 2a 71 70 3b 0a 41 44 44 |_struct |*qp;.ADD|
|00002700| 52 20 20 2a 2a 61 64 5f | 73 6e 64 72 2c 0a 20 20 |R **ad_|sndr,. |
|00002710| 20 20 20 20 2a 2a 61 64 | 5f 72 65 63 69 70 3b 0a | **ad|_recip;.|
|00002720| 69 6e 74 20 20 20 2a 61 | 64 5f 63 6f 75 6e 74 3b |int *a|d_count;|
|00002730| 0a 5c 65 6e 64 7b 76 65 | 72 62 61 74 69 6d 7d 5c |.\end{ve|rbatim}\|
|00002740| 65 6e 64 7b 71 75 6f 74 | 65 7d 0a 54 68 65 20 70 |end{quot|e}.The p|
|00002750| 61 72 61 6d 65 74 65 72 | 73 20 61 72 65 3a 0a 5c |arameter|s are:.\|
|00002760| 62 65 67 69 6e 7b 64 65 | 73 63 72 69 62 65 7d 0a |begin{de|scribe}.|
|00002770| 5c 69 74 65 6d 5b 5c 76 | 65 72 62 7c 6d 73 67 7c |\item[\v|erb|msg||
|00002780| 3a 5d 20 54 68 65 20 61 | 64 64 72 65 73 73 20 63 |:] The a|ddress c|
|00002790| 6f 6e 74 72 6f 6c 20 66 | 69 6c 65 2e 0a 0a 5c 69 |ontrol f|ile...\i|
|000027a0| 74 65 6d 5b 5c 76 65 72 | 62 7c 70 72 6d 7c 3a 5d |tem[\ver|b|prm|:]|
|000027b0| 20 54 68 65 20 6d 65 73 | 73 61 67 65 20 70 61 72 | The mes|sage par|
|000027c0| 61 6d 65 74 65 72 73 2e | 0a 0a 5c 69 74 65 6d 5b |ameters.|..\item[|
|000027d0| 5c 76 65 72 62 7c 71 70 | 7c 3a 5d 20 54 68 65 20 |\verb|qp||:] The |
|000027e0| 6d 65 73 73 61 67 65 20 | 71 75 65 75 65 20 73 74 |message |queue st|
|000027f0| 72 75 63 74 75 72 65 2e | 0a 0a 5c 69 74 65 6d 5b |ructure.|..\item[|
|00002800| 5c 76 65 72 62 7c 61 64 | 5c 5f 73 6e 64 72 7c 3a |\verb|ad|\_sndr|:|
|00002810| 5d 20 74 68 65 20 6f 72 | 69 67 69 6e 61 74 6f 72 |] the or|iginator|
|00002820| 20 6f 66 20 74 68 65 20 | 6d 65 73 73 61 67 65 2e | of the |message.|
|00002830| 0a 0a 5c 69 74 65 6d 5b | 5c 76 65 72 62 7c 61 64 |..\item[|\verb|ad|
|00002840| 5c 5f 72 65 63 69 70 7c | 3a 5d 20 54 68 65 20 6c |\_recip||:] The l|
|00002850| 69 73 74 20 6f 66 20 72 | 65 63 69 70 69 65 6e 74 |ist of r|ecipient|
|00002860| 73 20 6f 66 20 74 68 65 | 20 6d 65 73 73 61 67 65 |s of the| message|
|00002870| 2e 0a 0a 5c 69 74 65 6d | 5b 5c 76 65 72 62 7c 61 |...\item|[\verb|a|
|00002880| 64 5c 5f 63 6f 75 6e 74 | 7c 3a 5d 20 41 20 63 6f |d\_count||:] A co|
|00002890| 75 6e 74 20 6f 66 20 74 | 68 65 20 6e 75 6d 62 65 |unt of t|he numbe|
|000028a0| 72 20 6f 66 20 72 65 63 | 69 70 69 65 6e 74 20 61 |r of rec|ipient a|
|000028b0| 64 64 72 65 73 73 65 73 | 2e 0a 5c 65 6e 64 7b 64 |ddresses|..\end{d|
|000028c0| 65 73 63 72 69 62 65 7d | 0a 0a 54 68 65 20 72 6f |escribe}|..The ro|
|000028d0| 75 74 69 6e 65 20 72 65 | 74 75 72 6e 73 20 61 20 |utine re|turns a |
|000028e0| 73 74 61 74 75 73 20 74 | 6f 20 69 6e 64 69 63 61 |status t|o indica|
|000028f0| 74 65 20 73 75 63 63 65 | 73 73 20 6f 72 20 66 61 |te succe|ss or fa|
|00002900| 69 6c 75 72 65 2e 20 41 | 73 20 70 61 72 74 0a 6f |ilure. A|s part.o|
|00002910| 66 20 69 74 73 20 6f 70 | 65 72 61 74 69 6f 6e 20 |f its op|eration |
|00002920| 69 74 20 6c 6f 63 6b 73 | 20 74 68 65 20 61 64 64 |it locks| the add|
|00002930| 72 65 73 73 20 66 69 6c | 65 20 74 6f 20 70 72 65 |ress fil|e to pre|
|00002940| 76 65 6e 74 20 73 69 6d | 75 6c 74 61 6e 65 6f 75 |vent sim|ultaneou|
|00002950| 73 0a 61 63 63 65 73 73 | 20 62 79 20 6f 74 68 65 |s.access| by othe|
|00002960| 72 20 63 68 61 6e 6e 65 | 6c 73 2e 0a 0a 57 68 65 |r channe|ls...Whe|
|00002970| 6e 20 74 68 65 20 6d 65 | 73 73 61 67 65 20 68 61 |n the me|ssage ha|
|00002980| 73 20 62 65 65 6e 20 70 | 72 6f 63 65 73 73 65 64 |s been p|rocessed|
|00002990| 2c 20 74 68 65 20 6c 6f | 63 6b 20 7b 5c 65 6d 20 |, the lo|ck {\em |
|000029a0| 6d 75 73 74 7d 20 62 65 | 20 72 65 6c 65 61 73 65 |must} be| release|
|000029b0| 64 0a 62 79 20 63 61 6c | 6c 69 6e 67 20 74 68 65 |d.by cal|ling the|
|000029c0| 20 66 75 6e 63 74 69 6f | 6e 20 5c 76 65 72 62 7c | functio|n \verb||
|000029d0| 72 64 5f 65 6e 64 7c 2e | 0a 5c 62 65 67 69 6e 7b |rd_end|.|.\begin{|
|000029e0| 71 75 6f 74 65 7d 5c 69 | 6e 64 65 78 7b 72 64 5c |quote}\i|ndex{rd\|
|000029f0| 5f 65 6e 64 7d 5c 62 65 | 67 69 6e 7b 76 65 72 62 |_end}\be|gin{verb|
|00002a00| 61 74 69 6d 7d 0a 69 6e | 74 20 72 64 5f 65 6e 64 |atim}.in|t rd_end|
|00002a10| 20 28 29 3b 0a 5c 65 6e | 64 7b 76 65 72 62 61 74 | ();.\en|d{verbat|
|00002a20| 69 6d 7d 5c 65 6e 64 7b | 71 75 6f 74 65 7d 0a 0a |im}\end{|quote}..|
|00002a30| 49 66 20 74 68 65 20 6d | 65 73 73 61 67 65 73 20 |If the m|essages |
|00002a40| 73 74 61 74 75 73 20 63 | 68 61 6e 67 65 73 20 69 |status c|hanges i|
|00002a50| 6e 20 73 6f 6d 65 20 6d | 61 6e 6e 65 72 2c 20 74 |n some m|anner, t|
|00002a60| 68 65 20 61 64 64 72 65 | 73 73 20 66 69 6c 65 20 |he addre|ss file |
|00002a70| 6d 75 73 74 0a 62 65 20 | 75 70 64 61 74 65 64 2e |must.be |updated.|
|00002a80| 20 54 68 69 73 20 69 73 | 20 61 63 68 69 65 76 65 | This is| achieve|
|00002a90| 64 20 62 79 20 6f 6e 65 | 20 6f 66 20 74 68 65 20 |d by one| of the |
|00002aa0| 66 6f 6c 6c 6f 77 69 6e | 67 20 66 75 6e 63 74 69 |followin|g functi|
|00002ab0| 6f 6e 73 2e 0a 5c 62 65 | 67 69 6e 7b 71 75 6f 74 |ons..\be|gin{quot|
|00002ac0| 65 7d 5c 69 6e 64 65 78 | 7b 77 72 5c 5f 61 64 5c |e}\index|{wr\_ad\|
|00002ad0| 5f 73 74 61 74 75 73 7d | 5c 69 6e 64 65 78 7b 77 |_status}|\index{w|
|00002ae0| 72 5c 5f 61 64 5c 5f 72 | 63 6e 74 6e 6f 7d 5c 62 |r\_ad\_r|cntno}\b|
|00002af0| 65 67 69 6e 7b 76 65 72 | 62 61 74 69 6d 7d 0a 69 |egin{ver|batim}.i|
|00002b00| 6e 74 20 77 72 5f 61 64 | 5f 73 74 61 74 75 73 20 |nt wr_ad|_status |
|00002b10| 28 61 70 2c 20 74 79 70 | 65 7d 0a 41 44 44 52 20 |(ap, typ|e}.ADDR |
|00002b20| 2a 61 70 3b 0a 69 6e 74 | 20 74 79 70 65 3b 0a 0a |*ap;.int| type;..|
|00002b30| 69 6e 74 20 77 72 5f 61 | 64 5f 72 63 6e 74 6e 6f |int wr_a|d_rcntno|
|00002b40| 20 28 61 70 2c 20 72 63 | 6e 74 29 0a 41 44 44 52 | (ap, rc|nt).ADDR|
|00002b50| 20 2a 61 70 3b 0a 69 6e | 74 20 20 72 63 6e 74 3b | *ap;.in|t rcnt;|
|00002b60| 0a 5c 65 6e 64 7b 76 65 | 72 62 61 74 69 6d 7d 5c |.\end{ve|rbatim}\|
|00002b70| 65 6e 64 7b 71 75 6f 74 | 65 7d 0a 0a 54 68 65 20 |end{quot|e}..The |
|00002b80| 5c 76 65 72 62 7c 77 72 | 5f 61 64 5f 73 74 61 74 |\verb|wr|_ad_stat|
|00002b90| 75 73 7c 20 72 6f 75 74 | 69 6e 65 20 69 73 20 75 |us| rout|ine is u|
|00002ba0| 73 65 64 20 74 6f 20 75 | 70 64 61 74 65 20 74 68 |sed to u|pdate th|
|00002bb0| 65 20 73 74 61 74 75 73 | 20 6f 66 20 74 68 65 20 |e status| of the |
|00002bc0| 61 64 64 72 65 73 73 2e | 0a 54 68 69 73 20 63 61 |address.|.This ca|
|00002bd0| 6e 20 74 61 6b 65 20 6f | 6e 65 20 6f 66 20 74 68 |n take o|ne of th|
|00002be0| 65 20 66 6f 6c 6c 6f 77 | 69 6e 67 20 76 61 6c 75 |e follow|ing valu|
|00002bf0| 65 73 2e 0a 5c 5b 5c 62 | 65 67 69 6e 7b 74 61 62 |es..\[\b|egin{tab|
|00002c00| 75 6c 61 72 7d 7b 7c 6c | 7c 6c 7c 7d 0a 5c 68 6c |ular}{|l||l|}.\hl|
|00002c10| 69 6e 65 0a 09 5c 6d 75 | 6c 74 69 63 6f 6c 75 6d |ine..\mu|lticolum|
|00002c20| 6e 7b 31 7d 7b 7c 63 7c | 7d 7b 5c 62 66 20 56 61 |n{1}{|c||}{\bf Va|
|00002c30| 6c 75 65 7d 26 0a 09 09 | 5c 6d 75 6c 74 69 63 6f |lue}&...|\multico|
|00002c40| 6c 75 6d 6e 7b 31 7d 7b | 7c 63 7c 7d 7b 5c 62 66 |lumn{1}{||c|}{\bf|
|00002c50| 20 4d 65 61 6e 69 6e 67 | 7d 5c 5c 0a 5c 68 6c 69 | Meaning|}\\.\hli|
|00002c60| 6e 65 0a 09 5c 74 74 20 | 41 44 5c 5f 53 54 41 54 |ne..\tt |AD\_STAT|
|00002c70| 5c 5f 50 45 4e 44 26 09 | 54 68 65 20 61 64 64 72 |\_PEND&.|The addr|
|00002c80| 65 73 73 20 69 73 20 70 | 65 6e 64 69 6e 67 5c 5c |ess is p|ending\\|
|00002c90| 0a 09 5c 74 74 20 41 44 | 5c 5f 53 54 41 54 5c 5f |..\tt AD|\_STAT\_|
|00002ca0| 44 4f 4e 45 26 09 54 68 | 65 20 61 64 64 72 65 73 |DONE&.Th|e addres|
|00002cb0| 73 20 68 61 73 20 62 65 | 65 6e 20 66 69 6e 69 73 |s has be|en finis|
|00002cc0| 68 65 64 20 77 69 74 68 | 5c 5c 0a 5c 68 6c 69 6e |hed with|\\.\hlin|
|00002cd0| 65 0a 5c 65 6e 64 7b 74 | 61 62 75 6c 61 72 7d 5c |e.\end{t|abular}\|
|00002ce0| 5d 0a 0a 0a 54 68 65 20 | 5c 76 65 72 62 7c 77 72 |]...The |\verb|wr|
|00002cf0| 5f 61 64 5f 72 63 6e 74 | 6e 6f 7c 20 69 73 20 75 |_ad_rcnt|no| is u|
|00002d00| 73 65 64 20 74 6f 20 75 | 70 64 61 74 65 20 74 68 |sed to u|pdate th|
|00002d10| 65 20 72 65 66 6f 72 6d | 61 74 74 65 72 20 63 6f |e reform|atter co|
|00002d20| 75 6e 74 20 76 61 72 69 | 61 62 6c 65 2e 0a 0a 5c |unt vari|able...\|
|00002d30| 73 75 62 73 75 62 73 65 | 63 74 69 6f 6e 7b 4d 65 |subsubse|ction{Me|
|00002d40| 73 73 61 67 65 20 66 69 | 6c 65 73 7d 0a 0a 54 68 |ssage fi|les}..Th|
|00002d50| 65 72 65 20 61 72 65 20 | 61 20 6e 75 6d 62 65 72 |ere are |a number|
|00002d60| 20 6f 66 20 72 6f 75 74 | 69 6e 65 73 20 74 6f 20 | of rout|ines to |
|00002d70| 61 6c 6c 6f 77 20 61 20 | 63 68 61 6e 6e 65 6c 20 |allow a |channel |
|00002d80| 74 6f 20 69 74 65 72 61 | 74 65 20 74 68 72 6f 75 |to itera|te throu|
|00002d90| 67 68 0a 74 68 65 20 73 | 65 74 20 6f 66 20 6d 65 |gh.the s|et of me|
|00002da0| 73 73 61 67 65 20 66 69 | 6c 65 73 20 74 6f 20 64 |ssage fi|les to d|
|00002db0| 65 6c 69 76 65 72 2e 20 | 46 69 72 73 74 20 69 6e |eliver. |First in|
|00002dc0| 20 74 68 69 73 20 73 65 | 74 20 69 73 20 61 20 66 | this se|t is a f|
|00002dd0| 75 6e 63 74 69 6f 6e 0a | 74 6f 20 61 6c 6c 6f 77 |unction.|to allow|
|00002de0| 20 6c 6f 63 61 74 69 6f | 6e 20 6f 66 20 74 68 65 | locatio|n of the|
|00002df0| 20 72 65 6c 65 76 61 6e | 74 20 64 69 72 65 63 74 | relevan|t direct|
|00002e00| 6f 72 79 2e 20 54 68 69 | 73 20 66 75 6e 63 74 69 |ory. Thi|s functi|
|00002e10| 6f 6e 20 6d 61 70 73 20 | 61 0a 67 69 76 65 6e 20 |on maps |a.given |
|00002e20| 71 75 65 75 65 20 69 64 | 20 61 73 20 67 69 76 65 |queue id| as give|
|00002e30| 6e 20 62 79 20 74 68 65 | 20 51 4d 47 52 20 69 6e |n by the| QMGR in|
|00002e40| 74 6f 20 61 20 64 69 72 | 65 63 74 6f 72 79 20 62 |to a dir|ectory b|
|00002e50| 61 73 65 6e 61 6d 65 20 | 77 69 74 68 20 74 68 65 |asename |with the|
|00002e60| 0a 6d 65 73 73 61 67 65 | 20 66 69 6c 65 73 20 69 |.message| files i|
|00002e70| 6e 20 72 65 6c 61 74 69 | 6e 67 20 74 6f 20 61 20 |n relati|ng to a |
|00002e80| 67 69 76 65 6e 20 61 64 | 64 72 65 73 73 2e 20 49 |given ad|dress. I|
|00002e90| 74 20 69 73 0a 75 73 65 | 64 20 61 73 20 66 6f 6c |t is.use|d as fol|
|00002ea0| 6c 6f 77 73 3a 0a 5c 62 | 65 67 69 6e 7b 71 75 6f |lows:.\b|egin{quo|
|00002eb0| 74 65 7d 5c 69 6e 64 65 | 78 7b 71 69 64 32 64 69 |te}\inde|x{qid2di|
|00002ec0| 72 7d 5c 62 65 67 69 6e | 7b 76 65 72 62 61 74 69 |r}\begin|{verbati|
|00002ed0| 6d 7d 0a 69 6e 74 20 71 | 69 64 32 64 69 72 20 28 |m}.int q|id2dir (|
|00002ee0| 71 69 64 2c 20 61 70 2c | 20 65 78 69 73 74 73 2c |qid, ap,| exists,|
|00002ef0| 20 63 70 70 29 0a 63 68 | 61 72 20 20 20 2a 71 69 | cpp).ch|ar *qi|
|00002f00| 64 3b 0a 41 44 44 52 20 | 20 20 2a 61 70 3b 0a 69 |d;.ADDR | *ap;.i|
|00002f10| 6e 74 20 20 20 20 65 78 | 69 73 74 73 3b 0a 63 68 |nt ex|ists;.ch|
|00002f20| 61 72 20 20 20 2a 2a 63 | 70 70 3b 0a 5c 65 6e 64 |ar **c|pp;.\end|
|00002f30| 7b 76 65 72 62 61 74 69 | 6d 7d 5c 65 6e 64 7b 71 |{verbati|m}\end{q|
|00002f40| 75 6f 74 65 7d 0a 54 68 | 65 20 61 72 67 75 6d 65 |uote}.Th|e argume|
|00002f50| 6e 74 73 20 74 6f 20 74 | 68 69 73 20 61 72 65 0a |nts to t|his are.|
|00002f60| 5c 62 65 67 69 6e 7b 64 | 65 73 63 72 69 62 65 7d |\begin{d|escribe}|
|00002f70| 0a 5c 69 74 65 6d 5b 5c | 76 65 72 62 7c 71 69 64 |.\item[\|verb|qid|
|00002f80| 7c 3a 5d 09 41 20 63 68 | 61 72 61 63 74 65 72 20 ||:].A ch|aracter |
|00002f90| 73 74 72 69 6e 67 20 63 | 6f 6e 74 61 69 6e 69 6e |string c|ontainin|
|00002fa0| 67 20 74 68 65 20 71 75 | 65 75 65 20 69 64 65 6e |g the qu|eue iden|
|00002fb0| 74 69 66 69 65 72 2e 0a | 0a 5c 69 74 65 6d 5b 5c |tifier..|.\item[\|
|00002fc0| 76 65 72 62 7c 61 70 7c | 3a 5d 09 54 68 65 20 61 |verb|ap||:].The a|
|00002fd0| 64 64 72 65 73 73 20 74 | 68 61 74 20 69 73 20 62 |ddress t|hat is b|
|00002fe0| 65 69 6e 67 20 70 72 6f | 63 65 73 73 65 64 2e 0a |eing pro|cessed..|
|00002ff0| 0a 5c 69 74 65 6d 5b 5c | 76 65 72 62 7c 65 78 69 |.\item[\|verb|exi|
|00003000| 73 74 73 7c 3a 5d 09 41 | 20 66 6c 61 67 2c 20 74 |sts|:].A| flag, t|
|00003010| 68 69 73 20 73 68 6f 75 | 6c 64 20 62 65 20 5c 76 |his shou|ld be \v|
|00003020| 65 72 62 7c 54 52 55 45 | 7c 20 69 66 20 74 68 65 |erb|TRUE|| if the|
|00003030| 20 64 69 72 65 63 74 6f | 72 79 0a 73 68 6f 75 6c | directo|ry.shoul|
|00003040| 64 20 65 78 69 73 74 2c | 20 61 6e 64 20 5c 76 65 |d exist,| and \ve|
|00003050| 72 62 7c 46 41 4c 53 45 | 7c 20 69 66 20 69 74 20 |rb|FALSE|| if it |
|00003060| 64 6f 65 73 6e 27 74 20 | 6d 61 74 74 65 72 2e 0a |doesn't |matter..|
|00003070| 0a 5c 69 74 65 6d 5b 5c | 76 65 72 62 7c 63 70 70 |.\item[\|verb|cpp|
|00003080| 7c 3a 5d 09 41 20 63 68 | 61 72 61 63 74 65 72 20 ||:].A ch|aracter |
|00003090| 70 6f 69 6e 74 65 72 20 | 74 68 61 74 20 69 73 20 |pointer |that is |
|000030a0| 61 73 73 69 67 6e 65 64 | 20 74 68 65 0a 72 65 73 |assigned| the.res|
|000030b0| 75 6c 74 69 6e 67 20 64 | 69 72 65 63 74 6f 72 79 |ulting d|irectory|
|000030c0| 20 6e 61 6d 65 2e 0a 5c | 65 6e 64 7b 64 65 73 63 | name..\|end{desc|
|000030d0| 72 69 62 65 7d 0a 0a 54 | 68 65 20 66 75 6e 63 74 |ribe}..T|he funct|
|000030e0| 69 6f 6e 20 77 69 6c 6c | 20 72 65 74 75 72 6e 20 |ion will| return |
|000030f0| 5c 76 65 72 62 7c 4f 4b | 7c 20 6f 6e 20 73 75 63 |\verb|OK|| on suc|
|00003100| 63 65 73 73 66 75 6c 20 | 63 6f 6d 70 6c 65 74 69 |cessful |completi|
|00003110| 6f 6e 20 61 6e 64 0a 5c | 76 65 72 62 7c 4e 4f 54 |on and.\|verb|NOT|
|00003120| 4f 4b 7c 20 6f 6e 20 66 | 61 69 6c 75 72 65 2e 0a |OK| on f|ailure..|
|00003130| 0a 54 68 65 20 6e 65 78 | 74 20 6f 70 65 72 61 74 |.The nex|t operat|
|00003140| 69 6f 6e 20 69 73 20 74 | 79 70 69 63 61 6c 6c 79 |ion is t|ypically|
|00003150| 20 74 6f 20 76 69 73 69 | 74 20 65 61 63 68 20 6f | to visi|t each o|
|00003160| 66 20 74 68 65 20 6d 65 | 73 73 61 67 65 20 66 69 |f the me|ssage fi|
|00003170| 6c 65 73 20 69 6e 0a 74 | 75 72 6e 2e 20 54 68 69 |les in.t|urn. Thi|
|00003180| 73 20 69 73 20 68 61 6e | 64 6c 65 64 20 62 79 20 |s is han|dled by |
|00003190| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 72 6f |the foll|owing ro|
|000031a0| 75 74 69 6e 65 73 2e 0a | 0a 5c 62 65 67 69 6e 7b |utines..|.\begin{|
|000031b0| 71 75 6f 74 65 7d 5c 69 | 6e 64 65 78 7b 6d 73 67 |quote}\i|ndex{msg|
|000031c0| 5c 5f 72 69 6e 69 74 7d | 5c 62 65 67 69 6e 7b 76 |\_rinit}|\begin{v|
|000031d0| 65 72 62 61 74 69 6d 7d | 0a 69 6e 74 20 6d 73 67 |erbatim}|.int msg|
|000031e0| 5f 72 69 6e 69 74 20 28 | 64 69 72 29 0a 63 68 61 |_rinit (|dir).cha|
|000031f0| 72 20 2a 64 69 72 3b 0a | 5c 65 6e 64 7b 76 65 72 |r *dir;.|\end{ver|
|00003200| 62 61 74 69 6d 7d 5c 65 | 6e 64 7b 71 75 6f 74 65 |batim}\e|nd{quote|
|00003210| 7d 0a 0a 54 68 65 20 61 | 72 67 75 6d 65 6e 74 20 |}..The a|rgument |
|00003220| 68 65 72 65 20 69 73 3a | 0a 5c 62 65 67 69 6e 7b |here is:|.\begin{|
|00003230| 64 65 73 63 72 69 62 65 | 7d 0a 5c 69 74 65 6d 5b |describe|}.\item[|
|00003240| 5c 76 65 72 62 7c 64 69 | 72 7c 3a 5d 09 54 68 65 |\verb|di|r|:].The|
|00003250| 20 64 69 72 65 63 74 6f | 72 79 20 62 61 73 65 20 | directo|ry base |
|00003260| 6f 66 20 74 68 65 20 6d | 65 73 73 61 67 65 20 28 |of the m|essage (|
|00003270| 75 73 75 61 6c 6c 79 0a | 6f 62 74 61 69 6e 65 64 |usually.|obtained|
|00003280| 20 66 72 6f 6d 20 61 20 | 63 61 6c 6c 20 74 6f 20 | from a |call to |
|00003290| 5c 76 65 72 62 7c 71 69 | 64 32 64 69 72 7c 29 2e |\verb|qi|d2dir|).|
|000032a0| 0a 5c 65 6e 64 7b 64 65 | 73 63 72 69 62 65 7d 0a |.\end{de|scribe}.|
|000032b0| 0a 54 68 69 73 20 66 75 | 6e 63 74 69 6f 6e 20 72 |.This fu|nction r|
|000032c0| 65 74 75 72 6e 73 20 74 | 68 65 20 75 73 75 61 6c |eturns t|he usual|
|000032d0| 20 5c 76 65 72 62 7c 4f | 4b 7c 2f 5c 76 65 72 62 | \verb|O|K|/\verb|
|000032e0| 7c 4e 4f 54 4f 4b 7c 20 | 73 74 61 74 75 73 2e 0a ||NOTOK| |status..|
|000032f0| 0a 46 6f 6c 6c 6f 77 69 | 6e 67 20 74 68 69 73 2c |.Followi|ng this,|
|00003300| 20 74 68 65 20 66 75 6e | 63 74 69 6f 6e 20 5c 76 | the fun|ction \v|
|00003310| 65 72 62 7c 6d 73 67 5f | 72 66 69 6c 65 7c 20 69 |erb|msg_|rfile| i|
|00003320| 73 20 63 61 6c 6c 65 64 | 20 72 65 70 65 61 74 65 |s called| repeate|
|00003330| 64 6c 79 0a 75 6e 74 69 | 6c 20 69 74 20 72 65 74 |dly.unti|l it ret|
|00003340| 75 72 6e 73 20 5c 76 65 | 72 62 7c 52 50 5f 44 4f |urns \ve|rb|RP_DO|
|00003350| 4e 45 7c 20 74 6f 20 6f | 62 74 61 69 6e 20 65 61 |NE| to o|btain ea|
|00003360| 63 68 20 6f 66 20 74 68 | 65 20 66 69 6c 65 73 20 |ch of th|e files |
|00003370| 63 6f 6d 70 6f 73 69 6e | 67 0a 74 68 65 20 6d 65 |composin|g.the me|
|00003380| 73 73 61 67 65 2e 0a 5c | 62 65 67 69 6e 7b 71 75 |ssage..\|begin{qu|
|00003390| 6f 74 65 7d 5c 69 6e 64 | 65 78 7b 6d 73 67 5c 5f |ote}\ind|ex{msg\_|
|000033a0| 72 66 69 6c 65 7d 5c 62 | 65 67 69 6e 7b 76 65 72 |rfile}\b|egin{ver|
|000033b0| 62 61 74 69 6d 7d 0a 69 | 6e 74 20 6d 73 67 5f 72 |batim}.i|nt msg_r|
|000033c0| 66 69 6c 65 20 28 62 75 | 66 29 0a 63 68 61 72 20 |file (bu|f).char |
|000033d0| 2a 62 75 66 3b 0a 5c 65 | 6e 64 7b 76 65 72 62 61 |*buf;.\e|nd{verba|
|000033e0| 74 69 6d 7d 5c 65 6e 64 | 7b 71 75 6f 74 65 7d 0a |tim}\end|{quote}.|
|000033f0| 54 68 65 20 61 72 67 75 | 6d 65 6e 74 20 69 73 3a |The argu|ment is:|
|00003400| 0a 5c 62 65 67 69 6e 7b | 64 65 73 63 72 69 62 65 |.\begin{|describe|
|00003410| 7d 0a 5c 69 74 65 6d 5b | 5c 76 65 72 62 7c 62 75 |}.\item[|\verb|bu|
|00003420| 66 7c 3a 5d 20 41 20 70 | 6f 69 6e 74 65 72 20 74 |f|:] A p|ointer t|
|00003430| 6f 20 61 20 63 68 61 72 | 61 63 74 65 72 20 62 75 |o a char|acter bu|
|00003440| 66 66 65 72 20 28 6f 66 | 20 73 69 7a 65 0a 5c 76 |ffer (of| size.\v|
|00003450| 65 72 62 7c 46 49 4c 4e | 53 49 5a 45 7c 29 20 77 |erb|FILN|SIZE|) w|
|00003460| 68 69 63 68 20 69 73 20 | 66 69 6c 6c 65 64 20 69 |hich is |filled i|
|00003470| 6e 20 77 69 74 68 20 74 | 68 65 20 66 69 6c 65 20 |n with t|he file |
|00003480| 6e 61 6d 65 20 69 66 20 | 74 68 65 20 63 61 6c 6c |name if |the call|
|00003490| 20 73 75 63 63 65 65 64 | 73 2e 2e 0a 5c 65 6e 64 | succeed|s...\end|
|000034a0| 7b 64 65 73 63 72 69 62 | 65 7d 0a 0a 46 69 6e 61 |{describ|e}..Fina|
|000034b0| 6c 6c 79 2c 20 77 68 65 | 6e 20 61 6c 6c 20 66 69 |lly, whe|n all fi|
|000034c0| 6c 65 73 20 68 61 76 65 | 20 62 65 65 6e 20 70 72 |les have| been pr|
|000034d0| 6f 63 65 73 73 65 64 2c | 20 6f 72 20 69 66 20 74 |ocessed,| or if t|
|000034e0| 68 65 20 6f 70 65 72 61 | 74 69 6f 6e 20 69 73 20 |he opera|tion is |
|000034f0| 74 6f 0a 62 65 20 61 62 | 6f 72 74 65 64 2c 20 74 |to.be ab|orted, t|
|00003500| 68 65 20 66 75 6e 63 74 | 69 6f 6e 20 5c 76 65 72 |he funct|ion \ver|
|00003510| 62 7c 6d 73 67 5f 72 65 | 6e 64 7c 20 69 73 20 63 |b|msg_re|nd| is c|
|00003520| 61 6c 6c 65 64 3a 0a 5c | 62 65 67 69 6e 7b 71 75 |alled:.\|begin{qu|
|00003530| 6f 74 65 7d 5c 69 6e 64 | 65 78 7b 6d 73 67 5c 5f |ote}\ind|ex{msg\_|
|00003540| 72 65 6e 64 7d 5c 62 65 | 67 69 6e 7b 76 65 72 62 |rend}\be|gin{verb|
|00003550| 61 74 69 6d 7d 0a 69 6e | 74 20 6d 73 67 5f 72 65 |atim}.in|t msg_re|
|00003560| 6e 64 20 28 29 0a 5c 65 | 6e 64 7b 76 65 72 62 61 |nd ().\e|nd{verba|
|00003570| 74 69 6d 7d 5c 65 6e 64 | 7b 71 75 6f 74 65 7d 0a |tim}\end|{quote}.|
|00003580| 0a 5c 73 75 62 73 65 63 | 74 69 6f 6e 20 7b 44 65 |.\subsec|tion {De|
|00003590| 6c 69 76 65 72 79 20 4e | 6f 74 69 66 69 63 61 74 |livery N|otificat|
|000035a0| 69 6f 6e 73 7d 5c 6c 61 | 62 65 6c 7b 73 65 74 3a |ions}\la|bel{set:|
|000035b0| 64 72 7d 0a 0a 44 65 6c | 69 76 65 72 79 20 72 65 |dr}..Del|ivery re|
|000035c0| 70 6f 72 74 73 20 73 68 | 6f 75 6c 64 20 62 65 20 |ports sh|ould be |
|000035d0| 77 72 69 74 74 65 6e 20 | 6f 75 74 20 62 79 20 61 |written |out by a|
|000035e0| 20 63 68 61 6e 6e 65 6c | 20 77 68 65 6e 20 69 74 | channel| when it|
|000035f0| 20 69 73 20 63 6c 65 61 | 72 0a 74 68 61 74 20 74 | is clea|r.that t|
|00003600| 68 65 20 6d 65 73 73 61 | 67 65 20 63 61 6e 6e 6f |he messa|ge canno|
|00003610| 74 20 62 65 20 64 65 6c | 69 76 65 72 65 64 20 6f |t be del|ivered o|
|00003620| 72 20 69 66 20 74 68 65 | 20 6d 65 73 73 61 67 65 |r if the| message|
|00003630| 20 68 61 73 20 62 65 65 | 6e 0a 64 65 6c 69 76 65 | has bee|n.delive|
|00003640| 72 65 64 20 61 6e 64 20 | 63 6f 6e 66 69 72 6d 61 |red and |confirma|
|00003650| 74 69 6f 6e 20 69 73 20 | 72 65 71 75 65 73 74 65 |tion is |requeste|
|00003660| 64 2e 20 54 68 65 20 72 | 6f 75 74 69 6e 65 0a 5c |d. The r|outine.\|
|00003670| 76 65 72 62 7c 73 65 74 | 5f 31 64 72 7c 20 69 73 |verb|set|_1dr| is|
|00003680| 20 74 68 65 6e 20 75 73 | 65 64 20 74 6f 20 73 65 | then us|ed to se|
|00003690| 74 20 74 68 65 20 61 70 | 70 72 6f 70 72 69 61 74 |t the ap|propriat|
|000036a0| 65 20 73 74 61 74 75 73 | 20 69 6e 20 74 68 65 0a |e status| in the.|
|000036b0| 61 64 64 72 65 73 73 20 | 73 74 72 75 63 74 75 72 |address |structur|
|000036c0| 65 3a 0a 0a 5c 62 65 67 | 69 6e 7b 71 75 6f 74 65 |e:..\beg|in{quote|
|000036d0| 7d 5c 69 6e 64 65 78 7b | 73 65 74 5c 5f 31 64 72 |}\index{|set\_1dr|
|000036e0| 7d 5c 62 65 67 69 6e 7b | 76 65 72 62 61 74 69 6d |}\begin{|verbatim|
|000036f0| 7d 0a 69 6e 74 20 20 73 | 65 74 5f 31 64 72 20 28 |}.int s|et_1dr (|
|00003700| 71 70 2c 20 61 64 5f 6e | 6f 2c 20 6d 73 67 2c 20 |qp, ad_n|o, msg, |
|00003710| 72 65 61 73 6f 6e 2c 20 | 64 69 61 67 2c 20 73 74 |reason, |diag, st|
|00003720| 72 29 0a 51 5f 73 74 72 | 75 63 74 20 2a 71 70 3b |r).Q_str|uct *qp;|
|00003730| 0a 69 6e 74 20 20 20 20 | 20 20 61 64 5f 6e 6f 3b |.int | ad_no;|
|00003740| 0a 63 68 61 72 20 09 20 | 2a 6d 73 67 3b 0a 69 6e |.char . |*msg;.in|
|00003750| 74 20 20 20 20 20 20 72 | 65 61 73 6f 6e 3b 0a 69 |t r|eason;.i|
|00003760| 6e 74 20 20 20 20 20 20 | 64 69 61 67 3b 0a 63 68 |nt |diag;.ch|
|00003770| 61 72 20 20 20 20 20 2a | 73 74 72 3b 0a 5c 65 6e |ar *|str;.\en|
|00003780| 64 7b 76 65 72 62 61 74 | 69 6d 7d 5c 65 6e 64 7b |d{verbat|im}\end{|
|00003790| 71 75 6f 74 65 7d 0a 0a | 54 68 65 20 61 72 67 75 |quote}..|The argu|
|000037a0| 6d 65 6e 74 73 20 74 6f | 20 74 68 69 73 20 66 75 |ments to| this fu|
|000037b0| 6e 63 74 69 6f 6e 20 61 | 72 65 20 61 73 20 66 6f |nction a|re as fo|
|000037c0| 6c 6c 6f 77 73 3a 0a 5c | 62 65 67 69 6e 7b 64 65 |llows:.\|begin{de|
|000037d0| 73 63 72 69 62 65 7d 0a | 5c 69 74 65 6d 5b 5c 76 |scribe}.|\item[\v|
|000037e0| 65 72 62 7c 71 70 7c 3a | 5d 09 41 20 70 6f 69 6e |erb|qp|:|].A poin|
|000037f0| 74 65 72 20 74 6f 20 61 | 20 71 75 65 75 65 20 73 |ter to a| queue s|
|00003800| 74 72 75 63 74 75 72 65 | 20 72 65 70 72 65 73 65 |tructure| represe|
|00003810| 6e 74 69 6e 67 0a 74 68 | 65 20 6d 65 73 73 61 67 |nting.th|e messag|
|00003820| 65 2e 20 54 68 65 20 71 | 75 65 75 65 20 73 74 72 |e. The q|ueue str|
|00003830| 75 63 74 75 72 65 20 73 | 68 6f 75 6c 64 20 68 61 |ucture s|hould ha|
|00003840| 76 65 20 74 68 65 20 61 | 64 64 72 65 73 73 20 63 |ve the a|ddress c|
|00003850| 6f 6d 70 6f 6e 65 6e 74 | 73 0a 66 69 6c 6c 65 64 |omponent|s.filled|
|00003860| 20 69 6e 20 28 74 68 69 | 73 20 69 73 20 6e 6f 72 | in (thi|s is nor|
|00003870| 6d 61 6c 6c 79 20 74 68 | 65 20 63 61 73 65 29 2e |mally th|e case).|
|00003880| 0a 0a 5c 69 74 65 6d 5b | 5c 76 65 72 62 7c 61 64 |..\item[|\verb|ad|
|00003890| 5c 5f 6e 6f 7c 3a 5d 09 | 54 68 65 20 61 64 64 72 |\_no|:].|The addr|
|000038a0| 65 73 73 20 6e 75 6d 62 | 65 72 20 74 68 61 74 20 |ess numb|er that |
|000038b0| 74 68 69 73 20 72 65 70 | 6f 72 74 20 69 73 20 66 |this rep|ort is f|
|000038c0| 6f 72 2e 0a 0a 5c 69 74 | 65 6d 5b 5c 76 65 72 62 |or...\it|em[\verb|
|000038d0| 7c 6d 73 67 7c 3a 5d 20 | 54 68 65 20 71 75 65 75 ||msg|:] |The queu|
|000038e0| 65 20 6e 61 6d 65 20 6f | 66 20 74 68 65 20 6d 65 |e name o|f the me|
|000038f0| 73 73 61 67 65 20 62 65 | 69 6e 67 20 70 72 6f 63 |ssage be|ing proc|
|00003900| 65 73 73 65 64 2e 0a 0a | 5c 69 74 65 6d 5b 5c 76 |essed...|\item[\v|
|00003910| 65 72 62 7c 72 65 61 73 | 6f 6e 7c 3a 5d 09 41 20 |erb|reas|on|:].A |
|00003920| 72 65 61 73 6f 6e 20 63 | 6f 64 65 20 66 6f 72 20 |reason c|ode for |
|00003930| 74 68 65 20 6d 65 73 73 | 61 67 65 20 66 61 69 6c |the mess|age fail|
|00003940| 75 72 65 2e 20 54 68 69 | 73 0a 73 68 6f 75 6c 64 |ure. Thi|s.should|
|00003950| 20 62 65 20 63 68 6f 73 | 65 6e 20 66 72 6f 6d 20 | be chos|en from |
|00003960| 6f 6e 65 20 6f 66 20 74 | 68 6f 73 65 20 69 6e 20 |one of t|hose in |
|00003970| 54 61 62 6c 65 7e 5c 72 | 65 66 7b 74 61 62 3a 72 |Table~\r|ef{tab:r|
|00003980| 65 61 73 6f 6e 7d 20 6f | 6e 0a 70 61 67 65 7e 5c |eason} o|n.page~\|
|00003990| 70 61 67 65 72 65 66 7b | 74 61 62 3a 72 65 61 73 |pageref{|tab:reas|
|000039a0| 6f 6e 7d 2e 0a 0a 5c 69 | 74 65 6d 5b 5c 76 65 72 |on}...\i|tem[\ver|
|000039b0| 62 7c 64 69 61 67 7c 3a | 5d 20 41 20 64 69 61 67 |b|diag|:|] A diag|
|000039c0| 6e 6f 73 74 69 63 20 63 | 6f 64 65 20 66 6f 72 20 |nostic c|ode for |
|000039d0| 74 68 65 20 6d 65 73 73 | 61 67 65 20 66 61 69 6c |the mess|age fail|
|000039e0| 75 72 65 2e 0a 54 68 69 | 73 20 69 73 20 73 75 70 |ure..Thi|s is sup|
|000039f0| 70 6c 65 6d 65 6e 74 61 | 72 79 20 69 6e 66 6f 72 |plementa|ry infor|
|00003a00| 6d 61 74 69 6f 6e 20 74 | 6f 20 74 68 65 20 72 65 |mation t|o the re|
|00003a10| 61 73 6f 6e 20 63 6f 64 | 65 2e 20 49 74 20 73 68 |ason cod|e. It sh|
|00003a20| 6f 75 6c 64 20 62 65 20 | 6f 6e 65 0a 6f 66 20 74 |ould be |one.of t|
|00003a30| 68 6f 73 65 20 76 61 6c | 75 65 73 20 67 69 76 65 |hose val|ues give|
|00003a40| 6e 20 69 6e 20 74 68 65 | 20 66 69 6c 65 20 5c 66 |n in the| file \f|
|00003a50| 69 6c 65 7b 64 72 2e 68 | 7d 2e 20 54 68 65 72 65 |ile{dr.h|}. There|
|00003a60| 20 61 72 65 20 61 20 6c | 61 72 67 65 0a 6e 75 6d | are a l|arge.num|
|00003a70| 62 65 72 20 6f 66 20 74 | 68 65 73 65 20 61 76 61 |ber of t|hese ava|
|00003a80| 69 6c 61 62 6c 65 2e 0a | 0a 5c 69 74 65 6d 5b 5c |ilable..|.\item[\|
|00003a90| 76 65 72 62 7c 73 74 72 | 7c 3a 5d 09 41 20 63 68 |verb|str||:].A ch|
|00003aa0| 61 72 61 63 74 65 72 20 | 73 74 72 69 6e 67 20 77 |aracter |string w|
|00003ab0| 68 69 63 68 20 72 65 63 | 6f 72 64 73 20 74 68 65 |hich rec|ords the|
|00003ac0| 20 72 65 61 73 6f 6e 0a | 66 6f 72 20 74 68 65 20 | reason.|for the |
|00003ad0| 66 61 69 6c 75 72 65 2e | 20 54 68 69 73 20 73 68 |failure.| This sh|
|00003ae0| 6f 75 6c 64 20 62 65 20 | 73 6f 6d 65 74 68 69 6e |ould be |somethin|
|00003af0| 67 20 74 68 61 74 20 64 | 65 73 63 72 69 62 65 73 |g that d|escribes|
|00003b00| 20 74 68 65 20 66 61 69 | 6c 75 72 65 2e 0a 54 68 | the fai|lure..Th|
|00003b10| 69 73 20 66 69 65 6c 64 | 20 73 68 6f 75 6c 64 20 |is field| should |
|00003b20| 61 6c 77 61 79 73 20 62 | 65 20 66 69 6c 6c 65 64 |always b|e filled|
|00003b30| 20 69 6e 20 77 69 74 68 | 20 73 6f 6d 65 74 68 69 | in with| somethi|
|00003b40| 6e 67 20 61 70 70 72 6f | 70 72 69 61 74 65 2e 0a |ng appro|priate..|
|00003b50| 0a 5c 65 6e 64 7b 64 65 | 73 63 72 69 62 65 7d 0a |.\end{de|scribe}.|
|00003b60| 0a 5c 74 61 67 74 61 62 | 6c 65 7b 72 65 61 73 6f |.\tagtab|le{reaso|
|00003b70| 6e 7d 7b 52 65 61 73 6f | 6e 20 43 6f 64 65 73 7d |n}{Reaso|n Codes}|
|00003b80| 7b 74 61 62 3a 72 65 61 | 73 6f 6e 7d 0a 0a 57 68 |{tab:rea|son}..Wh|
|00003b90| 65 6e 20 63 61 6c 6c 69 | 6e 67 20 74 68 69 73 20 |en calli|ng this |
|00003ba0| 66 75 6e 63 74 69 6f 6e | 20 74 68 65 20 72 6f 75 |function| the rou|
|00003bb0| 74 69 6e 65 20 73 68 6f | 75 6c 64 20 72 65 74 75 |tine sho|uld retu|
|00003bc0| 72 6e 20 74 6f 20 74 68 | 65 20 51 4d 47 52 20 6f |rn to th|e QMGR o|
|00003bd0| 6e 65 0a 6f 66 20 74 68 | 65 20 66 6f 6c 6c 6f 77 |ne.of th|e follow|
|00003be0| 69 6e 67 20 76 61 72 69 | 61 62 6c 65 73 3a 0a 5c |ing vari|ables:.\|
|00003bf0| 5b 5c 62 65 67 69 6e 7b | 74 61 62 75 6c 61 72 7d |[\begin{|tabular}|
|00003c00| 7b 7c 6c 20 7c 20 70 7b | 30 2e 36 5c 74 65 78 74 |{|l | p{|0.6\text|
|00003c10| 77 69 64 74 68 7d 7c 7d | 0a 5c 68 6c 69 6e 65 0a |width}|}|.\hline.|
|00003c20| 09 5c 6d 75 6c 74 69 63 | 6f 6c 75 6d 6e 7b 31 7d |.\multic|olumn{1}|
|00003c30| 7b 7c 63 7c 7d 7b 5c 62 | 66 20 51 6d 67 72 20 63 |{|c|}{\b|f Qmgr c|
|00003c40| 6f 64 65 7d 20 26 0a 09 | 09 5c 6d 75 6c 74 69 63 |ode} &..|.\multic|
|00003c50| 6f 6c 75 6d 6e 7b 31 7d | 7b 7c 63 7c 7d 7b 5c 62 |olumn{1}|{|c|}{\b|
|00003c60| 66 20 57 68 65 6e 20 41 | 70 70 6c 69 63 61 62 6c |f When A|pplicabl|
|00003c70| 65 7d 20 5c 5c 0a 5c 68 | 6c 69 6e 65 0a 09 5c 74 |e} \\.\h|line..\t|
|00003c80| 74 20 70 6f 73 69 74 69 | 76 65 44 52 20 26 09 46 |t positi|veDR &.F|
|00003c90| 6f 72 20 74 68 65 20 66 | 69 72 73 74 20 72 65 63 |or the f|irst rec|
|00003ca0| 69 70 65 69 6e 74 20 77 | 69 74 68 20 61 0a 09 09 |ipeint w|ith a...|
|00003cb0| 09 09 70 6f 73 69 74 69 | 76 65 20 64 65 6c 69 76 |..positi|ve deliv|
|00003cc0| 65 72 79 20 72 65 70 6f | 72 74 20 20 5c 5c 0a 09 |ery repo|rt \\..|
|00003cd0| 5c 74 74 20 73 75 63 63 | 65 73 73 53 68 61 72 65 |\tt succ|essShare|
|00003ce0| 64 44 52 26 09 46 6f 72 | 20 73 75 62 73 65 71 75 |dDR&.For| subsequ|
|00003cf0| 65 6e 74 20 72 65 63 69 | 70 69 65 6e 74 73 20 77 |ent reci|pients w|
|00003d00| 69 74 68 0a 09 09 09 09 | 70 6f 73 69 74 69 76 65 |ith.....|positive|
|00003d10| 20 64 65 6c 69 76 65 72 | 79 20 72 65 70 6f 72 74 | deliver|y report|
|00003d20| 73 5c 5c 0a 09 5c 74 74 | 20 6e 65 67 61 74 69 76 |s\\..\tt| negativ|
|00003d30| 65 44 52 20 26 09 46 6f | 72 20 74 68 65 20 66 69 |eDR &.Fo|r the fi|
|00003d40| 72 73 74 20 72 65 63 69 | 70 69 65 6e 74 20 77 69 |rst reci|pient wi|
|00003d50| 74 68 20 61 0a 09 09 09 | 09 6e 65 67 61 74 69 76 |th a....|.negativ|
|00003d60| 65 20 64 65 6c 69 76 65 | 72 79 20 72 65 70 6f 72 |e delive|ry repor|
|00003d70| 74 20 5c 5c 0a 09 5c 74 | 74 20 66 61 69 6c 75 72 |t \\..\t|t failur|
|00003d80| 65 53 68 61 72 65 64 44 | 52 26 09 46 6f 72 20 73 |eSharedD|R&.For s|
|00003d90| 75 62 73 65 71 75 65 6e | 74 20 72 65 63 69 70 69 |ubsequen|t recipi|
|00003da0| 65 6e 74 73 20 77 69 74 | 68 0a 09 09 09 09 6e 65 |ents wit|h.....ne|
|00003db0| 67 61 74 69 76 65 20 64 | 65 6c 69 76 65 72 79 20 |gative d|elivery |
|00003dc0| 72 65 70 6f 72 74 73 20 | 5c 5c 0a 5c 68 6c 69 6e |reports |\\.\hlin|
|00003dd0| 65 0a 5c 65 6e 64 7b 74 | 61 62 75 6c 61 72 7d 5c |e.\end{t|abular}\|
|00003de0| 5d 0a 0a 4f 6e 63 65 20 | 74 68 65 20 72 65 63 69 |]..Once |the reci|
|00003df0| 70 69 65 6e 74 73 20 68 | 61 76 65 20 62 65 65 6e |pients h|ave been|
|00003e00| 20 6d 61 72 6b 65 64 20 | 77 69 74 68 20 5c 76 65 | marked |with \ve|
|00003e10| 72 62 7c 73 65 74 5f 31 | 64 72 7c 2c 20 74 68 65 |rb|set_1|dr|, the|
|00003e20| 20 6c 61 73 74 0a 73 74 | 65 70 20 6e 65 63 65 73 | last.st|ep neces|
|00003e30| 73 61 72 79 20 69 73 20 | 74 6f 20 77 72 69 74 65 |sary is |to write|
|00003e40| 20 6f 75 74 20 74 68 65 | 20 61 63 74 75 61 6c 20 | out the| actual |
|00003e50| 64 65 6c 69 76 65 72 79 | 20 72 65 70 6f 72 74 20 |delivery| report |
|00003e60| 62 79 20 63 61 6c 6c 69 | 6e 67 0a 5c 76 65 72 62 |by calli|ng.\verb|
|00003e70| 7c 77 72 5f 71 32 64 72 | 7c 2e 20 54 68 69 73 20 ||wr_q2dr||. This |
|00003e80| 69 73 20 64 65 66 69 6e | 65 64 20 61 73 20 66 6f |is defin|ed as fo|
|00003e90| 6c 6c 6f 77 73 3a 0a 0a | 5c 62 65 67 69 6e 7b 71 |llows:..|\begin{q|
|00003ea0| 75 6f 74 65 7d 5c 69 6e | 64 65 78 7b 77 72 5c 5f |uote}\in|dex{wr\_|
|00003eb0| 71 32 64 72 7d 5c 62 65 | 67 69 6e 7b 76 65 72 62 |q2dr}\be|gin{verb|
|00003ec0| 61 74 69 6d 7d 0a 69 6e | 74 20 77 72 5f 71 32 64 |atim}.in|t wr_q2d|
|00003ed0| 72 20 28 71 70 2c 20 6d | 73 67 69 64 29 0a 51 5f |r (qp, m|sgid).Q_|
|00003ee0| 73 74 72 75 63 74 20 2a | 71 70 3b 0a 63 68 61 72 |struct *|qp;.char|
|00003ef0| 20 2a 6d 73 67 69 64 3b | 0a 5c 65 6e 64 7b 76 65 | *msgid;|.\end{ve|
|00003f00| 72 62 61 74 69 6d 7d 5c | 65 6e 64 7b 71 75 6f 74 |rbatim}\|end{quot|
|00003f10| 65 7d 0a 0a 54 68 65 20 | 61 72 67 75 6d 65 6e 74 |e}..The |argument|
|00003f20| 73 20 74 6f 20 74 68 69 | 73 20 66 75 6e 63 74 69 |s to thi|s functi|
|00003f30| 6f 6e 20 61 72 65 3a 0a | 5c 62 65 67 69 6e 7b 64 |on are:.|\begin{d|
|00003f40| 65 73 63 72 69 62 65 7d | 0a 5c 69 74 65 6d 5b 5c |escribe}|.\item[\|
|00003f50| 76 65 72 62 7c 71 70 7c | 3a 5d 09 41 20 70 6f 69 |verb|qp||:].A poi|
|00003f60| 6e 74 65 72 20 74 6f 20 | 74 68 65 20 71 75 65 75 |nter to |the queu|
|00003f70| 65 20 73 74 72 75 63 74 | 75 72 65 20 72 65 70 72 |e struct|ure repr|
|00003f80| 65 73 65 6e 74 69 6e 67 | 0a 74 68 65 20 6d 65 73 |esenting|.the mes|
|00003f90| 73 61 67 65 20 77 69 74 | 68 20 74 68 65 20 61 64 |sage wit|h the ad|
|00003fa0| 64 72 65 73 73 20 63 6f | 6d 70 6f 6e 65 6e 74 73 |dress co|mponents|
|00003fb0| 20 66 69 6c 6c 65 64 20 | 69 6e 2e 0a 0a 5c 69 74 | filled |in...\it|
|00003fc0| 65 6d 5b 5c 76 65 72 62 | 7c 6d 73 67 69 64 7c 3a |em[\verb||msgid|:|
|00003fd0| 5d 20 54 68 65 20 71 75 | 65 75 65 20 69 64 20 66 |] The qu|eue id f|
|00003fe0| 6f 72 20 74 68 69 73 20 | 6d 65 73 73 61 67 65 2e |or this |message.|
|00003ff0| 0a 5c 65 6e 64 7b 64 65 | 73 63 72 69 62 65 7d 0a |.\end{de|scribe}.|
|00004000| 0a 54 68 69 73 20 66 75 | 6e 63 74 69 6f 6e 20 77 |.This fu|nction w|
|00004010| 69 6c 6c 20 74 68 65 6e | 20 77 72 69 74 65 20 6f |ill then| write o|
|00004020| 75 74 20 74 68 65 20 72 | 65 70 6f 72 74 73 20 61 |ut the r|eports a|
|00004030| 6e 64 20 75 70 64 61 74 | 65 20 74 68 65 20 71 75 |nd updat|e the qu|
|00004040| 65 75 65 0a 65 6e 74 72 | 69 65 73 20 77 69 74 68 |eue.entr|ies with|
|00004050| 20 74 68 65 69 72 20 6e | 65 77 20 73 74 61 74 75 | their n|ew statu|
|00004060| 73 2e 0a 0a 5c 73 75 62 | 73 65 63 74 69 6f 6e 7b |s...\sub|section{|
|00004070| 53 75 63 63 65 73 73 66 | 75 6c 20 44 65 6c 69 76 |Successf|ul Deliv|
|00004080| 65 72 79 7d 0a 0a 41 20 | 73 75 63 63 65 73 73 66 |ery}..A |successf|
|00004090| 75 6c 20 64 65 6c 69 76 | 65 72 79 20 69 73 20 72 |ul deliv|ery is r|
|000040a0| 65 63 6f 72 64 65 64 20 | 69 6e 20 74 68 65 20 73 |ecorded |in the s|
|000040b0| 74 61 74 20 6c 6f 67 2e | 20 54 68 69 73 20 69 73 |tat log.| This is|
|000040c0| 20 64 6f 6e 65 0a 62 79 | 20 74 68 65 20 72 6f 75 | done.by| the rou|
|000040d0| 74 69 6e 65 20 5c 76 65 | 72 62 7c 77 72 5f 71 32 |tine \ve|rb|wr_q2|
|000040e0| 64 72 7c 20 69 66 20 61 | 20 70 6f 73 69 74 69 76 |dr| if a| positiv|
|000040f0| 65 20 64 65 6c 69 76 65 | 72 79 20 72 65 70 6f 72 |e delive|ry repor|
|00004100| 74 20 69 73 0a 72 65 71 | 75 69 72 65 64 2e 20 41 |t is.req|uired. A|
|00004110| 6c 74 65 72 6e 74 69 76 | 65 6c 79 2c 20 69 66 20 |lterntiv|ely, if |
|00004120| 6e 6f 20 72 65 70 6f 72 | 74 20 69 73 20 72 65 71 |no repor|t is req|
|00004130| 75 69 72 65 64 2c 20 74 | 68 65 20 64 65 6c 69 76 |uired, t|he deliv|
|00004140| 65 72 79 20 69 73 0a 6e | 6f 74 65 64 20 77 69 74 |ery is.n|oted wit|
|00004150| 68 20 74 68 65 20 66 75 | 6e 63 74 69 6f 6e 20 5c |h the fu|nction \|
|00004160| 76 65 72 62 7c 77 72 5f | 73 74 61 74 7c 20 77 68 |verb|wr_|stat| wh|
|00004170| 69 63 68 20 69 73 20 63 | 61 6c 6c 65 64 20 61 73 |ich is c|alled as|
|00004180| 20 66 6f 6c 6c 6f 77 73 | 2e 0a 0a 5c 62 65 67 69 | follows|...\begi|
|00004190| 6e 7b 71 75 6f 74 65 7d | 5c 69 6e 64 65 78 7b 77 |n{quote}|\index{w|
|000041a0| 72 5c 5f 73 74 61 74 7d | 5c 62 65 67 69 6e 7b 76 |r\_stat}|\begin{v|
|000041b0| 65 72 62 61 74 69 6d 7d | 0a 69 6e 74 20 77 72 5f |erbatim}|.int wr_|
|000041c0| 73 74 61 74 20 28 61 70 | 2c 20 71 70 2c 20 6d 73 |stat (ap|, qp, ms|
|000041d0| 67 2c 20 73 69 7a 65 29 | 0a 41 44 44 52 20 2a 61 |g, size)|.ADDR *a|
|000041e0| 70 3b 0a 51 5f 73 74 72 | 75 63 74 20 2a 71 70 3b |p;.Q_str|uct *qp;|
|000041f0| 0a 63 68 61 72 20 2a 6d | 73 67 3b 0a 69 6e 74 20 |.char *m|sg;.int |
|00004200| 73 69 7a 65 3b 0a 5c 65 | 6e 64 7b 76 65 72 62 61 |size;.\e|nd{verba|
|00004210| 74 69 6d 7d 5c 65 6e 64 | 7b 71 75 6f 74 65 7d 0a |tim}\end|{quote}.|
|00004220| 54 68 65 20 70 61 72 61 | 6d 65 74 65 72 73 20 74 |The para|meters t|
|00004230| 6f 20 74 68 69 73 20 61 | 72 65 3a 0a 5c 62 65 67 |o this a|re:.\beg|
|00004240| 69 6e 7b 69 74 65 6d 69 | 7a 65 7d 0a 5c 69 74 65 |in{itemi|ze}.\ite|
|00004250| 6d 5b 5c 76 65 72 62 7c | 61 70 7c 3a 5d 20 54 68 |m[\verb||ap|:] Th|
|00004260| 65 20 61 64 64 72 65 73 | 73 20 74 68 61 74 20 68 |e addres|s that h|
|00004270| 61 73 20 62 65 65 6e 20 | 73 75 63 63 65 73 73 66 |as been |successf|
|00004280| 75 6c 6c 79 20 64 65 6c | 69 76 65 72 65 64 2e 0a |ully del|ivered..|
|00004290| 5c 69 74 65 6d 5b 5c 76 | 65 72 62 7c 71 70 7c 3a |\item[\v|erb|qp|:|
|000042a0| 5d 20 54 68 65 20 71 75 | 65 75 65 20 73 74 72 75 |] The qu|eue stru|
|000042b0| 63 74 75 72 65 20 66 6f | 72 20 74 68 69 73 20 6d |cture fo|r this m|
|000042c0| 65 73 73 61 67 65 2e 0a | 5c 69 74 65 6d 5b 5c 76 |essage..|\item[\v|
|000042d0| 65 72 62 7c 6d 73 67 7c | 3a 5d 20 54 68 65 20 71 |erb|msg||:] The q|
|000042e0| 75 65 75 65 20 6e 61 6d | 65 20 66 6f 72 20 74 68 |ueue nam|e for th|
|000042f0| 69 73 20 6d 65 73 73 61 | 67 65 2e 0a 5c 69 74 65 |is messa|ge..\ite|
|00004300| 6d 5b 5c 76 65 72 62 7c | 73 69 7a 65 7c 3a 5d 20 |m[\verb||size|:] |
|00004310| 54 68 65 20 73 69 7a 65 | 20 69 6e 20 62 79 74 65 |The size| in byte|
|00004320| 73 20 6f 66 20 74 68 65 | 20 6d 65 73 73 61 67 65 |s of the| message|
|00004330| 20 64 65 6c 69 76 65 72 | 65 64 2e 20 54 68 69 73 | deliver|ed. This|
|00004340| 0a 6d 61 79 20 62 65 20 | 64 69 66 66 65 72 65 6e |.may be |differen|
|00004350| 74 20 66 72 6f 6d 20 74 | 68 65 20 73 69 7a 65 20 |t from t|he size |
|00004360| 69 6e 20 74 68 65 20 71 | 75 65 75 65 20 66 69 6c |in the q|ueue fil|
|00004370| 65 2e 0a 5c 65 6e 64 7b | 69 74 65 6d 69 7a 65 7d |e..\end{|itemize}|
|00004380| 0a 0a 57 68 65 6e 20 61 | 20 6d 65 73 73 61 67 65 |..When a| message|
|00004390| 20 68 61 73 20 62 65 65 | 6e 20 64 65 6c 69 76 65 | has bee|n delive|
|000043a0| 72 65 64 20 73 75 63 63 | 65 73 73 66 75 6c 6c 79 |red succ|essfully|
|000043b0| 2c 20 69 74 20 69 73 20 | 6e 65 63 65 73 73 61 72 |, it is |necessar|
|000043c0| 79 20 74 6f 0a 63 68 65 | 63 6b 20 73 65 76 65 72 |y to.che|ck sever|
|000043d0| 61 6c 20 74 68 69 6e 67 | 73 2e 20 54 68 65 73 65 |al thing|s. These|
|000043e0| 20 61 72 65 3a 0a 5c 62 | 65 67 69 6e 7b 65 6e 75 | are:.\b|egin{enu|
|000043f0| 6d 65 72 61 74 65 7d 0a | 5c 69 74 65 6d 09 49 66 |merate}.|\item.If|
|00004400| 20 61 20 70 6f 73 69 74 | 69 76 65 20 64 65 6c 69 | a posit|ive deli|
|00004410| 76 65 72 79 20 72 65 70 | 6f 72 74 20 77 61 73 20 |very rep|ort was |
|00004420| 72 65 71 75 65 73 74 65 | 64 2c 20 6f 6e 65 20 73 |requeste|d, one s|
|00004430| 68 6f 75 6c 64 20 62 65 | 0a 63 6f 6d 70 6f 73 65 |hould be|.compose|
|00004440| 64 20 77 69 74 68 20 5c | 76 65 72 62 7c 73 65 74 |d with \|verb|set|
|00004450| 5f 31 64 72 7c 20 61 6e | 64 20 5c 76 65 72 62 7c |_1dr| an|d \verb||
|00004460| 77 72 5f 71 32 64 72 7c | 2e 0a 5c 69 74 65 6d 09 |wr_q2dr||..\item.|
|00004470| 4f 74 68 65 72 77 69 73 | 65 2c 20 74 68 65 20 73 |Otherwis|e, the s|
|00004480| 74 61 74 75 73 20 73 68 | 6f 75 6c 64 20 62 65 20 |tatus sh|ould be |
|00004490| 75 70 64 61 74 65 64 20 | 74 6f 20 5c 76 65 72 62 |updated |to \verb|
|000044a0| 7c 41 44 5f 44 4f 4e 45 | 7c 0a 77 69 74 68 20 61 ||AD_DONE||.with a|
|000044b0| 20 63 61 6c 6c 20 74 6f | 20 0a 5c 6c 69 6e 65 62 | call to| .\lineb|
|000044c0| 72 65 61 6b 0a 5c 76 65 | 72 62 7c 77 72 5f 61 64 |reak.\ve|rb|wr_ad|
|000044d0| 5f 73 74 61 74 75 73 7c | 2e 0a 5c 69 74 65 6d 09 |_status||..\item.|
|000044e0| 54 68 65 20 51 4d 47 52 | 20 72 65 74 75 72 6e 20 |The QMGR| return |
|000044f0| 73 74 61 74 75 73 20 73 | 68 6f 75 6c 64 20 62 65 |status s|hould be|
|00004500| 20 75 70 64 61 74 65 64 | 20 74 6f 20 65 69 74 68 | updated| to eith|
|00004510| 65 72 0a 5c 6c 69 6e 65 | 62 72 65 61 6b 0a 5c 76 |er.\line|break.\v|
|00004520| 65 72 62 7c 69 6e 74 5f | 51 6d 67 72 5f 53 74 61 |erb|int_|Qmgr_Sta|
|00004530| 74 75 73 5f 73 75 63 63 | 65 73 73 7c 20 6f 72 20 |tus_succ|ess| or |
|00004540| 5c 76 65 72 62 7c 69 6e | 74 5f 51 6d 67 72 5f 53 |\verb|in|t_Qmgr_S|
|00004550| 74 61 74 75 73 5f 70 6f | 73 69 74 69 76 65 44 52 |tatus_po|sitiveDR|
|00004560| 7c 2e 0a 5c 69 74 65 6d | 09 49 66 20 5c 76 65 72 ||..\item|.If \ver|
|00004570| 62 7c 77 72 5f 71 32 64 | 72 7c 20 69 73 20 6e 6f |b|wr_q2d|r| is no|
|00004580| 74 20 6e 65 63 65 73 73 | 61 72 79 20 28 74 68 65 |t necess|ary (the|
|00004590| 72 65 20 77 61 73 20 6e | 6f 20 72 65 71 75 65 73 |re was n|o reques|
|000045a0| 74 20 66 6f 72 0a 70 6f | 73 69 74 69 76 65 20 64 |t for.po|sitive d|
|000045b0| 65 6c 69 76 65 72 79 20 | 72 65 70 6f 72 74 73 29 |elivery |reports)|
|000045c0| 2e 20 41 20 63 61 6c 6c | 20 73 68 6f 75 6c 64 20 |. A call| should |
|000045d0| 62 65 20 6d 61 64 65 20 | 74 6f 20 5c 76 65 72 62 |be made |to \verb|
|000045e0| 7c 77 72 5f 73 74 61 74 | 7c 20 74 6f 0a 69 6e 64 ||wr_stat|| to.ind|
|000045f0| 69 63 61 74 65 20 69 6e | 20 74 68 65 20 73 74 61 |icate in| the sta|
|00004600| 74 69 73 74 69 63 73 20 | 74 68 61 74 20 73 75 63 |tistics |that suc|
|00004610| 63 65 73 73 66 75 6c 20 | 64 65 6c 69 76 65 72 79 |cessful |delivery|
|00004620| 20 68 61 73 20 62 65 65 | 6e 20 61 63 68 69 65 76 | has bee|n achiev|
|00004630| 65 64 2e 0a 5c 65 6e 64 | 7b 65 6e 75 6d 65 72 61 |ed..\end|{enumera|
|00004640| 74 65 7d 0a 0a 5c 73 75 | 62 73 65 63 74 69 6f 6e |te}..\su|bsection|
|00004650| 20 7b 56 65 72 69 66 69 | 63 61 74 69 6f 6e 20 61 | {Verifi|cation a|
|00004660| 6e 64 20 54 72 75 73 74 | 7d 0a 0a 43 68 61 6e 6e |nd Trust|}..Chann|
|00004670| 65 6c 73 20 61 72 65 20 | 74 72 75 73 74 65 64 20 |els are |trusted |
|00004680| 70 72 6f 63 65 73 73 65 | 73 2c 20 61 6e 64 20 61 |processe|s, and a|
|00004690| 73 20 73 75 63 68 20 73 | 68 6f 75 6c 64 20 72 65 |s such s|hould re|
|000046a0| 73 70 65 63 74 20 74 68 | 69 73 20 74 72 75 73 74 |spect th|is trust|
|000046b0| 2e 0a 41 73 20 66 61 72 | 20 61 73 20 70 6f 73 73 |..As far| as poss|
|000046c0| 69 62 6c 65 20 74 68 65 | 79 20 73 68 6f 75 6c 64 |ible the|y should|
|000046d0| 20 63 68 65 63 6b 20 74 | 68 61 74 20 74 68 65 20 | check t|hat the |
|000046e0| 64 61 74 61 20 74 68 65 | 79 20 61 72 65 20 62 65 |data the|y are be|
|000046f0| 69 6e 67 0a 67 69 76 65 | 6e 20 69 73 20 72 65 61 |ing.give|n is rea|
|00004700| 73 6f 6e 61 62 6c 65 2e | 20 54 68 69 73 20 69 6e |sonable.| This in|
|00004710| 63 6c 75 64 65 73 20 74 | 68 65 20 66 6f 6c 6c 6f |cludes t|he follo|
|00004720| 77 69 6e 67 3a 0a 5c 62 | 65 67 69 6e 7b 69 74 65 |wing:.\b|egin{ite|
|00004730| 6d 69 7a 65 7d 0a 5c 69 | 74 65 6d 09 54 68 61 74 |mize}.\i|tem.That|
|00004740| 20 74 68 65 20 63 68 61 | 6e 6e 65 6c 20 6e 61 6d | the cha|nnel nam|
|00004750| 65 20 61 6e 64 20 74 79 | 70 65 20 69 73 20 72 65 |e and ty|pe is re|
|00004760| 61 73 6f 6e 61 62 6c 65 | 20 66 6f 72 20 74 68 69 |asonable| for thi|
|00004770| 73 20 63 68 61 6e 6e 65 | 6c 2e 0a 0a 5c 69 74 65 |s channe|l...\ite|
|00004780| 6d 09 54 68 61 74 20 74 | 68 65 20 61 64 64 72 65 |m.That t|he addre|
|00004790| 73 73 20 72 65 71 75 65 | 73 74 65 64 20 74 6f 20 |ss reque|sted to |
|000047a0| 62 65 20 70 72 6f 63 65 | 73 73 65 64 20 65 78 69 |be proce|ssed exi|
|000047b0| 73 74 73 20 61 6e 64 20 | 69 73 20 72 65 61 64 79 |sts and |is ready|
|000047c0| 0a 74 6f 20 62 65 20 70 | 72 6f 63 65 73 73 65 64 |.to be p|rocessed|
|000047d0| 20 28 65 2e 67 2e 2c 20 | 69 74 20 68 61 73 20 70 | (e.g., |it has p|
|000047e0| 61 73 73 65 64 20 74 68 | 72 6f 75 67 68 20 61 6c |assed th|rough al|
|000047f0| 6c 20 72 65 66 6f 72 6d | 61 74 74 65 72 73 29 2e |l reform|atters).|
|00004800| 0a 0a 5c 69 74 65 6d 09 | 54 68 61 74 20 74 68 65 |..\item.|That the|
|00004810| 20 74 79 70 65 20 6f 66 | 20 61 64 64 72 65 73 73 | type of| address|
|00004820| 20 69 73 20 63 6f 72 72 | 65 63 74 20 66 6f 72 20 | is corr|ect for |
|00004830| 74 68 69 73 20 74 79 70 | 65 20 6f 66 20 63 68 61 |this typ|e of cha|
|00004840| 6e 6e 65 6c 0a 28 65 2e | 67 2e 2c 20 52 46 43 7e |nnel.(e.|g., RFC~|
|00004850| 38 32 32 20 66 6f 72 20 | 73 6d 74 70 20 6f 72 20 |822 for |smtp or |
|00004860| 58 2e 34 30 30 20 66 6f | 72 20 58 2e 34 30 30 20 |X.400 fo|r X.400 |
|00004870| 63 68 61 6e 6e 65 6c 73 | 29 2e 0a 0a 5c 69 74 65 |channels|)...\ite|
|00004880| 6d 09 54 68 61 74 20 74 | 68 65 20 6d 65 73 73 61 |m.That t|he messa|
|00004890| 67 65 20 69 73 20 6e 6f | 74 20 6c 6f 63 6b 65 64 |ge is no|t locked|
|000048a0| 20 62 79 20 61 6e 6f 74 | 68 65 72 20 63 68 61 6e | by anot|her chan|
|000048b0| 6e 65 6c 2e 0a 0a 5c 69 | 74 65 6d 20 09 54 68 61 |nel...\i|tem .Tha|
|000048c0| 74 20 74 68 65 20 63 68 | 61 6e 6e 65 6c 20 69 73 |t the ch|annel is|
|000048d0| 20 74 68 65 20 73 61 6d | 65 20 61 73 20 74 68 65 | the sam|e as the|
|000048e0| 20 63 68 61 6e 6e 65 6c | 20 67 69 76 65 6e 20 69 | channel| given i|
|000048f0| 6e 20 74 68 65 0a 61 64 | 64 72 65 73 73 20 73 74 |n the.ad|dress st|
|00004900| 72 75 63 74 75 72 65 2e | 0a 5c 65 6e 64 7b 69 74 |ructure.|.\end{it|
|00004910| 65 6d 69 7a 65 7d 0a 0a | 46 6f 72 20 63 6f 6d 6d |emize}..|For comm|
|00004920| 6f 6e 20 6f 75 74 62 6f | 75 6e 64 20 63 68 61 6e |on outbo|und chan|
|00004930| 6e 65 6c 73 20 61 6e 64 | 20 66 69 6c 74 65 72 73 |nels and| filters|
|00004940| 20 74 68 65 73 65 20 63 | 68 65 63 6b 73 20 61 72 | these c|hecks ar|
|00004950| 65 20 65 6e 63 61 70 73 | 75 6c 61 74 65 64 0a 69 |e encaps|ulated.i|
|00004960| 6e 20 74 68 65 20 66 75 | 6e 63 74 69 6f 6e 73 2c |n the fu|nctions,|
|00004970| 20 5c 76 65 72 62 7c 63 | 68 61 6e 5f 61 63 68 65 | \verb|c|han_ache|
|00004980| 63 6b 7c 5c 69 6e 64 65 | 78 7b 63 68 61 6e 5c 5f |ck|\inde|x{chan\_|
|00004990| 61 63 68 65 63 6b 7d 2c | 0a 5c 76 65 72 62 7c 6c |acheck},|.\verb|l|
|000049a0| 63 68 61 6e 5f 61 63 68 | 65 63 6b 7c 5c 69 6e 64 |chan_ach|eck|\ind|
|000049b0| 65 78 7b 6c 63 68 61 6e | 5c 5f 61 63 68 65 63 6b |ex{lchan|\_acheck|
|000049c0| 7d 20 61 6e 64 0a 5c 76 | 65 72 62 7c 63 68 61 6e |} and.\v|erb|chan|
|000049d0| 5f 64 63 68 65 63 6b 7c | 5c 69 6e 64 65 78 7b 63 |_dcheck||\index{c|
|000049e0| 68 61 6e 5c 5f 64 63 68 | 65 63 6b 7d 2e 0a 0a 54 |han\_dch|eck}...T|
|000049f0| 68 65 73 65 20 63 61 6c | 6c 73 20 61 72 65 20 73 |hese cal|ls are s|
|00004a00| 69 6d 69 6c 61 72 20 69 | 6e 20 66 75 6e 63 74 69 |imilar i|n functi|
|00004a10| 6f 6e 3b 20 6f 6e 65 20 | 63 68 65 63 6b 73 20 74 |on; one |checks t|
|00004a20| 68 65 20 61 64 64 72 65 | 73 73 20 69 73 20 6f 6b |he addre|ss is ok|
|00004a30| 61 79 0a 74 6f 20 70 72 | 6f 63 65 73 73 20 66 6f |ay.to pr|ocess fo|
|00004a40| 72 20 66 69 6c 74 65 72 | 73 20 61 6e 64 20 6f 75 |r filter|s and ou|
|00004a50| 74 62 6f 75 6e 64 20 63 | 68 61 6e 6e 65 6c 73 3b |tbound c|hannels;|
|00004a60| 20 74 68 65 20 73 65 63 | 6f 6e 64 20 69 73 20 66 | the sec|ond is f|
|00004a70| 6f 72 20 6c 6f 63 61 6c | 0a 63 68 61 6e 6e 65 6c |or local|.channel|
|00004a80| 73 3b 20 61 6e 64 20 74 | 68 65 20 6c 61 73 74 20 |s; and t|he last |
|00004a90| 69 73 20 66 6f 72 20 63 | 68 61 6e 6e 65 6c 73 20 |is for c|hannels |
|00004aa0| 74 68 61 74 20 63 61 6e | 20 68 61 6e 64 6c 65 20 |that can| handle |
|00004ab0| 64 65 6c 69 76 65 72 79 | 20 72 65 70 6f 72 74 73 |delivery| reports|
|00004ac0| 2e 0a 54 68 65 79 20 61 | 72 65 20 63 61 6c 6c 65 |..They a|re calle|
|00004ad0| 64 20 69 6e 20 74 68 65 | 20 66 6f 6c 6c 6f 77 69 |d in the| followi|
|00004ae0| 6e 67 20 77 61 79 3a 0a | 0a 5c 62 65 67 69 6e 7b |ng way:.|.\begin{|
|00004af0| 71 75 6f 74 65 7d 5c 73 | 6d 61 6c 6c 5c 62 65 67 |quote}\s|mall\beg|
|00004b00| 69 6e 7b 76 65 72 62 61 | 74 69 6d 7d 0a 69 6e 74 |in{verba|tim}.int|
|00004b10| 20 63 68 61 6e 5f 61 63 | 68 65 63 6b 20 28 61 70 | chan_ac|heck (ap|
|00004b20| 2c 20 6d 79 63 68 61 6e | 2c 20 66 69 72 73 74 2c |, mychan|, first,|
|00004b30| 20 6d 74 61 29 0a 41 44 | 44 52 20 2a 61 70 3b 0a | mta).AD|DR *ap;.|
|00004b40| 43 48 41 4e 20 2a 6d 79 | 63 68 61 6e 3b 0a 69 6e |CHAN *my|chan;.in|
|00004b50| 74 20 66 69 72 73 74 2c | 0a 63 68 61 72 20 2a 2a |t first,|.char **|
|00004b60| 6d 74 61 3b 0a 5c 65 6e | 64 7b 76 65 72 62 61 74 |mta;.\en|d{verbat|
|00004b70| 69 6d 7d 5c 65 6e 64 7b | 71 75 6f 74 65 7d 0a 0a |im}\end{|quote}..|
|00004b80| 54 68 65 20 61 72 67 75 | 6d 65 6e 74 73 20 61 72 |The argu|ments ar|
|00004b90| 65 20 61 73 20 66 6f 6c | 6c 6f 77 73 3a 0a 5c 62 |e as fol|lows:.\b|
|00004ba0| 65 67 69 6e 7b 64 65 73 | 63 72 69 62 65 7d 0a 5c |egin{des|cribe}.\|
|00004bb0| 69 74 65 6d 5b 5c 76 65 | 72 62 7c 61 70 7c 3a 5d |item[\ve|rb|ap|:]|
|00004bc0| 20 54 68 65 20 61 64 64 | 72 65 73 73 20 74 6f 20 | The add|ress to |
|00004bd0| 62 65 20 63 68 65 63 6b | 65 64 2e 0a 5c 69 74 65 |be check|ed..\ite|
|00004be0| 6d 5b 5c 76 65 72 62 7c | 6d 79 63 68 61 6e 7c 3a |m[\verb||mychan|:|
|00004bf0| 5d 20 54 68 65 20 63 68 | 61 6e 6e 65 6c 20 74 68 |] The ch|annel th|
|00004c00| 61 74 20 69 73 20 64 6f | 69 6e 67 20 74 68 69 73 |at is do|ing this|
|00004c10| 20 63 68 65 63 6b 69 6e | 67 2e 0a 5c 69 74 65 6d | checkin|g..\item|
|00004c20| 5b 5c 76 65 72 62 7c 66 | 69 72 73 74 7c 3a 5d 20 |[\verb|f|irst|:] |
|00004c30| 49 66 20 74 68 69 73 20 | 69 73 20 74 68 65 20 66 |If this |is the f|
|00004c40| 69 72 73 74 20 61 64 64 | 72 65 73 73 20 74 6f 20 |irst add|ress to |
|00004c50| 62 65 20 63 68 65 63 6b | 65 64 2e 20 54 68 69 73 |be check|ed. This|
|00004c60| 0a 69 73 20 75 73 65 64 | 20 74 6f 20 64 65 74 65 |.is used| to dete|
|00004c70| 72 6d 69 6e 65 20 69 66 | 20 74 68 65 20 6d 74 61 |rmine if| the mta|
|00004c80| 20 70 61 72 61 6d 65 74 | 65 72 20 63 61 6e 20 62 | paramet|er can b|
|00004c90| 65 20 63 68 61 6e 67 65 | 64 2e 0a 5c 69 74 65 6d |e change|d..\item|
|00004ca0| 5b 5c 76 65 72 62 7c 6d | 74 61 7c 3a 5d 20 54 68 |[\verb|m|ta|:] Th|
|00004cb0| 65 20 4d 54 41 20 74 68 | 69 73 20 73 68 6f 75 6c |e MTA th|is shoul|
|00004cc0| 64 20 63 6f 6e 6e 65 63 | 74 20 74 6f 2e 20 49 66 |d connec|t to. If|
|00004cd0| 20 74 68 65 20 63 6f 6e | 73 74 61 6e 74 0a 5c 76 | the con|stant.\v|
|00004ce0| 65 72 62 7c 4e 55 4c 4c | 56 50 7c 20 69 73 20 75 |erb|NULL|VP| is u|
|00004cf0| 73 65 64 2c 20 74 68 65 | 20 6d 74 61 20 70 61 72 |sed, the| mta par|
|00004d00| 61 6d 65 74 65 72 20 77 | 69 6c 6c 20 6e 6f 74 20 |ameter w|ill not |
|00004d10| 62 65 20 66 69 6c 6c 65 | 64 20 69 6e 20 6f 72 0a |be fille|d in or.|
|00004d20| 63 68 65 63 6b 65 64 2e | 20 49 66 20 74 68 65 20 |checked.| If the |
|00004d30| 6d 74 61 20 69 73 20 74 | 68 65 20 61 64 64 72 65 |mta is t|he addre|
|00004d40| 73 73 20 6f 66 20 61 20 | 70 6f 69 6e 74 65 72 20 |ss of a |pointer |
|00004d50| 77 69 74 68 20 5c 76 65 | 72 62 7c 4e 55 4c 4c 7c |with \ve|rb|NULL||
|00004d60| 0a 63 6f 6e 74 65 6e 74 | 73 20 74 68 65 6e 20 69 |.content|s then i|
|00004d70| 74 20 77 69 6c 6c 20 62 | 65 20 75 70 64 61 74 65 |t will b|e update|
|00004d80| 64 20 69 66 20 72 65 71 | 75 69 72 65 64 2e 20 49 |d if req|uired. I|
|00004d90| 66 20 74 68 65 20 6d 74 | 61 20 69 73 20 61 20 70 |f the mt|a is a p|
|00004da0| 6f 69 6e 74 65 72 0a 74 | 6f 20 61 20 73 74 72 69 |ointer.t|o a stri|
|00004db0| 6e 67 2c 20 74 68 65 6e | 20 69 74 20 69 73 20 63 |ng, then| it is c|
|00004dc0| 68 65 63 6b 65 64 20 74 | 68 61 74 20 74 68 65 20 |hecked t|hat the |
|00004dd0| 6d 74 61 20 64 6f 65 73 | 20 6e 6f 74 20 63 68 61 |mta does| not cha|
|00004de0| 6e 67 65 20 75 6e 6c 65 | 73 73 0a 74 68 65 20 5c |nge unle|ss.the \|
|00004df0| 76 65 72 62 7c 66 69 72 | 73 74 7c 20 66 6c 61 67 |verb|fir|st| flag|
|00004e00| 20 69 73 20 73 65 74 2e | 20 54 68 69 73 20 65 6e | is set.| This en|
|00004e10| 73 75 72 65 73 20 66 6f | 72 20 63 68 61 6e 6e 65 |sures fo|r channe|
|00004e20| 6c 73 20 74 68 61 74 20 | 62 61 74 63 68 0a 6d 65 |ls that |batch.me|
|00004e30| 73 73 61 67 65 73 20 74 | 6f 20 74 68 65 20 73 61 |ssages t|o the sa|
|00004e40| 6d 65 20 68 6f 73 74 2c | 20 74 68 61 74 20 61 6c |me host,| that al|
|00004e50| 6c 20 61 64 64 72 65 73 | 73 65 73 20 69 6e 20 74 |l addres|ses in t|
|00004e60| 68 69 73 20 6d 65 73 73 | 61 67 65 20 61 72 65 0a |his mess|age are.|
|00004e70| 64 65 73 74 69 6e 65 64 | 20 66 6f 72 20 74 68 65 |destined| for the|
|00004e80| 20 73 61 6d 65 20 4d 54 | 41 2e 0a 5c 65 6e 64 7b | same MT|A..\end{|
|00004e90| 64 65 73 63 72 69 62 65 | 7d 0a 49 74 20 72 65 74 |describe|}.It ret|
|00004ea0| 75 72 6e 73 20 65 69 74 | 68 65 72 20 74 68 65 20 |urns eit|her the |
|00004eb0| 63 6f 6e 73 74 61 6e 74 | 20 5c 76 65 72 62 7c 4f |constant| \verb|O|
|00004ec0| 4b 7c 20 6f 72 20 5c 76 | 65 72 62 7c 4e 4f 54 4f |K| or \v|erb|NOTO|
|00004ed0| 4b 7c 2e 20 49 66 0a 5c | 76 65 72 62 7c 4e 4f 54 |K|. If.\|verb|NOT|
|00004ee0| 4f 4b 7c 20 74 68 65 6e | 20 74 68 65 20 5c 76 65 |OK| then| the \ve|
|00004ef0| 72 62 7c 64 65 6c 69 76 | 65 72 79 73 74 61 74 65 |rb|deliv|erystate|
|00004f00| 7c 20 69 73 20 75 70 64 | 61 74 65 64 20 69 6e 20 || is upd|ated in |
|00004f10| 61 20 73 75 69 74 61 62 | 6c 65 20 77 61 79 2e 0a |a suitab|le way..|
|00004f20| 49 66 20 5c 76 65 72 62 | 7c 4f 4b 7c 20 74 68 65 |If \verb||OK| the|
|00004f30| 6e 20 74 68 65 20 61 64 | 64 72 65 73 73 20 73 68 |n the ad|dress sh|
|00004f40| 6f 75 6c 64 20 62 65 20 | 70 72 6f 63 65 73 73 65 |ould be |processe|
|00004f50| 64 2c 20 61 6e 64 20 74 | 68 65 0a 5c 76 65 72 62 |d, and t|he.\verb|
|00004f60| 7c 64 65 6c 69 76 65 72 | 79 73 74 61 74 65 7c 20 ||deliver|ystate| |
|00004f70| 75 70 64 61 74 65 64 20 | 61 63 63 6f 72 64 69 6e |updated |accordin|
|00004f80| 67 6c 79 2e 0a 0a 54 68 | 65 20 66 75 6e 63 74 69 |gly...Th|e functi|
|00004f90| 6f 6e 20 5c 76 65 72 62 | 7c 6c 63 68 61 6e 5f 61 |on \verb||lchan_a|
|00004fa0| 63 68 65 63 6b 7c 20 69 | 73 20 61 6c 6d 6f 73 74 |check| i|s almost|
|00004fb0| 20 65 71 75 69 76 61 6c | 65 6e 74 2c 20 65 78 63 | equival|ent, exc|
|00004fc0| 65 70 74 20 69 6e 20 70 | 6c 61 63 65 0a 6f 66 20 |ept in p|lace.of |
|00004fd0| 74 68 65 20 5c 76 65 72 | 62 7c 6d 74 61 7c 20 70 |the \ver|b|mta| p|
|00004fe0| 61 72 61 6d 65 74 65 72 | 20 69 73 20 61 20 75 73 |arameter| is a us|
|00004ff0| 65 72 2e 0a 0a 5c 62 65 | 67 69 6e 7b 71 75 6f 74 |er...\be|gin{quot|
|00005000| 65 7d 5c 73 6d 61 6c 6c | 5c 62 65 67 69 6e 7b 76 |e}\small|\begin{v|
|00005010| 65 72 62 61 74 69 6d 7d | 0a 69 6e 74 20 6c 63 68 |erbatim}|.int lch|
|00005020| 61 6e 5f 61 63 68 65 63 | 6b 20 28 61 70 2c 20 6d |an_achec|k (ap, m|
|00005030| 79 63 68 61 6e 2c 20 66 | 69 72 73 74 2c 20 75 73 |ychan, f|irst, us|
|00005040| 65 72 29 0a 41 44 44 52 | 20 2a 61 70 3b 0a 43 48 |er).ADDR| *ap;.CH|
|00005050| 41 4e 20 2a 6d 79 63 68 | 61 6e 3b 0a 69 6e 74 20 |AN *mych|an;.int |
|00005060| 66 69 72 73 74 2c 0a 63 | 68 61 72 20 2a 2a 75 73 |first,.c|har **us|
|00005070| 65 72 3b 0a 5c 65 6e 64 | 7b 76 65 72 62 61 74 69 |er;.\end|{verbati|
|00005080| 6d 7d 5c 65 6e 64 7b 71 | 75 6f 74 65 7d 0a 0a 54 |m}\end{q|uote}..T|
|00005090| 68 65 20 6c 61 73 74 20 | 66 75 6e 63 74 69 6f 6e |he last |function|
|000050a0| 20 69 73 20 73 69 6d 69 | 6c 61 72 20 62 75 74 20 | is simi|lar but |
|000050b0| 73 75 69 74 61 62 6c 65 | 20 66 6f 72 20 63 68 61 |suitable| for cha|
|000050c0| 6e 6e 65 6c 73 20 74 68 | 61 74 20 63 61 6e 20 68 |nnels th|at can h|
|000050d0| 61 6e 64 6c 65 0a 64 65 | 6c 69 76 65 72 79 20 72 |andle.de|livery r|
|000050e0| 65 70 6f 72 74 73 20 28 | 73 75 63 68 20 61 73 20 |eports (|such as |
|000050f0| 58 2e 34 30 30 29 2e 0a | 0a 5c 62 65 67 69 6e 7b |X.400)..|.\begin{|
|00005100| 71 75 6f 74 65 7d 5c 73 | 6d 61 6c 6c 5c 62 65 67 |quote}\s|mall\beg|
|00005110| 69 6e 7b 76 65 72 62 61 | 74 69 6d 7d 0a 69 6e 74 |in{verba|tim}.int|
|00005120| 20 64 63 68 61 6e 5f 61 | 63 68 65 63 6b 20 28 61 | dchan_a|check (a|
|00005130| 70 2c 20 61 73 70 2c 20 | 6d 79 63 68 61 6e 2c 20 |p, asp, |mychan, |
|00005140| 66 69 72 73 74 2c 20 6d | 74 61 29 0a 41 44 44 52 |first, m|ta).ADDR|
|00005150| 20 2a 61 70 2c 20 2a 61 | 73 70 3b 0a 43 48 41 4e | *ap, *a|sp;.CHAN|
|00005160| 20 2a 74 68 65 63 68 61 | 6e 3b 0a 69 6e 74 20 66 | *thecha|n;.int f|
|00005170| 69 72 73 74 3b 0a 63 68 | 61 72 20 2a 2a 6d 74 61 |irst;.ch|ar **mta|
|00005180| 3b 0a 5c 65 6e 64 7b 76 | 65 72 62 61 74 69 6d 7d |;.\end{v|erbatim}|
|00005190| 5c 65 6e 64 7b 71 75 6f | 74 65 7d 0a 0a 54 68 65 |\end{quo|te}..The|
|000051a0| 20 6f 6e 6c 79 20 64 69 | 66 66 65 72 65 6e 63 65 | only di|fference|
|000051b0| 20 66 6f 72 20 74 68 69 | 73 20 63 61 6c 6c 20 69 | for thi|s call i|
|000051c0| 73 20 74 68 61 74 20 61 | 6e 20 61 64 64 72 65 73 |s that a|n addres|
|000051d0| 73 20 73 74 72 75 63 74 | 75 72 65 0a 72 65 66 65 |s struct|ure.refe|
|000051e0| 72 65 6e 63 69 6e 67 20 | 74 68 65 20 6f 72 69 67 |rencing |the orig|
|000051f0| 69 6e 61 74 6f 72 20 6d | 75 73 74 20 62 65 20 70 |inator m|ust be p|
|00005200| 61 73 73 65 64 20 69 6e | 20 61 73 20 74 68 65 20 |assed in| as the |
|00005210| 73 65 63 6f 6e 64 20 70 | 61 72 61 6d 65 74 65 72 |second p|arameter|
|00005220| 2e 0a 0a 5c 73 65 63 74 | 69 6f 6e 20 7b 45 78 61 |...\sect|ion {Exa|
|00005230| 6d 70 6c 65 20 55 73 61 | 67 65 7d 0a 0a 5c 73 75 |mple Usa|ge}..\su|
|00005240| 62 73 65 63 74 69 6f 6e | 20 7b 4f 75 74 62 6f 75 |bsection| {Outbou|
|00005250| 6e 64 20 43 68 61 6e 6e | 65 6c 73 7d 0a 0a 50 72 |nd Chann|els}..Pr|
|00005260| 65 73 65 6e 74 65 64 20 | 68 65 72 65 20 69 73 20 |esented |here is |
|00005270| 61 20 73 6b 65 6c 65 74 | 6f 6e 20 6f 66 20 61 6e |a skelet|on of an|
|00005280| 20 6f 75 74 62 6f 75 6e | 64 20 63 68 61 6e 6e 65 | outboun|d channe|
|00005290| 6c 2e 20 54 68 69 73 20 | 73 74 72 75 63 74 75 72 |l. This |structur|
|000052a0| 65 20 69 73 0a 6e 6f 74 | 20 72 65 71 75 69 72 65 |e is.not| require|
|000052b0| 64 2c 20 62 75 74 20 69 | 73 20 61 20 63 6f 6d 6d |d, but i|s a comm|
|000052c0| 6f 6e 20 77 61 79 20 6f | 66 20 61 63 68 69 65 76 |on way o|f achiev|
|000052d0| 69 6e 67 20 74 68 65 20 | 72 65 73 75 6c 74 73 2e |ing the |results.|
|000052e0| 0a 0a 5c 74 61 67 72 69 | 6e 64 66 69 6c 65 7b 6f |..\tagri|ndfile{o|
|000052f0| 75 74 62 6f 75 6e 64 7d | 7b 45 78 61 6d 70 6c 65 |utbound}|{Example|
|00005300| 20 4f 75 74 62 6f 75 6e | 64 20 43 68 61 6e 6e 65 | Outboun|d Channe|
|00005310| 6c 7d 7b 65 78 61 6d 70 | 6c 65 3a 6f 75 74 62 6f |l}{examp|le:outbo|
|00005320| 75 6e 64 7d 0a 0a 5c 73 | 75 62 73 65 63 74 69 6f |und}..\s|ubsectio|
|00005330| 6e 7b 41 64 64 72 65 73 | 73 20 50 61 72 73 69 6e |n{Addres|s Parsin|
|00005340| 67 7d 0a 0a 4f 63 63 61 | 73 69 6f 6e 61 6c 6c 79 |g}..Occa|sionally|
|00005350| 20 69 74 20 69 73 20 6e | 65 63 65 73 73 61 72 79 | it is n|ecessary|
|00005360| 20 66 6f 72 20 61 20 63 | 68 61 6e 6e 65 6c 20 74 | for a c|hannel t|
|00005370| 6f 20 70 61 72 73 65 20 | 6f 72 20 6d 61 6e 69 70 |o parse |or manip|
|00005380| 75 6c 61 74 65 20 61 6e | 0a 61 64 64 72 65 73 73 |ulate an|.address|
|00005390| 2e 20 4d 6f 73 74 20 63 | 68 61 6e 6e 65 6c 73 20 |. Most c|hannels |
|000053a0| 63 61 6e 20 67 65 74 20 | 61 77 61 79 20 77 69 74 |can get |away wit|
|000053b0| 68 6f 75 74 20 6e 65 65 | 64 69 6e 67 20 74 68 69 |hout nee|ding thi|
|000053c0| 73 20 68 6f 77 65 76 65 | 72 2e 0a 53 6f 6d 65 20 |s howeve|r..Some |
|000053d0| 6f 66 20 74 68 65 20 62 | 61 73 69 63 20 70 61 72 |of the b|asic par|
|000053e0| 73 69 6e 67 20 72 6f 75 | 74 69 6e 65 73 20 61 72 |sing rou|tines ar|
|000053f0| 65 20 67 69 76 65 6e 20 | 68 65 72 65 2e 0a 0a 54 |e given |here...T|
|00005400| 68 65 20 62 61 73 69 63 | 20 69 6e 74 65 72 66 61 |he basic| interfa|
|00005410| 63 65 20 74 6f 20 70 61 | 72 73 69 6e 67 20 69 73 |ce to pa|rsing is|
|00005420| 20 5c 76 65 72 62 7c 61 | 64 5f 70 61 72 73 65 7c | \verb|a|d_parse||
|00005430| 2e 20 54 68 69 73 20 74 | 61 6b 65 73 20 61 6e 0a |. This t|akes an.|
|00005440| 61 64 64 72 65 73 73 20 | 61 6e 64 20 61 74 74 65 |address |and atte|
|00005450| 6d 70 74 73 20 74 6f 20 | 70 61 72 73 65 20 69 74 |mpts to |parse it|
|00005460| 20 61 63 63 6f 72 64 69 | 6e 67 20 74 6f 20 74 68 | accordi|ng to th|
|00005470| 65 20 67 69 76 65 6e 20 | 74 79 70 65 20 61 6e 64 |e given |type and|
|00005480| 0a 64 6f 6d 61 69 6e 20 | 6f 72 64 65 72 69 6e 67 |.domain |ordering|
|00005490| 2e 20 49 74 20 69 73 20 | 63 61 6c 6c 65 64 20 61 |. It is |called a|
|000054a0| 73 3a 0a 0a 5c 62 65 67 | 69 6e 7b 71 75 6f 74 65 |s:..\beg|in{quote|
|000054b0| 7d 5c 69 6e 64 65 78 7b | 61 64 5c 5f 70 61 72 73 |}\index{|ad\_pars|
|000054c0| 65 7d 5c 62 65 67 69 6e | 7b 76 65 72 62 61 74 69 |e}\begin|{verbati|
|000054d0| 6d 7d 0a 69 6e 74 20 61 | 64 5f 70 61 72 73 65 20 |m}.int a|d_parse |
|000054e0| 28 61 70 2c 20 72 70 2c | 20 6f 72 64 65 72 29 0a |(ap, rp,| order).|
|000054f0| 41 44 44 52 09 2a 61 70 | 3b 0a 52 50 5f 42 75 66 |ADDR.*ap|;.RP_Buf|
|00005500| 20 2a 72 70 3b 0a 69 6e | 74 20 6f 72 64 65 72 3b | *rp;.in|t order;|
|00005510| 0a 5c 65 6e 64 7b 76 65 | 72 62 61 74 69 6d 7d 5c |.\end{ve|rbatim}\|
|00005520| 65 6e 64 7b 71 75 6f 74 | 65 7d 0a 0a 54 68 65 20 |end{quot|e}..The |
|00005530| 70 61 72 61 6d 65 74 65 | 72 73 20 61 72 65 3a 0a |paramete|rs are:.|
|00005540| 5c 62 65 67 69 6e 7b 64 | 65 73 63 72 69 62 65 7d |\begin{d|escribe}|
|00005550| 0a 5c 69 74 65 6d 5b 5c | 76 65 72 62 7c 61 70 7c |.\item[\|verb|ap||
|00005560| 3a 5d 20 54 68 65 20 61 | 64 64 72 65 73 73 20 73 |:] The a|ddress s|
|00005570| 74 72 75 63 74 75 72 65 | 20 77 69 74 68 20 74 68 |tructure| with th|
|00005580| 65 20 61 64 64 72 65 73 | 73 20 74 6f 20 62 65 20 |e addres|s to be |
|00005590| 70 61 72 73 65 64 0a 69 | 6e 20 74 68 65 20 5c 76 |parsed.i|n the \v|
|000055a0| 65 72 62 7c 61 64 5f 76 | 61 6c 75 65 7c 20 73 74 |erb|ad_v|alue| st|
|000055b0| 72 75 63 74 75 72 65 20 | 6d 65 6d 62 65 72 2e 20 |ructure |member. |
|000055c0| 54 68 65 20 61 64 64 72 | 65 73 73 20 74 79 70 65 |The addr|ess type|
|000055d0| 20 73 68 6f 75 6c 64 20 | 62 65 0a 73 65 74 20 69 | should |be.set i|
|000055e0| 6e 20 5c 76 65 72 62 7c | 61 64 5f 74 79 70 65 7c |n \verb||ad_type||
|000055f0| 2e 0a 5c 69 74 65 6d 5b | 5c 76 65 72 62 7c 72 70 |..\item[|\verb|rp|
|00005600| 7c 3a 5d 20 41 20 72 65 | 70 6c 79 20 73 74 72 75 ||:] A re|ply stru|
|00005610| 63 74 75 72 65 20 77 68 | 69 63 68 20 69 73 20 75 |cture wh|ich is u|
|00005620| 70 64 61 74 65 64 20 77 | 69 74 68 20 74 68 65 20 |pdated w|ith the |
|00005630| 72 65 73 75 6c 74 73 0a | 6f 66 20 74 68 65 20 70 |results.|of the p|
|00005640| 61 72 73 69 6e 67 2e 0a | 5c 69 74 65 6d 5b 5c 76 |arsing..|\item[\v|
|00005650| 65 72 62 7c 6f 72 64 65 | 72 7c 3a 5d 20 54 68 65 |erb|orde|r|:] The|
|00005660| 20 65 78 70 65 63 74 65 | 64 20 6f 72 64 65 72 20 | expecte|d order |
|00005670| 6f 66 20 74 68 65 20 64 | 6f 6d 61 69 6e 73 2e 20 |of the d|omains. |
|00005680| 54 68 69 73 20 69 73 20 | 6f 6e 65 20 6f 66 0a 74 |This is |one of.t|
|00005690| 68 65 20 66 6f 6c 6c 6f | 77 69 6e 67 3a 0a 5c 5b |he follo|wing:.\[|
|000056a0| 5c 62 65 67 69 6e 7b 74 | 61 62 75 6c 61 72 7d 7b |\begin{t|abular}{|
|000056b0| 7c 6c 7c 6c 7c 7d 0a 5c | 68 6c 69 6e 65 0a 09 5c ||l|l|}.\|hline..\|
|000056c0| 6d 75 6c 74 69 63 6f 6c | 75 6d 6e 7b 31 7d 7b 7c |multicol|umn{1}{||
|000056d0| 63 7c 7d 7b 5c 62 66 20 | 56 61 6c 75 65 7d 26 0a |c|}{\bf |Value}&.|
|000056e0| 09 09 5c 6d 75 6c 74 69 | 63 6f 6c 75 6d 6e 7b 31 |..\multi|column{1|
|000056f0| 7d 7b 7c 63 7c 7d 7b 5c | 62 66 20 4d 65 61 6e 69 |}{|c|}{\|bf Meani|
|00005700| 6e 67 7d 5c 5c 0a 5c 68 | 6c 69 6e 65 0a 09 5c 74 |ng}\\.\h|line..\t|
|00005710| 74 20 43 48 5c 5f 55 53 | 41 5c 5f 4f 4e 4c 59 26 |t CH\_US|A\_ONLY&|
|00005720| 09 55 53 20 6f 72 64 65 | 72 20 64 6f 6d 61 69 6e |.US orde|r domain|
|00005730| 20 6f 6e 6c 79 5c 5c 0a | 09 5c 74 74 20 43 48 5c | only\\.|.\tt CH\|
|00005740| 5f 55 53 41 5c 5f 50 52 | 45 46 26 09 55 53 20 6f |_USA\_PR|EF&.US o|
|00005750| 72 64 65 72 20 70 72 65 | 66 65 72 65 64 20 5c 5c |rder pre|fered \\|
|00005760| 0a 09 5c 74 74 20 43 48 | 5c 5f 55 4b 5c 5f 4f 4e |..\tt CH|\_UK\_ON|
|00005770| 4c 59 26 09 55 4b 20 6f | 72 64 65 72 20 64 6f 6d |LY&.UK o|rder dom|
|00005780| 61 69 6e 73 20 6f 6e 6c | 79 5c 5c 0a 09 5c 74 74 |ains onl|y\\..\tt|
|00005790| 20 43 48 5c 5f 55 4b 5c | 5f 50 52 45 46 26 09 55 | CH\_UK\|_PREF&.U|
|000057a0| 4b 20 6f 72 64 65 72 20 | 70 72 65 66 65 72 65 64 |K order |prefered|
|000057b0| 20 5c 5c 0a 5c 68 6c 69 | 6e 65 0a 5c 65 6e 64 7b | \\.\hli|ne.\end{|
|000057c0| 74 61 62 75 6c 61 72 7d | 5c 5d 0a 54 68 69 73 20 |tabular}|\].This |
|000057d0| 69 73 20 75 73 75 61 6c | 6c 79 20 69 6e 70 75 74 |is usual|ly input|
|000057e0| 20 66 72 6f 6d 20 74 68 | 65 20 63 68 61 6e 6e 65 | from th|e channe|
|000057f0| 6c 20 73 74 72 75 63 74 | 75 72 65 2e 0a 5c 65 6e |l struct|ure..\en|
|00005800| 64 7b 64 65 73 63 72 69 | 62 65 7d 0a 0a 54 68 69 |d{descri|be}..Thi|
|00005810| 73 20 72 6f 75 74 69 6e | 65 20 72 65 74 75 72 6e |s routin|e return|
|00005820| 73 20 61 6e 20 5c 76 65 | 72 62 7c 52 50 7c 20 63 |s an \ve|rb|RP| c|
|00005830| 6f 64 65 20 77 68 69 63 | 68 20 63 61 6e 20 62 65 |ode whic|h can be|
|00005840| 20 63 68 65 63 6b 65 64 | 20 77 69 74 68 0a 5c 76 | checked| with.\v|
|00005850| 65 72 62 7c 72 70 5f 69 | 73 67 6f 6f 64 7c 20 74 |erb|rp_i|sgood| t|
|00005860| 6f 20 73 65 65 20 69 66 | 20 74 68 65 20 61 64 64 |o see if| the add|
|00005870| 72 65 73 73 20 77 61 73 | 20 70 61 72 73 65 64 2e |ress was| parsed.|
|00005880| 20 49 66 20 69 74 20 66 | 61 69 6c 73 2c 20 61 0a | If it f|ails, a.|
|00005890| 73 75 69 74 61 62 6c 65 | 20 65 72 72 6f 72 20 77 |suitable| error w|
|000058a0| 69 6c 6c 20 62 65 20 77 | 72 69 74 74 65 6e 20 69 |ill be w|ritten i|
|000058b0| 6e 20 74 68 65 20 5c 76 | 65 72 62 7c 52 50 5f 42 |n the \v|erb|RP_B|
|000058c0| 75 66 7c 20 73 74 72 75 | 63 74 75 72 65 2e 0a 0a |uf| stru|cture...|
|000058d0| 57 68 65 6e 20 64 65 6c | 69 76 65 72 69 6e 67 20 |When del|ivering |
|000058e0| 74 6f 20 6c 6f 63 61 6c | 20 61 64 64 72 65 73 73 |to local| address|
|000058f0| 65 73 20 69 74 20 69 73 | 20 6f 66 74 65 6e 20 6e |es it is| often n|
|00005900| 65 63 65 73 73 61 72 79 | 20 74 6f 20 72 65 64 75 |ecessary| to redu|
|00005910| 63 65 20 61 0a 67 6c 6f | 62 61 6c 20 61 64 64 72 |ce a.glo|bal addr|
|00005920| 65 73 73 20 64 6f 77 6e | 20 74 6f 20 61 20 75 73 |ess down| to a us|
|00005930| 65 72 20 6f 66 20 74 68 | 65 20 73 79 73 74 65 6d |er of th|e system|
|00005940| 2e 20 54 68 65 20 72 6f | 75 74 69 6e 65 0a 5c 76 |. The ro|utine.\v|
|00005950| 65 72 62 7c 61 64 5f 67 | 65 74 6c 6f 63 61 6c 7c |erb|ad_g|etlocal||
|00005960| 20 63 61 6e 20 62 65 20 | 6f 66 20 75 73 65 20 68 | can be |of use h|
|00005970| 65 72 65 2e 20 54 68 69 | 73 20 72 6f 75 74 69 6e |ere. Thi|s routin|
|00005980| 65 20 74 61 6b 65 73 20 | 61 6e 20 61 64 64 72 65 |e takes |an addre|
|00005990| 73 73 0a 61 6e 64 20 72 | 65 74 75 72 6e 73 20 6a |ss.and r|eturns j|
|000059a0| 75 73 74 20 74 68 65 20 | 6c 6f 63 61 6c 20 70 61 |ust the |local pa|
|000059b0| 72 74 20 6f 66 20 69 74 | 20 69 66 20 61 6e 79 2c |rt of it| if any,|
|000059c0| 20 65 6c 73 65 20 5c 76 | 65 72 62 7c 4e 55 4c 4c | else \v|erb|NULL|
|000059d0| 43 50 7c 2e 20 49 74 0a | 69 73 20 63 61 6c 6c 65 |CP|. It.|is calle|
|000059e0| 64 20 61 73 20 66 6f 6c | 6c 6f 77 73 3a 0a 0a 5c |d as fol|lows:..\|
|000059f0| 62 65 67 69 6e 7b 71 75 | 6f 74 65 7d 5c 69 6e 64 |begin{qu|ote}\ind|
|00005a00| 65 78 7b 61 64 5c 5f 67 | 65 74 6c 6f 63 61 6c 7d |ex{ad\_g|etlocal}|
|00005a10| 5c 62 65 67 69 6e 7b 76 | 65 72 62 61 74 69 6d 7d |\begin{v|erbatim}|
|00005a20| 0a 63 68 61 72 20 2a 61 | 64 5f 67 65 74 6c 6f 63 |.char *a|d_getloc|
|00005a30| 61 6c 20 28 61 64 64 72 | 2c 20 74 79 70 65 2c 20 |al (addr|, type, |
|00005a40| 72 65 73 70 29 0a 63 68 | 61 72 20 2a 61 64 64 72 |resp).ch|ar *addr|
|00005a50| 3b 0a 69 6e 74 20 74 79 | 70 65 3b 0a 69 6e 74 20 |;.int ty|pe;.int |
|00005a60| 72 65 73 70 3b 0a 5c 65 | 6e 64 7b 76 65 72 62 61 |resp;.\e|nd{verba|
|00005a70| 74 69 6d 7d 5c 65 6e 64 | 7b 71 75 6f 74 65 7d 0a |tim}\end|{quote}.|
|00005a80| 0a 54 68 65 20 61 72 67 | 75 6d 65 6e 74 73 20 61 |.The arg|uments a|
|00005a90| 72 65 3a 0a 5c 62 65 67 | 69 6e 7b 64 65 73 63 72 |re:.\beg|in{descr|
|00005aa0| 69 62 65 7d 0a 5c 69 74 | 65 6d 5b 5c 76 65 72 62 |ibe}.\it|em[\verb|
|00005ab0| 7c 61 64 64 72 7c 3a 5d | 20 41 20 73 74 72 69 6e ||addr|:]| A strin|
|00005ac0| 67 2d 65 6e 63 6f 64 65 | 64 20 66 6f 72 6d 20 6f |g-encode|d form o|
|00005ad0| 66 20 74 68 65 20 61 64 | 64 72 65 73 73 3b 20 65 |f the ad|dress; e|
|00005ae0| 69 74 68 65 72 20 61 6e | 0a 52 46 43 7e 38 32 32 |ither an|.RFC~822|
|00005af0| 20 61 64 64 72 65 73 73 | 20 6f 72 20 61 6e 20 52 | address| or an R|
|00005b00| 46 43 7e 31 31 34 38 20 | 65 6e 63 6f 64 65 64 20 |FC~1148 |encoded |
|00005b10| 58 2e 34 30 30 20 61 64 | 64 72 65 73 73 2e 0a 0a |X.400 ad|dress...|
|00005b20| 5c 69 74 65 6d 5b 5c 76 | 65 72 62 7c 74 79 70 65 |\item[\v|erb|type|
|00005b30| 7c 3a 5d 20 54 68 65 20 | 74 79 70 65 20 6f 66 20 ||:] The |type of |
|00005b40| 61 64 64 72 65 73 73 2c | 20 65 69 74 68 65 72 20 |address,| either |
|00005b50| 5c 76 65 72 62 7c 41 44 | 5f 58 34 30 30 5f 74 79 |\verb|AD|_X400_ty|
|00005b60| 70 65 7c 20 6f 72 0a 5c | 76 65 72 62 7c 41 44 5f |pe| or.\|verb|AD_|
|00005b70| 38 32 32 5f 74 79 70 65 | 7c 2e 0a 0a 5c 69 74 65 |822_type||...\ite|
|00005b80| 6d 5b 5c 76 65 72 62 7c | 72 65 73 70 7c 3a 5d 20 |m[\verb||resp|:] |
|00005b90| 49 66 20 74 68 65 20 61 | 64 64 72 65 73 73 20 69 |If the a|ddress i|
|00005ba0| 73 20 61 20 72 65 63 69 | 70 69 65 6e 74 2c 20 74 |s a reci|pient, t|
|00005bb0| 68 69 73 20 76 61 6c 75 | 65 20 73 68 6f 75 6c 64 |his valu|e should|
|00005bc0| 0a 62 65 20 5c 76 65 72 | 62 7c 31 7c 2c 20 65 6c |.be \ver|b|1|, el|
|00005bd0| 73 65 20 5c 76 65 72 62 | 7c 30 7c 2e 0a 5c 65 6e |se \verb||0|..\en|
|00005be0| 64 7b 64 65 73 63 72 69 | 62 65 7d 0a 0a 5c 73 75 |d{descri|be}..\su|
|00005bf0| 62 73 65 63 74 69 6f 6e | 20 7b 4c 6f 63 61 6c 20 |bsection| {Local |
|00005c00| 50 69 63 6b 75 70 7d 0a | 0a 54 68 69 73 20 73 74 |Pickup}.|.This st|
|00005c10| 79 6c 65 20 6f 66 20 63 | 68 61 6e 6e 65 6c 20 68 |yle of c|hannel h|
|00005c20| 61 73 20 6e 6f 74 20 79 | 65 74 20 62 65 65 6e 20 |as not y|et been |
|00005c30| 77 72 69 74 74 65 6e 2e | 0a 0a 5c 73 75 62 73 65 |written.|..\subse|
|00005c40| 63 74 69 6f 6e 20 7b 54 | 57 41 20 43 68 61 6e 6e |ction {T|WA Chann|
|00005c50| 65 6c 7d 0a 0a 25 53 68 | 6f 77 20 68 6f 77 20 74 |el}..%Sh|ow how t|
|00005c60| 68 69 73 20 63 61 6e 20 | 62 65 20 75 73 65 64 20 |his can |be used |
|00005c70| 61 73 20 60 60 70 75 6c | 6c 20 6f 6e 6c 79 27 27 |as ``pul|l only''|
|00005c80| 2c 20 61 6e 64 20 61 73 | 20 66 75 6c 6c 20 54 57 |, and as| full TW|
|00005c90| 41 20 69 6e 20 63 6f 6e | 6a 75 6e 63 74 69 6f 6e |A in con|junction|
|00005ca0| 0a 25 77 69 74 68 20 73 | 75 62 6d 69 73 73 69 6f |.%with s|ubmissio|
|00005cb0| 6e 2e 20 20 20 4e 65 65 | 64 20 74 6f 20 68 61 76 |n. Nee|d to hav|
|00005cc0| 65 20 62 6f 74 68 20 51 | 4d 47 52 20 61 6e 64 20 |e both Q|MGR and |
|00005cd0| 73 65 72 76 65 72 20 69 | 6e 69 74 69 61 74 65 64 |server i|nitiated|
|00005ce0| 20 61 70 70 72 6f 61 63 | 68 2e 0a 54 68 69 73 20 | approac|h..This |
|00005cf0| 73 74 79 6c 65 20 6f 66 | 20 63 68 61 6e 6e 65 6c |style of| channel|
|00005d00| 20 68 61 73 20 6e 6f 74 | 20 79 65 74 20 62 65 65 | has not| yet bee|
|00005d10| 6e 20 77 72 69 74 74 65 | 6e 2e 0a 0a 5c 73 75 62 |n writte|n...\sub|
|00005d20| 73 65 63 74 69 6f 6e 20 | 7b 44 65 6c 69 76 65 72 |section |{Deliver|
|00005d30| 79 20 52 65 70 6f 72 74 | 73 7d 0a 0a 41 20 74 79 |y Report|s}..A ty|
|00005d40| 70 69 63 61 6c 20 69 6e | 74 65 72 66 61 63 65 20 |pical in|terface |
|00005d50| 74 6f 20 74 68 65 20 64 | 65 6c 69 76 65 72 79 20 |to the d|elivery |
|00005d60| 72 65 70 6f 72 74 20 66 | 75 6e 63 74 69 6f 6e 73 |report f|unctions|
|00005d70| 20 69 73 20 73 68 6f 77 | 6e 20 69 6e 20 0a 46 69 | is show|n in .Fi|
|00005d80| 67 75 72 65 7e 5c 72 65 | 66 7b 65 78 61 6d 70 3a |gure~\re|f{examp:|
|00005d90| 64 72 7d 2e 0a 0a 5c 74 | 61 67 72 69 6e 64 66 69 |dr}...\t|agrindfi|
|00005da0| 6c 65 7b 64 65 6c 76 2d | 72 65 70 7d 7b 45 78 61 |le{delv-|rep}{Exa|
|00005db0| 6d 70 6c 65 20 44 65 6c | 69 76 65 72 79 20 52 65 |mple Del|ivery Re|
|00005dc0| 70 6f 72 74 20 47 65 6e | 65 72 61 74 69 6f 6e 7d |port Gen|eration}|
|00005dd0| 7b 65 78 61 6d 70 3a 64 | 72 7d 0a 0a 5c 73 65 63 |{examp:d|r}..\sec|
|00005de0| 74 69 6f 6e 20 7b 46 6f | 72 6d 61 74 74 65 72 73 |tion {Fo|rmatters|
|00005df0| 20 61 6e 64 20 43 6f 6e | 76 65 72 74 65 72 73 7d | and Con|verters}|
|00005e00| 0a 0a 0a 46 6f 72 6d 61 | 74 74 65 72 73 20 61 6e |...Forma|tters an|
|00005e10| 64 20 63 6f 6e 76 65 72 | 74 65 72 73 20 63 61 6e |d conver|ters can|
|00005e20| 20 72 75 6e 20 69 6e 20 | 74 77 6f 20 77 61 79 73 | run in |two ways|
|00005e30| 2e 20 47 65 6e 65 72 61 | 6c 6c 79 20 74 68 65 20 |. Genera|lly the |
|00005e40| 73 69 6d 70 6c 65 0a 66 | 69 6c 74 65 72 73 20 77 |simple.f|ilters w|
|00005e50| 6f 72 6b 20 6f 6e 20 73 | 69 6e 67 6c 65 20 66 69 |ork on s|ingle fi|
|00005e60| 6c 65 73 2c 20 74 68 65 | 20 63 6f 6d 70 6c 65 78 |les, the| complex|
|00005e70| 20 66 69 6c 74 65 72 73 | 20 77 6f 72 6b 20 6f 6e | filters| work on|
|00005e80| 20 73 65 76 65 72 61 6c | 0a 66 69 6c 65 73 20 61 | several|.files a|
|00005e90| 74 20 6f 6e 63 65 2e 20 | 54 68 65 20 6d 61 6a 6f |t once. |The majo|
|00005ea0| 72 69 74 79 20 6f 66 20 | 66 69 6c 74 65 72 73 20 |rity of |filters |
|00005eb0| 73 68 6f 75 6c 64 20 62 | 65 20 6f 66 20 74 68 65 |should b|e of the|
|00005ec0| 20 73 69 6d 70 6c 65 20 | 6b 69 6e 64 2e 0a 0a 5c | simple |kind...\|
|00005ed0| 73 75 62 73 65 63 74 69 | 6f 6e 7b 53 69 6d 70 6c |subsecti|on{Simpl|
|00005ee0| 65 20 43 6f 6e 76 65 72 | 74 65 72 73 7d 0a 0a 54 |e Conver|ters}..T|
|00005ef0| 68 65 20 73 69 6d 70 6c | 65 20 63 6f 6e 76 65 72 |he simpl|e conver|
|00005f00| 74 65 72 73 20 61 72 65 | 20 70 72 6f 67 72 61 6d |ters are| program|
|00005f10| 73 20 74 68 61 74 20 72 | 65 61 64 20 66 72 6f 6d |s that r|ead from|
|00005f20| 20 74 68 65 20 73 74 61 | 6e 64 61 72 64 20 69 6e | the sta|ndard in|
|00005f30| 70 75 74 2c 0a 64 6f 20 | 73 6f 6d 65 20 66 6f 72 |put,.do |some for|
|00005f40| 6d 61 74 74 69 6e 67 2c | 20 61 6e 64 20 77 72 69 |matting,| and wri|
|00005f50| 74 65 20 74 68 65 20 72 | 65 73 75 6c 74 20 74 6f |te the r|esult to|
|00005f60| 20 74 68 65 20 73 74 61 | 6e 64 61 72 64 20 6f 75 | the sta|ndard ou|
|00005f70| 74 70 75 74 2e 0a 54 68 | 69 73 20 74 79 70 65 20 |tput..Th|is type |
|00005f80| 6f 66 20 66 6f 72 6d 61 | 74 74 65 72 20 69 73 20 |of forma|tter is |
|00005f90| 69 6e 76 6f 6b 65 64 20 | 62 79 20 74 68 65 20 66 |invoked |by the f|
|00005fa0| 69 6c 74 65 72 63 6f 6e | 74 72 6f 6c 20 70 72 6f |iltercon|trol pro|
|00005fb0| 67 72 61 6d 2c 0a 5c 76 | 65 72 62 7c 66 63 6f 6e |gram,.\v|erb|fcon|
|00005fc0| 74 72 6f 6c 7c 5c 69 6e | 64 65 78 7b 66 63 6f 6e |trol|\in|dex{fcon|
|00005fd0| 74 72 6f 6c 7d 2e 0a 0a | 54 68 65 73 65 20 73 69 |trol}...|These si|
|00005fe0| 6d 70 6c 65 20 66 69 6c | 74 65 72 73 20 73 68 6f |mple fil|ters sho|
|00005ff0| 75 6c 64 20 72 65 74 75 | 72 6e 20 61 20 73 75 69 |uld retu|rn a sui|
|00006000| 74 61 62 6c 65 20 65 78 | 69 74 20 73 74 61 74 75 |table ex|it statu|
|00006010| 73 20 74 6f 20 63 6f 6e | 66 69 72 6d 0a 74 68 61 |s to con|firm.tha|
|00006020| 74 20 74 68 65 20 63 6f | 6e 76 65 72 73 69 6f 6e |t the co|nversion|
|00006030| 20 63 6f 6d 70 6c 65 74 | 65 64 20 73 75 63 63 65 | complet|ed succe|
|00006040| 73 73 66 75 6c 6c 79 2e | 20 54 68 65 79 20 66 6f |ssfully.| They fo|
|00006050| 6c 6c 6f 77 20 74 68 65 | 20 73 74 61 6e 64 61 72 |llow the| standar|
|00006060| 64 0a 5c 75 6e 69 78 2f | 20 74 72 61 64 69 74 69 |d.\unix/| traditi|
|00006070| 6f 6e 20 6f 66 20 72 65 | 74 75 72 6e 69 6e 67 20 |on of re|turning |
|00006080| 5c 76 65 72 62 7c 30 7c | 20 6f 6e 20 73 75 63 63 |\verb|0|| on succ|
|00006090| 65 73 73 20 61 6e 64 20 | 61 6e 79 74 68 69 6e 67 |ess and |anything|
|000060a0| 20 65 6c 73 65 20 6f 6e | 0a 66 61 69 6c 75 72 65 | else on|.failure|
|000060b0| 2e 20 0a 0a 54 68 65 73 | 65 20 66 69 6c 74 65 72 |. ..Thes|e filter|
|000060c0| 73 20 6d 61 79 20 62 65 | 20 61 6e 79 74 68 69 6e |s may be| anythin|
|000060d0| 67 20 66 72 6f 6d 20 73 | 69 6d 70 6c 65 20 73 68 |g from s|imple sh|
|000060e0| 65 6c 6c 2f 61 77 6b 2f | 73 65 64 20 73 63 72 69 |ell/awk/|sed scri|
|000060f0| 70 74 73 20 74 6f 0a 6d | 6f 72 65 20 63 6f 6d 70 |pts to.m|ore comp|
|00006100| 6c 65 78 20 7b 5c 65 6d | 20 43 7d 20 70 72 6f 67 |lex {\em| C} prog|
|00006110| 72 61 6d 73 2e 0a 0a 5c | 73 75 62 73 65 63 74 69 |rams...\|subsecti|
|00006120| 6f 6e 7b 43 6f 6d 70 6c | 65 78 20 46 69 6c 74 65 |on{Compl|ex Filte|
|00006130| 72 73 7d 0a 0a 4d 6f 72 | 65 20 63 6f 6d 70 6c 65 |rs}..Mor|e comple|
|00006140| 78 20 66 6f 72 6d 61 74 | 74 65 72 73 20 61 72 65 |x format|ters are|
|00006150| 20 6e 65 63 65 73 73 61 | 72 79 20 69 66 20 74 68 | necessa|ry if th|
|00006160| 65 20 66 6f 72 6d 61 74 | 74 69 6e 67 20 6e 65 65 |e format|ting nee|
|00006170| 64 73 20 74 6f 0a 63 6f | 6e 76 65 72 74 20 6d 6f |ds to.co|nvert mo|
|00006180| 72 65 20 74 68 61 6e 20 | 6f 6e 65 20 66 69 6c 65 |re than |one file|
|00006190| 2e 20 54 68 69 73 20 69 | 73 20 74 68 65 20 63 61 |. This i|s the ca|
|000061a0| 73 65 20 66 6f 72 20 66 | 6f 72 6d 61 74 74 65 72 |se for f|ormatter|
|000061b0| 73 20 74 68 61 74 20 63 | 68 61 6e 67 65 0a 74 68 |s that c|hange.th|
|000061c0| 65 20 64 69 72 65 63 74 | 6f 72 79 20 73 74 72 75 |e direct|ory stru|
|000061d0| 63 74 75 72 65 2c 20 6f | 72 20 63 6f 6d 62 69 6e |cture, o|r combin|
|000061e0| 65 20 73 65 76 65 72 61 | 6c 20 66 69 6c 65 73 20 |e severa|l files |
|000061f0| 69 6e 74 6f 20 6f 6e 65 | 2e 20 54 68 65 73 65 0a |into one|. These.|
|00006200| 66 6f 72 6d 61 74 74 65 | 72 73 20 72 65 71 75 69 |formatte|rs requi|
|00006210| 72 65 20 6d 6f 72 65 20 | 77 6f 72 6b 2c 20 62 75 |re more |work, bu|
|00006220| 74 20 61 72 65 20 73 69 | 6d 69 6c 61 72 20 74 6f |t are si|milar to|
|00006230| 20 74 68 65 20 63 68 61 | 6e 6e 65 6c 20 70 72 6f | the cha|nnel pro|
|00006240| 67 72 61 6d 73 0a 69 6e | 20 74 68 65 69 72 20 6f |grams.in| their o|
|00006250| 70 65 72 61 74 69 6f 6e | 2e 20 54 68 65 20 51 4d |peration|. The QM|
|00006260| 47 52 20 69 6e 74 65 72 | 66 61 63 65 20 69 73 20 |GR inter|face is |
|00006270| 69 6e 20 66 61 63 74 20 | 69 64 65 6e 74 69 63 61 |in fact |identica|
|00006280| 6c 2e 0a 54 68 65 20 6f | 6e 6c 79 20 72 65 61 6c |l..The o|nly real|
|00006290| 20 64 69 66 66 65 72 65 | 6e 63 65 20 69 73 20 69 | differe|nce is i|
|000062a0| 6e 20 74 68 65 20 5c 76 | 65 72 62 7c 71 69 64 32 |n the \v|erb|qid2|
|000062b0| 64 69 72 7c 5c 69 6e 64 | 65 78 7b 71 69 64 32 64 |dir|\ind|ex{qid2d|
|000062c0| 69 72 7d 0a 72 6f 75 74 | 69 6e 65 20 75 73 65 64 |ir}.rout|ine used|
|000062d0| 20 74 6f 20 6c 6f 63 61 | 74 65 20 74 68 65 20 64 | to loca|te the d|
|000062e0| 69 72 65 63 74 6f 72 79 | 2e 20 54 68 65 20 73 74 |irectory|. The st|
|000062f0| 61 72 74 69 6e 67 20 64 | 69 72 65 63 74 6f 72 79 |arting d|irectory|
|00006300| 20 69 73 20 66 6f 75 6e | 64 0a 75 73 69 6e 67 20 | is foun|d.using |
|00006310| 74 68 65 20 6e 6f 72 6d | 61 6c 20 5c 76 65 72 62 |the norm|al \verb|
|00006320| 7c 71 69 64 32 64 69 72 | 7c 20 72 6f 75 74 69 6e ||qid2dir|| routin|
|00006330| 65 2e 20 54 68 65 20 64 | 65 73 74 69 6e 61 74 69 |e. The d|estinati|
|00006340| 6f 6e 20 64 69 72 65 63 | 74 6f 72 79 20 69 73 0a |on direc|tory is.|
|00006350| 66 6f 75 6e 64 20 75 73 | 69 6e 67 20 74 68 65 20 |found us|ing the |
|00006360| 73 61 6d 65 20 72 6f 75 | 74 69 6e 65 2c 20 62 75 |same rou|tine, bu|
|00006370| 74 20 66 69 72 73 74 20 | 69 6e 63 72 65 6d 65 6e |t first |incremen|
|00006380| 74 69 6e 67 20 74 68 65 | 20 66 6f 72 6d 61 74 74 |ting the| formatt|
|00006390| 65 72 0a 63 6f 75 6e 74 | 20 69 6e 20 74 68 65 20 |er.count| in the |
|000063a0| 61 64 64 72 65 73 73 20 | 73 74 72 75 63 74 75 72 |address |structur|
|000063b0| 65 2c 20 61 6e 64 20 74 | 68 65 6e 20 63 61 6c 6c |e, and t|hen call|
|000063c0| 69 6e 67 20 74 68 65 20 | 72 6f 75 74 69 6e 65 20 |ing the |routine |
|000063d0| 77 69 74 68 20 74 68 65 | 0a 66 6c 61 67 20 73 65 |with the|.flag se|
|000063e0| 74 20 74 6f 20 5c 76 65 | 72 62 7c 46 41 4c 53 45 |t to \ve|rb|FALSE|
|000063f0| 7c 2e 20 54 68 65 20 66 | 6f 72 6d 61 74 74 65 72 ||. The f|ormatter|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.