Debian Codegraph @

xpa/doc/xpa.ps

raw
1 %!PS
2 %%Title: The XPA Help Facility
3 %%Creator: html2ps version 1.0 beta5
4 %%EndComments
5 save
6 2000 dict begin
7 /d {bind def} bind def
8 /D {def} d
9 /t true D
10 /f false D
11 /FL [/Times-Roman
12 /Times-Italic
13 /Times-Bold
14 /Times-BoldItalic
15 /Courier
16 /Courier-Oblique
17 /Courier-Bold
18 /Courier-BoldOblique
19 /Helvetica
20 /Helvetica-Oblique
21 /Helvetica-Bold
22 /Helvetica-BoldOblique] D
23 /WF t D
24 /WI 0 D
25 /F 1 D
26 /IW 471 F div D
27 /IL 621 F div D
28 /PS 791 D
29 /EF [0 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 2 2] D
30 /EZ [11 9 19 17 15 13 12 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 8 8] D
31 /Ey [0 0 2 2 2 2 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] D
32 /EG [-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1] D
33 /Tm [1 1 0.8 0.8 0.8 0.8 0.8 0.8 0 0 0 0 0 0 0.5 1 1 1 1 0 0 1.3 0 0] D
34 /Bm [1 1 0.5 0.5 0.5 0.5 0.5 0.5 0 0 0 0 0 0 0.5 1 1 1 1 0 0 1 0 0] D
35 /Lm [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 2 0 0 2 0 0 0] D
36 /Rm [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0] D
37 /EU [-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 0 0] D
38 /NO t D
39 /YY [[{()}1][{()}0][{()}2]] D
40 /ZZ [[{()}1][{()}0][{()}2]] D
41 /Ts EZ 0 get D
42 /TU f D
43 /Xp t D
44 /AU t D
45 /SN 0 D
46 /Cf f D
47 /Tp f D
48 /Fe f D
49 /TI 1 Ts mul D
50 /Fm 14 D
51 /xL 71 D
52 /xR 71 D
53 /yL 706 D
54 /yR 706 D
55 /Wl 471 F div D
56 /Wr 471 F div D
57 /hL 621 F div D
58 /hR 621 F div D
59 /FE {newpath Fm neg Fm M CP BB IW Fm add Fm L IW Fm add IL Fm add neg L CP BB
60 Fm neg IL Fm add neg L closepath} D
61 /LA {PM 0 eq{/IW Wl D /IL hL D}{/IW Wr D /IL hR D}ie /W IW D /LL W D /LS W D
62 TU PM 0 eq and{IW 56 F div add SA{Sf div}if 0 translate}
63 {PM 0 eq{xL yL}{xR yR}ie translate F SA{Sf mul}if dup scale
64 CS CF FS Cf{CA CL get VC}if /Bb f D}ie 0 0 M
65 TF not Tc or {Cf{gsave SA{1 Sf div dup scale}if Cb VC FE fill grestore}if}if}D
66 /Pi 0 Ts mul D
67 /SG [0.8 1 1] D
68 /Ab 15 D
69 /J 0 D
70 /Tc t D
71 /NH 6 D
72 /Nf f D
73 /Pa f D
74 /LH 1.2 D
75 /XR f D
76 /Xr {/pN E D ( [p ) WB pN WB (] )WB} D
77 /Db [16#FF 16#FF 16#FF] D
78 /Dt [16#00 16#00 16#00] D
79 /eA f D
80 /Fi f D
81 /bT f D
82 /Lc t D
83 /Dl [16#00 16#00 16#00] D
84 /LX f D
85 /Br 0.25 D
86 /IA ([IMAGE]) D
87 /DS {/PF f D()WB NL NP()pop RC ZF} D
88 /Gb f D
89 /Mb t D
90 /Hc [16#00 16#00 16#00] D
91 /Bl 3 D
92 /MI -15.2 D
93 /DX (DRAFT) D
94 /Di 0 D
95 /Tt 113.385826771654 D
96 /Th {()2 Al()BR (
97 ) 0 1 -1 H()4 FZ Ti ES()EH (
98 ) 0 2 -1 H() ME 0 get join EH()Ea()BR()} D
99 /tH {()0 1 -1 H (Table of Contents) EH()} D
100 /FD 2 D
101 /Dy 2 D
102 /cD [16#F0 16#F0 16#F0] D
103 /FW 0.6 D
104 /FU [16#00 16#00 16#00] D
105 /ET {/RM f D /A0 0 D /PN SN D /OU t D /Ou t D /W IW D /LL W D D1
106 Ms not TP and{Ip}if /TF f D} D
107 [{true statusdict/setduplexmode get exec} stopped cleartomark
108 %-- End of variable part --
109 /MySymbol 10 dict dup begin
110 /FontType 3 D /FontMatrix [.001 0 0 .001 0 0 ] D /FontBBox [25 -10 600 600] D
111 /Encoding 256 array D 0 1 255{Encoding exch /.notdef put}for
112 Encoding (e) 0 get /euro put
113 /Metrics 2 dict D Metrics begin
114 /.notdef 0 D
115 /euro 651 D
116 end
117 /BBox 2 dict D BBox begin
118 /.notdef [0 0 0 0] D
119 /euro [25 -10 600 600] D
120 end
121 /CharacterDefs 2 dict D CharacterDefs begin
122 /.notdef {} D
123 /euro{newpath 114 600 moveto 631 600 lineto 464 200 lineto 573 200 lineto
124 573 0 lineto -94 0 lineto 31 300 lineto -10 300 lineto closepath clip
125 50 setlinewidth newpath 656 300 moveto 381 300 275 0 360 arc stroke
126 -19 350 moveto 600 0 rlineto -19 250 moveto 600 0 rlineto stroke}d
127 end
128 /BuildChar{0 begin
129 /char E D /fontdict E D /charname fontdict /Encoding get char get D
130 fontdict begin
131 Metrics charname get 0 BBox charname get aload pop setcachedevice
132 CharacterDefs charname get exec
133 end
134 end}D
135 /BuildChar load 0 3 dict put /UniqueID 1 D
136 end
137 definefont pop
138
139 /Cd {aload length 2 idiv dup dict begin {D} repeat currentdict end} D
140 /EX {EC cvx exec} D
141 /DU {} d
142 /BB {pop pop}d
143 /ie {ifelse} d
144 /E {exch} d
145 /M {moveto} d
146 /R {rmoveto} d
147 /L {lineto} d
148 /RL {rlineto} d
149 /CP {currentpoint} d
150 /SW {stringwidth} d
151 /GI {getinterval} d
152 /PI {putinterval} d
153 /Sg {setgray} d
154 /LW {setlinewidth} d
155 /S {dup () ne OU and{0 Co R AT 3 eq LB and HF not and A1 0 ne A2 0 ne or and
156 {A2 0 32 A1 0 6 -1 roll awidthshow}{show}ie 0 Co neg R}{pop}ie
157 OU PH 3 eq or{/Ms t D}if} D
158 /U {OU{gsave CP currentfont /FontInfo get /UnderlinePosition get
159 0 E currentfont /FontMatrix get dtransform E pop add newpath M dup SW pop
160 CJ 0 RL stroke grestore}if} D
161 /B {OU Br 0 gt and{CP Ts neg Ts .33 mul R gsave 0 Sg
162 CP newpath Ts Br mul 0 360 arc closepath UI 2 mod 0 eq{stroke}{fill}ie
163 grestore M CP E Ts Br 1 add mul sub E BB /Ms t D}if}D
164 /NP {Ms TP not or PA and OU and{TP{OR}if f1{mF k2 /mF E D /YC 0 D}if
165 TP TU not PM 0 eq or and{showpage}if DU Ip TE not{LA}if 0.6 LW
166 /CI 0 D /TP t D /Hs f D /hl 6 D /Hv 6 D /HI hi D /Ms f D}if Bs XO BO M} D
167 /Np {LE sub CP E pop gt PL 0 eq and{NP}if}D
168 /Ip {/PN PN 1 add D /Pn RM{1}{4}ie PN Ns D /PM PN SN sub 2 mod D} D
169 /GP {E dup 3 -1 roll get PN 1 add 2 mod get dup type /integertype eq
170 {get 0 get}{E pop}ie}d
171 /Fc {dup 2 GP exec SW pop /S1 E D dup 1 GP exec SW pop /S2 E D 0 GP exec SW
172 pop /S3 E D S1 0 gt{S2 2 mul S1 add S3 2 mul S1 add 2 copy lt{E}if pop}{0}ie
173 S2 S3 add 2 copy lt{E}if pop IW .9 mul div dup 1 gt{1 E div}{pop 1}ie}D
174 /OR {Df{Sd}if tp not{gsave SA{1 Sf div dup scale}if Fe{Cf{FU VC}if FW LW
175 1 setlinejoin FE stroke}if /YO {60 F div dup 40 gt{pop 40}if}D /cs CS D
176 /cf CF D /CF 0 D /pf PF D /PF f D /Fn FN D /At AT D /AT 0 D /FN EF Hf 1 add
177 get D Fz Fs FS ZZ Fc Fz mul Fs FS EU Hf 1 add get dup type /arraytype eq
178 Cf and{VC}{pop 0 Sg}ie IW IL neg YO sub M ZZ 1 GP exec dup SW pop neg 0 R Sh
179 0 IL neg YO sub M ZZ 0 GP exec Sh ZZ 2 GP exec dup SW pop IW E sub 2 div
180 IL neg YO sub M Sh Fz Fs FS NO{/AW IW Pn SW pop sub D AW 2 div IL neg YO sub
181 S1 0 gt S2 AW .45 mul gt or S3 AW .45 mul gt or{Fz 2 mul sub}if M Pn Sh}if
182 EU Hf get dup type /arraytype eq Cf and{VC}{pop 0 Sg}ie YY Fc /FN EF Hf get D
183 Hz mul HS FS IW YO M YY 1 GP exec dup SW pop neg 0 R Sh 0 YO M YY 0 GP exec Sh
184 YY 2 GP exec dup SW pop IW E sub 2 div YO M Sh /FN Fn D /AT At D t Pb XO SZ
185 SL get neg R /PF pf D grestore /CF 0 D cs cf FS}if}D
186 /Sh {dup () ne{CP Hz 4 div sub BB show CP CS add BB}{pop}ie}D
187 /Pb {/OU E D /Ou OU D /PB t D 0 0 M Ba{/Sa save D /BP t D /Fl t D RC /PL 0 D
188 /PH 0 D /W IW D /LE IL .7 mul D /EO 0 D SI ZF /YA 0 D /BO 0 D /C1 () D
189 BA 0 Ts neg R Bb{Xl Yl Xh Yh}if Bb CP Sa restore M
190 {/Yh E D /Xh E D /Yl E D /Xl E D}if /Fl t D}if
191 BL /OU t D /HM f D /Ou t D /PB f D} D
192 /Bs {/BP Ba not D}D
193 /reencodeISO {
194 dup dup findfont dup length dict begin{1 index /FID ne{D}{pop pop}ie}forall
195 /Encoding ISOLatin1Encoding D currentdict end definefont} D
196 /ISOLatin1Encoding [
197 /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
198 /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
199 /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
200 /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
201 /space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright
202 /parenleft/parenright/asterisk/plus/comma/hyphen/period/slash
203 /zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon
204 /less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N
205 /O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright
206 /asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m
207 /n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde
208 /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
209 /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
210 /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
211 /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
212 /.notdef/space/exclamdown/cent/sterling/currency/yen/brokenbar
213 /section/dieresis/copyright/ordfeminine/guillemotleft/logicalnot
214 /hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior
215 /acute/mu/paragraph/periodcentered/cedilla/onesuperior/ordmasculine
216 /guillemotright/onequarter/onehalf/threequarters/questiondown
217 /Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla
218 /Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex
219 /Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis
220 /multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute
221 /Thorn/germandbls/agrave/aacute/acircumflex/atilde/adieresis
222 /aring/ae/ccedilla/egrave/eacute/ecircumflex/edieresis/igrave
223 /iacute/icircumflex/idieresis/eth/ntilde/ograve/oacute/ocircumflex
224 /otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex/udieresis
225 /yacute/thorn/ydieresis
226 ] D
227 [128/backslash 129/parenleft 130/parenright 141/circumflex 142/tilde
228 143/perthousand 144/dagger 145/daggerdbl 146/Ydieresis 147/scaron 148/Scaron
229 149/oe 150/OE 151/guilsinglleft 152/guilsinglright 153/quotesinglbase
230 154/quotedblbase 155/quotedblleft 156/quotedblright 157/endash 158/emdash
231 159/trademark]
232 aload length 2 idiv 1 1 3 -1 roll{pop ISOLatin1Encoding 3 1 roll put}for
233 /colorimage where{pop}{
234 /colorimage {
235 pop pop /Pr E D {/Cv Pr D /Gr Cv length 3 idiv string D 0 1 Gr length 1 sub
236 {Gr E dup /i E 3 mul D Cv i get 0.299 mul Cv i 1 add get 0.587 mul add
237 Cv i 2 add get 0.114 mul add cvi put}for Gr} image} D
238 }ie
239 /pdfmark where{pop}{userdict /pdfmark /cleartomark load put}ie
240 WF{FL{reencodeISO D}forall}{4 1 FL length 1 sub{FL E get reencodeISO D}for}ie
241 /Symbol dup dup findfont dup length dict begin
242 {1 index /FID ne{D}{pop pop}ie}forall /Encoding [Encoding aload pop]
243 dup 128 /therefore put D currentdict end definefont D
244
245 /SF {/CS E D SZ SL CS put FO SL FN put /YI CS LH neg mul D dup ST cvs ( ) join
246 CS ST cvs join C1 E join ( NF ) join /C1 E D CS NF /Wf WF FN 0 gt or D
247 /BW Wf{( ) SW pop}{0}ie D}D
248 /NF {/cS E D /cF E D cF 0 ge{FL cF get}{cF -1 eq{/Symbol}{/MySymbol}ie}ie
249 findfont cS scalefont setfont} D
250 /FS {CF or /CF E D FR SL CF put CF CF 0 ge{FN 4 mul add}if E SF} D
251 /PC {SH /BP f D fin not GL not and{NL}if /HM t D /LL LS D} D
252 /BS {/TX E D Wf{/fin f D /CW 0 D /LK 0 D /SC 0 D
253 /RT TX D {RT ( ) search{/NW E D pop /RT E D /WH NW SW pop D CW WH add LL gt
254 {TX SC LK SC sub 1 sub NN GI GL{SH cF cS OC
255 2 copy cS ne E cF ne or{NF}{pop pop}ie}{PC /CW WH BW add D}ie
256 /SC LK D}
257 {GL{JC}if
258 /CW CW WH add BW add D /HM t D}ie /GL f D /Ph f D
259 /LK LK NW length 1 add add D}{pop exit}ie}loop
260 /fin t D TX SC LK SC sub GI SH RT () ne{GL not{CC}if}if
261 /LC TX length D /WH RT SW pop D CW WH add Hy{HC SW pop add}if LL gt
262 {RT GL{SH cF cS OC 2 copy cS ne E cF ne or{NF}{pop pop}ie
263 Hy{/Ph t D}if /LL LS D}{NL /LL LS D SH}ie}
264 {RT PC Hy{CC}if /Ph Ph Hy or D}ie RT () ne{/GL t D /HM t D}if}
265 {TX SW pop LL le{TX SH}{/NW () D 0 2 TX length 1 sub
266 {/CW E D TX 0 CW GI dup SW pop LL gt{pop NW SH /HM t D NL/LL W XO sub MR sub D
267 /CW CW 2 sub NN D /TX TX CW TX length CW sub GI D TX BS exit}
268 {/NW E D}ie}for}ie}ie /HM t D}D
269 /CC {C0 length 0 gt{JC}if /C0 [C1 L1 YA YB Mf NS NB TB AF Bw] D
270 /C1 () D /L0 L1 D /YA 0 D /YB 0 D /Mf 0 D /NS 0 D /NB 0 D}D
271 /JC {C0 aload length 0 gt{pop pop pop NB add /NB E D NS add /NS E D
272 dup Mf gt{/Mf E D}{pop}ie dup YB gt{/YB E D}{pop}ie
273 dup YA gt{/YA E D}{pop}ie pop C1 join /C1 E D /C0 [] D}if}D
274 /OC {C0 length 0 gt{C1 L1 L0 sub YA YB Mf NS NB TB AF Bw GL C0 aload pop
275 /Bw E D /AF E D /TB E D /NB E D /NS E D /Mf E D /YB E D /YA E D /C0 [] D
276 /L1 E D /C1 E D Ph{HC SH}if NL /GL E D /Bw E D /AF E D /TB E D /NB E D /NS E D
277 /Mf E D /YB E D /YA E D /L1 E D /LL W L1 sub XO sub MR sub WH sub D /CW 0 D
278 C1 E join /C1 E D}if}D
279 /BT {/LB t D dup length string copy RS dup dup () ne E ( ) ne and
280 {/CI 0 D /LS LL D /LL W L1 sub XO sub MR sub D BS}
281 {dup ( ) eq{/GL f D}if dup () eq L1 0 eq or{pop}{SH /BP f D /Ph f D}ie}ie
282 /LB f D} D
283 /BL {CP E pop XO E M} D
284 /NL {JC /GL f D /SK W XO sub MR sub L1 sub TB{Bw add}if D
285 /YA LF{Mf HM Fl not and PF or{LH mul}if}{0 /LF t D}ie YA 2 copy lt{E}if pop D
286 C1 () ne{/FB YB Mf SA{Sf mul}if 4 div 2 copy lt{E}if pop D}if Fl{/Ya YA D}if
287 CP E pop YA sub YB sub LE neg lt Fl not and PB not and{NP}if NT TL BL
288 OU PF not and PB or{/RE L1 TB{Bw sub}if
289 W XO sub MR sub div YA YB add LE BO add div 2 copy lt{E}if pop D
290 RE 1 gt{BL 1 RE div dup scale}if}if
291 AT 2 le{SK AT mul 2 div YA neg R}if
292 AT 3 eq{0 YA neg R TB{/NB NB 1 sub D /NS NS 1 sub D}if /NB NB 1 sub NN D
293 /A3 NS 6 mul NB add D NS NB add 0 eq
294 {/A1 0 D /A2 0 D}
295 {NS 0 eq{/A1 SK NB div dup J gt{pop 0}if D /A2 0 D}{J A3 mul SK lt
296 {/A1 J D /A2 SK J NB mul sub NS div dup Ab gt{/A1 0 D pop 0}if D}
297 {/A1 SK A3 div D /A2 A1 6 mul D}ie}ie}ie /A1 A1 NN D /A2 A2 NN D}if
298 AT 4 eq{0 YA neg R PH 2 le{PD 0 lt{/PD L1 D}if PD M1 gt{/M1 PD D}if
299 L1 PD sub M2 gt{/M2 L1 PD sub D}if}{DV ID 1 sub get 0 ge{Lo 0 R}if}ie}if
300 F0 cF ne Cs cS ne or{F0 Cs NF}if
301 /ms Ms D /Ms f D CP FB sub
302 C1 cvx exec XO EO sub L1 add TB{BW sub}if dup LM gt{/LM E D}{pop}ie
303 PH 0 eq PH 4 eq or Ms and{HF not{/PO t D /AH t D}if
304 BB CP YA add E AT 3 eq LB and{A1 sub}if TB{BW sub}if E BB}
305 {pop pop}ie Ms HM PH 3 eq and or{/BP f D /Fl f D}if
306 /Lo 0 D /L1 0 D /F0 cF D /Cs cS D BP not{0 YB NN neg R}if
307 OU f1 and mF not and{k2 /f1 f D}if
308 OU PF not and PB or{RE 1 gt{RE dup scale}if}if /Ms ms Ms or D
309 /C1 AF{(Cp )}{()}ie D /YA 0 D /YB 0 D BL
310 AT 4 eq LB not and PH 3 ge and
311 {ID DV length lt{DV ID get dup 0 ge{DO E sub /Lo E D /L1 Lo D}{pop}ie
312 /ID ID 1 add D}if}if /T t D CD{/LN LN 1 add D PD}if
313 /PD -1 D /NS 0 D /NB 0 D /TB f D /Ph f D /Mf 0 D /HM f D} D
314 /RS {/TM E D /CN 0 D TM{10 eq{TM CN ( ) PI}if /CN CN 1 add D}forall
315 /CN 0 D /BK HM EN and{0}{1}ie D TM
316 {dup 32 ne{TM CN 3 2 roll put /CN CN 1 add D /BK 0 D}
317 {pop BK 0 eq{TM CN 32 put /CN CN 1 add D}if /BK 1 D}ie}forall
318 TM 0 CN GI dup dup () ne E ( ) ne and
319 {dup CN 1 sub get 32 eq{/EN f D}{/EN t D}ie}if} D
320 /join {2 copy length E length add string dup 4 2 roll 2 index 0 3 index
321 PI E length E PI}d
322 /WR {(\n) search{dup () ne BP not or
323 {Li 4 le CP E pop YI Li mul add LE add 0 lt and PL 0 eq and{NP}if
324 SH NL pop /Li Li 1 sub D WR}{pop pop WR}ie}{SH}ie /CI 0 D /BP f D} D
325 /SH {dup dup () ne E ( ) ne and PF or CS Mf gt and{/Mf CS D}if
326 T not Wf and{( ) E join /T t D}if dup BP{/MF CS D}if
327 AT 3 eq{2 copy length dup 0 gt{/NB E NB add D
328 {( ) search{/NS NS 1 add D pop pop}{pop exit}ie}loop}{pop pop}ie}if
329 CD PD 0 lt and{dup DC search{SW pop /PD E L1 add D pop pop}{pop}ie}if
330 0 Np dup SW pop L1 add /L1 E D dup () ne
331 {C1 (\() join E join (\)) join AU AF and UF or Wf and{( U ) join}if
332 sF{( s ) join}if ( S ) join
333 /C1 E D dup length 1 sub get 32 eq /TB E D /Bw BW D}{pop pop}ie} D
334 /BG {AI LG BC add add 0 eq} D
335 /ON {OU{Ty AR AI NN get dup 1 add Ln Ns Ty 2 mod 0 eq{(. )}{(\) )}ie join
336 dup SW pop neg 0 R CP E 0 lt{0 E M}{pop}ie CP BB show /Ms t D}if} D
337 /Ln {AR AI 3 -1 roll put}D
338 /SP {dup CI lt BP not and{dup CI sub 0 E R /CI E D}{pop}ie} D
339 /BN {PF{WR /HM f D}{BT NL}ie} D
340 /NN {dup 0 lt{pop 0}if} D
341 /h {(h) HI ST cvs join cvx exec dup 1 get E Nf{0 get E join}{pop}ie} D
342 /H {/fn FN D /Hi E 1 add D 1 sub /HL E D /H2 HL 2 add D /GS EZ H2 get D
343 E Tm H2 get GS mul BE dup 0 gt{1 sub}{pop EG H2 get dup 0 lt{pop AT}if}ie NA
344 WW Np /SL SL 1 add D /FN EF H2 get D GS Ey H2 get FS
345 EU H2 get Sc Hs not HL Hl lt and Hs HL hl lt and or Hi 0 eq or
346 {/HI Hi D /Hs t D /hl HL D /Hv HL D}if HL Hl lt{/hi Hi D}if
347 Nf HI 0 gt and{(h) Hi ST cvs join cvx exec 0 get WB}if
348 /HF t D /AH f D /PO f D} D
349 /EH {Bm H2 get GS mul BE OA /SL SL 1 sub NN D /CF 0 D /FN fn D
350 SZ SL get FR SL get FS /HF f D /GS Ts D ()Ec} D
351 /P {E PF{WR}{PO{EP}{BN}ie Ts 4 mul Np AE not{Tm 0 get Ts mul neg SP}if
352 dup 0 ge AH and{Pi Pd}if}ie 1 sub dup 0 lt{pop AV AL get}if /AT E D /PO t D} D
353 /EP {PF{WR}{BN Ts 4 mul Np}ie AE not{Bm 0 get Ts mul neg SP}if
354 /AT AV AL get D /PO f D} D
355 /BE {E PO{EP}{BN}ie Ts 4 mul Np neg SP} D
356 /HR {/Aw W EO sub D /RW E dup 0 gt{Aw mul}{neg}ie dup Aw gt{pop Aw}if D /RZ E D
357 E BN Ts neg SP 1 sub 2 div Aw RW sub mul EO add CP E pop M PF{0 Ps neg R}if
358 0 Np OU{gsave RZ LW Cf{Hc VC}{0 Sg}ie CP BB RW 0 RL CP BB stroke grestore}if
359 /CI 0 D /BP f D PF not{Ts neg SP}if /Ms t D} D
360 /AD {I NL EG 14 get dup 0 lt{pop AT}if NA /AE t D Tm 14 get Ts mul neg SP
361 Cf{EU 14 get dup -1 eq{pop CA CL get}if Sc}if} D
362 /DA {BN ()ES OA /AE f D ()Ec Bm 14 get Ts mul neg SP} D
363 /PR {/MW E D /Li E D Tm 1 get Ps mul BE 0 NA /FN Fp D /PF t D SI /SL SL 1 add D
364 /CF 0 D Ps CS mul Ts div MW WC mul CS mul Ts div dup LL gt PL 0 eq and
365 {LL div div}{pop}ie Ey 1 get FS CP E pop LE add YI neg div cvi dup Li lt
366 AH and{4 lt YI Li mul 5 mul LE add 0 gt or PL 0 eq and{NP}if}{pop}ie
367 EU 1 get Sc /GS Ps D}D
368 /RP {WR NL () /PF f D SI /FN 0 D ES Bm 1 get Ps mul neg SP OA /GS Ts D} D
369 /SI {/XO Lm 15 get BC NN mul Lm 16 get AI UI sub NN mul add
370 Lm 17 get UI NN mul add Lm 20 get LG NN mul add Ts mul
371 PF{Lm 1 get Ps mul add}if EO add D
372 /MR Rm 15 get BC NN mul Rm 16 get AI UI sub NN mul add
373 Rm 17 get UI NN mul add Rm 20 get LG NN mul add Ts mul
374 PF{Rm 1 get Ps mul add}if D /LL W XO sub MR sub D} D
375 /DT {/cC E D BN /LG LG 1 sub D SI /LG LG 1 add D WW 2 div Np BL} D
376 /DD {WB Cc 0 eq cC 0 eq and L1 0 eq or Lm 20 get Ts mul L1 sub TB{BW add}if
377 Ts 2 div lt or NL /LF E D SI BL /cC 0 D} D
378 /DL {Dc LG Cc put /Cc E D BG{Tm 18 get Ts mul BE}{BN}ie /LG LG 1 add D BL} D
379 /LD {BN LG 0 gt{/LG LG 1 sub D}if /Cc Dc LG get D SI
380 BG{()Bm 18 get Ts mul BE}if BL} D
381 /UL {BG{Tm 17 get Ts mul BE}{BN}ie NR AI NN 0 put /UI UI 1 add D
382 /AI AI 1 add D SI BL} D
383 /LU {BN /UI UI 1 sub D /AI AI 1 sub D SI BG{()Bm 17 get Ts mul BE}if BL} D
384 /OL {E BG{Tm 16 get Ts mul BE}{BN}ie TR AI NN Ty put /Ty E D NR AI NN 1 put
385 /AI AI 1 add D SI BL 1 Ln} D
386 /LO {BN /AI AI 1 sub D /Ty TR AI get D SI BG{()Bm 16 get Ts mul BE}if BL} D
387 /LI {E BN -1 SP /BP f D /CI 0 D 0 Np NR AI 1 sub NN get 1 eq
388 {dup dup 0 gt E 4 le and{/Ty E D}{pop}ie
389 /L1 L1 Ty AR AI NN get Ns SW pop XO sub dup 0 lt{pop 0}if add D ( ON )}
390 {pop ( B )}ie C1 E join /C1 E D CS Mf gt{/Mf CS D}if BL} D
391 /BQ {Tm 15 get Ts mul BE /BC BC 1 add D SI BL} D
392 /QB {Bm 15 get Ts mul BE /BC BC 1 sub D SI BL} D
393 /Al {E EP 1 sub dup 0 lt{pop AV AL get}if NA} D
394 /Ea {EP OA} D
395 /WB {PF{WR}{BT}ie} D
396 /F1 {WB /FN 0 D CS 0 FS} D
397 /F2 {WB /FN WI D CS 0 FS} D
398 /HY {/Hy t D WB /Hy f D} D
399 /YH {WB} D
400 /A {/LT E D LT 1 eq{/RN E D}if /Lh E D WB /C1 C1 ( Cp ) join D
401 Lc AF not and{Cl Sc}if /AF t D} D
402 /EA {Lc AF and{Ec}{WB}ie TL Pa AF and Lh 0 ne and
403 {( \() Lh join (\)) join /AF f D WB}if /AF f D} D
404 /TL {C1 ( Tl ) apa /C1 E D} d
405 /apa {AF OU and Lh 0 ne LT 1 eq or and{LT 1 eq{RN ( /) E ST cvs join}
406 {(\() Lh join (\)) join}ie E join join}{pop}ie} d
407 /Cp {/Xc CP /Yc E D D} D
408 /SS {Cf{dup 0 ge{EU E get dup -1 eq{pop CA CL get}if}{pop CA CL get}ie Sc}
409 {pop}ie SZ SL get /SL SL 1 add D} D
410 /I {WB 8 SS 1 FS} D
411 /EM {WB 8 SS /CF CF 1 xor D 0 FS} D
412 /BD {WB 9 SS 2 FS} D
413 /TT {WB 10 SS /FN Fp D 0 FS} D
414 /KB {WB 11 SS /FN Fp D 2 FS} D
415 /CT {WB 12 SS 1 FS} D
416 /SM {WB 13 SS /FN Fp D 0 FS} D
417 /Q {/QL QL 1 add D QO QL 2 mod get La get join WB} D
418 /EQ {QC QL 2 mod get La get join WB /QL QL 1 sub D} D
419 /RO {WB -1 SS /CF 0 D 0 FS} D
420 /SY {WB -1 SS -1 FS} D
421 /MY {WB -1 SS -2 FS} D
422 /ES {WB /SL SL 1 sub NN D /CF 0 D /FN FO SL get D SZ SL get FR SL get FS ()Ec}D
423 /FZ {3 sub 1.2 E exp GS mul E WB TL /C1 C1 ( Cp ) join D /SL SL 1 add D 0 FS} D
424 /Ef {WB TL ()ES /C1 C1 ( Cp ) join D} D
425 /BZ {dup /Bf E D FZ}D
426 /Sc {dup -1 ne Cf and{/CL CL 1 add D dup 0 eq{pop [0 0 0]}if
427 dup CA E CL E put VS ( VC ) join C1 E join /C1 E D}{pop}ie} D
428 /Ec {WB Cf{/CL CL 1 sub NN D CA CL get VS ( VC ) join C1 E join /C1 E D}if} D
429 /VS {dup type /arraytype eq{([) E {ST cvs join ( ) join}forall (]) join}if} D
430 /VC {{255 div}forall setrgbcolor} D
431 /Sl {dup type /integertype ne{Ds}if /La E D WB}d
432 /UN {WB /UF t D} D
433 /NU {WB /UF f D} D
434 /SE {WB /sF t D} D
435 /XE {WB /sF f D} D
436 /sM {/C1 C1 ( k1 ) join D}d
437 /eM {/C1 C1 ( k2 ) join D}d
438 /k1 {/YC CP E pop Ts add D /mF t D /f1 t D}d
439 /k2 {gsave 3 LW -9 CP E pop Ts 0.2 mul sub M -9 YC L stroke grestore /mF f D}d
440 /Ac {/AC E D WB}d
441 /Ca {eA{( \()join AC join(\) )join}if WB}d
442 /s {OU{gsave 0 CS .25 mul R dup SW pop CJ 0 RL stroke grestore}if}D
443 /CJ {AT 3 eq LB and{E dup dup length 1 sub A1 mul E
444 {( ) search{pop pop E A2 add E}{pop exit}ie}loop 3 -1 roll add
445 W CP pop sub 2 copy gt{E}if pop}if}D
446 /So {/Co E D} D
447 /SO {C1 Yo ST cvs join ( So ) join /C1 E D (j) SW pop 2 div Pd} D
448 /Se {E WB CS E div Pd}D
449 /Pd {dup type /stringtype eq{SW pop}if dup /L1 E L1 add D
450 ST cvs ( 0 R ) join C1 E join /C1 E D} D
451 /Sp {0.35 CO} D
452 /Sb {-0.2 CO} D
453 /CO {OV Io Yo put /Yo E CS mul Yo add D /Io Io 1 add D -1.5 Io mul 3 add FZ SO
454 CS Yo add dup YA gt{/YA E D}{pop}ie
455 Yo neg dup YB gt{/YB E D}{pop}ie} D
456 /Es {ES /Io Io 1 sub NN D /Yo OV Io get D SO} D
457 /SB {/N2 0 D 0 1 NI{/N E D{IX N2 get 0 lt{/N2 N2 1 add D}{exit}ie}loop
458 /K WS N get FC N get mul D /NY AY N2 get D /BV NY array D
459 0 1 NY 1 sub{/TM K string D currentfile TM readhexstring pop pop BV E TM put}
460 for BM N BV put /N2 N2 1 add D}for} D
461 /IC [{/MA E D /MB 0 D}{2 div /MA E D /MB MA D}{/MB E CS sub D /MA CS D}
462 {pop /MA YS AB mul D /MB 1 AB sub YS mul D}{pop /MA 0 D /MB 0 D}] D
463 /IP {BV N get /N N 1 add D} D
464 /II {/K E D IX K get 0 lt{/EC E D}if /TY E D
465 TY 4 eq{/Y E D /X E D}if TY 3 eq{/AB E D}if
466 /XW AX K get D /YW AY K get D /IS SG IT K get get D /XS XW IS mul D
467 /YS YW IS mul D YS IC TY get exec /MA MA Fl not{3 add}if D} D
468 /IM {II /ty TY D /xs XS D /ys YS D /ya YA D /yb YB D /ma MA D /mb MB D /k K D
469 /ec EC D /BP f D /CI 0 D WB TL L1 xs add dup XO add MR add W gt
470 {pop /ma ma Fl{3 add}if D NL /YA ma D /YB mb D /YS ys D /L1 xs D}
471 {/L1 E D ma YA gt{/YA ma D}if mb YB gt{/YB mb D}if}ie /TB f D
472 OU{CP E pop YS sub LE neg lt Fl not and PB not and{NP /YA ma D /YB mb D}if
473 /BP f D ty ST cvs ( ) join IX k get 0 lt{(\() join ec join (\) ) join}if
474 k ST cvs join ty 3 eq{AB ST cvs ( ) join E join}if
475 ty 4 eq{X ST cvs ( ) join Y ST cvs join ( ) join E join}if C1 E join
476 ( DI ) join FP 2 eq FP 1 eq AF and or{( FM ) join}if
477 ( Il Cp ) apa /C1 E D /EN f D}if /HM t D /T f D} D
478 /DI {II /Xc CP /Yc E D D /YN YW neg D /HM t D /CI 0 D /K2 IX K get D gsave
479 TY 4 eq{OX X IS mul add OY FY add YS sub Y IS mul sub}
480 {/FY YS D CP MB sub 2 copy /OY E D /OX E D}ie
481 translate K2 0 ge{/DP AZ K2 get D /BV BM K2 get D XS YS scale /N 0 D XW YW DP
482 [XW 0 0 YN 0 YW] {IP} FC K2 get 1 eq{image}{f 3 colorimage}ie}
483 {EX}ie grestore XS 0 R /Ms t D} D
484 /FM {gsave 0 Sg CP MB sub translate XS neg 0 M 0 YS RL XS 0 RL 0 YS neg RL
485 XS neg 0 RL stroke grestore} D
486 /NA {/AT E D /AL AL 1 add D AV AL AT put} D
487 /OA {AL 0 gt{/AL AL 1 sub D /AT AV AL get D}if} D
488 /D1 {/BR {CP E pop E BN Mb{CP E pop eq{0 YI R}if}{pop}ie} D
489 /Sn {OU{C1 E ST cvs join ( Ld ) join /C1 E D}{pop}ie} D} D
490 /D1 {/BR {BN} D /Sn {OU {C1 E ST cvs join ( Ld ) join /C1 E D} {pop} ie} D} D
491 /TC {/TF t D /ML 0 D HN{SW pop dup ML gt{/ML E D}{pop}ie}forall NP /RM RM not D
492 RC /OU Tc D Ep /PN 0 D Ms not TP and{Ip}if /W IW ML sub Ts sub D
493 /A0 0 D TH{/BR {( ) join BT} D /Sn {pop} D /Au () D}if} D
494 /TN {0 eq{E EA PF HF or not XR and{HN E get Xr}{pop}ie}
495 {OU{Tn 0 ge{() BN}if /Tn E D}{pop}ie WB}ie} D
496 /NT {OU LB not and Tn 0 ge and{PL 0 eq{Ms not{CS CF FS}if CP dup
497 /y E YA sub D W 9 sub CS -1.8 mul XO L1 add 2 add{y M (.) show}for
498 HN Tn get dup SW pop IW E sub y M show CP BB M}if /Tn -1 D}if} D
499 /Ld {/DN E D HN DN Pn put [/View [/XYZ -4 Fl{PS}{CP YA add US E pop}ie null]
500 /Dest DN ST cvs cvn /DEST pdfmark} D
501 /C {ND 1 eq{1 sub}if TI mul /XO E D NL Nf not{pop()}if 0 3 -1 roll 1 A} D
502 /OP {BP not{NP}if PN 2 mod 0 eq{/Ms t D NP}if}D
503 /Ep {Xp PN 2 mod 0 eq and OU and{/Pn (-) D showpage /PM 1 D LA}if}D
504 /Dg [73 86 88 76 67 68 77] D
505 /Rd [0 [1 1 0][2 1 0][3 1 0][2 1 1][1 1 1][2 2 1][3 3 1][4 4 1][2 1 2]] D
506 /Ns {/m E D /c E 32 mul D /j m 1000 idiv D /p j 12 add string D
507 c 96 le m 0 gt and{c 32 le {/i 0 D /d 77 D /l 100 D /m m j 1000 mul sub D
508 j -1 1 {pop p i d c add put /i i 1 add D}for
509 4 -2 0 {/j E D /n m l idiv D /m m n l mul sub D /d Dg j get D
510 n 0 gt {/x Rd n get D x 0 get -1 1 {pop p i d c add put /i i 1 add D}for
511 p i x 1 get sub Dg x 2 get j add get c add put}if /l l 10 idiv D
512 }for p 0 i GI}
513 {/i ST length 1 sub D m {1 sub dup 0 ge{dup 26 mod c add 1 add
514 ST i 3 -1 roll put 26 idiv dup 0 eq{pop exit}if}if /i i 1 sub D}loop
515 ST i ST length i sub GI}ie}
516 {m p cvs}ie} D
517 /US {matrix currentmatrix matrix defaultmatrix matrix invertmatrix
518 matrix concatmatrix transform} D
519 /GB {Gb{US}if}D
520 /Tl {/Rn E D Xc CP pop ne{
521 [/Rect [Xc 1 sub Yc cS 0.25 mul sub GB CP E 1 add E cS 0.85 mul add GB]
522 /Subtype /Link /Border [0 0 Cf Lc and LX and AU or{0}{1}ie] Rn type
523 /nametype eq {/Dest Rn}{/Action [/Subtype /URI /URI Rn] Cd}ie
524 /ANN pdfmark}if} D
525 /Il {/Rn E D [/Rect [Xc Yc GB Xc XS add Yc YS add GB] /Subtype /Link
526 /Border [0 0 0] Rn type /nametype eq{/Dest Rn}
527 {/Action [/Subtype /URI /URI Rn] Cd}ie /ANN pdfmark} D
528 /XP {[{/Z Bz 2 div D Z 0 R Z Z RL Z neg Z RL Z neg Z neg RL Z Z neg RL
529 Fi cH 1 eq and{fill}if} {Bz 0 RL 0 Bz RL Bz neg 0 RL 0 Bz neg RL
530 Fi cH 1 eq and{fill}if} {0 -5 R Bz 0 RL 0 21 RL Bz neg 0 RL 0 -21 RL}]} D
531 /MS {/Sm E D WB}D
532 /O {BN()Sm BX} D
533 /O {BN()0 Sm BX} D
534 /BX {/Bt E D Bt 2 lt{/Ch E D CS 0.8 mul}{11 mul}ie W XO sub MR sub
535 2 copy gt{E}if pop /HZ E D Bt 2 eq{Fi not{pop()}if ( )E join /Ft E D TT
536 /PF t D /MW 1 D /Li 1 D /Fw Ft SW pop D Fw HZ gt{/HZ Fw 8 add D}if
537 HZ ST cvs( )join}{WB Ch ST cvs( )join}ie L1 HZ add XO add MR add W gt{NL}if
538 Bt 2 eq{Ft ES Fw neg HM{CS sub}if Pd}if Bt ST cvs join( Bx )join
539 Bt 2 eq HM and{CS Pd}if C1 E join /C1 E D /L1 L1 HZ add D /T f D
540 ( ) Pd /PF f D Bt 2 lt{YA CS .8 mul lt{/YA CS .8 mul D}if}
541 {YB 5 lt{/YB 5 D}if YA 21 lt{/YA 21 D}if}ie /CI 0 D} D
542 /Bx {dup 2 eq{E /Bz E D}{E /cH E D /Bz CS .8 mul D}ie
543 OU {gsave 0 Sg XP E get exec stroke grestore}{pop}ie Bz 0 R /Ms t D}D
544 /SD {FD 4 mul Dy add DZ NF newpath 0 0 M DX t charpath pathbbox
545 3 -1 roll sub /DY E D E dup /X1 E D sub WM mul WX DY mul add WM DG mul E div
546 /DF E D /DR WX DF mul DY mul WM div 2 div D} d
547 /Sd {gsave 0 IL Di mul neg translate IL IW atan Di 0 eq{neg}if rotate
548 FD 4 mul Dy add DZ NF DR X1 sub DY 2 div neg M cD VC DX show grestore} d
549 /Pt {/tp t D Tp{NP /Pn (TP) D 0 Tt neg R Th BN NP Ep ET RC ZF}if /tp f D} D
550 /RC {/AI 0 D /LG 0 D /BC 0 D /UI 0 D /PF f D /Cc 0 D /cC 0 D /Dc 10 array D
551 /NR [0 1 9{pop 0}for] D /La Ds D /AR 10 array D /TR 10 array D /AV 30 array D
552 SI /AL -1 D /AT A0 D AT NA /OV 9 array D /Yo 0 D /Co 0 D /Io 0 D /Hy f D
553 /Ph f D /CL -1 D Ct Sc}D
554 /ZF {/FR [0 1 30{pop 0}for] D /SZ [0 1 30{pop 0}for] D /FO [0 1 30{pop 0}for] D
555 /SL 0 D /CF 0 D /FN 0 D 0 Ts SF}D
556 /QO [[(\234)(\233)(\253\240)(\232)(\273)(\253)][(')(`)(\253\240)(\231)(\273)(\253)]] D
557 /QC [[(\234)(\234)(\240\273)(\233)(\253)(\273)][(')(')(\240\273)(`)(\253)(\273)]] D
558 /Hf EF length 2 sub D
559 /Hz EZ Hf get D
560 /HS Ey Hf get D
561 /Fz EZ Hf 1 add get D
562 /Fs Ey Hf 1 add get D
563 /LE IL D
564 /Ps EZ 1 get D
565 /Fp EF 1 get D
566 /XO 0 D
567 /YI 0 D
568 /CI 0 D
569 /FP 0 D
570 /WW Ts 7 mul D
571 /Mf 0 D
572 /YA 0 D
573 /YB 0 D
574 /Cs Ts D
575 /GS Ts D
576 /F0 0 D
577 /NS 0 D
578 /NB 0 D
579 /N 0 D
580 /C0 [] D
581 /C1 () D
582 /Lo 0 D
583 /L1 0 D
584 /LM 0 D
585 /PH 0 D
586 /EC 0 D
587 /Lh 0 D
588 /LT 0 D
589 /CH 1 string D
590 /ST 16 string D
591 /CA 9 array D
592 /HC (\255) D
593 /HM f D
594 /PF f D
595 /EN f D
596 /TB f D
597 /UF f D
598 /sF f D
599 /AE f D
600 /AF f D
601 /BP t D
602 /CD f D
603 /PA t D
604 /GL f D
605 /T t D
606 /HF f D
607 /AH f D
608 /SA f D
609 /PB f D
610 /f1 f D
611 /mF f D
612 /OX 0 D
613 /OY 0 D
614 /FY 0 D
615 /EO 0 D
616 /FB 0 D
617 /PL 0 D
618 /Bw 0 D
619 /PD -1 D
620 /TP f D
621 /tp f D
622 /TH f D
623 /Ty 4 D
624 /Tn -1 D
625 /Fl t D
626 /LB t D
627 /PM 1 D
628 /Ms f D
629 /Ba f D
630 /Bb f D
631 /Hl 3 D
632 /hl 6 D
633 /Hv 6 D
634 /Hs f D
635 /HI 0 D
636 /hi 0 D
637 /PO t D
638 /TE f D
639 /LF t D
640 /BO 0 D
641 /Sm 1 D
642 /Bf 3 D
643 /A1 0 D
644 /A2 0 D
645 /Ds 1 D
646 /QL -1 D
647 /Cb Db D
648 /Ct Dt D
649 /Cl Dl D
650 [/Creator (html2ps version 1.0 beta5) /Author () /Keywords () /Subject ()
651 /Title (The XPA Help Facility) /DOCINFO pdfmark
652 /ND 22 D
653 /HN [(1) (1) (1) (3) (5) (8) (10) (14) (15) (16) (15) (16) (17) (19) (22) (25)
654 (26) (29) (30) (30) (31) (32) (32) (33) (34) (34) (35) (37) (38) (46) (46)
655 (39) (40) (42) (43) (44) (47) (48) (50) (51) (55) (61) (63) (75) (76) (77)
656 (80) (1) (1) (1) (2) (1) (??) (??) (1) (1) (1) (2) (3) (3) (3) (3) (4) (5)
657 (5) (5) (5) (7) (8) (8) (8) (8) (9) (10) (10) (10) (10) (10) (11) (12) (13)
658 (14) (14) (14) (14) (14) (15) (15) (15) (16) (16) (17) (18) (19) (19) (19)
659 (19) (20) (21) (22) (22) (22) (24) (25) (25) (33) (25) (25) (25) (25) (26)
660 (29) (30) (30) (31) (32) (32) (33) (33) (34) (34) (35) (36) (37) (37) (37)
661 (37) (37) (38) (38) (38) (38) (38) (38) (39) (40) (42) (43) (44) (46) (46)
662 (47) (48) (49) (50) (50) (50) (50) (50) (51) (53) (51) (51) (51) (51) (51)
663 (52) (53) (54) (55) (55) (55) (55) (60) (61) (61) (61) (61) (62) (63) (63)
664 (63) (63) (63) (63) (64) (64) (64) (65) (65) (66) (67) (67) (67) (68) (68)
665 (68) (68) (69) (69) (69) (70) (70) (70) (70) (70) (71) (71) (71) (71) (72)
666 (72) (73) (73) (73) (74) (74) (74) (74) (75) (75) (75) (75) (75) (76) (76)
667 (76) (76) (76) (77) (77) (77) (77) (79) (80) (80) (80) (80) (80)] D
668 /h0 [()(Table of Contents)] D
669 /h1 [(0.1\240\240)(XPA: Public Access to Data and Algorithms)] D
670 /h2 [(0.2\240\240)(Summary)] D
671 /h3 [(0.3\240\240)(Description)] D
672 /h4 [(0.3.0.0.1\240\240)(Last updated: September 10, 2003)] D
673 /h5 [(0.4\240\240)(XPAIntro: Introduction to the XPA Messaging System)] D
674 /h6 [(0.5\240\240)(Summary)] D
675 /h7 [(0.6\240\240)(Description)] D
676 /h8 [(0.6.0.0.1\240\240)(Last updated: March 10, 2007)] D
677 /h9 [(0.7\240\240)(XPATemplate: Access Point Names and Templates)] D
678 /h10 [(0.8\240\240)(Summary)] D
679 /h11 [(0.9\240\240)(Description)] D
680 /h12 [(0.9.0.0.1\240\240)(Last updated: September 10, 2003)] D
681 /h13 [(0.10\240\240)(XPACommon: Getting Common Information About Access Points)] D
682 /h14 [(0.11\240\240)(Summary)] D
683 /h15 [(0.12\240\240)(Description)] D
684 /h16 [(0.12.0.0.1\240\240)(Last updated: September 10, 2003)] D
685 /h17 [(0.13\240\240)(XPAMethod: XPA Communication Methods)] D
686 /h18 [(0.14\240\240)(Summary)] D
687 /h19 [(0.15\240\240)(Description)] D
688 /h20 [(0.15.0.0.1\240\240)(Last updated: September 10, 2003)] D
689 /h21 [(0.16\240\240)(XPAInet: XPA Communication Between Hosts)] D
690 /h22 [(0.17\240\240)(Summary)] D
691 /h23 [(0.18\240\240)(Description)] D
692 /h24 [(0.19\240\240)(Manual Registration)] D
693 /h25 [(0.20\240\240)(Remote Registration)] D
694 /h26 [(0.21\240\240)(XPANS Proxy Registration)] D
695 /h27 [(0.21.0.0.1\240\240)(Last updated: September 10, 2003)] D
696 /h28 [(0.22\240\240)(XPAUsers: Distinguishing Users)] D
697 /h29 [(0.23\240\240)(Summary)] D
698 /h30 [(0.24\240\240)(Description)] D
699 /h31 [(0.24.0.0.1\240\240)(Last updated: September 10, 2003)] D
700 /h32 [(0.25\240\240)(XPA Programs)] D
701 /h33 [(0.26\240\240)(Summary)] D
702 /h34 [(0.27\240\240)(xpaset: send data to one or more XPA servers)] D
703 /h35 [(0.28\240\240)(xpaget: retrieve data from one or more XPA servers)] D
704 /h36 [(0.29\240\240)(xpainfo: send short message to one or more XPA servers)] D
705 /h37 [(0.30\240\240)(xpaaccess: see if template matches registered XPA access points)] D
706 /h38 [(0.30.0.0.1\240\240)(Last updated: September 10, 2003)] D
707 /h39 [(0.31\240\240)(xpamb: the XPA Message Bus)] D
708 /h40 [(0.32\240\240)(Summary)] D
709 /h41 [(0.33\240\240)(Description)] D
710 /h42 [(0.34\240\240)(Options)] D
711 /h43 [(0.34.0.0.1\240\240)(Last updated: September 10, 2003)] D
712 /h44 [(0.35\240\240)(xpans: the XPA Name Server)] D
713 /h45 [(0.36\240\240)(Summary)] D
714 /h46 [(0.36.0.0.1\240\240)(Last updated: January 24, 2005)] D
715 /h47 [(0.37\240\240)(XPAServer: The XPA Server-side Programming Interface)] D
716 /h48 [(0.38\240\240)(Summary)] D
717 /h49 [(0.39\240\240)(Introduction to XPA Server Programming)] D
718 /h50 [(0.40\240\240)(Introduction)] D
719 /h51 [(0.41\240\240)(XPANew: create a new XPA access point)] D
720 /h52 [(0.42\240\240)(XPACmdNew: create a new XPA public access point for commands)] D
721 /h53 [(0.43\240\240)(XPACmdAdd: add a command to an XPA command public access point)] D
722 /h54 [(0.44\240\240)(XPACmdDel: remove a command from an XPA command public access point)] D
723 /h55 [(0.45\240\240)(XPAInfoNew: define an XPA info public access point)] D
724 /h56 [(0.46\240\240)(XPAFree: remove an XPA public access point)] D
725 /h57 [(0.47\240\240)(XPAMainLoop: optional main loop for XPA)] D
726 /h58 [(0.48\240\240)(XPAPoll: execute existing XPA requests)] D
727 /h59 [(0.49\240\240)(XPAAtExit: install exit handler)] D
728 /h60 [(0.50\240\240)(XPACleanup: release reserved XPA memory)] D
729 /h61 [(0.51\240\240)(XPA Server Callback Macros)] D
730 /h62 [(0.52\240\240)(XPA Race Conditions)] D
731 /h63 [(0.52.0.0.1\240\240)(Last updated: September 10, 2003)] D
732 /h64 [(0.53\240\240)(Xpaoom: What happens when XPA runs out of memory?)] D
733 /h65 [(0.54\240\240)(Summary)] D
734 /h66 [(0.55\240\240)(Description)] D
735 /h67 [(0.55.0.0.1\240\240)(Last updated: April 7, 2009)] D
736 /h68 [(0.56\240\240)(XPAClient: The XPA Client-side Programming Interface)] D
737 /h69 [(0.57\240\240)(Summary)] D
738 /h70 [(0.58\240\240)(Introduction to XPA Client Programming)] D
739 /h71 [(0.59\240\240)(Introduction)] D
740 /h72 [(0.60\240\240)(XPAGet: retrieve data from one or more XPA servers)] D
741 /h73 [(0.61\240\240)(XPASet: send data to one or more XPA servers)] D
742 /h74 [(0.62\240\240)(XPAInfo: send short message to one or more XPA servers)] D
743 /h75 [(0.63\240\240)(XPAGetFd: retrieve data from one or more XPA servers and write to files)] D
744 /h76 [(0.64\240\240)(XPASetFd: send data from stdin to one or more XPA servers)] D
745 /h77 [(0.65\240\240)(XPAOpen: allocate a persistent client handle)] D
746 /h78 [(0.66\240\240)(XPAClose: close a persistent XPA client handle)] D
747 /h79 [(0.67\240\240)(XPANSLookup: lookup registered XPA access points)] D
748 /h80 [(0.68\240\240)(XPAAccess: return XPA access points matching template \(XPA 2.1 and above\))] D
749 /h81 [(0.68.0.0.1\240\240)(Last updated: March 10, 2007)] D
750 /h82 [(0.69\240\240)(XPAXt: the XPA Interface to Xt \(X Windows\))] D
751 /h83 [(0.70\240\240)(Summary)] D
752 /h84 [(0.71\240\240)(Description)] D
753 /h85 [(0.71.0.0.1\240\240)(Last updated: September 10, 2003)] D
754 /h86 [(0.72\240\240)(XPATcl: the XPA Interface to the Tcl/Tk Environment)] D
755 /h87 [(0.73\240\240)(Summary)] D
756 /h88 [(0.74\240\240)(Server Routines)] D
757 /h89 [(0.75\240\240)(Client Routines)] D
758 /h90 [(0.76\240\240)(Description)] D
759 /h91 [(0.77\240\240)(XPANew)] D
760 /h92 [(0.78\240\240)(XPARec)] D
761 /h93 [(0.78.0.0.1\240\240)(Last updated: September 10, 2003)] D
762 /h94 [(0.79\240\240)(XPAEnv: Environment Variables for XPA Messaging)] D
763 /h95 [(0.80\240\240)(Summary)] D
764 /h96 [(0.81\240\240)(Description)] D
765 /h97 [(0.81.0.0.1\240\240)(Last updated: December 23, 2009)] D
766 /h98 [(0.82\240\240)(XPAAcl: Access Control for XPA Messaging)] D
767 /h99 [(0.83\240\240)(Summary)] D
768 /h100 [(0.84\240\240)(Description)] D
769 /h101 [(0.84.0.0.1\240\240)(Last updated: September 10, 2003)] D
770 /h102 [(0.85\240\240)(XPA ChangeLog)] D
771 /h103 [(0.86\240\240)(Public Release 2.1.15 \(July 23, 2013\))] D
772 /h104 [(0.87\240\240)(Public Release 2.1.14 \(June 7, 2012\))] D
773 /h105 [(0.88\240\240)(Public Release 2.1.13 \(April 14, 2011\))] D
774 /h106 [(0.89\240\240)(Public Release 2.1.12 \(January 26, 2010\))] D
775 /h107 [(0.90\240\240)(Public Release 2.1.11 \(December 7, 2009\))] D
776 /h108 [(0.91\240\240)(Public Release 2.1.10 \(September 1, 2009\))] D
777 /h109 [(0.92\240\240)(Internal Release 2.1.9)] D
778 /h110 [(0.93\240\240)(Public Release 2.1.8 \(1 November 2007\))] D
779 /h111 [(0.94\240\240)(Patch Release 2.1.7b[1,2] \(Feb 22, 2006; March 8, 2007\))] D
780 /h112 [(0.95\240\240)(Patch Release 2.1.6 \(4 May 2005\))] D
781 /h113 [(0.96\240\240)(Patch Release 2.1.5 \(12 January 2004\))] D
782 /h114 [(0.97\240\240)(Patch Release 2.1.4 \(24 March 2003\))] D
783 /h115 [(0.98\240\240)(Patch Release 2.1.3 \(26 September 2002\))] D
784 /h116 [(0.99\240\240)(Patch Release 2.1.2 \(18 July 2002\))] D
785 /h117 [(0.100\240\240)(Patch Release 2.1.1 \(20 June 2002\))] D
786 /h118 [(0.101\240\240)(Public Release 2.1.0 \(22 April 2002\))] D
787 /h119 [(0.102\240\240)(Pre-Release 2.1.0e \(2 April 2002\))] D
788 /h120 [(0.103\240\240)(Pre-Release 2.1.0e \(1 April 2002\))] D
789 /h121 [(0.104\240\240)(Pre-Release 2.1.0e \(25 March 2002\))] D
790 /h122 [(0.105\240\240)(Pre-Release 2.1.0e \(19 March 2002\))] D
791 /h123 [(0.106\240\240)(Pre-Release 2.1.0e \(14 February 2002\))] D
792 /h124 [(0.107\240\240)(Pre-Release 2.1.0e \(11 February 2002\))] D
793 /h125 [(0.108\240\240)(Beta Release 2.1.0b10 \(31 January 2002\))] D
794 /h126 [(0.109\240\240)(Beta Release 2.1.0b9 \(26 January 2002\))] D
795 /h127 [(0.110\240\240)(Beta Release 2.1.0b8 \(4 January 2002\))] D
796 /h128 [(0.111\240\240)(Beta Release 2.1.0b7 \(21 December 2001\))] D
797 /h129 [(0.112\240\240)(Beta Release 2.1.0b6 \(29 October 2001\))] D
798 /h130 [(0.113\240\240)(Beta Release 2.1.0b5 \(22 October 2001\))] D
799 /h131 [(0.114\240\240)(Beta Release 2.1.0b4 \(24 September 2001\))] D
800 /h132 [(0.115\240\240)(Beta Release 2.1.0b3 \(6 September 2001\))] D
801 /h133 [(0.116\240\240)(Beta Release 2.1.0b2 \(17 August 2001\))] D
802 /h134 [(0.117\240\240)(Beta Release 2.1.0b1 \(6 August 2001\))] D
803 /h135 [(0.118\240\240)(Patch Release 2.0.5 \(10 November 2000\))] D
804 /h136 [(0.119\240\240)(Patch Release 2.0.4 \(20 September 2000\))] D
805 /h137 [(0.120\240\240)(Patch Release 2.0.3 \(15 June 2000\))] D
806 /h138 [(0.121\240\240)(Patch Release 2.0.2 \(9 September 1999\))] D
807 /h139 [(0.122\240\240)(Patch Release 2.0.1 \(6 August 1999\))] D
808 /h140 [(0.123\240\240)(Public Release 2.0 \(27 May 1999\))] D
809 /h141 [(0.123.0.0.1\240\240)(Last updated: 22 April 2002)] D
810 /h142 [(0.124\240\240)(XPACode: Where to Find Example/Test Code)] D
811 /h143 [(0.125\240\240)(Summary)] D
812 /h144 [(0.126\240\240)(Description)] D
813 /h145 [(0.126.0.0.1\240\240)(Last updated: September 10, 2003)] D
814 /h146 [(0.127\240\240)(XPA Changes: Changes For Users from XPA 1.0 and 2.0)] D
815 /h147 [(0.128\240\240)(Summary)] D
816 /h148 [(0.129\240\240)(Description)] D
817 /h149 [(0.129.0.0.1\240\240)(Last updated: September 10, 2003)] D
818 /h150 [(0.130\240\240)(XPAConvert: Converting the XPA API to 2.0)] D
819 /h151 [(0.131\240\240)(Summary)] D
820 /h152 [(0.132\240\240)(Description)] D
821 /h153 [(0.132.0.0.1\240\240)(Last updated: September 10, 2003)] D
822 /h154 [(0.133\240\240)(XPAName: What does XPA stand for?)] D
823 /h155 [(0.134\240\240)(Summary)] D
824 /h156 [(0.135\240\240)(Description)] D
825 /h157 [(0.135.0.0.1\240\240)(Last updated: September 10, 2003)] D
826 /Hr [-47 47 48 49 -50 -50 50 -54 54 55 56 -57 -57 57 -59 59 60 61 -62 -62
827 62 -64 64 65 66 -67 -67 67 -69 69 70 71 -72 -72 72 -74 74 75 76 77 78 79
828 -80 -80 80 -82 82 83 84 -85 -85 85 -86 86 87 88 89 90 91 -92 -92 92 -94
829 94 95 96 97 -98 -98 98 -100 100 101 -102 -102 102 -106 106 107 108 109 110
830 111 112 113 114 115 116 117 118 119 120 121 -122 -122 122 -124 124 125 126
831 -127 -127 127 -130 130 131 132 133 134 135 136 137 138 139 140 141 142 -143
832 -143 143 -145 145 146 147 -148 -148 148 -151 151 152 153 154 155 156 157
833 -158 -158 158 -160 160 161 162 -163 -163 163 -165 165 166 167 -168 -168
834 168 -169 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184
835 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202
836 203 204 205 206 207 -208 -208 208 -210 210 211 212 -213 -213 213 -215 215
837 216 217 -218 -218 218 -220 220 221 222 -223 -223 223 -225 225 226 227 -228
838 -228 228]D
839 /HV [1 2 2 2 3 4 5 1 2 2 2 3 4 5 1 2 2 2 3 4 5 1 2 2 2 3 4 5 1 2 2 2 3
840 4 5 1 2 2 2 2 2 2 3 4 5 1 2 2 2 3 4 5 1 2 2 2 2 2 2 3 4 5 1 2 2 2 2 3 4
841 5 1 2 2 3 4 5 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 4 5 1 2 2 2 3 4 5 1 2
842 2 2 2 2 2 2 2 2 2 2 2 2 3 4 5 1 2 2 2 3 4 5 1 2 2 2 2 2 2 2 3 4 5 1 2 2
843 2 3 4 5 1 2 2 2 3 4 5 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
844 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 4 5 1 2 2 2 3 4 5 1 2 2 2 3 4 5 1 2 2 2
845 3 4 5 1 2 2 2 3 4 5]D
846 /Cn [3 0 0 1 1 1 0 3 0 0 1 1 1 0 3 0 0 1 1 1 0 3 0 0 1 1 1 0 3 0 0 1 1
847 1 0 6 0 0 0 0 0 1 1 1 0 3 0 0 1 1 1 0 6 0 0 0 0 0 1 1 1 0 4 0 0 0 1 1 1
848 0 2 0 1 1 1 0 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 3 0 0 1 1 1 0 13
849 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 3 0 0 1 1 1 0 7 0 0 0 0 0 0 1 1 1 0 3 0
850 0 1 1 1 0 3 0 0 1 1 1 0 39 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
851 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 3 0 0 1 1 1 0 3 0 0 1 1 1 0 3 0 0
852 1 1 1 0 3 0 0 1 1 1 0]D
853 Hr length 0 gt{[/PageMode /UseOutlines /DOCVIEW pdfmark}if
854 /Hn 1 D
855 0 1 Hr length 1 sub{
856 /Bn E D [Cn Bn get dup 0 gt{/Count E HV Bn get Bl ge{neg}if}{pop}ie
857 /Dest Hr Bn get dup abs ST cvs cvn E 0 ge{(h)Hn ST cvs join cvx exec
858 dup 1 get E Nf{0 get E join}{pop}ie /Hn Hn 1 add D}{()}ie
859 /Title E dup length 255 gt{0 255 getinterval}if /OUT pdfmark}for
860 ZF /FN Fp D Ps 0 FS /WC Wf{( )}{<A1A1>}ie SW pop D
861 ET RC ZF
862 /Df f D
863 /R1 (http://hea-www.harvard.edu/RD/xpa/changelog.html) D
864 /Ba f D /BO 0 D Bs
865 /UR (help.html) D
866 /Ti (The XPA Help Facility) D
867 /Au () D
868 /Df f D
869 /ME [()] D
870 TC
871
872 /Cb Db D /Ct [16#00 16#00 16#00] D /Cl [16#00 16#00 16#00] D /CL -1 D Ct Sc
873
874 /Ba f D /BO 0 D Bs
875 /UR (help.html) D
876 /Ti (The XPA Help Facility) D
877 /Au () D
878 /Df f D
879 /ME [()] D
880 TC
881
882 NP RC ZF
883 ()1 Sl()WB 0 Sn(
884
885
886 )0 2 0 H(XPA:)WB 47 Sn()WB 1 Sn( Public Access to Data and Algorithms)EA()EH(
887
888
889 )0 2 1 H(Summary)WB 48 Sn()EH(
890 This document is the Table of Contents for XPA.
891
892
893 )0 2 2 H(Description)WB 49 Sn()EH(
894 )0 P(The XPA messaging system provides seamless communication between many
895 kinds of Unix programs, including X programs and Tcl/Tk programs. It
896 also provides an easy way for users to communicate with XPA-enabled
897 programs by executing XPA client commands in the shell or by utilizing
898 such commands in scripts. Because XPA works both at the programming
899 level and the shell level, it is a powerful tool for unifying any
900 analysis environment: users and programmers have great flexibility in
901 choosing the best level or levels at which to access XPA services, and
902 client access can be extended or modified easily at any time.
903
904 )0 P(A program becomes an XPA-enabled server by defining named points of
905 public access through which data and commands can be exchanged with
906 other client programs \201and users\202. Using standard TCP sockets as a
907 transport mechanism, XPA supports both single-point and broadcast
908 messaging to and from these servers. It supports direct communication
909 between clients and servers, or indirect communication via an
910 intermediate message bus emulation program. Host-based access control
911 is implemented, as is as the ability to communicate with XPA servers
912 across a network.
913
914 )0 P(XPA implements a layered interface that is designed to be useful both
915 to software developers and to users. The interface consists of a
916 library of XPA client and server routines for use in C/C++ programs and
917 a suite of high-level user programs built on top of these libraries.
918 Using the XPA library, access points can be added to Tcl/Tk programs,
919 Xt programs, or to Unix programs that use the XPA event loop or any
920 event loop based on select\201\202. Client access subroutines can be added
921 to any Tcl/Tk, Xt, or Unix program. Client access also is supported at
922 the command line via a suite of high-level programs.
923
924 )0 P(Choose from the following topics:
925
926 )UL(
927 )-1 LI()0 2 1 A(Introduction to XPA)2 1 TN TL()Ec /AF f D(
928
929 )-1 LI()0 3 1 A(Access Point Names and Templates)3 1 TN TL()Ec /AF f D(
930
931 )-1 LI()0 4 1 A(Getting Common Information About Access Points)4 1 TN TL()Ec /AF f D(
932
933 )-1 LI()0 5 1 A(Communication Methods)5 1 TN TL()Ec /AF f D(
934
935 )-1 LI()0 6 1 A(Communication Between Hosts)6 1 TN TL()Ec /AF f D(
936
937 )-1 LI()0 7 1 A(Distinguishing Users)7 1 TN TL()Ec /AF f D(
938
939
940 )-1 LI()0 8 1 A(XPA User Programs)8 1 TN TL()Ec /AF f D(
941 )UL()-1 LI()0 9 1 A(xpaget: get data and info)9 1 TN TL()Ec /AF f D(
942
943 )-1 LI()0 10 1 A(xpaset: send data and info)10 1 TN TL()Ec /AF f D(
944
945 )-1 LI()0 11 1 A(xpainfo: send info alert)11 1 TN TL()Ec /AF f D(
946
947 )-1 LI()0 12 1 A(xpaaccess: get access point info)12 1 TN TL()Ec /AF f D(
948
949 )-1 LI()0 13 1 A(xpamb: message bus emulation)13 1 TN TL()Ec /AF f D(
950
951 )-1 LI()0 14 1 A(xpans: the XPA name server)14 1 TN TL()Ec /AF f D(
952 )LU(
953
954 )-1 LI()0 15 1 A(XPA Server Routines)15 1 TN TL()Ec /AF f D(
955 )UL()-1 LI()0 16 1 A(XPANew: define a new access point)16 1 TN TL()Ec /AF f D(
956
957 )-1 LI()0 17 1 A(XPACmdNew: define a new command access point)17 1 TN TL()Ec /AF f D(
958
959 )-1 LI()0 18 1 A(XPACmdAdd: add a command)18 1 TN TL()Ec /AF f D(
960
961 )-1 LI()0 19 1 A(XPACmdDel: delete a command)19 1 TN TL()Ec /AF f D(
962
963 )-1 LI()0 20 1 A(XPAInfoNew: define an info access point)20 1 TN TL()Ec /AF f D(
964
965 )-1 LI()0 21 1 A(XPAFree: free an access point)21 1 TN TL()Ec /AF f D(
966
967 )-1 LI()0 22 1 A(XPAMainLoop: event loop for select server)22 1 TN TL()Ec /AF f D(
968
969 )-1 LI()0 23 1 A(XPAPoll: poll for XPA events)23 1 TN TL()Ec /AF f D(
970
971 )-1 LI()0 24 1 A(XPACleanup: release reserved XPA memory)24 1 TN TL()Ec /AF f D(
972
973 )-1 LI()0 25 1 A(XPA Server Macros: accessing structure internals)25 1 TN TL()Ec /AF f D(
974
975 )-1 LI()0 26 1 A(XPA Race Conditions: how to avoid them)26 1 TN TL()Ec /AF f D(
976
977 )-1 LI()0 27 1 A(XPA Out of Memory \201OOM\202 errors)27 1 TN TL()Ec /AF f D(
978 )LU(
979
980 )-1 LI()0 28 1 A(XPA Client Routines)28 1 TN TL()Ec /AF f D(
981 )UL()-1 LI()0 29 1 A(XPAOpen: open a persistent client connection)29 1 TN TL()Ec /AF f D(
982
983 )-1 LI()0 30 1 A(XPAClose: close persistent client connection)30 1 TN TL()Ec /AF f D(
984
985 )-1 LI()0 31 1 A(XPAGet: get data)31 1 TN TL()Ec /AF f D(
986
987 )-1 LI()0 32 1 A(XPASet: send data or commands)32 1 TN TL()Ec /AF f D(
988
989 )-1 LI()0 33 1 A(XPAInfo: send an info alert)33 1 TN TL()Ec /AF f D(
990
991 )-1 LI()0 34 1 A(XPAGetFd: get data and write to an fd)34 1 TN TL()Ec /AF f D(
992
993 )-1 LI()0 35 1 A(XPASetFd: read data from and fd and send)35 1 TN TL()Ec /AF f D(
994
995 )-1 LI()0 36 1 A(XPANSLookup: look up an access point)36 1 TN TL()Ec /AF f D(
996
997 )-1 LI()0 37 1 A(XPAAccess: get access info)37 1 TN TL()Ec /AF f D(
998
999 )-1 LI()0 38 1 A(The XPA/Xt Interface: Xt interface to XPA)38 1 TN TL()Ec /AF f D(
1000
1001 )-1 LI()0 39 1 A(The XPA/Tcl Interface: Tcl interface to XPA)39 1 TN TL()Ec /AF f D(
1002 )LU(
1003
1004 )-1 LI( Tailoring the XPA Environment
1005 )UL()-1 LI()0 40 1 A(Environment Variables)40 1 TN TL()Ec /AF f D(
1006
1007 )-1 LI()0 41 1 A(Access Control)41 1 TN TL()Ec /AF f D(
1008 )LU(
1009
1010 )-1 LI( Miscellaneous
1011 )UL(
1012 )-1 LI()0 42 1 A(XPA ChangeLog)42 1 TN TL()Ec /AF f D(
1013
1014 )-1 LI()0 43 1 A(Where to Find Example/Test Code)43 1 TN TL()Ec /AF f D(
1015 )-1 LI()0 44 1 A(User Changes Between XPA 1.0 and 2.0)44 1 TN TL()Ec /AF f D(
1016 )-1 LI()0 45 1 A(API Changes Between XPA 1.0 and 2.0)45 1 TN TL()Ec /AF f D(
1017 )-1 LI()0 46 1 A(What Does XPA Stand For, Anyway?)46 1 TN TL()Ec /AF f D()LU(
1018 )LU(
1019
1020
1021
1022 )0 5 3 H(Last)WB 50 Sn( updated: September 10, 2003)EH(
1023 )WB NL NP Ep ET /Tc f D
1024 /Cb Db D /Ct [16#00 16#00 16#00] D /Cl [16#00 16#00 16#00] D /CL -1 D Ct Sc
1025 DS
1026 /Ba f D /BO 0 D Bs
1027 /UR (intro.html) D
1028 /Ti (Introduction to XPA) D
1029 /Au () D
1030 /Df f D
1031 /ME [()] D
1032
1033 0 BO R
1034 ()1 Sl()WB 2 Sn(
1035
1036
1037 )0 2 4 H(XPAIntro:)WB 54 Sn()WB 51 Sn( Introduction to the XPA Messaging System)EA()EH(
1038
1039
1040 )0 2 5 H(Summary)WB 55 Sn()EH(
1041 )0 P(A brief introduction to the XPA messaging system, which provides
1042 seamless communication between all kinds of Unix event-driven
1043 programs, including X programs, Tcl/Tk programs, and Perl programs.
1044
1045
1046 )0 2 6 H(Description)WB 56 Sn()EH(
1047 )0 P(The XPA messaging system provides seamless communication between all
1048 kinds of Unix programs, including X programs, Tcl/Tk programs, and
1049 Perl programs. It also provides an easy way for users to communicate
1050 with these XPA-enabled programs by executing XPA client commands in
1051 the shell or by utilizing such commands in scripts. Because XPA works
1052 both at the programming level and the shell level, it is a powerful
1053 tool for unifying any analysis environment: users and programmers have
1054 great flexibility in choosing the best level or levels at which to
1055 access XPA services, and client access can be extended or modified
1056 easily at any time.
1057
1058 )0 P(A program becomes an XPA-enabled server by defining named points of
1059 public access through which data and commands can be exchanged with
1060 other client programs \201and users\202. Using standard TCP sockets as
1061 a transport mechanism, XPA supports both single-point and broadcast
1062 messaging to and from these servers. It supports direct communication
1063 between clients and servers, or indirect communication via an
1064 intermediate message bus emulation program. Host-based access control
1065 is implemented, as is as the ability to communicate with XPA servers
1066 across a network.
1067
1068 )0 P(XPA implements a layered interface that is designed to be useful both
1069 to software developers and to users. The interface consists of a
1070 library of XPA client and server routines for use in programs and a
1071 suite of high-level user programs built on top of these libraries.
1072 Using the XPA library, access points can be added to
1073 )0 52 1 A(Tcl/Tk)52 0 TN TL()Ec /AF f D(
1074 programs,
1075 )0 53 1 A(Xt)53 0 TN TL()Ec /AF f D(
1076 programs, or to Unix programs that use the XPA event loop or any
1077 event loop based on select\201\202. Client access subroutines can be added
1078 to any Tcl/Tk or Unix program. Client access also is supported at the
1079 command line via a suite of high-level programs.
1080
1081 )0 P(The major components of the XPA layered interface are:
1082 )UL()-1 LI(A set of XPA server routines, centered on
1083 )0 16 1 A(XPANew\201\202,)16 0 TN TL()Ec /AF f D(
1084 which are used by XPA server programs to tag public access points with
1085 string identifiers and to register send and receive callbacks for
1086 these access points.
1087
1088 )-1 LI(A set of XPA client routines, centered on the
1089 )0 32 1 A(XPASet\201\202)32 0 TN TL()Ec /AF f D(
1090 and
1091 )0 31 1 A(XPAGet\201\202,)31 0 TN TL()Ec /AF f D(
1092 which are used by external client applications to exchange data and
1093 commands with an XPA server.
1094
1095 )-1 LI(High-level programs, centered on
1096 )0 10 1 A(xpaset)10 0 TN TL()Ec /AF f D(
1097 and
1098 )0 9 1 A(xpaget,)9 0 TN TL()Ec /AF f D(
1099 which allow data
1100 and information to be exchanged with XPA server programs from the
1101 command line and from scripts. These programs have the command syntax:
1102 ) 2 35 PR( [data] | xpaset [qualifiers ...]
1103 xpaget [qualifiers ...])RP(
1104 )-1 LI(An XPA name server program,
1105 )0 14 1 A(xpans,)14 0 TN TL()Ec /AF f D(
1106 through which XPA access point names are
1107 registered by servers and distributed to clients.)LU(
1108
1109 )0 P(Defining an XPA access point is easy: a server application calls
1110 )0 16 1 A(XPANew\201\202,)16 0 TN TL()Ec /AF f D(
1111 )0 17 1 A(XPACmdNew\201\202,)17 0 TN TL()Ec /AF f D(
1112 or the experimental
1113 )0 20 1 A(XPAInfoNew\201\202)20 0 TN TL()Ec /AF f D(
1114 routine to
1115 create a named public access point. An XPA service can specify "send"
1116 and "receive" callback procedures \201or an "info" procedure in the case
1117 of XPAInfoNew\201\202\202 to be executed by the program when an external
1118 process either sends data or commands to this access point or requests
1119 data or information from this access point. Either of the callbacks
1120 can be omitted, so that a particular access point can be specified as
1121 read-only, read-write, or write-only. Application-specific client
1122 data can be associated with these callbacks. Having defined one or
1123 more public access points in this way, an XPA server program enters
1124 its usual event loop \201or uses the standard XPA event loop\202.
1125
1126 )0 P(Clients communicate with these XPA public access points
1127 using programs such as
1128 )0 9 1 A(xpaget)9 0 TN TL()Ec /AF f D(,
1129 )0 10 1 A(xpaset)10 0 TN TL()Ec /AF f D(, and
1130 )0 11 1 A(xpainfo)11 0 TN TL()Ec /AF f D(
1131 \201at the command line\202,
1132 or routines such as
1133 )0 31 1 A(XPAGet\201\202,)31 0 TN TL()Ec /AF f D(
1134 )0 32 1 A(XPASet\201\202,)32 0 TN TL()Ec /AF f D(
1135 and
1136 )0 33 1 A(XPAInfo\201\202)33 0 TN TL()Ec /AF f D(
1137 within a program. Both methods require specification of the name of
1138 the access point. The xpaget program returns data or other
1139 information from an XPA server to its standard output, while the
1140 xpaset program sends data or commands from its standard input to an
1141 XPA application. The corresponding API routines set/get data to/from
1142 memory, returning error messages and other info as needed. If a
1143 )0 3 1 A(template)3 0 TN TL()Ec /AF f D(
1144 is used to specify the access point name \201e.g., "ds9*"\202, then
1145 communication will take place with all servers matching that template.
1146
1147 )0 P(Please note that XPA currently is not thread-safe. All XPA calls must be
1148 in the same thread.
1149
1150
1151
1152
1153
1154 )0 P()0 0 1 A(Go to XPA Help Index)0 0 TN TL()Ec /AF f D(
1155
1156 )0 5 7 H(Last)WB 57 Sn( updated: March 10, 2007)EH(
1157
1158 )WB NL
1159 /Cb Db D /Ct [16#00 16#00 16#00] D /Cl [16#00 16#00 16#00] D /CL -1 D Ct Sc
1160 DS
1161 /Ba f D /BO 0 D Bs
1162 /UR (template.html) D
1163 /Ti (Access Point Names and Templates) D
1164 /Au () D
1165 /Df f D
1166 /ME [()] D
1167
1168 0 BO R
1169 ()1 Sl()WB 3 Sn(
1170
1171
1172 )0 2 8 H(XPATemplate:)WB 59 Sn()WB 58 Sn( Access Point Names and Templates)EA()EH(
1173
1174 )0 2 9 H(Summary)WB 60 Sn()EH(
1175 )0 P(XPA access points are composed of two parts: a general class and a
1176 specific name. Both parts accept template characters so that you
1177 can send/retrieve data to/from multiple servers at one time.
1178
1179
1180 )0 2 10 H(Description)WB 61 Sn()EH(
1181 )0 P(When XPA servers call
1182 )0 16 1 A(XPANew\201\202,)16 0 TN TL()Ec /AF f D(
1183 or
1184 )0 17 1 A(XPACmdNew\201\202)17 0 TN TL()Ec /AF f D(
1185 to define XPA access points, they specify a string identifier composed of a
1186 class and a name. When clients communicate with XPA access points,
1187 they specify which access points to communicate with using
1188 an identifier of the form:
1189 ) 1 12 PR( class:name)RP(
1190 All registered XPA access points that match the specified identifier
1191 will be available for communication \201subject to access control rules,
1192 etc.\202
1193
1194 )0 P(As of XPA 2.1.5, the length of both the class and name designations are
1195 limited to 1024 characters.
1196
1197 )0 P(The XPA class:name identifier actually is a template: it accepts wild
1198 cards in its syntax, so a single specifier can match more than one XPA
1199 access point. \201Note that the class is optional and defaults to "*".\202
1200 The allowed syntax for clients to specify the class:name template is
1201 of the form shown below. \201Note that "*" is used to denote a generic
1202 wild card, but other wild cards characters are supported, as described
1203 below\202.
1204 ) 7 46 PR( template explanation
1205 -------- -----------
1206 class:name exact match of class and name
1207 name match any class with this name
1208 *:name match any class with this name
1209 class:* match any name of this class
1210 *:* match any access point)RP(
1211 )0 P(In general, the following wild-cards can be applied to class and name:
1212 ) 5 58 PR( wildcard explanation
1213 -------- -----------
1214 ? match any character, but there must be one
1215 * match anything, or nothing
1216 [...] match an inclusive set)RP(
1217 )0 P(Although the class:name template normally is used to refer to XPA
1218 access points, these also can be specified using their individual
1219 socket identifiers. For inet sockets, the socket identifier is
1220 )BD(ip:port)ES(, where ip can be the DNS-registered name,
1221 the ASCII IP number \201e.g. 123.45.67.890\202 or the hex IP number
1222 \201e.g. 838f3a60\202. For unix sockets, the identifier is the )BD(socket file
1223 name)ES(. These socket identifiers are displayed as the fourth argument
1224 in the xpans display of registered access points. For example,
1225 consider the ds9 program started using inet sockets. The xpans name
1226 server will register something like this:
1227 ) 2 40 PR( csh> xpaget xpans
1228 DS9 ds9 gs saord.harvard.edu:3236 eric)RP(
1229 You can access ds9 using ip:3236 in any of the three forms:
1230 ) 8 37 PR( csh> xpaget saord:3236 file
1231 /home/eric/data/snr.ev
1232
1233 csh> xpaget 123.45.67.890:3236 file
1234 /home/eric/data/snr.ev
1235
1236 csh> xpaget 838f3a60:3236 file
1237 /home/eric/data/snr.ev)RP(
1238 In the case of unix sockets, the socket identifier is a file:
1239 ) 5 41 PR( csh> xpaget xpans
1240 DS9 ds9 gs /tmp/.xpa/DS9_ds9.2631 eric
1241
1242 csh> xpaget /tmp/.xpa/DS9_ds9.2631 file
1243 /home/eric/data/snr.ev)RP(
1244 This feature can be useful in distinguishing between multiple
1245 instances of a program that all have the same class:name designation.
1246
1247
1248
1249
1250
1251 )0 P()0 0 1 A(Go to XPA Help Index)0 0 TN TL()Ec /AF f D(
1252
1253 )0 5 11 H(Last)WB 62 Sn( updated: September 10, 2003)EH(
1254
1255 )WB NL
1256 /Cb Db D /Ct [16#00 16#00 16#00] D /Cl [16#00 16#00 16#00] D /CL -1 D Ct Sc
1257 DS
1258 /Ba f D /BO 0 D Bs
1259 /UR (info.html) D
1260 /Ti (Getting Common Information About Access Points) D
1261 /Au () D
1262 /Df f D
1263 /ME [()] D
1264
1265 0 BO R
1266 ()1 Sl()WB 4 Sn(
1267
1268
1269 )0 2 12 H(XPACommon:)WB 64 Sn()WB 63 Sn( Getting Common Information About Access Points)EA()EH(
1270
1271
1272 )0 2 13 H(Summary)WB 65 Sn()EH(
1273 )0 P(There are various kinds of generic information you can retrieve about
1274 an XPA access point by using the xpaget command.
1275
1276
1277 )0 2 14 H(Description)WB 66 Sn()EH(
1278 )0 P(You can find out which XPA access points have been registered with
1279 the currently running
1280 )0 14 1 A(XPA name server)14 0 TN TL()Ec /AF f D(
1281 by executing the
1282 )0 9 1 A(xpaget)9 0 TN TL()Ec /AF f D(
1283 command to retrieve info from the XPA name server:
1284 ) 1 14 PR( xpaget xpans)RP(
1285 If, for example, the
1286 )0 43 1 A(stest)43 0 TN TL()Ec /AF f D( test server program
1287 is running, the following XPA access points will be returned \201the specifics
1288 of the returned info will vary for different machines and users\202:
1289 ) 4 33 PR( XPA xpa gs 838e2f67:1262 eric
1290 XPA xpa1 gs 838e2f67:1266 eric
1291 XPA c_xpa gs 838e2f67:1267 eric
1292 XPA i_xpa i 838e2f67:1268 eric)RP(
1293 Note that access to this information is subject to the usual
1294 )0 41 1 A(XPA Access Control)41 0 TN TL()Ec /AF f D( restrictions.
1295
1296 )0 P(Each XPA access point supports a number of reserved sub-commands that provide
1297 access to different kinds of information, e.g. the access control for
1298 that access point. These sub-commands can be executed by using
1299 )0 10 1 A(xpaset)10 0 TN TL()Ec /AF f D(
1300 or
1301 )0 9 1 A(xpaget)9 0 TN TL()Ec /AF f D(
1302 at the command line, or
1303 )0 31 1 A(XPAGet\201\202)31 0 TN TL()Ec /AF f D(
1304 or
1305 )0 32 1 A(XPASet\201\202)32 0 TN TL()Ec /AF f D(
1306 in programs, e.g:
1307 ) 5 30 PR( xpaget ds9 -acl
1308 xpaget ds9 -help
1309 xpaget ds9 env FOO
1310
1311 xpaset -p ds9 env FOO foofoo)RP(
1312 With the exception of )BD(-help)ES( and )BD(-version)ES(, reserved
1313 sub-commands are available only on the machine on which the XPA server
1314 itself is running.
1315
1316 The following reserved sub-commands are defined for all access points:
1317 )0 DL(
1318 )0 P()0 DT()BD(-acl)ES( get \201set\202 the access control list [options: host type acl, for set]
1319 )DD(
1320 The 'xpaset' option allows you to add a new acl for a given host, or change
1321 the acl for an existing host. See
1322 )0 41 1 A(XPA Access Control)41 0 TN TL()Ec /AF f D(
1323 for more information.
1324 This access point is available only on the server machine.
1325
1326 )0 P()0 DT()BD(-env)ES( get \201set\202 an environment variable [options: name \201value, for set\202]
1327 )DD(The 'xpaget' option will return the value of the named environment
1328 variable. The 'xpaset' option will set the value of the names
1329 variable to the specified value.
1330 This access point is available only on the server machine.
1331 \201Please be advised that we have had problems setting environment
1332 variables in static Tcl/Tk programs such as ds9 running under Linux.\202
1333
1334 )0 P()0 DT( )BD(-clipboard)ES( set\201get\202 information on a named clipboard
1335 )DD( Clients can store ASCII state information on any number of named
1336 clipboards. Clipboards of the same name created by clients on
1337 different machines are kept separate. The syntax for creating a
1338 clipboard is:
1339 ) 2 65 PR( [data] | xpaset [server] -clipboard add|append [clipboard_name]
1340 xpaset -p [server] -clipboard delete [clipboard_name])RP(
1341 Use "add" to create a new clipboard or replace the contents of an existing
1342 one. Use "append" to append to an existing clipboard.
1343 )0 P(Information on a named clipboard is retrieved using:
1344 ) 1 45 PR( xpaget [server] -clipboard [clipboard_name])RP(
1345 )0 P()0 DT()BD(-exec)ES( set: execute commands from buffer [options: none]
1346 )DD(If -exec is specified in the paramlist of an 'xpaset' call, then further
1347 sub-commands will be retrieved from the data buffer.
1348
1349 )0 P()0 DT()BD(-help)ES( get: return help string for this XPA or sub-command [options: name \201for sub-commands\202]
1350 )DD(Each XPA access point and each XPA sub-command can have a help string
1351 associated with it that is specified when the access point is defined.
1352 The -help option will return this help string. For XPA access points
1353 that contain user-defined sub-commands, you can get the help string
1354 for a particular sub-command by specifying its name, or else get the
1355 help strings for all sub-commands if not name is specified.
1356
1357 )0 P()0 DT()BD(-ltimeout)ES( get \201set\202 the long timeout value [options: seconds|reset]
1358 )DD(The 'xpaget' option will return the value of the long timeout \201in seconds\202.
1359 The 'xpaset' option will set the value of the long timeout. If "reset" is
1360 specified, then the timeout value will be reset to the default value.
1361
1362 )0 P()0 DT()BD(-nsconnect)ES( set: re-establish name server connection to all XPA's [options: none]
1363 )DD(If the
1364 )0 14 1 A(XPA Name Server \201xpans\202)14 0 TN TL()Ec /AF f D(
1365 process has terminated unexpectedly and then re-started, this
1366 sub-command can be used to re-establish the connection. You use it by
1367 sending the command to the [name:port] or [file] of the access point
1368 instead of to the XPA name \201since the latter requires the xpans
1369 connection!\202:
1370 ) 1 36 PR( xpaset -p 838e2f67:1268 -nsconnect)RP(
1371 See )0 14 1 A(xpans)14 0 TN TL()Ec /AF f D( for more information.
1372
1373 )0 P()0 DT()BD(-nsdisconnect)ES( set: break name server connection to all XPA's [options: none]
1374 )DD(This sub-command will terminate the connection to the
1375 )0 14 1 A(XPA Name Server \201xpans\202)14 0 TN TL()Ec /AF f D(, thereby making
1376 all access points inaccessible except through their underlying [name:port]
1377 or [file] identifiers. I forget why we added it, it seems pretty useless.
1378
1379 )0 P()0 DT()BD(-stimeout)ES( get \201set\202 the short timeout value [options: seconds|reset]
1380 )DD(The 'xpaget' option will return the value of the short timeout \201in seconds\202.
1381 The 'xpaset' option will set the value of the short timeout. If "reset" is
1382 specified, then the timeout value will be reset to the default value.
1383
1384 )0 P()0 DT()BD(-remote)ES( set: register xpa with remote server [options: host[:port] [acl]] [-proxy]
1385 )DD(This sub-command will register the XPA access point with the XPA name
1386 server \201xpans\202 on the specified host \201which must already be running\202.
1387 The specified host also is given access control to the access point,
1388 using the specified acl or the default acl of "+" \201meaning the remote
1389 host can xpaset, xpaget, xpainfo or xpaaccess\202. If the acl is
1390 specified as "-", then the access point is unregistered.
1391 See )0 6 1 A(Communication Between Machines)6 0 TN TL()Ec /AF f D(
1392 for more information on how this sub-command is used.
1393
1394 )0 P()0 DT()BD(-version)ES( get: return XPA version string [options: none]
1395 )DD(The version refers to the version of XPA used to define this access point
1396 \201currently something like 2.0\202.
1397 )LD(
1398
1399 )0 P(You can add your own reserved commands to all XPA access points by using the
1400 )0 18 1 A(XPACmdAdd\201\202)18 0 TN TL()Ec /AF f D(
1401 routine, passing the XPA handle returned by )EM(XPA XPAGetReserved\201void\202)ES(
1402 as the first argument. Note again that these will only be available on the
1403 machine where the XPA service is running.
1404
1405
1406
1407
1408
1409 )0 P()0 0 1 A(Go to XPA Help Index)0 0 TN TL()Ec /AF f D(
1410
1411 )0 5 15 H(Last)WB 67 Sn( updated: September 10, 2003)EH(
1412 )WB NL
1413 /Cb Db D /Ct [16#00 16#00 16#00] D /Cl [16#00 16#00 16#00] D /CL -1 D Ct Sc
1414 DS
1415 /Ba f D /BO 0 D Bs
1416 /UR (method.html) D
1417 /Ti (XPA Communication Methods) D
1418 /Au () D
1419 /Df f D
1420 /ME [()] D
1421
1422 0 BO R
1423 ()1 Sl()WB 5 Sn(
1424
1425
1426 )0 2 16 H(XPAMethod:)WB 69 Sn()WB 68 Sn( )EA(XPA Communication Methods)EH(
1427
1428
1429 )0 2 17 H(Summary)WB 70 Sn()EH(
1430 )0 P(XPA supports both inet and unix \201local\202 socket communication.
1431
1432
1433 )0 2 18 H(Description)WB 71 Sn()EH(
1434 )0 P(XPA uses sockets for communication between processes. It supports
1435 three methods of socket communication: inet, localhost, and unix. In
1436 general, the same method should be employed for all XPA processes in a
1437 session and the global environment variable XPA_METHOD should be used
1438 to set up the desired method. By default, the preferred method is
1439 "inet", which is appropriate for most users. You can set up a
1440 different method by typing something like:
1441 ) 3 70 PR( setenv XPA_METHOD local # unix csh
1442 XPA_METHOD=local; export XPA_METHOD # unix sh, bash, windows/cygwin
1443 set XPA_METHOD=localhost # dos/windows)RP(
1444 The options for XPA_METHOD are: )BD(inet)ES(, )BD(unix)ES( \201or
1445 )BD(local)ES(\202, and )BD(localhost)ES(. On Unix machines, this
1446 environment setup command can be placed in your shell init file
1447 \201.cshrc, .profile, .bashrc, etc.\202 On Windows platforms, it can be
1448 placed in your AUTOEXEC.BAT file \201I think!\202.
1449
1450 )0 P(By default, )BD(inet)ES( sockets are used by XPA. These are the standard
1451 Internet sockets that are used by programs such as Netscape,
1452 ftp. etc. Inet sockets utilize the IP address of the given machine and
1453 a \201usually random\202 port number to communicate between processes on the
1454 same machine or between different machines on the Internet. \201Note that
1455 XPA has an )0 41 1 A(Access Control)41 0 TN TL()Ec /AF f D( mechanism to
1456 prevent unauthorized access of XPA access points by other computers on
1457 the Net\202. For users connected to the Internet, this usually is the
1458 appropriate communication method. For more information about setting
1459 up XPA communication between machines, see
1460 )0 6 1 A(Communication Between Machines)6 0 TN TL()Ec /AF f D(.
1461
1462 )0 P(In you are using XPA on a machine without an Internet connection, then
1463 inet sockets are not appropriate. In fact, an XPA process often will
1464 hang for many seconds while waiting for a response from the Domain
1465 Name Service \201DNS\202 when using inet sockets. Instead of inet sockets,
1466 users on Unix platforms can also use )BD(unix)ES( sockets \201also known
1467 as local sockets\202. These sockets are based on the local file system
1468 and do not make use of the DNS. They generally are considered to be
1469 faster than inet sockets, but they are not implemented under
1470 Windows. Use local sockets as a first resort if you are on a Unix
1471 machine that is not connected to the Internet.
1472
1473 )0 P(Users not connected to the Internet also can use )BD(localhost)ES(
1474 sockets. These are also inet-type sockets but the IP address used for
1475 the local machine is the )BD(localhost)ES( address, 0x7F000001, instead
1476 of the real IP of the machine. Depending on how sockets are set up for
1477 a given platform, communication with the DNS usually is not required in
1478 this case \201though of course, XPA cannot interact with other machines\202.
1479 The localhost method will generally work on both Unix and Windows
1480 platforms, but whether the DNS is required or not is subject to
1481 individual configurations.
1482
1483 )0 P(A final warning/reminder: if your XPA-enabled server hangs at startup
1484 time and your XPA_METHOD is )BD(inet)ES(, the problem probably is
1485 related to an incorrect Internet configuration. This can be confirmed
1486 by using the )BD(unix)ES( method or \201usually\202 the )BD(localhost)ES(
1487 method. You can use these alternate methods if other hosts do not need
1488 access to the XPA server.
1489
1490
1491
1492
1493
1494 )0 P()0 0 1 A(Go to XPA Help Index)0 0 TN TL()Ec /AF f D(
1495
1496 )0 5 19 H(Last)WB 72 Sn( updated: September 10, 2003)EH(
1497 )WB NL
1498 /Cb Db D /Ct [16#00 16#00 16#00] D /Cl [16#00 16#00 16#00] D /CL -1 D Ct Sc
1499 DS
1500 /Ba f D /BO 0 D Bs
1501 /UR (inet.html) D
1502 /Ti (XPA Communication Between Hosts) D
1503 /Au () D
1504 /Df f D
1505 /ME [()] D
1506
1507 0 BO R
1508 ()1 Sl()WB 6 Sn(
1509
1510
1511 )0 2 20 H(XPAInet:)WB 74 Sn()WB 73 Sn( XPA Communication Between Hosts)EA()EH(
1512
1513
1514 )0 2 21 H(Summary)WB 75 Sn()EH(
1515 XPA uses standard inet sockets to support communication between two or
1516 more host computers.
1517
1518
1519 )0 2 22 H(Description)WB 76 Sn()EH(
1520 )0 P(When the )0 5 1 A(Communication Method)5 0 TN TL()Ec /AF f D( is set to
1521 )BD(inet)ES( \201as it is by default\202, XPA can be used to communicate
1522 between different computers on the Internet. INET sockets utilize the
1523 IP address of the given machine and a \201usually random\202 port number to
1524 communicate between processes on the same machine or between different
1525 machines on the Internet. These standard Internet sockets are also
1526 used by programs such as Netscape, ftp. etc.
1527
1528 )0 P(XPA supports a host-based )0 41 1 A(Access Control)41 0 TN TL()Ec /AF f D( mechanism
1529 to prevent unauthorized access of XPA access points by other computers
1530 on the Net. By default, only the machine on which the XPA server is
1531 running can access XPA services. Therefore, setting up communication
1532 between a local XPA server machine and a remote client machine
1533 requires a two-part registration process:
1534
1535 )UL()-1 LI( the XPA service on the local machine must be made known to the
1536 remote machine
1537 )-1 LI( the remote machine must be given permission to access the local
1538 XPA service)LU(
1539
1540 Three methods by which this remote registration can be accomplished
1541 are described below.
1542
1543 )0 2 23 H(Manual)WB 77 Sn( Registration)EH(
1544
1545 The first method is the most basic and does not require the remote
1546 client to have xpans running. To use it, the local server simply
1547 gives a remote client machine access to one or more XPA access points
1548 using xpaset and the )BD(-acl)ES( sub-command. For example,
1549 consider the XPA test program "stest" running on a local machine. By
1550 default the access control for the access point named "xpa" is
1551 restricted to that machine:
1552 ) 3 25 PR( [sh]$ xpaget xpa -acl
1553 *:* 123.456.78.910 gisa
1554 *:* localhost gisa)RP(
1555 Using xpaset and the )BD(-acl)ES( sub-command, a remote client
1556 machine can be given permission to perform xpaget, xpaset, xpaaccess,
1557 or xpainfo operations. For example, to allow the xpaget operation, the
1558 following command can be issued on the local machine:
1559 ) 1 45 PR( [sh]$ xpaset -p xpa -acl "remote_machine g")RP(
1560 This results in the following access permissions on the local machine:
1561 ) 4 26 PR( [sh]$ xpaget xpa -acl
1562 XPA:xpa 234.567.89.012 g
1563 *:* 123.456.78.910 gisa
1564 *:* localhost gisa)RP(
1565
1566 The remote client can now use the local server's xpans name server to
1567 establish communication with the local XPA service. This can be done
1568 on a call-by-call basis using the )BD(-i)ES( switch on xpaset, xpaget, etc:
1569 ) 6 43 PR( [sh]$ xpaget -i "local_machine:12345" xpa
1570 class: XPA
1571 name: xpa
1572 method: 88877766:2778
1573 sendian: little
1574 cendian: big)RP(
1575 Alternatively, the XPA_NSINET variable on the remote machine can be
1576 set to point directly to xpans on the local machine, removing
1577 the need to override this value each time an XPA program is run:
1578 ) 7 42 PR( [csh]$ setenv XPA_NSINET 'karapet:$port'
1579 [csh]$ xpaget xpa
1580 class: XPA
1581 name: xpa
1582 method: 88877766:2778
1583 sendian: little
1584 cendian: big)RP(
1585 Here, '$port' means to use the default XPA name service port \20114285\202.
1586 not a port environment variable.
1587
1588 )0 P(Access permission for remote client machines can be stored in a file
1589 on the local machine pointed to by the )BD(XPA_ACLFILE)ES( environment
1590 variable or using the )BD(XPA_DEFACL)ES( environment variable. See )0 41 1 A(XPA Access Control)41 0 TN TL()Ec /AF f D( for more information.
1591
1592 )0 2 24 H(Remote)WB 78 Sn( Registration)EH(
1593
1594 If xpans is running on the remote client machine, then a local xpaset
1595 command can be used with the )BD(-remote)ES( sub-command to
1596 register the local XPA service in the remote name service, while at
1597 the same time giving the remote machine permission to access the local
1598 service. For example, assume again that "stest" is running on the
1599 local machine and that xpans is also running on the remote machine.
1600 To register access of this local xpa on the remote machine, use
1601 the xpaset and the )BD(-remote)ES( sub-command:
1602 ) 1 56 PR( [sh]$ ./xpaset -p xpa -remote 'remote_machine:$port' +)RP(
1603 To register the local xpa access point on the remote machine with xpaget
1604 access only, execute:
1605 ) 1 56 PR( [sh]$ ./xpaset -p xpa -remote 'remote_machine:$port' g)RP(
1606 Once the remote registration command is executed, the remote client
1607 machine will have an entry such as the following in its own xpans name
1608 service:
1609 ) 2 31 PR( [csh]$ xpaget xpans
1610 XPA xpa gs 88877766:2839 eric)RP(
1611 The xpa access point can now be utilized on the remote machine without
1612 further setup:
1613 ) 6 23 PR( [csh]$ xpaget xpa
1614 class: XPA
1615 name: xpa
1616 method: 838e2f68:2839
1617 sendian: little
1618 cendian: big)RP(
1619 To unregister remote access from the local machine, use the same
1620 command but with a '-' argument:
1621 ) 1 54 PR( [sh]$ xpaset -p xpa -remote 'remote_machine:$port' -)RP(
1622 The benefit of using remote registration is that communication with
1623 remote access points can be mixed with that of other access points
1624 on the remote machine. Using )0 3 1 A(Access Point
1625 Names and Templates)3 0 TN TL()Ec /AF f D(, one XPA command can be used to send or
1626 receive messages to the remote and local services.
1627
1628 )0 2 25 H(XPANS)WB 79 Sn( Proxy Registration)EH(
1629
1630 The two methods described above are useful when the local and remote
1631 machines are able to communicate freely to one another. This would be
1632 the case on most Local Area Networks \201LANs\202 where all machines are
1633 behind the same firewall and there is no port blocking between
1634 machines on the same LAN. The situation is more complicated when the
1635 XPA server is behind a firewall, where outgoing connections are
1636 allowed, but incoming port blocking is implemented to prevent machines
1637 outside the firewall from connecting to machines inside the
1638 firewall. Such incoming port blocking will prevent xpaset and xpaget
1639 from connecting to an XPA server inside a firewall.
1640
1641 )0 P(To allow locally fire-walled XPA services to register with remote
1642 machines, we have implemented a proxy service within the xpans name
1643 server. To register remote proxy service, xpaset and the
1644 )BD(-remote)ES( sub-command is again used, but with an additional
1645 )BD(-proxy)ES( argument added to the end of the command:
1646 ) 1 63 PR( [sh]$ ./xpaset -p xpa -remote 'remote_machine:$port' g -proxy)RP(
1647 Once a remote proxy registration command is executed, the remote
1648 machine will have an entry such as the following in its own xpans name
1649 service:
1650 ) 2 32 PR( [csh]$ xpaget xpans
1651 XPA xpa gs @88877766:2839 eric)RP(
1652 The '@' sign in the name service entry indicates that xpans proxy
1653 processing is being used for this access point. Other than that, from
1654 the user's point of view, there is no difference in how this XPA
1655 access point is contacted using XPA programs \201xpaset, xpaget, etc.\202 or
1656 libraries:
1657 ) 6 23 PR( [csh]$ xpaget xpa
1658 class: XPA
1659 name: xpa
1660 method: 88877766:3053
1661 sendian: little
1662 cendian: big)RP(
1663 )0 P(Of course, the underlying processing of the XPA requests is very much
1664 different when xpans proxy is involved. Instead of an XPA program such
1665 contacting the XPA service directly, it contacts the local xpans.
1666 Acting as a proxy server, xpans communicates with the XPA service
1667 using the command channel established at registration time. Commands
1668 \201including establishing a new data channel\202 are sent between xpans and
1669 the XPA service to set up a new message transfer, and then data is fed
1670 to/from the xpa request, through xpans, from/to the XPA service. In
1671 this way, it can be arranged so that connections between the
1672 fire-walled XPA service and the remote client are always initiated by
1673 the XPA service itself. Thus, incoming connections that would be
1674 blocked by the firewall are avoided. Note that there is a performance
1675 penalty for using the xpans/proxy service. Aside from extra overhead
1676 to set up proxy communication, all data must be sent through the
1677 intermediate proxy process.
1678
1679 )0 P(The xpans proxy scheme requires that the remote client allow the local
1680 XPA server machine to connect to the remote xpans/proxy server. If the
1681 remote client machine also is behind a port-blocking firewall, such
1682 connections will be disallowed. In this case, the only solution is to
1683 open up some ports on the remote client machine to allow incoming
1684 connections to xpans/proxy. Two ports must be opened \201for command and
1685 data channel connections\202. By default, these two ports are 14285 and
1686 14287. The port numbers can be changed using the )BD(XPA_NSINET)ES(
1687 environment variable. This variable takes the form:
1688 ) 1 49 PR( setenv XPA_NSINET machine:port1[,port2[,port3]])RP(
1689 where port1 is the main connecting port, port2 is the XPA access port,
1690 and port3 is the secondary data connecting port. The second and third
1691 ports are optional and default to port1+1 and port1+2, respectively.
1692 It is port1 and port3 that must be left open for incoming connections.
1693
1694 )0 P(For example, to change the port assignments so that xpans listens
1695 for registration commands on port 12345 and data commands on port 28573:
1696 ) 1 32 PR( setenv XPA_NSINET myhost:12345)RP(
1697 Alternatively, all three ports can be assigned explicitly:
1698 ) 1 43 PR( setenv XPA_NSINET remote:12345,3000,12346)RP(
1699 In this case 12345 and 12346 should be open for incoming connections.
1700 The XPA access port \201which need not be open to the outside
1701 world\202 is set to 3000.
1702
1703 )0 P(Finally, note that we currently have no mechanism to cope with
1704 Internet proxy servers \201such as SOCKS servers\202. If an XPA service is
1705 running on a machine that cannot connect directly to outside machines,
1706 but goes through a proxy server instead, there currently is no way to
1707 register that XPA service with a remote machine. We hope to implement
1708 support for SOCKS proxy in a future release.
1709
1710
1711
1712
1713
1714 )0 P()0 0 1 A(Go to XPA Help Index)0 0 TN TL()Ec /AF f D(
1715
1716 )0 5 26 H(Last)WB 80 Sn( updated: September 10, 2003)EH(
1717 )WB NL
1718 /Cb Db D /Ct [16#00 16#00 16#00] D /Cl [16#00 16#00 16#00] D /CL -1 D Ct Sc
1719 DS
1720 /Ba f D /BO 0 D Bs
1721 /UR (users.html) D
1722 /Ti (Distinguishing Users) D
1723 /Au () D
1724 /Df f D
1725 /ME [()] D
1726
1727 0 BO R
1728 ()1 Sl()WB 7 Sn(
1729
1730
1731 )0 2 27 H(XPAUsers:)WB 82 Sn()WB 81 Sn( Distinguishing Users)EA()EH(
1732
1733
1734 )0 2 28 H(Summary)WB 83 Sn()EH(
1735 )0 P(XPA normally distinguishes between users on a given host, but it is possible
1736 to send data to access points belonging to other users.
1737
1738
1739 )0 2 29 H(Description)WB 84 Sn()EH(
1740 )0 P(A single XPA name service typically serves all users on a given
1741 machine. Two users can register the same XPA access points on the
1742 same machine without conflict, because the user's username is
1743 registered with each access point and, by default, programs such as
1744 xpaget and xpaset only process access points of the appropriate user.
1745 For example:
1746 ) 4 32 PR( XPA xpa1 gs 838e2f67:1262 eric
1747 XPA xpa2 gs 838e2f67:1266 eric
1748 XPA xpa1 gs 838e2f67:2523 john
1749 XPA xpa2 gs 838e2f67:2527 john)RP(
1750 Here the users "eric" and "john" both have registered the access
1751 points xpa1 and xpa2. When either "john" or "eric" retrieves
1752 information from xpa1, they will process only the access point
1753 registered in their user name.
1754
1755 )0 P(If you want to access another user's XPA access points on a single
1756 machine, use the -u [user] option on xpaset, xpaget, etc. For example,
1757 if eric executes:
1758 ) 1 21 PR( xpaget -u john xpa1)RP(
1759 he will access John's xpa1 access point.Use "*" to access all users
1760 on a given machine:
1761 ) 1 20 PR( xpaget -u "*" xpa1)RP(
1762 Note that the )0 40 1 A(XPA Environment Variable)40 0 TN TL()Ec /AF f D(
1763 XPA_NSUSERS can be used to specify the default list of users to
1764 process:
1765 ) 1 32 PR( setenv XPA_NSUSERS "eric,john")RP(
1766 will cause access points from both "eric" and "john" to be processed
1767 by default.
1768
1769
1770
1771
1772
1773 )0 P()0 0 1 A(Go to XPA Help Index)0 0 TN TL()Ec /AF f D(
1774
1775 )0 5 30 H(Last)WB 85 Sn( updated: September 10, 2003)EH(
1776 )WB NL
1777 /Cb Db D /Ct [16#00 16#00 16#00] D /Cl [16#00 16#00 16#00] D /CL -1 D Ct Sc
1778 DS
1779 /Ba f D /BO 0 D Bs
1780 /UR (programs.html) D
1781 /Ti (XPA Programs) D
1782 /Au () D
1783 /Df f D
1784 /ME [()] D
1785
1786 0 BO R
1787 ()1 Sl()WB 8 Sn(
1788 )0 2 31 H(XPA)WB 86 Sn( Programs)EH(
1789
1790 )0 2 32 H(Summary)WB 87 Sn()EH(
1791
1792 )0 P(Use the XPA programs to send/receive data to/from XPA servers from the
1793 command line or from scripts.
1794
1795 )0 P() 7 116 PR( <data> | xpaset [-h] [-i nsinet] [-m method] [-n] [-p] [-s] [-t sval,lval] [-u users] [-v] <template> [paramlist]
1796
1797 xpaget [-h] [-i nsinet] [-m method] [-s] [-t sval,lval] [-u users] <template> [paramlist]
1798
1799 xpainfo [-h] [-i nsinet] [-m method] [-n] [-s] [-t sval,lval] [-u users] <template> [paramlist]
1800
1801 xpaaccess [-c] [-h] [-i nsinet] [-m method] [-n] [-u users] [-v|-V] <template> [type])RP(
1802
1803
1804
1805
1806 )0 2 33 H(xpaset:)WB 88 Sn()WB 10 Sn( send data to one or more XPA servers)EA()EH(
1807
1808
1809 )BD() 1 124 PR(<data> | xpaset [-h] [-i nsinet] [-m method] [-n] [-p] [-s] [-t sval,lval] [-u users] [-v] <template|host:port> [paramlist])RP()ES(
1810
1811
1812 )0 P() 10 79 PR( -h print help message
1813 -i access XPA point on different machine \201override XPA_NSINET\202
1814 -m override XPA_METHOD environment variable
1815 -n don't wait for the status message after server completes
1816 -p don't read \201or send\202 buf data from stdin
1817 -s enter server mode
1818 -t [s,l] set short and long timeouts \201override XPA_[SHORT,LONG]_TIMEOUT\202
1819 -u [users] XPA points can be from specified users \201override XPA_NSUSERS\202
1820 -v verify message to stdout
1821 --version display version and exit)RP(
1822
1823
1824 )0 P(Data read from stdin will be sent to access points matching the
1825 )0 3 1 A(template)3 0 TN TL()Ec /AF f D(
1826 or host:port.
1827 A set of qualifying parameters can be appended.
1828 )0 P(Normally, xpaset reads data input from stdin until EOF and sends those
1829 data to the XPA target, along with parameters entered on the command
1830 line. For example to send a FITS file to the ds9 image display:
1831 ) 1 32 PR( cat foo.fits | xpaset ds9 fits)RP(
1832 )0 P(Sometimes, however, it is desirable to send only parameters to an XPA
1833 access point, without sending data. For such cases, use the -p switch to
1834 indicate that there is no data being send to stdin. For example, to
1835 change the colormap used by the ds9 image display program, use:
1836 ) 1 30 PR( csh> xpaset -p ds9 cmap Heat)RP(
1837 Of course, this also can be accomplished by sending EOF to stdin in
1838 any of the usual ways:
1839 ) 4 43 PR( csh> echo "" | xpaset ds9 cmap Heat
1840 csh> xpaget ds9 cmap Heat < /dev/null
1841 csh> xpaset ds9 cmap Heat
1842 ^D # Ctl-D signals EOF)RP(
1843 )0 P(The -s switch puts xpaset into server mode, in which commands and data
1844 can be sent to access points without having to run xpaset multiple times.
1845 \201Its not clear if this buys you much!\202 The syntax for sending commands
1846 in server mode is:
1847 )0 P() 8 24 PR( csh> xpaset -s
1848 xpaset ds9 colormap I8
1849 ^D
1850 xpaset ds9 regions
1851 circle 200 300 40
1852 circle 300 400 50
1853 ^D
1854 etc.)RP(
1855 After the required "xpaset" command is specified, optional ASCII data
1856 can be appended \201as in the region example\202. A single data/command set is
1857 delimited by ^D. Note that typing ^D when a command is expected terminates
1858 the program.
1859 )0 P(NB: server mode only works from the terminal and only ASCII data can be
1860 sent in this way.
1861 )0 P()BD(Examples:)ES(
1862 ) 2 40 PR( csh> xpaset ds9 file < foo.fits
1863 csh> echo "stop" | xpaset myhost:12345)RP(
1864
1865
1866
1867
1868 )0 2 34 H(xpaget:)WB 89 Sn()WB 9 Sn( retrieve data from one or more XPA servers)EA()EH(
1869
1870
1871 )BD() 1 99 PR(xpaget [-h] [-i nsinet] [-m method] [-s] [-t sval,lval] [-u users] <template|host:port> [paramlist])RP()ES(
1872
1873
1874 )0 P() 8 79 PR( -h print help message
1875 -i access XPA point on different machine \201override XPA_NSINET\202
1876 -m override XPA_METHOD environment variable
1877 -n don't wait for the status message after server completes
1878 -s enter server mode
1879 -t [s,l] set short and long timeouts \201override XPA_[SHORT,LONG]_TIMEOUT\202
1880 -u [users] XPA points can be from specified users \201override XPA_NSUSERS\202
1881 --version display version and exit)RP(
1882
1883
1884 )0 P(Data will be retrieved from access points matching the
1885 )0 3 1 A(template)3 0 TN TL()Ec /AF f D(
1886 or host:port.
1887 A set of qualifying parameters can be appended.
1888 )0 P()BD(Examples:)ES(
1889 ) 2 38 PR( csh> xpaget ds9 images
1890 csh> xpaget myhost.harvard.edu:12345)RP(
1891
1892
1893
1894
1895 )0 2 35 H(xpainfo:)WB 90 Sn()WB 11 Sn( send short message to one or more XPA servers)EA()EH(
1896
1897
1898 )BD() 1 105 PR(xpainfo [-h] [-i nsinet] [-m method] [-n] [-s] [-t sval,lval] [-u users] <template|host:port> [paramlist])RP()ES(
1899
1900
1901 )0 P() 8 79 PR( -h print help message
1902 -i access XPA point on different machine \201override XPA_NSINET\202
1903 -m override XPA_METHOD environment variable
1904 -n don't wait for the status message after server completes
1905 -s enter server mode
1906 -t [s,l] set short and long timeouts \201override XPA_[SHORT,LONG]_TIMEOUT\202
1907 -u [users] XPA points can be from specified users \201override XPA_NSUSERS\202
1908 --version display version and exit)RP(
1909
1910
1911 )0 P(Info will be sent to access points matching the
1912 )0 3 1 A(template)3 0 TN TL()Ec /AF f D(
1913 or host:port.
1914 A set of qualifying parameters can be appended.
1915 )0 P()BD(Examples:)ES(
1916 ) 1 30 PR( csh> xpainfo IMAGE ds9 image)RP(
1917
1918
1919
1920
1921 )0 2 36 H(xpaaccess:)WB 91 Sn()WB 12 Sn( see if template matches registered XPA access points)EA()EH(
1922
1923
1924 )BD() 1 95 PR(xpaaccess [-c] [-h] [-i nsinet] [-m method] [-n] [-t sval,lval] [-u users] -v <template> [type])RP()ES(
1925
1926
1927 )0 P() 10 79 PR( -c contact each access point individually
1928 -h print help message
1929 -i access XPA point on different machine \201override XPA_NSINET\202
1930 -m override XPA_METHOD environment variable
1931 -n return number of matches instead of "yes" or "no"
1932 -t [s,l] set short and long timeouts \201override XPA_[SHORT,LONG]_TIMEOUT\202
1933 -u [users] XPA points can be from specified users \201override XPA_NSUSERS\202
1934 -v print info about each successful access point
1935 -V print info or error about each access point
1936 --version display version and exit)RP(
1937
1938
1939 )0 P(xpaaccess returns "yes" to stdout \201with a return error code if 1\202 if there are
1940 existing XPA access points that match the
1941 )0 3 1 A(template)3 0 TN TL()Ec /AF f D(
1942 \201and optional access type: g,i,s\202. Otherwise, it returns "no" \201with a
1943 return error code of 0\202. If -n is specified, the number of matches is
1944 returned instead \201both to stdout and in the returned error code\202. If
1945 -v is specified, each access point is displayed to stdout instead of
1946 the number of matches.
1947
1948 )0 P(By default, xpaaccess simply contacts the xpans name server to find
1949 the list of registered access points that match the specified
1950 template. It also checks to make sure the specified types are
1951 supported by that access point. This is the fastest way to determine
1952 available access points. However, an access point might registered but
1953 not yet available, if, for example, the server program has not entered
1954 its event loop to process XPA requests. To find access points that are
1955 guaranteed to be available for processing, use the -c \201contact\202
1956 switch. With this switch, xpaaccess contacts each matching XPA server
1957 \201rather than the name server\202 to make sure the registered access point
1958 really is ready for processing. In this mode, if an access point is
1959 registered but not available, xpaaccess will pause for a period of
1960 time equal to the XPA_LONG_TIMEOUT, in order to give the server a
1961 chance to ready itself. By default, this timeout is 30 seconds. You
1962 can shorten the time of delay using the -t "short,long" switch. For
1963 example, to shorten the delay time to 2 seconds, use:
1964 ) 1 27 PR( xpaaccess -c -t "2,2" ds9)RP(
1965 The first argument is the short delay value, and is ignored in this
1966 operation. The second is the long delay timeout.
1967
1968 )0 P(Note also that the default xpaaccess method \201no -c switch\202 does not
1969 check access control \201acls\202 but rather only checks whether the access
1970 point is both registered with the xpans name server and provides the
1971 specified type of access. In other words, the default xpaaccess could
1972 return 'yes' when you might not actually have access. This mode also
1973 always returns 'yes' for the xpans name server itself, regardless of
1974 whether the name server is active. The -c \201contact\202 switch, which
1975 contacts the access point directly, can and does check the access
1976 control \201only for servers using version 2.1 and above\202 and also
1977 returns the real status of xpans.
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989 )0 P()0 0 1 A(Go to XPA Help Index)0 0 TN TL()Ec /AF f D(
1990
1991 )0 5 37 H(Last)WB 92 Sn( updated: September 10, 2003)EH(
1992 )WB NL
1993 /Cb Db D /Ct [16#00 16#00 16#00] D /Cl [16#00 16#00 16#00] D /CL -1 D Ct Sc
1994 DS
1995 /Ba f D /BO 0 D Bs
1996 /UR (xpamb.html) D
1997 /Ti (The XPA Message Bus \201xpamb\202) D
1998 /Au () D
1999 /Df f D
2000 /ME [()] D
2001
2002 0 BO R
2003 ()1 Sl()WB 13 Sn(
2004
2005
2006 )0 2 38 H(xpamb:)WB 94 Sn()WB 93 Sn( the XPA Message Bus)EA()EH(
2007
2008
2009 )0 2 39 H(Summary)WB 95 Sn()EH(
2010 )0 P(The xpamb program can act as a "classical" message bus interface
2011 between clients and servers. A client can send a data request to
2012 the message bus, which then interfaces with multiple servers and
2013 returns the data back to the client.
2014
2015
2016 )0 2 40 H(Description)WB 96 Sn()EH(
2017 )0 P(A "classical" message bus \201such as ToolTalk\202 consists of servers and
2018 clients, along with a mediating program that transfers data between
2019 different processes. XPA takes a slightly different approach in that
2020 communication between clients and servers is direct. This generally
2021 is the correct technique when there is only one connection \201or even a
2022 small number of connections\202, but can become inefficient for the
2023 serving program if a large amount of data is being transferred to many
2024 clients. For example, if a real-time data acquisition program is
2025 broadcasting a FITS image to several clients, it would need to
2026 transmit that image to each client individually. This might interfere
2027 with its own processing cycles. The preferable mechanism would be to
2028 pass the image off to an intermediate program that can then broadcast
2029 the data to the several clients.
2030 )0 P(The )BD(xpamb)ES( program can alleviate such problems by functioning
2031 as a message bus in cases where such an intermediary process is
2032 wanted. It pre-defines a single access point named
2033 )BD(XPAMB:xpamb)ES( to which data can be sent for re-broadcast. You
2034 also can tell )BD(xpamb)ES( to save the data, and associate with that
2035 data a new access point, so that it can be retrieved later on.
2036
2037 )0 P(All interaction with )BD(xpamb)ES( is performed through
2038 )BD(xpaset)ES( and )BD(xpaget)ES( \201or the corresponding API
2039 routines, )BD(XPASet\201\202)ES( and )BD(XPAGet\201\202)ES(\202 to the
2040 )BD(XPAMB:xpamb)ES( access point. That is, )BD(xpamb)ES( is just
2041 another XPA-enabled program that responds to requests from
2042 clients. The paramlist is used to specify the targets to which
2043 the data will be for re-broadcast, as well as the re-broadcast paramlist:
2044 ) 1 69 PR( data | xpaset xpamb [switches] broadcast-target broadcast-paramlist)RP(
2045 Optional switches are used to store data, and manipulate stored data,
2046 and are described below.
2047
2048 )0 P(In its simplest form, you can, for example, send a FITS image to xpamb for
2049 broadcasting to all ds9 image simply by executing:
2050 ) 1 51 PR( cat foo.fits | xpaset xpamb "DS9:*" fits foo.fits)RP(
2051 Since )BD(DS9)ES( is the class name for the ds9 image display
2052 program, this will result in the FITS image being re-sent to all fits
2053 access points for all active image display programs.
2054
2055 )0 P(You can send stored data and new data to the same set of access points at
2056 the same time. The stored data always is send first, followed by the new
2057 data:
2058 ) 1 62 PR( cat foo2.fits | xpaset xpamb -send foo "DS9:*" fits foo.fits)RP(
2059 will first send the foo.fits file, and then the foo2.fits file to all
2060 access points of class )BD(DS9)ES(. Notice that in this example,
2061 the foo2.fits file is not stored, but it could be stored by using the
2062 )BD(-store [name])ES( switch on the command line.
2063
2064 )0 P(The )BD(xpaget)ES( command can be used to retrieve a data from XPA
2065 access points or from a stored data buffer, or retrieve information
2066 about a stored data buffer. If no arguments are given:
2067 ) 1 14 PR( xpaget xpamb)RP(
2068 then information about all currently stored data buffers is returned. This
2069 information includes the data and time at which the data was stored, the
2070 size in bytes of the data, and the supplied info string.
2071
2072 )0 P(If arguments are specified, they will be in the form:
2073 ) 1 49 PR( xpaget xpamb [-info] [-data] [name [paramlist]])RP(
2074 If the optional )BD(-info)ES( and/or )BD(-data)ES( switches are specified, then
2075 information and/or data will be returned for the named data buffer
2076 following the switches. You can use either or both of these switches
2077 in a single command. For example, if the -info switch is used:
2078 ) 1 24 PR( xpaget xpamb -info foo)RP(
2079 then the info about that stored data buffer will be returned.
2080 If the -data is used with a specific name:
2081 ) 1 24 PR( xpaget xpamb -data foo)RP(
2082 then the stored data itself will be returned. If both are used:
2083 ) 1 30 PR( xpaget xpamb -info -data foo)RP(
2084 then the info will be returned, followed by the data. Note that it is an
2085 error to specify one of these switches without a data buffer name and that
2086 the paramlist will be ignored.
2087
2088 )0 P(If neither the )BD(-info)ES( or )BD(-data)ES( switch is specified, then
2089 the name refers to an XPA access point \201with an optional paramlist
2090 following\202.
2091 For example:
2092 ) 1 23 PR( xpaget xpamb ds9 file)RP(
2093 is equivalent to:
2094 ) 1 17 PR( xpaget ds9 file)RP(
2095
2096
2097 )0 2 41 H(Options)WB 97 Sn()EH(
2098 )0 P(For xpaset, several optional switches are used to save data and
2099 manipulate the stored data:
2100 )0 DL(
2101 )0 P()0 DT()BD(-data [name])ES(
2102 )DD( Add the supplied data buffer to a pool of stored data buffers,
2103 using the specified name as a unique identifier for later retrieval.
2104 An error occurs if the name already exists \201use either )BD(replace)ES(
2105 or )BD(del)ES( to rectify this\202. The )BD(-add)ES( switch is supported
2106 for backwards compatibility with xpa 2.0.
2107
2108 )0 P()0 DT()BD(-replace [name])ES(
2109 )DD( Replace previously existing stored data having the same unique name
2110 with new data. This essentially is a combination of the )BD(del)ES(
2111 and )BD(data)ES( commands.
2112
2113 )0 P()0 DT()BD(-info ["'info string'"])ES(
2114 )DD( When adding a data buffer, you can specify an informational
2115 string to be stored with that data. This string will be returned
2116 by xpaget:
2117 ) 1 24 PR( xpaget xpamb foo -info)RP(
2118 \201along with other information such as the date/time of storage and the size of
2119 the data buffer\202 if the -info switch is specified. If the info string contains
2120 spaces, you must enclose it in )BD(two)ES( sets of quotes:
2121 ) 1 65 PR( cat foo | xpaset xpamb -store foo -info "'this is info on foo'")RP(
2122 The first set of quotes is removed by the shell while the second is used to
2123 delineate the info string.
2124
2125 )0 P()0 DT()BD(-send [name])ES(
2126 )DD( Broadcast the stored data buffer to the named template.
2127
2128 )0 P()0 DT()BD(-del [name])ES(
2129 )DD( Delete the named data buffer and free all allocated space.)LD(
2130
2131 )0 P(Switches can be used in any combination that makes sense. For example:
2132 ) 1 75 PR( cat foo.fits | xpaset xpamb -store foo -info "FITS" "DS9:*" fits foo.fits)RP(
2133 will broadcast the foo.fits image to all access points of class
2134 )BD(DS9)ES(. In addition, the foo.fits file will be stored under the
2135 name of )BD(foo)ES( for later manipulation such as:
2136 ) 1 49 PR( xpaset -p xpamb -send foo "DS9:*" fits foo.fits)RP(
2137 will re-broadcast the foo.fits image to all access points of class "DS9".
2138
2139
2140
2141
2142
2143 )0 P()0 0 1 A(Go to XPA Help Index)0 0 TN TL()Ec /AF f D(
2144
2145 )0 5 42 H(Last)WB 98 Sn( updated: September 10, 2003)EH(
2146 )WB NL
2147 /Cb Db D /Ct [16#00 16#00 16#00] D /Cl [16#00 16#00 16#00] D /CL -1 D Ct Sc
2148 DS
2149 /Ba f D /BO 0 D Bs
2150 /UR (xpans.html) D
2151 /Ti (The XPA Name Server \201xpans\202) D
2152 /Au () D
2153 /Df f D
2154 /ME [()] D
2155
2156 0 BO R
2157 ()1 Sl()WB 14 Sn(
2158
2159
2160 )0 2 43 H(xpans:)WB 100 Sn()WB 99 Sn( the XPA Name Server)EA()EH(
2161
2162
2163 )0 2 44 H(Summary)WB 101 Sn()EH(
2164 ) 1 70 PR( xpans [-h] [-e] [-k sec] [-p port] [-l log] [-s security log] [-P n])RP(
2165
2166
2167 )0 P() 8 71 PR( -h print help message
2168 -e exit when there are no more XPA connections
2169 -k send keepalive messages every n sec
2170 -l log data base entries to specified file
2171 -p listen for connections on specified port
2172 -s log security info for each connection to specified file
2173 -P accept proxy requests \201P=1\202 using separate thread \201P=2\202
2174 --version display version and exit)RP(
2175
2176
2177 )0 P(The xpans name server is an XPA-enabled program that is used to
2178 manage the names and ports of XPA access points. It is started
2179 automatically when an XPA access point is registered. You can access
2180 the name server using xpaget to get a list of registered access points.
2181 )0 P(The )EM(xpans)ES( name server provides a crucial link between XPA
2182 clients and servers. When an XPA server defines an access point using
2183 XPANew\201\202, XPACmdNew\201\202, or XPAInfoNew\201\202, the name of the access point
2184 is registered in the name service, along with connection information.
2185 The name server then matches class:name templates passed to it by XPA
2186 clients with these registered entries, so that the clients can
2187 communicate with the appropriate servers.
2188
2189 )0 P(The socket connection between an XPA-enabled program and
2190 )EM(xpans)ES( is kept open until the former exits \201or explicitly
2191 closes the connection\202. Apparently, some Internet equipment \201e.g. DSL
2192 modems\202 can cause such a connection to time-out after a period of
2193 inactivity. To prevent this from happening, you can use the )EM(-k
2194 [sec])ES( switch to send a short keep-alive message to each open
2195 connection after the specified time delay. \201Note that this
2196 application level use of keep-alive is necessary only if you are
2197 serving XPA-enabled clients over the Internet and have to deal with
2198 long-term connections involving DSL or similar equipment. XPA uses
2199 the ordinary socket-level keep-alive, which works for all other cases.\202
2200 )BD(NB \20112/2/2009\202: Out-of-band \201URG\202 TCP data, used by xpans
2201 keep-alive, is changed by some Cisco routers into in-band data.
2202 Encountering such a router will break the keep-alive function and may
2203 break your XPA server as well. Proceed with caution!)ES(
2204
2205 )0 P(The )EM(xpans)ES( program will be started automatically \201assuming it
2206 can be found in the user's path\202 when the first XPA access point is
2207 registered. It therefore need not be started explicitly. However,
2208 when started automatically, the )EM(-e)ES( switch is used, so that
2209 the name server will exit when there are no more XPA access points
2210 registered. If you wish to keep the name server running continually,
2211 simply start it manually without the )EM(-e)ES( switch.
2212
2213 )0 P(The name server will keep a log of registered access points if the
2214 )EM(-l [log])ES( switch is used on the command line \201this is the
2215 case for automatic start-up\202. The log contains enough name and connection
2216 information to allow you to re-register all XPA access points in case
2217 the name server process is terminated prematurely. For example, after
2218 the ds9 access point is registered,the log will contain the entry:
2219 ) 1 35 PR( add 838e2f67:1863 ds9 ds9 gs eric)RP(
2220 If )EM(xpans)ES( is terminated but ds9 still is running, you
2221 can re-register both access points for the ds9 process by running:
2222 ) 1 36 PR( xpaset -p 838e2f67:1863 -nsconnect)RP(
2223 Notice that the ip:port specifier is used with )EM(xpaset)ES( to bypass
2224 the need for contacting the name server \201which does not have the name
2225 registered yet!\202
2226
2227 )0 P(The name server will keep a log of security information if the )EM(-s
2228 [security log])ES( switch is used on the command line. For each
2229 accepted connection, \201including connections via the )EM(xpaget)ES(
2230 command\202, information will be logged about the host issuing the
2231 command and the parameters passed into the program. This is most
2232 useful when )EM(xpans)ES( is accepting connections from untrusted
2233 machines.
2234
2235 )0 P(When an XPA access point is removed by a server using )EM(XPAFree\201\202)ES(,
2236 the access information is removed from the name server. If an
2237 XPA-enabled process is terminated, all names registered by that process
2238 will be removed automatically. The log file is always updated to
2239 reflect the currently registered access points.
2240
2241 )0 P(The name server itself has an XPA access point names )EM(xpans)ES(
2242 registered through which you can find out information about currently
2243 registered access points \201assuming you have access to the name server;
2244 see )0 41 1 A(XPA Access Control)41 0 TN TL()Ec /AF f D( for more information\202.
2245 For each registered access point, the following information is returned:
2246 ) 5 80 PR( class # class of the access point
2247 name # name of the access point
2248 access # allowed access \201g=xpaget,s=xpaset,i=xpainfo\202
2249 id # socket access method \201host:port for inet, file for local/unix\202
2250 user # user name of access point owner)RP(
2251
2252 )0 P(For example, to display all currently registered access points, simply execute:
2253 ) 1 14 PR( xpaget xpans)RP(
2254 Continuing the example of ds9 above, this will return:
2255 ) 1 31 PR( DS9 ds9 gs 838e2f67:1863 eric)RP(
2256 If the same program has been started with different XPA access names,
2257 you can look up only names matching a specified template. For example,
2258 assume that ds9 has been started up using:
2259 ) 3 25 PR( ds9 &
2260 ds9 -title ds9-1-eric &
2261 ds9 -title ds9-2-eric &)RP(
2262 To lookup all ds9 access points which end in ".eric" and which can
2263 be accessed using )EM(xpaset)ES(, use:
2264 ) 1 35 PR( xpaget xpans "DS9:*.eric" "s" "*")RP(
2265 This will return:
2266 ) 2 39 PR( DS9 ds9-2-eric gs 838e29d3:42102 eric
2267 DS9 ds9-1-eric gs 838e29d3:42105 eric)RP(
2268 The third argument "*" requests all access points from all users.
2269 You also can specify a specific user name and only access points
2270 registered by that user will be returned.
2271
2272 )0 P(The name server uses the )EM(XPA_METHOD)ES( environment variable
2273 to determine whether it should listen for requests on INET or LOCAL
2274 sockets. Since XPA access points also use this environment variable,
2275 the choice of socket method will be consistent. Note that, when INET
2276 sockets are used, a local server can be accessed from remote machines
2277 if the )EM(XPA_NSINET)ES( environment variable is set to point to
2278 the local machine. See
2279 )0 40 1 A(XPA Environment Variables)40 0 TN TL()Ec /AF f D(
2280 for more information.
2281
2282 )0 P(An experimental feature of xpans is its ability to act as a proxy to
2283 XPA servers behind firewalls that want to communicate with external
2284 processes. The basic idea is the following: an XPA server \201call it
2285 "foo"\202 on host1, possibly behind a firewall, makes a remote connection
2286 to a proxy-enabled xpans program on host2 \201specifying host2's XPA method\202.
2287 For example:
2288 ) 1 59 PR( xpaset -p foo -remote 'host2:28571' + -proxy # on host1)RP(
2289 When this is done, host2 can use xpaset, xpaget, and xpainfo calls to
2290 communicate with the XPA server foo. All command communication is
2291 performed via the xpans socket connection between foo on host1 and
2292 xpans on host2 \201which was initiated by foo from inside the firewall\202.
2293 Data communication is similarly performed using a socket connection
2294 initiated on host1 \201usually with a port value two greater than the
2295 port value of the main xpans socket connection\202. An xpaset or xpaget
2296 call on host2 contacts xpans, which performs an XPASet\201\202 or XPAGet\201\202
2297 call to foo, passing commands and data back and forth between the two
2298 programs.
2299
2300 )0 P(By default, proxy connections are not allowed by xpans. If the -P switch is
2301 specified with a value of 1, proxy connection are allowed, but all proxy
2302 communication is performed in the same thread as xpans processing. If
2303 a value of 2 is specified, the proxy processing is performed in a
2304 separate thread \201assuming pthreads are supported on your system\202.
2305 Because xpa callback processing of any type can take a long time and
2306 therefore can interfere with normal xpans processing, threaded proxy
2307 connections \201-P 2\202 are recommended. When using proxy connections, it
2308 might also be useful to set the XPA_IOCALLSXPA environment variable, so
2309 that multiple proxy requests can be handled at the same time, instead of
2310 serially.
2311
2312 )0 P(Note that this proxy interface to xpans is experimental. It is used
2313 to provide remote data analysis capabilities on the Chandra-Ed system
2314 using ds9. \201See http://chandra-ed.cfa.harvard.edu and
2315 http://hea-www.harvard.edu/saord/ds9 for more details\202. As always, please
2316 contact us if you have problems or questions.
2317
2318
2319
2320
2321
2322 )0 P()0 0 1 A(Go to XPA Help Index)0 0 TN TL()Ec /AF f D(
2323
2324 )0 5 45 H(Last)WB 102 Sn( updated: January 24, 2005)EH(
2325 )WB NL
2326 /Cb Db D /Ct [16#00 16#00 16#00] D /Cl [16#00 16#00 16#00] D /CL -1 D Ct Sc
2327 DS
2328 /Ba f D /BO 0 D Bs
2329 /UR (server.html) D
2330 /Ti (XPA Server API) D
2331 /Au () D
2332 /Df f D
2333 /ME [()] D
2334
2335 0 BO R
2336 ()1 Sl()WB 15 Sn(
2337
2338
2339 )0 2 46 H(XPAServer:)WB 106 Sn()WB 103 Sn( The XPA Server-side Programming Interface)EA()EH(
2340
2341
2342 )0 2 47 H(Summary)WB 107 Sn()EH(
2343 A description of the XPA server-side programming interface.
2344
2345
2346 )0 2 48 H(Introduction)WB 108 Sn()WB 104 Sn( to XPA Server Programming)EH()EA(
2347 )0 P(Creating an XPA server is easy: you generally only need to call the
2348 XPANew\201\202 subroutine to define a named XPA access point and set up the
2349 send and receive callback routines. You then enter an event loop such
2350 as XPAMainLoop\201\202 to field XPA requests.
2351 ) 27 66 PR( #include <xpa.h>
2352
2353 XPA )0 16 1 A(XPANew)16 0 TN TL()Ec /AF f D(\201char *class, char *name, char *help,
2354 int \201*send_callback\202\201\202, void *send_data, char *send_mode,
2355 int \201*rec_callback\202\201\202, void *rec_data, char *rec_mode\202;
2356
2357 XPA )0 17 1 A(XPACmdNew)17 0 TN TL()Ec /AF f D(\201char *class, char *name\202;
2358
2359 XPACmd )0 18 1 A(XPACmdAdd)18 0 TN TL()Ec /AF f D(\201XPA xpa,
2360 char *name, char *help,
2361 int \201*send_callback\202\201\202, void *send_data, char *send_mode,
2362 int \201*rec_callback\202\201\202, void *rec_data, char *rec_mode\202;
2363
2364 void )0 19 1 A(XPACmdDel)19 0 TN TL()Ec /AF f D(\201XPA xpa, XPACmd cmd\202;
2365
2366 XPA )0 20 1 A(XPAInfoNew)20 0 TN TL()Ec /AF f D(\201char *class, char *name,
2367 int \201*info_callback\202\201\202, void *info_data, char *info_mode\202;
2368
2369 int )0 21 1 A(XPAFree)21 0 TN TL()Ec /AF f D(\201XPA xpa\202;
2370
2371 void )0 22 1 A(XPAMainLoop)22 0 TN TL()Ec /AF f D(\201void\202;
2372
2373 int )0 23 1 A(XPAPoll)23 0 TN TL()Ec /AF f D(\201int msec, int maxreq\202;
2374
2375 void )0 105 1 A(XPAAtExit)105 0 TN TL()Ec /AF f D(\201void\202;
2376
2377 void )0 24 1 A(XPACleanup)24 0 TN TL()Ec /AF f D(\201void\202;)RP(
2378
2379 )0 2 49 H(Introduction)WB 109 Sn()EH(
2380
2381 To use the XPA application programming interface, a software developer
2382 generally will include the xpa.h definitions file:
2383 ) 1 18 PR( #include <xpa.h>)RP(
2384 in the software module that defines or accesses an XPA access point, and
2385 then will link against the libxpa.a library:
2386 ) 1 27 PR( gcc -o foo foo.c libxpa.a)RP(
2387 XPA has been compiled using both C and C++ compilers.
2388
2389 )0 P(A server program generally defines an XPA access point by calling the
2390 XPANew\201\202 routine and specifies "send" and/or "receive" callback
2391 procedures to be executed by the program when an external process
2392 either sends data or commands to this access point or requests data or
2393 information from this access point. A program also can define several
2394 sub-commands for a single access point by calling XPACmdNew\201\202 and
2395 XPACmdAdd\201\202 instead. Having defined one or more public access points
2396 in this way, an XPA server program enters its usual event loop \201or
2397 uses the standard XPA event loop\202.
2398
2399
2400
2401
2402 )0 2 50 H(XPANew:)WB 110 Sn()WB 16 Sn( create a new XPA access point)EA()EH(
2403
2404
2405 )BD() 7 49 PR( #include <xpa.h>
2406
2407 XPA XPANew\201char *class, char *name, char *help,
2408 int \201*send_callback\202\201\202,
2409 void *send_data, char *send_mode,
2410 int \201*rec_callback\202\201\202,
2411 void *rec_data, char *rec_mode\202;)RP()ES(
2412
2413
2414 )0 P(Create a new XPA public access point with the class:name
2415 identifier )0 3 1 A(template)3 0 TN TL()Ec /AF f D(
2416 and enter this access point into the XPA name server, so that it
2417 can be accessed by external processes. XPANew\201\202 returns an XPA struct.
2418 Note that the length of the class and name designations must be less
2419 than or equal to 1024 characters each.
2420
2421 )0 P(The XPA name server daemon, xpans, will be started automatically if it
2422 is not running already \201assuming it can be found in the path\202. The
2423 program's ip address and listening port are specified by the
2424 environment variable XPA_NSINET, which takes the form :. If
2425 no such environment variable exists, then xpans is started on the
2426 current machine listening on port 14285. It also uses 14286 as a
2427 known port for its public access point \201so that routines do not have
2428 to go to the name server to find the name server ip and port!\202
2429 As of XPA 2.1.1, version information is exchanged between the xpans
2430 process and the new access point. If the access point uses an XPA
2431 major/minor version newer than xpans, a warning is issued by both processes,
2432 since mixing of new servers and old xpa programs \201xpaset, xpaget,
2433 xpans, etc.\202 is not likely to work. You can turn off the warning
2434 message by setting the XPA_VERSIONCHECK environment variable to "false".
2435
2436 )0 P(The help string is meant to be returned by a request from xpaget:
2437 ) 1 25 PR( xpaget class:name -help)RP(
2438 )0 P(A send_callback and/or a receive_callback can be specified; at
2439 least one of them must be specified.
2440
2441 )0 P(A send_callback can be specified that will be executed in response to
2442 an external request from the xpaget program, the XPAGet\201\202 routine, or
2443 XPAGetFd\201\202 routine. This callback is used to send data to the
2444 requesting client.
2445
2446 )0 P(The calling sequence for send_callback\201\202 is:
2447 ) 7 53 PR( int send_callback\201void *send_data, void *call_data,
2448 char *paramlist, char **buf, size_t *len\202
2449 {
2450 XPA xpa = \201XPA\202call_data;
2451 ...
2452 return\201stat\202;
2453 })RP(
2454 )0 P(The send_mode string is of the form: "key1=value1,key2=value2,..."
2455 The following keywords are recognized:
2456 ) 4 81 PR( key value default explanation
2457 ------ -------- -------- -----------
2458 acl true/false true enable access control
2459 freebuf true/false true free buf after callback completes)RP(
2460 )0 P(The call_data should be recast to the XPA struct as shown. In
2461 addition, client-specific data can be passed to the callback in
2462 send_data.
2463
2464 )0 P(The paramlist will be supplied by the client as qualifying parameters
2465 for the callback. There are two ways in which the send_callback\201\202
2466 routine can send data back to the client:
2467
2468 )0 P(1. The send_callback\201\202 routine can fill in a buffer and pass back a
2469 pointer to this buffer. An integer len also is returned to specify the
2470 number of bytes of data in buf. XPA will send this buffer to the
2471 client after the callback is complete.
2472
2473 )0 P(2. The send_callback can send data directly to the client by writing
2474 to the fd pointed by the macro:
2475 ) 1 17 PR( xpa_datafd\201xpa\202)RP(
2476 )0 P(Note that this fd is of the kind returned by socket\201\202 or open\201\202.
2477
2478 )0 P(If a buf has been allocated by a standard malloc routine, filled, and
2479 returned to XPA, then freebuf generally is set so that the buffer will
2480 be freed automatically when the callback is completed and data has
2481 been sent to the client. If a static buf is returned, freebuf should
2482 be set to false to avoid a system error when freeing static storage.
2483 Note that default value for freebuf implies that the callback will
2484 allocate a buffer rather than use static storage.
2485
2486 )0 P(On the other hand, if buf is dynamically allocated using a method
2487 other than a standard malloc/calloc/realloc routine \201e.g. using Perl's
2488 memory allocation and garbage collection scheme\202, then it is necessary
2489 to tell XPA how to free the allocated buffer. To do this, use the
2490 XPASetFree\201\202 routine within your callback:
2491 ) 1 69 PR( void XPASetFree\201XPA xpa, void \201*myfree\202\201void *\202, void *myfree_ptr\202;)RP(
2492 The first argument is the usual XPA handle. The second argument is the
2493 special routine to call to free your allocated memory. The third
2494 argument is an optional pointer. If not NULL, the specified free
2495 routine is called with that pointer as its sole argument. If NULL, the
2496 free routine is called with the standard buf pointer as its sole
2497 argument. This is useful in cases where there is a mapping between the
2498 buffer pointer and the actual allocated memory location, and the
2499 special routine is expecting to be passed the former.
2500
2501 )0 P(If, while the callback performs its processing, an error occurs that
2502 should be communicated to the client, then the routine XPAError should be
2503 called:
2504 ) 1 29 PR( XPAError\201XPA xpa, char *s\202;)RP(
2505 )0 P(where s is an arbitrary error message. The returned error message
2506 string will be of the form:
2507 ) 1 42 PR( XPA$ERROR [error] \201class:name ip:port\202)RP(
2508 )0 P(If the callback wants to send a specific acknowledgment message back
2509 to the client, the routine XPAMessage can be called:
2510 ) 1 31 PR( XPAMessage\201XPA xpa, char *s\202;)RP(
2511 )0 P(where s is an arbitrary error message. The returned error message
2512 string will be of the form:
2513 ) 1 44 PR( XPA$MESSAGE [message] \201class:name ip:port\202)RP(
2514 )0 P(Otherwise, a standard acknowledgment is sent back to the client
2515 after the callback is completed.
2516
2517 )0 P(The callback routine should return 0 if no error occurs, or -1 to
2518 signal an error.
2519
2520 )0 P(A receive_callback can be specified that will be executed in response
2521 to an external request from the xpaset program, or the XPASet \201or
2522 XPASetFd\201\202\202 routine. This callback is used to process data received
2523 from an external process.
2524
2525 )0 P(The calling sequence for receive_callback is:
2526 ) 7 59 PR( int receive_callback\201void *receive_data, void *call_data,
2527 char *paramlist, char *buf, size_t len\202
2528 {
2529 XPA xpa = \201XPA\202call_data;
2530 ...
2531 return\201stat\202;
2532 })RP(
2533 )0 P(The mode string is of the form: "key1=value1,key2=value2,..."
2534 The following keywords are recognized:
2535 ) 6 92 PR( key value default explanation
2536 ------ -------- -------- -----------
2537 acl true/false true enable access control
2538 buf true/false true server expects data bytes from client
2539 fillbuf true/false true read data into buf before executing callback
2540 freebuf true/false true free buf after callback completes)RP(
2541 )0 P(The call_data should be recast to the XPA struct as shown. In
2542 addition, client-specific data can be passed to the callback in
2543 receive_data.
2544
2545 )0 P(The paramlist will be supplied by the client. In addition, if the
2546 receive_mode keywords buf and fillbuf are true, then on entry into the
2547 receive_callback\201\202 routine, buf will contain the data sent by the
2548 client. If buf is true but fillbuf is false, it becomes the callback's
2549 responsibility to retrieve the data from the client, using the data fd
2550 pointed to by the macro xpa_datafd\201xpa\202. If freebuf is true, then buf
2551 will be freed when the callback is complete.
2552
2553 )0 P(If, while the callback is performing its processing, an error occurs
2554 that should be communicated to the client, then the routine XPAError
2555 can be called:
2556 ) 1 29 PR( XPAError\201XPA xpa, char *s\202;)RP(
2557 )0 P(where s is an arbitrary error message.
2558
2559 )0 P(The callback routine should return 0 if no error occurs, or -1 to
2560 signal an error.
2561
2562
2563
2564
2565 )0 2 51 H(XPACmdNew:)WB 111 Sn()WB 17 Sn( create a new XPA public access point for commands)EA()EH(
2566
2567
2568 )BD() 3 41 PR( #include <xpa.h>
2569
2570 XPA XPACmdNew\201char *class, char *name\202;)RP()ES(
2571
2572
2573 )0 P(Create a new XPA public access point for commands that will share a
2574 common identifier class:name. Enter this access point into the XPA
2575 name server, so that it can be accessed by external processes.
2576 XPACmdNew\201\202 returns an XPA struct.
2577
2578 )0 P(It often is more convenient to have one public access point that can
2579 manage a number of commands, rather than having individual access
2580 points for each command. For example, it is easier to command the
2581 ds9 image display using:
2582 ) 3 35 PR( echo "colormap I8" | xpaset ds9
2583 echo "scale log" | xpaset ds9
2584 echo "file foo.fits" | xpaset ds9)RP(
2585 )0 P(then to use:
2586 ) 3 39 PR( echo "I8" | xpaset ds9_colormap
2587 echo "log" | xpaset ds9_scale
2588 echo "foo.fits" | xpaset ds9_file)RP(
2589 )0 P(In the first case, the commands remain the same regardless of the
2590 target XPA name. In the second case, the command names must change
2591 for each instance of ds9. That is, if a second instance of ds9
2592 called DS9 were running, it would be commanded either as:
2593 ) 3 35 PR( echo "colormap I8" | xpaset DS9
2594 echo "scale log" | xpaset DS9
2595 echo "file foo.fits" | xpaset DS9)RP(
2596 )0 P(or as:
2597 ) 3 39 PR( echo "I8" | xpaset DS9_colormap
2598 echo "log" | xpaset DS9_scale
2599 echo "foo.fits" | xpaset DS9_file)RP(
2600 )0 P(Thus, in cases where a program is going to manage many commands, it
2601 generally is easier to define them as commands associated with the
2602 XPACmdNew\201\202 routine, rather than as separate access points using
2603 XPANew\201\202.
2604
2605 )0 P(When XPACmdNew\201\202 is called, only the class:name identifier is
2606 specified. Each sub-command is subsequently defined using the
2607 XPACmdAdd\201\202 routine.
2608
2609
2610
2611
2612 )0 2 52 H(XPACmdAdd:)WB 112 Sn()WB 18 Sn( add a command to an XPA command public access point)EA()EH(
2613
2614
2615 )BD() 7 52 PR( #include <xpa.h>
2616
2617 XPACmd XPACmdAdd\201XPA xpa, char *name, char *help,
2618 int \201*send_callback\202\201\202,
2619 void *send_data, char *send_mode,
2620 int \201*rec_callback\202\201\202,
2621 void *rec_data, char *rec_mode\202;)RP()ES(
2622
2623
2624 )0 P(Add a command to an XPA command access point. The XPA argument specifies the
2625 XPA struct returned by a call to XPANewCmd\201\202. The name argument is the
2626 name of the command. The other arguments function identically to the
2627 arguments in the XPANew\201\202 command, i.e., the send_callback and rec_callback
2628 routines have identical calling sequences to their XPANew\201\202 counterparts,
2629 with the exceptions noted below.
2630
2631 )0 P(When help is requested for a command access point using:
2632 ) 1 22 PR( xpaget -h class:name)RP(
2633 )0 P(all of the command help strings are listed. To get help for a given
2634 command, use:
2635 ) 1 26 PR( xpaget -h class:name cmd)RP(
2636 )0 P(Also, the acl keyword in the send_mode and receive_mode strings is
2637 global to the access point, not local to the command. Thus, the value
2638 for the acl mode should be the same in all send_mode \201or receive_mode\202
2639 strings for each command in a command access point. \201The acl for
2640 send_mode need not be the same as the acl for receive_mode, though\202.
2641
2642
2643
2644
2645 )0 2 53 H(XPACmdDel:)WB 113 Sn()WB 19 Sn( remove a command from an XPA command public access point)EA()EH(
2646
2647
2648 )BD() 3 38 PR( #include <xpa.h>
2649
2650 void XPACmdDel\201XPA xpa, XPACmd cmd\202;)RP()ES(
2651
2652
2653 )0 P(This routine removes a command from the list of available commands in
2654 a given XPA. That command will no longer be available for processing.
2655
2656
2657
2658
2659 )0 2 54 H(XPAInfoNew:)WB 114 Sn()WB 20 Sn( define an XPA info public access point)EA()EH(
2660
2661
2662 )BD() 5 51 PR( #include <xpa.h>
2663
2664 XPA XPAInfoNew\201char *class, char *name,
2665 int \201*info_callback\202\201\202,
2666 void *info_data, char *info_mode\202;)RP()ES(
2667
2668
2669 )0 P([NB: this is an experimental interface, new to XPA 2.0, whose value
2670 and best use is evolving.]
2671
2672 )0 P(A program can register interest in receiving a short message about a
2673 particular topic from any other process that cares to send such a
2674 message. Neither has to be an XPA server. For example, if a user
2675 starts to work with a new image file called new.fits, she might
2676 wish to alert interested programs about this new file by sending a
2677 short message using xpainfo:
2678 ) 1 34 PR( xpainfo IMAGEFILE /data/new.fits)RP(
2679
2680 )0 P(In this example, each process that has used the XPAInfoNew\201\202 call to
2681 register interest in messages associated with the identifier IMAGEFILE
2682 will have its info_callback\201\202 executed with the following calling
2683 sequence:
2684 ) 4 64 PR( int info_cb\201void *info_data, void *call_data, char *paramlist\202
2685 {
2686 XPA xpa = \201XPA\202call_data;
2687 })RP(
2688 )0 P(The arguments passed to this routine are equivalent to those sent in
2689 the send_callback\201\202 routine. The main difference is that there is no
2690 buf sent to the info callback: this mechanism is meant for short
2691 announcement of messages of interest to many clients.
2692
2693 )0 P(The mode string is of the form: "key1=value1,key2=value2,..."
2694 The following keywords are recognized:
2695 ) 3 69 PR( key value default explanation
2696 ------ -------- -------- -----------
2697 acl true/false true enable access control)RP(
2698 )0 P(Because no buf is passed to this callback, the usual buf-related keywords
2699 are not applicable here.
2700
2701 )0 P(The information sent in the parameter list is arbitrary. However, we
2702 envision sending information such as file names or XPA access points
2703 from which to collect more data. Note that the xpainfo program and
2704 the XPAInfo\201\202 routine that cause the info_callback to execute do not
2705 wait for the callback to complete before returning.
2706
2707
2708
2709
2710 )0 2 55 H(XPAFree:)WB 115 Sn()WB 21 Sn( remove an XPA public access point)EA()EH(
2711
2712
2713 ) 3 23 PR()BD( #include <xpa.h>
2714
2715 int XPAFree\201XPA xpa\202;)ES()RP(
2716
2717
2718 )0 P(Remove the specified XPA public access point from the name server and
2719 free all associated storage. Note that removal from the name server
2720 happens automatically when the process terminates, so this call is not
2721 generally needed. It is used when public access points are being
2722 defined temporarily and then destroyed when no longer needed. For
2723 example, ds9 temporarily creates a public access point when it
2724 loads a new image for display and destroys it when the image is
2725 unloaded.
2726
2727
2728
2729
2730 )0 2 56 H(XPAMainLoop:)WB 116 Sn()WB 22 Sn( optional main loop for XPA)EA()EH(
2731
2732
2733 )BD() 3 21 PR( #include <xpa.h>
2734
2735 void XPAMainLoop\201\202;)RP()ES(
2736
2737
2738 )0 P(Once XPA access points have been defined, a program must enter an
2739 event loop to watch for requests from external programs. This can be
2740 done in a variety of ways, depending on whether the event loop is
2741 processing events other than XPA events. In cases where there are no
2742 non-XPA events to be processed, the program can simply call the
2743 XPAMainLoop\201\202 event loop. This loop is implemented essentially as
2744 follows \201error checking is simplified in this example\202:
2745 ) 8 62 PR( FD_ZERO\201&readfds\202;
2746 while\201 XPAAddSelect\201NULL, &readfds\202 \202{
2747 if\201 sgot = select\201swidth, &readfds, NULL, NULL, NULL\202 >0 \202
2748 XPAProcessSelect\201&readfds, 0\202;
2749 else
2750 break;
2751 FD_ZERO\201&readfds\202;
2752 })RP(
2753 )0 P(The XPAAddSelect\201\202 routine sets up the select\201\202 readfds variable so
2754 that select\201\202 will wait for I/O on all the active XPA channels. It
2755 returns the number of XPAs that are active; the loop will end when
2756 there are no active XPAs. The standard select\201\202 routine is called to
2757 wait for an external I/O request. Since no timeout struct is passed
2758 in argument 5, the select\201\202 call hangs until there is an external
2759 request. When an external I/O request is made, the XPAProcessSelect\201\202
2760 routine is executed to process the pending requests. In this routine,
2761 the maxreq value determines how many requests will be processed: if
2762 maxreq <=0, then all currently pending requests will be processed.
2763 Otherwise, up to maxreq requests will be processed. \201The most usual
2764 values for maxreq is 0 to process all requests.\202
2765
2766 )0 P(If a program has its own Unix select\201\202 loop, then XPA access points can
2767 be added to it by using a variation of the standard XPAMainLoop:
2768 ) 7 39 PR( XPAAddSelect\201xpa, &readfds\202;
2769 [app-specific ...]
2770 if\201 select\201width, &readfds, ...\202 \202{
2771 XPAProcessSelect\201&readfds, maxreq\202;
2772 [app-specific ...]
2773 FD_ZERO\201&readfds\202;
2774 })RP(
2775 )0 P(XPAAddSelect\201\202 is called before select\201\202 to add the access points.
2776 If the first argument is NULL, then all active XPA access points
2777 are added. Otherwise only the specified access point is added.
2778 After select\201\202 is called, the XPAProcessSelect\201\202 routine can be called
2779 to process XPA requests. Once again, the maxreq value determines how
2780 many requests will be processed: if maxreq <=0, then all currently
2781 pending requests will be processed. Otherwise, up to maxreq requests
2782 will be processed.
2783
2784 )0 P(XPA access points can be added to
2785 )0 38 1 A(Xt event loops)38 0 TN TL()Ec /AF f D( \201using XtAppMainLoop\201\202\202
2786 and
2787 )0 39 1 A(Tcl/Tk event loops)39 0 TN TL()Ec /AF f D( \201using vwait and the Tk loop\202.
2788 When using XPA with these event loops, you only need to call:
2789 ) 1 44 PR(int XPAXtAddInput\201XtAppContext app, XPA xpa\202)RP(
2790 or
2791 ) 1 29 PR( int XPATclAddInput\201XPA xpa\202)RP(
2792 respectively before entering the loop.
2793
2794
2795
2796
2797 )0 2 57 H(XPAPoll:)WB 117 Sn()WB 23 Sn( execute existing XPA requests)EA()EH(
2798
2799
2800 )BD() 3 36 PR( #include <xpa.h>
2801
2802 int XPAPoll\201int msec, int maxreq\202;)RP()ES(
2803
2804
2805 )0 P(It is sometimes desirable to implement a polling loop, i.e., where one
2806 checks for and processes XPA requests without blocking. For this
2807 situation, use the XPAPoll\201\202 routine:
2808 ) 1 32 PR( XPAPoll\201int msec, int maxreq\202;)RP(
2809 )0 P(The XPAPoll\201\202 routine will perform XPAAddSelect\201\202 and select\201\202, but with a
2810 timeout specified in millisecs by the msec argument. If one or more
2811 XPA requests are made before the timeout expires, the XPAProcessSelect\201\202
2812 routine is called to process those requests. The maxreq value determines
2813 how many requests will be processed: if maxreq < 0, then no events are
2814 processed, but instead, the return value indicates the number of events
2815 that are pending. If maxreq == 0, then all currently pending requests
2816 will be processed. Otherwise, up to maxreq requests will be processed.
2817 \201The most usual values for maxreq are 0 to process all requests and 1
2818 to process one request\202.
2819
2820
2821
2822
2823 )0 2 58 H(XPAAtExit:)WB 118 Sn()WB 105 Sn( install exit handler)EA()EH(
2824
2825
2826 ) 3 23 PR()BD( #include <xpa.h>
2827
2828 void XPAAtExit\201void\202;)ES()RP(
2829
2830
2831 )0 P(XPAAtExit\201\202 will install an exit handler using atexit\201\202 to run XPAFree on all
2832 XPA access points. This might be useful in cases where Unix sockets are being
2833 used: if an explicit call to XPAFree\201\202 is not made by the program, the Unix
2834 socket file will not be deleted immediately without an atexit handler. \201NB: this
2835 call should not be made in a Tcl/Tk application. Accessing the Tcl native file
2836 system after Tcl has shut down all file systems causes the Tcl/Tl program to
2837 crash\202.
2838
2839
2840
2841
2842 )0 2 59 H(XPACleanup:)WB 119 Sn()WB 24 Sn( release reserved XPA memory)EA()EH(
2843
2844
2845 ) 3 24 PR()BD( #include <xpa.h>
2846
2847 void XPACleanup\201void\202;)ES()RP(
2848
2849
2850 )0 P(When XPA is initialized, it allocates a small amount of memory for the
2851 access control list, temp directory path, and reserved commands. This
2852 memory is found by valgrind to be "still reachable", meaning that "your
2853 program didn't free some memory it could have". Calling the
2854 XPACleanup\201\202 routine before exiting the program will free this memory
2855 and make valgrind happy.
2856
2857
2858
2859
2860 )0 2 60 H(XPA)WB 120 Sn()WB 25 Sn( Server Callback Macros)EA()EH(
2861
2862
2863 )BD() 4 57 PR( #include <xpa.h>
2864
2865 xpa_class, xpa_name, xpa_method, xpa_cmdfd, xpa_datafd,
2866 xpa_sendian, xpa_cendian)RP()ES(
2867
2868
2869 )0 P(Server routines have access to information about the XPA being called via
2870 the following macros \201each of which takes the xpa handle as an argument\202:
2871 ) 9 66 PR( macro explanation
2872 ------ -----------
2873 xpa_class class of this xpa
2874 xpa_name name of this xpa
2875 xpa_method method string \201inet or local connect info\202
2876 xpa_cmdfd fd of command socket
2877 xpa_datafd fd of data socket
2878 xpa_sendian endian-ness of server \201"little" or "big"\202
2879 xpa_cendian endian-ness of client \201"little" or "big")RP(
2880 )0 P(The argument to these macros is the call_data pointer that is passed
2881 to the server procedure. This pointer should be type case to XPA
2882 in the server routine:
2883 ) 1 27 PR( XPA xpa = \201XPA\202call_data;)RP(
2884
2885 )0 P(The most important of these macros is xpa_datafd\201\202. A server routine
2886 that sets "fillbuf=false" in receive_mode or send_mode can use this
2887 macro to perform I/O directly to/from the client, rather than using
2888 buf.
2889
2890 )0 P(The xpa_cendian and xpa_sendian macros can be used together to determine
2891 if the data transferred from the client is byte swapped with respect
2892 to the server. Values for these macros are: "little", "big", or "?".
2893 In order to do a proper conversion, you still need to know the format
2894 of the data \201i.e., byte swapping is dependent on the size of the data
2895 element being converted\202.
2896
2897
2898
2899
2900 )0 2 61 H(XPA)WB 121 Sn()WB 26 Sn( Race Conditions)EA()EH(
2901
2902
2903 Potential XPA race conditions and how to avoid them.
2904
2905
2906 )0 P(Currently, there is only one known circumstance in which XPA can get
2907 \201temporarily\202 deadlocked in a race condition: if two or more XPA
2908 servers send messages to one another using an XPA client routine such
2909 as XPASet\201\202, they can deadlock while each waits for the other server
2910 to respond. \201This can happen if the servers call XPAPoll\201\202 with a
2911 time limit, and send messages in between the polling call.\202 The
2912 reason this happens is that both client routines send a string to the
2913 other server to establish the handshake and then wait for the server
2914 response. Since each client is waiting for a response, neither is able
2915 to enter its event-handling loop and respond to the other's
2916 request. This deadlock will continue until one of the timeout periods
2917 expire, at which point an error condition will be triggered and the
2918 timed-out server will return to its event loop.
2919
2920 )0 P(Starting with version 2.1.6, this rare race condition can be
2921 avoided by setting the XPA_IOCALLSXPA environment variable for servers
2922 that will make client calls. Setting this variable causes all XPA
2923 socket IO calls to process outstanding XPA requests whenever the
2924 primary socket is not ready for IO. This means that a server making a
2925 client call will \201recursively\202 process incoming server requests while
2926 waiting for client completion. It also means that a server callback
2927 routine can handle incoming XPA messages if it makes its own XPA call.
2928 The semi-public routine oldvalue=XPAIOCallsXPA\201newvalue\202 can be used
2929 to turn this behavior off and on temporarily. Passing a 0 will turn
2930 off IO processing, 1 will turn it back on. The old value is returned
2931 by the call.
2932
2933 )0 P(By default, the XPA_IOCALLSXPA option is turned off, because we judge
2934 that the added code complication and overhead involved will not be
2935 justified by the amount of its use. Moreover, processing XPA requests
2936 within socket IO can lead to non-intuitive results, since incoming
2937 server requests will not necessarily be processed to completion in the
2938 order in which they are received.
2939
2940 )0 P(Aside from setting XPA_IOCALLSXPA, the simplest way to avoid this race
2941 condition is to multi-process: when you want to send a client message,
2942 simply start a separate process to call the client routine, so that
2943 the server is not stopped. It probably is fastest and easiest to use
2944 fork\201\202 and then have the child call the client routine and exit. But
2945 you also can use either the system\201\202 or popen\201\202 routine to start one
2946 of the command line programs and do the same thing. Alternatively, you
2947 can use XPA's internal launch\201\202 routine instead of system\201\202. Based on
2948 fork\201\202 and exec\201\202, this routine is more secure than system\201\202 because
2949 it does not call /bin/sh.
2950
2951 )0 P(Starting with version 2.1.5, you also can send an XPAInfo\201\202 message with
2952 the mode string "ack=false". This will cause the client to send a message
2953 to the server and then exit without waiting for any return message from
2954 the server. This UDP-like behavior will avoid the server deadlock when
2955 sending short XPAInfo messages.
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983 )0 P()0 0 1 A(Go to XPA Help Index)0 0 TN TL()Ec /AF f D(
2984
2985 )0 5 62 H(Last)WB 122 Sn( updated: September 10, 2003)EH(
2986 )WB NL
2987 /Cb Db D /Ct [16#00 16#00 16#00] D /Cl [16#00 16#00 16#00] D /CL -1 D Ct Sc
2988 DS
2989 /Ba f D /BO 0 D Bs
2990 /UR (oom.html) D
2991 /Ti (Out of Memory) D
2992 /Au () D
2993 /Df f D
2994 /ME [()] D
2995
2996 0 BO R
2997 ()1 Sl()WB 27 Sn(
2998
2999
3000 )0 2 63 H(Xpaoom:)WB 124 Sn()WB 123 Sn( What happens when XPA runs out of memory?)EA()EH(
3001
3002
3003 )0 2 64 H(Summary)WB 125 Sn()EH(
3004 )0 P(When XPA can't allocate memory, it exits. You can arrange to have it call
3005 longjmp\201\202 instead.
3006
3007
3008 )0 2 65 H(Description)WB 126 Sn()EH(
3009 )0 P(When an XPA server or client cannot allocate memory, it will attempt to
3010 output an error message and then exit. If this is not satisfactory \201e.g.,
3011 perhaps your program is interactive and can recover from OOM errors\202, you
3012 can tell XPA to call longjmp\201\202 to go to a recovery branch. To pass the
3013 requisite jmp_buf variable to XPA, make the following call:
3014 ) 1 24 PR( XPASaveJmp\201void *env\202;)RP(
3015 The value of env is the address of a jmp_buf variable that was previously
3016 passed to setjmp\201\202. For example:
3017 ) 9 62 PR( jmp_buf env;
3018 ...
3019 if\201 setjmp\201jmp_buf\202 != 0 \202{
3020 /* out of memory -- take corrective action, if possible */
3021 } else {
3022 /* save env for XPA */
3023 XPASaveJmp\201\201void *\202&jmp_buf\202;
3024 }
3025 // enter main loop ...)RP(
3026
3027
3028
3029
3030
3031 )0 P()0 0 1 A(Go to XPA Help Index)0 0 TN TL()Ec /AF f D(
3032
3033 )0 5 66 H(Last)WB 127 Sn( updated: April 7, 2009)EH(
3034
3035 )WB NL
3036 /Cb Db D /Ct [16#00 16#00 16#00] D /Cl [16#00 16#00 16#00] D /CL -1 D Ct Sc
3037 DS
3038 /Ba f D /BO 0 D Bs
3039 /UR (client.html) D
3040 /Ti (XPA Client API) D
3041 /Au () D
3042 /Df f D
3043 /ME [()] D
3044
3045 0 BO R
3046 ()1 Sl()WB 28 Sn(
3047
3048
3049 )0 2 67 H(XPAClient:)WB 130 Sn()WB 128 Sn( The XPA Client-side Programming Interface)EA()EH(
3050
3051
3052 )0 2 68 H(Summary)WB 131 Sn()EH(
3053 A description of the XPA client-side programming interface.
3054
3055
3056 )0 2 69 H(Introduction)WB 132 Sn()WB 129 Sn( to XPA Client Programming)EH()EA(
3057 )0 P(Sending/receiving data to/from an XPA access point is easy: you
3058 generally only need to call the XPAGet\201\202 or XPASet\201\202 subroutines.
3059 ) 33 71 PR( #include <xpa.h>
3060
3061 int )0 31 1 A(XPAGet)31 0 TN TL()Ec /AF f D(\201XPA xpa,
3062 char *template, char *paramlist, char *mode,
3063 char **bufs, size_t *lens, char **names, char **messages, int n\202;
3064
3065 int )0 32 1 A(XPASet)32 0 TN TL()Ec /AF f D(\201XPA xpa,
3066 char *template, char *paramlist, char *mode,
3067 char *buf, size_t len, char **names, char **messages, int n\202;
3068
3069 int )0 33 1 A(XPAInfo)33 0 TN TL()Ec /AF f D(\201XPA xpa,
3070 char *template, char *paramlist, char *mode,
3071 char **names, char **messages, int n\202;
3072
3073 int )0 37 1 A(XPAAccess)37 0 TN TL()Ec /AF f D(\201XPA xpa,
3074 char *template, char *paramlist, char *mode,
3075 char **names, char **messages, int n\202;
3076
3077 int )0 34 1 A(XPAGetFd)34 0 TN TL()Ec /AF f D(\201XPA xpa,
3078 char *template, char *paramlist, char *mode,
3079 int *fds, char **names, char **messages, int n\202;
3080
3081 int )0 35 1 A(XPASetFd)35 0 TN TL()Ec /AF f D(\201XPA xpa,
3082 char *template, char *paramlist, char *mode,
3083 int fd, char **names, char **messages, int n\202;
3084
3085 XPA )0 29 1 A(XPAOpen)29 0 TN TL()Ec /AF f D(\201char *mode\202;
3086
3087 void )0 30 1 A(XPAClose)30 0 TN TL()Ec /AF f D(\201XPA xpa\202;
3088
3089 int )0 36 1 A(XPANSLookup)36 0 TN TL()Ec /AF f D(\201XPA xpa,)WR(
3090 char *template, char *type,
3091 char ***classes, char ***names, char ***methods, char ***infos\202;)RP(
3092
3093 )0 2 70 H(Introduction)WB 133 Sn()EH(
3094
3095 To use the XPA application programming interface, a software developer
3096 generally will include the xpa.h definitions file:
3097 ) 1 18 PR( #include <xpa.h>)RP(
3098 in the software module that defines or accesses an XPA access point and
3099 then will link against the libxpa.a library:
3100 ) 1 27 PR( gcc -o foo foo.c libxpa.a)RP(
3101 XPA has been compiled using both C and C++ compilers.
3102 )0 P(Client communication with XPA public access points generally is
3103 accomplished using XPAGet\201\202 or XPASet\201\202 within a program \201or xpaget
3104 and xpaset at the command line\202. Both routines require specification
3105 of the name of the access point. If a )0 3 1 A(template)3 0 TN TL()Ec /AF f D(
3106 is used to specify the access point name \201e.g., "ds9*"\202, then
3107 communication will take place with all servers matching that template.
3108
3109
3110
3111
3112 )0 2 71 H(XPAGet:)WB 134 Sn()WB 31 Sn( retrieve data from one or more XPA servers)EA()EH(
3113
3114
3115 )BD() 6 70 PR( #include <xpa.h>
3116
3117 int XPAGet\201XPA xpa,
3118 char *template, char *paramlist, char *mode,
3119 char **bufs, size_t *lens, char **names, char **messages,
3120 int n\202;)RP()ES(
3121
3122
3123 )0 P(Retrieve data from one or more XPA servers whose class:name identifier
3124 matches the specified template.
3125
3126 )0 P(A
3127 )0 3 1 A(template)3 0 TN TL()Ec /AF f D(
3128 of the form "class1:name1" is sent to the
3129 XPA name server, which returns a list of at most n matching XPA
3130 servers. A connection is established with each of these servers and
3131 the paramlist string is passed to the server as the data transfer
3132 request is initiated. If an XPA struct is passed to the call, then the
3133 persistent connections are updated as described above. Otherwise,
3134 temporary connections are made to the servers \201which will be closed
3135 when the call completes\202.
3136
3137 )0 P(The XPAGet\201\202 routine then retrieves data from at most n XPA servers,
3138 places these data into n allocated buffers and places the buffer
3139 pointers in the bufs array. The length of each buffer is stored in the
3140 lens array. A string containing the class:name and ip:port is stored
3141 in the name array. If a given server returned an error or the server
3142 callback sends a message back to the client, then the message will be
3143 stored in the associated element of the messages array. NB: if
3144 specified, the name and messages arrays must be of size n or greater.
3145
3146 )0 P(The returned message string will be of the form:
3147 ) 1 46 PR( XPA$ERROR error-message \201class:name ip:port\202)RP(
3148 or
3149 ) 1 42 PR( XPA$MESSAGE message \201class:name ip:port\202)RP(
3150 )0 P(Note that when there is an error stored in an messages entry, the
3151 corresponding bufs and lens entry may or may not be NULL and 0
3152 \201respectively\202, depending on the particularities of the server.
3153
3154 )0 P(The return value will contain the actual number of servers that were
3155 processed. This value thus will hold the number of valid entries in
3156 the bufs, lens, names, and messages arrays, and can be used to loop
3157 through these arrays. In names and/or messages is NULL, no information is
3158 passed back in that array.
3159
3160 )0 P(The bufs, names, and messages arrays should be freed upon completion \201if
3161 they are not NULL\202;
3162
3163 )0 P(The mode string is of the form: "key1=value1,key2=value2,..."
3164 The following keywords are recognized:
3165 ) 4 115 PR( key value default explanation
3166 ------ -------- -------- -----------
3167 ack true/false true if false, don't wait for ack from server \201after callback completes\202
3168 doxpa true/false true client processes xpa requests)RP(
3169 )0 P(The ack keyword is not very useful, since the server completes the callback
3170 in order to return the data anyway. It is here for completion \201and perhaps
3171 for future usefulness\202.
3172
3173 )0 P(Normally, an XPA client will process incoming XPA server requests
3174 while awaiting the completion of the client request. Setting this
3175 variable to "false" will prevent XPA server requests from being
3176 processed by the client.
3177
3178 )0 P()BD(Example:)ES(
3179 ) 25 70 PR( #include <xpa.h>
3180
3181 #define NXPA 10
3182 int i, got;
3183 size_t lens[NXPA];
3184 char *bufs[NXPA];
3185 char *names[NXPA];
3186 char *messages[NXPA];
3187 got = XPAGet\201NULL, "ds9", "file", NULL, bufs, lens, names, messages,
3188 NXPA\202;
3189 for\201i=0; i<got; i++\202{
3190 if\201 messages[i] == NULL \202{
3191 /* process buf contents */
3192 ProcessImage\201bufs[i], ...\202;
3193 free\201bufs[i]\202;
3194 }
3195 else{
3196 /* error processing */
3197 fprintf\201stderr, "ERROR: %s \201%s\202\200n", messages[i], names[i]\202;
3198 }
3199 if\201 names[i] \202
3200 free\201names[i]\202;
3201 if\201 messages[i] \202
3202 free\201messages[i]\202;
3203 })RP(
3204
3205
3206
3207
3208 )0 2 72 H(XPASet:)WB 135 Sn()WB 32 Sn( send data to one or more XPA servers)EA()EH(
3209
3210
3211 )BD() 6 66 PR( #include <xpa.h>
3212
3213 int XPASet\201XPA xpa,
3214 char *template, char *paramlist, char *mode,
3215 char *buf, size_t len, char **names, char **messages,
3216 int n\202;)RP()ES(
3217
3218
3219 )0 P(Send data to one or more XPA servers whose class:name identifier
3220 matches the specified template.
3221
3222 )0 P(A
3223 )0 3 1 A(template)3 0 TN TL()Ec /AF f D(
3224 of the form "class1:name1" is sent to the
3225 XPA name server, which returns a list of at most n matching XPA
3226 servers. A connection is established with each of these servers and
3227 the paramlist string is passed to the server as the data transfer
3228 request is initiated. If an XPA struct is passed to the call, the
3229 persistent connections are updated as described above. Otherwise,
3230 temporary connections are made to the servers \201which will be closed
3231 when the call completes\202.
3232
3233 )0 P(The XPASet\201\202 routine transfers data from buf to the XPA servers.
3234 The length of buf \201in bytes\202 should be placed in the len variable.
3235
3236 )0 P(A string containing the class:name and ip:port of each of these server
3237 is returned in the name array. If a given server returned an error or
3238 the server callback sends a message back to the client, then the
3239 message will be stored in the associated element of the messages
3240 array. NB: if specified, the name and messages arrays must be of size
3241 n or greater.
3242
3243 )0 P(The returned message string will be of the form:
3244
3245 ) 1 42 PR( XPA$ERROR [error] \201class:name ip:port\202)RP(
3246 or
3247 ) 1 44 PR( XPA$MESSAGE [message] \201class:name ip:port\202)RP(
3248 )0 P(The return value will contain the actual number of servers that were
3249 processed. This value thus will hold the number of valid entries in
3250 the names and messages arrays, and can be used to loop through these
3251 arrays. In names and/or messages is NULL, no information is passed back
3252 in that particular array.
3253
3254 )0 P(The mode string is of the form: "key1=value1,key2=value2,..."
3255 The following keywords are recognized:
3256 ) 5 115 PR( key value default explanation
3257 ------ -------- -------- -----------
3258 ack true/false true if false, don't wait for ack from server \201after callback completes\202
3259 verify true/false false send buf from XPASet[Fd] to stdout
3260 doxpa true/false true client processes xpa requests)RP(
3261 )0 P(The ack keyword is useful in cases where one does not want to wait for
3262 the server to complete, e.g. if a lot of processing needs to be done
3263 by the server on the passed data or when the success of the server
3264 operation is not relevant to the client.
3265
3266 )0 P(Normally, an XPA client will process incoming XPA server requests
3267 while awaiting the completion of the client request. Setting this
3268 variable to "false" will prevent XPA server requests from being
3269 processed by the client.
3270
3271 )0 P()BD(Example:)ES(
3272 ) 21 75 PR( #include <xpa.h>
3273
3274 #define NXPA 10
3275 int i, got;
3276 size_t len;
3277 char *buf;
3278 char *names[NXPA];
3279 char *messages[NXPA];
3280 ...
3281 [fill buf with data and set len to the length, in bytes, of the data]
3282 ...
3283 /* send data to all access points */
3284 got = XPASet\201NULL, "ds9", "fits", NULL, buf, len, names, messages, NXPA\202;
3285 /* error processing */
3286 for\201i=0; i<got; i++\202{
3287 if\201 messages[i] \202{
3288 fprintf\201stderr, "ERROR: %s \201%s\202\200n", messages[i], names[i]\202;
3289 }
3290 if\201 names[i] \202 free\201names[i]\202;
3291 if\201 messages[i] \202 free\201messages[i]\202;
3292 })RP(
3293
3294
3295
3296
3297 )0 2 73 H(XPAInfo:)WB 136 Sn()WB 33 Sn( send short message to one or more XPA servers)EA()EH(
3298
3299
3300 )BD() 5 58 PR( #include <xpa.h>
3301
3302 int XPAInfo\201XPA xpa,
3303 char *template, char *paramlist, char *mode,
3304 char **names, char **messages, int n\202;)RP()ES(
3305
3306
3307 )0 P(Send a short paramlist message to one or more XPA servers whose
3308 class:name identifier matches the specified
3309 )0 3 1 A(template)3 0 TN TL()Ec /AF f D(.
3310
3311 )0 P(A
3312 )0 3 1 A(template)3 0 TN TL()Ec /AF f D(
3313 of the form "class1:name1" is sent to the
3314 XPA name server, which returns a list of at most n matching XPA
3315 servers. A connection is established with each of these servers and
3316 the paramlist string is passed to the server as the data transfer
3317 request is initiated. If an XPA struct is passed to the call, then the
3318 persistent connections are updated as described above. Otherwise,
3319 temporary connections are made to the servers \201which will be closed
3320 when the call completes\202.
3321
3322 )0 P(The XPAInfo\201\202 routine does not send data from a buf to the XPA
3323 servers. Only the paramlist is sent. The semantics of the paramlist
3324 is not formalized, but at a minimum is should tell the server how to
3325 get more information. For example, it might contain the class:name
3326 of the XPA access point from which the server \201acting as a client\202
3327 can obtain more info using XPAGet.
3328
3329 )0 P(A string containing the class:name and ip:port of each server is
3330 returned in the name array. If a given server returned an error or
3331 the server callback sends a message back to the client, then the
3332 message will be stored in the associated element of the messages
3333 array. The returned message string will be of the form:
3334 ) 1 48 PR( XPA$ERROR error-message \201class:name ip:port\202)RP(
3335 or
3336 ) 1 46 PR( XPA$MESSAGE message \201class:name ip:port\202)RP(
3337 )0 P(The return value will contain the actual number of servers that were
3338 processed. This value thus will hold the number of valid entries in
3339 the names and messages arrays, and can be used to loop through these
3340 arrays. In names and/or messages is NULL, no information is passed back
3341 in that array.
3342
3343 )0 P(The following keywords are recognized:
3344 ) 3 88 PR( key value default explanation
3345 ------ -------- -------- -----------
3346 ack true/false true if false, don't wait for ack from server)RP(
3347 )0 P(When ack is false, XPAInfo\201\202 will not wait for an error return from the XPA
3348 server. This means, in effect, that XPAInfo will send its paramlist string
3349 to the XPA server and then exit: no information will be sent from the server
3350 to the client. This UDP-like behavior is essential to avoid race
3351 conditions in cases where XPA servers are sending info messages to
3352 other servers. If two servers try to send each other an info message
3353 at the same time and then wait for an ack, a race condition will result and
3354 one or both will time out.
3355
3356 )0 P()BD(Example:)ES(
3357 ) 1 65 PR( \201void\202XPAInfo\201NULL, "IMAGE", "ds9 image", NULL, NULL, NULL, 0\202;)RP(
3358
3359
3360
3361
3362 )0 2 74 H(XPAGetFd:)WB 137 Sn()WB 34 Sn( retrieve data from one or more XPA servers and write to files)EA()EH(
3363
3364
3365 )BD() 5 63 PR( #include <xpa.h>
3366
3367 int XPAGetFd\201XPA xpa,
3368 char *template, char *paramlist, char *mode,
3369 int *fds, char **names, char **messages, int n\202;)RP()ES(
3370
3371
3372 )0 P(Retrieve data from one or more XPA servers whose class:name identifier
3373 matches the specified
3374 )0 3 1 A(template)3 0 TN TL()Ec /AF f D(
3375 and write it to files associated with
3376 one or more standard I/O fds \201i.e, handles returned by open\201\202\202.
3377
3378 )0 P(A
3379 )0 3 1 A(template)3 0 TN TL()Ec /AF f D(
3380 of the form "class1:name1" is sent to the
3381 XPA name server, which returns a list of at most ABS\201n\202 matching XPA
3382 servers. A connection is established with each of these servers and
3383 the paramlist string is passed to the server as the data transfer
3384 request is initiated. If an XPA struct is passed to the call, then the
3385 persistent connections are updated as described above. Otherwise,
3386 temporary connections are made to the servers \201which will be closed
3387 when the call completes\202.
3388
3389 )0 P(The XPAGetFd\201\202 routine then retrieves data from the XPA servers,
3390 and write these data to the fds associated with one or more fds
3391 \201i.e., results from open\202. Is n is positive, then there will be n fds
3392 and the data from each server will be sent to a separate fd. If n is
3393 negative, then there is only 1 fd and all data is sent to this single
3394 fd. \201The latter is how xpaget is implemented.\202
3395
3396 )0 P(A string containing the class:name and ip:port is stored in the name
3397 array. If a given server returned an error or the server callback
3398 sends a message back to the client, then the message will be stored in
3399 the associated element of the messages array. NB: if specified, the
3400 name and messages arrays must be of size n or greater.
3401
3402 )0 P(The returned message string will be of the form:
3403 ) 1 48 PR( XPA$ERROR error-message \201class:name ip:port\202)RP(
3404 or
3405 ) 1 46 PR( XPA$MESSAGE message \201class:name ip:port\202)RP(
3406 )0 P(Note that when there is an error stored in an messages entry, the
3407 corresponding bufs and lens entry may or may not be NULL and 0
3408 \201respectively\202, depending on the particularities of the server.
3409
3410 )0 P(The return value will contain the actual number of servers that were
3411 processed. This value thus will hold the number of valid entries in
3412 the bufs, lens, names, and messages arrays, and can be used to loop
3413 through these arrays. In names and/or messages is NULL, no information is
3414 passed back in that array.
3415
3416 )0 P(The mode string is of the form: "key1=value1,key2=value2,..."
3417 The following keywords are recognized:
3418 ) 3 115 PR( key value default explanation
3419 ------ -------- -------- -----------
3420 ack true/false true if false, don't wait for ack from server \201after callback completes\202)RP(
3421 )0 P(The ack keyword is not very useful, since the server completes the callback
3422 in order to return the data anyway. It is here for completion \201and perhaps
3423 for future usefulness\202.
3424
3425 )0 P()BD(Example:)ES(
3426 ) 19 72 PR( #include <xpa.h>
3427 #define NXPA 10
3428 int i, got;
3429 int fds[NXPA];
3430 char *names[NXPA];
3431 char *messages[NXPA];
3432 for\201i=0; i<NXPA; i++\202
3433 fds[i] = open\201...\202;
3434 got = XPAGetFd\201NULL, "ds9", "file", NULL, fds, names, messages, NXPA\202;
3435 for\201i=0; i<got; i++\202{
3436 if\201 messages[i] != NULL \202{
3437 /* error processing */
3438 fprintf\201stderr, "ERROR: %s \201%s\202\200n", messages[i], names[i]\202;
3439 }
3440 if\201 names[i] \202
3441 free\201names[i]\202;
3442 if\201 messages[i] \202
3443 free\201messages[i]\202;
3444 })RP(
3445
3446
3447
3448
3449 )0 2 75 H(XPASetFd:)WB 138 Sn()WB 35 Sn( send data from stdin to one or more XPA servers)EA()EH(
3450
3451 )ES(
3452 ) 5 60 PR( #include <xpa.h>
3453
3454 int XPASetFd\201XPA xpa,
3455 char *template, char *paramlist, char *mode,
3456 int fd, char **names, char **messages, int n\202)RP()ES(
3457
3458
3459 )0 P(Read data from a standard I/O fd and send it to one or more XPA
3460 servers whose class:name identifier matches the specified
3461 )0 3 1 A(template.
3462
3463 )0 P(A
3464 )0 3 1 A(template)3 0 TN TL()Ec /AF f D(
3465 of the form "class1:name1" is sent to the
3466 XPA name server, which returns a list of at most n matching XPA
3467 servers. A connection is established with each of these servers and
3468 the paramlist string is passed to the server as the data transfer
3469 request is initiated. If an XPA struct is passed to the call, then the
3470 persistent connections are updated as described above. Otherwise,
3471 temporary connections are made to the servers \201which will be closed
3472 when the call completes\202.
3473
3474 )0 P(The XPASetFd\201\202 routine then reads bytes from the specified fd
3475 until EOF and sends these bytes to the XPA servers.
3476 The final parameter n specifies the maximum number of servers to contact.
3477 A string containing the class:name and ip:port of each server is returned in
3478 the name array. If a given server returned an error, then the error
3479 message will be stored in the associated element of the messages array.
3480 NB: if specified, the name and messages arrays must be of size n or greater.
3481
3482 )0 P(The return value will contain the actual number of servers that were
3483 processed. This value thus will hold the number of valid entries in
3484 the names and messages arrays, and can be used to loop through these
3485 arrays. In names and/or messages is NULL, no information is passed back
3486 in that array.
3487
3488 )0 P(The mode string is of the form: "key1=value1,key2=value2,..."
3489 The following keywords are recognized:
3490 ) 4 115 PR( key value default explanation
3491 ------ -------- -------- -----------
3492 ack true/false true if false, don't wait for ack from server \201after callback completes\202
3493 verify true/false false send buf from XPASet[Fd] to stdout)RP(
3494 )0 P(The ack keyword is useful in cases where one does not want to wait for
3495 the server to complete, e.g. is a lot of processing needs to be done
3496 on the passed data or when the success of the server operation is not
3497 relevant to the client.
3498
3499 )0 P()BD(Example:)ES(
3500 ) 19 71 PR( #include <xpa.h>
3501
3502 #define NXPA 10
3503 int i, got;
3504 int fd;
3505 char *names[NXPA];
3506 char *messages[NXPA];
3507 fd = open\201...\202;
3508 got = XPASetFd\201NULL, "ds9", "fits", NULL, fd, names, messages, NXPA\202;
3509 for\201i=0; i<got; i++\202{
3510 if\201 messages[i] != NULL \202{
3511 /* error processing */
3512 fprintf\201stderr, "ERROR: %s \201%s\202\200n", messages[i], names[i]\202;
3513 }
3514 if\201 names[i] \202
3515 free\201names[i]\202;
3516 if\201 messages[i] \202
3517 free\201messages[i]\202;
3518 })RP(
3519
3520
3521
3522
3523 )0 2 76 H(XPAOpen:)WB 139 Sn()WB 29 Sn( allocate a persistent client handle)3 0 TN TL()Ec /AF f D()EH(
3524
3525
3526 )BD() 3 26 PR( #include <xpa.h>
3527
3528 XPA XPAOpen\201char *mode\202;)RP()ES(
3529
3530
3531 )0 P(XPAOpen\201\202 allocates a persistent XPA struct that can be used with
3532 calls to XPAGet\201\202, XPASet\201\202, XPAInfo\201\202, XPAGetFd\201\202, and
3533 XPASetFd\201\202. Persistence means that a connection to an XPA server is
3534 not closed when one of the above calls is completed but will be
3535 re-used on successive calls. Using XPAOpen\201\202 therefore saves the time
3536 it takes to connect to a server, which could be significant with slow
3537 connections or if there will be a large number of exchanges with a
3538 given access point. The mode argument currently is ignored \201"reserved
3539 for future use"\202.
3540
3541 )0 P(An XPA struct is returned if XPAOpen\201\202 was successful; otherwise NULL
3542 is returned. This returned struct can be passed as the first argument
3543 to XPAGet\201\202, etc. Those calls will update the list of active XPA
3544 connections. Already connected servers \201from a previous call\202 are
3545 left connected and new servers also will be connected. Old servers
3546 \201from a previous call\202 that are no longer needed are disconnected.
3547 The connected servers will remain connected when the next call to
3548 XPAGet\201\202 is made and connections are once again updated.
3549
3550 )0 P()BD(Example:)ES(
3551 ) 4 22 PR( #include <xpa.h>
3552
3553 XPA xpa;
3554 xpa = XPAOpen\201NULL\202;)RP(
3555
3556
3557
3558
3559 )0 2 77 H(XPAClose:)WB 140 Sn()WB 30 Sn( close a persistent XPA client handle)EA()EH(
3560
3561
3562 )BD() 3 25 PR( #include <xpa.h>
3563
3564 void XPAClose\201XPA xpa\202;)RP()ES(
3565
3566
3567 )0 P(XPAClose closes the persistent connections associated with this XPA struct
3568 and frees all allocated space. It also closes the open sockets connections
3569 to all XPA servers that were opened using this handle.
3570
3571 )0 P()BD(Example:)ES(
3572 ) 4 18 PR( #include <xpa.h>
3573
3574 XPA xpa;
3575 XPAClose\201xpa\202;)RP(
3576
3577
3578
3579
3580 )0 2 78 H(XPANSLookup:)WB 141 Sn()WB 36 Sn( lookup registered XPA access points)EA()EH(
3581
3582
3583 )BD() 6 49 PR( #include <xpa.h>
3584
3585 int XPANSLookup\201XPA xpa,
3586 char *template, char type,
3587 char ***classes, char ***names,
3588 char ***methods, char ***infos\202)RP()ES(
3589
3590
3591 )0 P(XPA routines act on a class:name identifier in such a way
3592 that all access points that match the identifier are processed. It is
3593 sometimes desirable to choose specific access points from the
3594 candidates that match the
3595 )0 3 1 A(template)3 0 TN TL()Ec /AF f D(. In order to do this, the
3596 XPANSLookup routine can be called to return a list of matches, so that
3597 specific class:name instances can then be fed to XPAGet\201\202, XPASet\201\202, etc.
3598
3599 )0 P( The first argument is an optional XPA struct. If non-NULL, the
3600 existing name server connection associated with the specified xpa is
3601 used to query the xpans name server for matching templates. Otherwise,
3602 a new \201temporary\202 connection is established with the name server.
3603
3604 )0 P(The second argument to XPANSLookup is the class:name
3605 )0 3 1 A(template)3 0 TN TL()Ec /AF f D(
3606 to match.
3607
3608 )0 P(The third argument for XPANSLookup\201\202 is the type of access and can be
3609 any combination of:
3610 ) 5 62 PR( type explanation
3611 ------ -----------
3612 g xpaget calls can be made on this access point
3613 s xpaset calls can be made on this access point
3614 i xpainfo calls can be made on this access point)RP(
3615 )0 P(The call typically specifies only one of these at a time.
3616
3617 )0 P(The final arguments are pointers to arrays that will be filled
3618 in and returned by the name server. The name server will allocate and
3619 return arrays filled with the classes, names, and methods of all XPA
3620 access points that match the )0 3 1 A(template)3 0 TN TL()Ec /AF f D(
3621 and have the specified type. Also returned are info strings, which
3622 generally are used internally by the client routines. These can be
3623 ignored \201but the strings must be freed\202. The function returns the
3624 number of matches. The returned value can be used to loop through the
3625 matches:
3626
3627 )BD(Example:)ES(
3628 ) 24 73 PR( #include <xpa.h>
3629
3630 char **classes;
3631 char **names;
3632 char **methods;
3633 char **infos;
3634 int i, n;
3635 n = XPANSLookup\201NULL, "foo*", "g", &classes, &names, &methods, &infos\202;
3636 for\201i=0; i<n; i++\202{
3637 [more specific checks on possibilities ...]
3638 [perhaps a call to XPAGet for those that pass, etc. ...]
3639 /* don't forget to free alloc'ed strings when done */
3640 free\201classes[i]\202;
3641 free\201names[i]\202;
3642 free\201methods[i]\202;
3643 free\201infos[i]\202;
3644 }
3645 /* free up arrays alloc'ed by names server */
3646 if\201 n > 0 \202{
3647 free\201classes\202;
3648 free\201names\202;
3649 free\201methods\202;
3650 free\201infos\202;
3651 })RP(
3652 )0 P(The specified
3653 )0 3 1 A(template)3 0 TN TL()Ec /AF f D(
3654 also can be a host:port specification, for example:
3655 ) 1 14 PR( myhost:12345)RP(
3656 )0 P(In this case, no connection is made to the name server. Instead, the
3657 call will return one entry such that the ip array contains the ip for
3658 the specified host and the port array contains the port. The class
3659 and name entries are set to the character "?", since the class and
3660 name of the access point are not known.
3661
3662
3663
3664
3665 )0 2 79 H(XPAAccess:)WB 142 Sn()WB 37 Sn( return XPA access points matching
3666 template \201XPA 2.1 and above\202)EA()EH(
3667
3668
3669 )BD() 5 60 PR( #include <xpa.h>
3670
3671 int XPAAccess\201XPA xpa,
3672 char *template, char *paramlist, char *mode,
3673 char **names, char **messages, int n\202;)RP()ES(
3674
3675
3676 )0 P(The XPAAccess routine returns the public access points that match the
3677 specified second argument )0 3 1 A(template)3 0 TN TL()Ec /AF f D( and
3678 have the specified access type.
3679
3680 )0 P(A
3681 )0 3 1 A(template)3 0 TN TL()Ec /AF f D(
3682 of the form "class1:name1" is sent to the
3683 XPA name server, which returns a list of at most n matching XPA
3684 servers. A connection is established with each of these servers and
3685 the paramlist string is passed to the server as the data transfer
3686 request is initiated. If an XPA struct is passed to the call, then the
3687 persistent connections are updated as described above. Otherwise,
3688 temporary connections are made to the servers \201which will be closed
3689 when the call completes\202.
3690
3691 )0 P(The XPAAccess\201\202 routine retrieves names from at most n XPA servers
3692 that match the specified template and that were checked for access
3693 using the specified mode. The return string contains both the
3694 class:name and ip:port. If a given server returned an error or the
3695 server callback sends a message back to the client, then the message
3696 will be stored in the associated element of the messages array.
3697 NB: if specified, the name and messages arrays must be of size n or greater.
3698
3699 )0 P(The returned message string will be of the form:
3700 ) 1 46 PR( XPA$ERROR error-message \201class:name ip:port\202)RP(
3701 )0 P(Note that names of matching registered access points are always
3702 returned but may not be valid; it is not sufficient to assume that the
3703 returned number of access points is the number of valid access points.
3704 Rather, it is essential to check the messages array for error
3705 messages. Any string in the messages array is an error message and
3706 indicated that the associated access point is not available.
3707
3708 )0 P(For example, assume that a server registers a number of access points
3709 but delays entering its event loop. If a call to XPAAccess\201\202 is made
3710 before the event loop is entered, the call will timeout \201after waiting
3711 for the long timeout period\202 and return an error of the form:
3712 ) 1 65 PR( XPA$ERROR: timeout waiting for server authentication \201XPA:xpa1\202)RP(
3713 The error means that the XPA access point has been registered but is
3714 not yet available \201because events are not being processed\202. When the
3715 server finally enters its event loop, subsequent calls to XPAAccess\201\202
3716 will return successfully.
3717
3718 )0 P(NB: This routine only works with XPA servers built with XPA 2.1.x and later.
3719 Servers with older versions of XPA will return the error message:
3720
3721 XPA$ERROR invalid xpa command in initialization string
3722
3723 If you get this error message, then the old server actually is ready
3724 for access, since it got to the point of fielding the query! The
3725 xpaaccess program, for example, ignores this message in order to work
3726 properly with older servers.
3727
3728 )0 P(The third argument for XPAAccess\201\202 is the type of access and can be
3729 any combination of:
3730 ) 5 62 PR( type explanation
3731 ------ -----------
3732 g xpaget calls can be made on this access point
3733 s xpaset calls can be made on this access point
3734 i xpainfo calls can be made on this access point)RP(
3735 )0 P(The mode string argument is of the form: "key1=value1,key2=value2,..."
3736 The following keywords are recognized:
3737 ) 3 115 PR( key value default explanation
3738 ------ -------- -------- -----------
3739 ack true/false true if false, don't wait for ack from server \201after callback completes\202)RP(
3740 )0 P(The ack keyword is not very useful, since the server completes the callback
3741 in order to return the data anyway. It is here for completion \201and perhaps
3742 for future usefulness\202.
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766 )0 P()0 0 1 A(Go to XPA Help Index)0 0 TN TL()Ec /AF f D(
3767
3768 )0 5 80 H(Last)WB 143 Sn( updated: March 10, 2007)EH(
3769
3770 )WB NL
3771 /Cb Db D /Ct [16#00 16#00 16#00] D /Cl [16#00 16#00 16#00] D /CL -1 D Ct Sc
3772 DS
3773 /Ba f D /BO 0 D Bs
3774 /UR (xt.html) D
3775 /Ti (XPA/Xt Interface) D
3776 /Au () D
3777 /Df f D
3778 /ME [()] D
3779
3780 0 BO R
3781 ()1 Sl()WB 38 Sn(
3782
3783
3784 )0 2 81 H(XPAXt:)WB 145 Sn()WB 144 Sn( the XPA Interface to Xt \201X Windows\202)EA()EH(
3785
3786
3787 )0 2 82 H(Summary)WB 146 Sn()EH(
3788 Describes how XPA access points can be added to X Toolkit \201Xt\202 programs.
3789
3790
3791 )0 2 83 H(Description)WB 147 Sn()EH(
3792 )0 P(XPA supports Xt programs: you can call XPANew\201\202, XPACmdNew\201\202, or
3793 XPAInfoNew\201\202 within any C routine to add XPA server callbacks to an Xt
3794 program. Since an Xt program has its own event loop call \201i.e.,
3795 XtAppMainLoop\201\202\202, it therefore does not need or want to use the XPA
3796 even loop. Thus, in order to add XPA access points to the standard Xt
3797 event loop, the following routine should be called before entering the
3798 loop:
3799 ) 1 46 PR( int XPAXtAddInput\201XtAppContext app, XPA xpa\202)RP(
3800 )0 P(The XPAAddAddInput\201\202 routine will add XPA access points to the Xt event
3801 loop by making calls to the standard XtAppAddInput\201\202 routine. \201If the
3802 XtAppContext argument is NULL, then the alternate XtAddInput\201\202 routine
3803 is used instead.\202 If the xpa argument is NULL, then all active XPA
3804 access points are added to the loop. If xpa is not NULL, then only
3805 the specified access point is added. The latter type of call is used
3806 to add new access points from within a callback, after the program has
3807 entered the XtAppMainLoop\201\202 even loop.
3808
3809
3810
3811
3812
3813 )0 P()0 0 1 A(Go to XPA Help Index)0 0 TN TL()Ec /AF f D(
3814
3815 )0 5 84 H(Last)WB 148 Sn( updated: September 10, 2003)EH(
3816 )WB NL
3817 /Cb Db D /Ct [16#00 16#00 16#00] D /Cl [16#00 16#00 16#00] D /CL -1 D Ct Sc
3818 DS
3819 /Ba f D /BO 0 D Bs
3820 /UR (tcl.html) D
3821 /Ti (XPA/Tcl Interface) D
3822 /Au () D
3823 /Df f D
3824 /ME [()] D
3825
3826 0 BO R
3827 ()1 Sl()WB 39 Sn(
3828
3829
3830 )0 2 85 H(XPATcl:)WB 151 Sn()WB 149 Sn( the XPA Interface to the Tcl/Tk Environment)EA()EH(
3831
3832
3833 )0 2 86 H(Summary)WB 152 Sn()EH(
3834
3835 )0 P(Tcl/Tk programs can act as XPA clients and/or servers using the Tcl
3836 interface to XPA that is contained in the libtclxpa.so shared object.
3837
3838 )0 2 87 H(Server)WB 153 Sn( Routines)EH(
3839
3840 ) 11 70 PR( set xpa [xpanew class name help sproc sdata smode rproc rdata rmode]
3841 xpafree xpa
3842 set xpa [xpanew class name help iproc idata imode]
3843 set xpa [xpacmdnew class name]
3844 xpacmdadd xpa name help sproc sdata smode rproc rdata rmode
3845 xpacmddel xpa cmd
3846 set val [xparec xpa option]
3847 options: name, class, method, cmdfd, datafd, cmdchan, datachan
3848 xpasetbuf xpa buf len
3849 xpaerror xpa message
3850 xpamessage xpa message)RP(
3851
3852 )0 2 88 H(Client)WB 154 Sn( Routines)EH(
3853
3854 ) 11 69 PR( set xpa [xpaopen mode]
3855 xpaclose xpa
3856 set got [xpaget xpa template paramlist mode bufs lens names errs n]
3857 set got [xpaget xpa template paramlist mode chans names errs n]
3858 set got [xpaset xpa template paramlist mode buf len names errs n]
3859 set got [xpasetfd xpa template paramlist mode chan names errs n]
3860 set got [xpainfo xpa template paramlist mode names errs n]
3861 # NB: 2.1 calling sequence change
3862 # set got [xpaaccess template type] \2012.0.5\202
3863 set got [xpaaccess xpa template paramlist mode names errs n]
3864 set got [xpanslookup template type classes names methods])RP(
3865
3866
3867 )0 2 89 H(Description)WB 155 Sn()EH(
3868 )0 P(You can call XPANew\201\202, XPACmdNew\201\202, or XPAInfoNew\201\202 within a C
3869 routine to add C-based XPA server callbacks to a TCL/Tk program that
3870 uses a Tcl/Tk event loop \201either vwait\201\202 or the Tk event loop\202;
3871 Such a program does not need or want to use the XPA event loop.
3872 Therefore, in order to add XPA access points to the Tcl/Tk loop, the
3873 following routine should be called beforehand:
3874 ) 1 30 PR( int XPATclAddInput\201XPA xpa\202;)RP(
3875 )0 P(Normally, the xpa argument is NULL, meaning that all current XPA
3876 access points are registered with the event loop. However, if a
3877 single XPA access point is to be added \201i.e., after the event loop is
3878 started\202 then the handle of that XPA access point can be passed to
3879 this routine.
3880
3881 )0 P(The significance of the XPA/TCL interface goes beyond the support for
3882 using XPA inside C code. The interface allows you to write XPA
3883 servers and to make calls to the XPA client interface within the Tcl
3884 environment using the Tcl language directly. The XPA/Tcl
3885 interface can be loaded using the following package command:
3886 ) 1 28 PR( package require tclxpa 2.0)RP(
3887 Alternatively, you can load the shared object \201called libtclxpa.so \202 directly:
3888 ) 1 30 PR( load .../libtclxpa.so tclxpa)RP(
3889 )0 P(Once the tclxpa package is loaded, you can use Tcl versions of XPA
3890 routines to define XPA servers or make client XPA calls. The
3891 interface for these routines is designed to match the Unix XPA
3892 interface as nearly as possible. Please refer to
3893 )0 15 1 A(XPA Servers)15 0 TN TL()Ec /AF f D(
3894 and
3895 )0 28 1 A(XPA Clients)28 0 TN TL()Ec /AF f D(
3896 for general information about these routines.
3897
3898 )0 P(The file test.tcl in the XPA source directory gives examples for using the
3899 XPA/Tcl interface.
3900
3901 )0 P(The following notes describe the minor differences between the interfaces.
3902
3903 )0 2 90 H(XPANew)WB 156 Sn()WB 150 Sn()EA()EH(
3904 ) 1 70 PR()BD( set xpa [xpanew class name help sproc sdata smode rproc rdata rmode])ES()RP(
3905 )0 P(rproc and sproc routines are routines. The calling sequence of the
3906 rproc routine is identical to its C counterpart:
3907 ) 1 59 PR( proc rec_cb { xpa client_data paramlist buf len } { ... })RP(
3908 )0 P(The sproc routine, however is slightly different from its C counterpart
3909 because of the difficulty of passing data back from the callback to C:
3910 ) 1 51 PR( proc sendcb { xpa client_data paramlist } { ... })RP(
3911 )0 P(Note that the C-based server's char **buf and int *len arguments are
3912 missing from the Tcl callback. This is because we did not know how to
3913 fill buf with data and pass it back to the C routines for communication
3914 with the client. Instead, the Tcl server callback uses the following
3915 routine to set buf and len:
3916 ) 1 23 PR( xpasetbuf xpa buf len)RP(
3917 where:
3918 ) 5 79 PR( arg explanation
3919 ------ -----------
3920 xpa the first argument of the server callback
3921 buf the data to be returned to the client
3922 len data length in bytes, \201if absent, use length of the buf object\202)RP(
3923 )0 P(When this routine is called, a copy of buf is saved for transmission to
3924 the client.
3925
3926 )0 P(The fact that buf is duplicated means that TCL server writers might wish to
3927 perform the I/O directly within the callback, rather than have XPA do it
3928 automatically at the end of the routine. To do this, set:
3929 ) 1 15 PR( fillbuf=false)RP(
3930 )0 P(in the xpanew smode and then perform I/O through the Tcl channel
3931 obtained from:
3932 ) 1 34 PR( set dchan [xparec $xpa datachan])RP(
3933 )0 P(where:
3934 ) 5 79 PR( arg explanation
3935 ------ -----------
3936 xpa the first argument of the server callback
3937 datachan literal string "datachan" that returns the data channel
3938 len data length in bytes, \201if absent, use length of the buf object\202)RP(
3939 )0 P()BD(NB: datachan and cmdchan are not available under Windows. It is
3940 necessary to use the "raw" equivalents: datafd and cmdfd.)ES(
3941
3942 )0 P(The same considerations apply to the rproc for receive servers: a copy
3943 of the incoming data is generated to pass to the receive callback. This
3944 copy again can be avoided by using "fillbuf=false" in the rmode and then
3945 reading the incoming data from datachan.
3946
3947 )0 P(The send and receive callback routines can use the xpaerror and xpamessage
3948 routines to send errors and messages back to the client. If you also
3949 want tcl itself to field an error condition, use the standard return call:
3950 ) 1 56 PR( return ?-code c? ?-errorinfo i? ?-errorcode ec? string)RP(
3951 )0 P(See the Tcl man page for more info.
3952
3953 )0 2 91 H(XPARec)WB 157 Sn()WB 150 Sn()EA()EH(
3954 )0 P(The Tcl xparec procedure supplies server routines with access to information
3955 that is available via macros in the C interface:
3956 ) 1 31 PR( set val [xparec xpa <option>])RP(
3957 )0 P(where option is: name, class, method, cmdfd, datafd, cmdchan,
3958 datachan. Note that two additional identifiers, cmdchan and datachan,
3959 have been added to to provide Tcl channels corresponding to datafd and
3960 cmdfd. \201These latter might still be retrieved in Tcl and passed back
3961 to a C routines.\202 An additional option called "version" can be used to
3962 determine the XPA version used to build the Tcl interface. Note that
3963 the standard options require a valid XPA handle, but "version" does
3964 not \201since it simply reports the value of the XPA_VERSION definition
3965 in the XPA source include file\202.
3966
3967 )0 P()BD(NB: datachan and cmdchan are not available under Windows. It is
3968 necessary to use the "raw" equivalents: datafd and cmdfd.)ES(
3969 ) 12 58 PR( macro explanation
3970 ------ -----------
3971 class class of this xpa
3972 name name of this xpa
3973 method method string \201inet or local connect info\202
3974 cmdchan Tcl channel of command socket
3975 datachan Tcl channel of data socket
3976 cmdfd fd of command socket
3977 datafd fd of data socket
3978 sendian endian-ness of server \201"little" or "big"\202
3979 cendian endian-ness of client \201"little" or "big"
3980 version XPA version used to build this code)RP(
3981
3982 )0 P(Under Windows, the Tcl event handler cannot automatically sense when an
3983 XPA socket is ready for IO \201i.e. Tcl_CreateFileHandler\201\202 is not available
3984 under Windows\202. The Windows Tcl event handler therefore must be awakened
3985 occasionally for check for XPA events. This is done using the standard
3986 Tcl_SetMaxBlockTime\201\202 call. The time parameter is defined in tclloop.c
3987 and is currently set to 1000 microseconds \2011/1000 of a second\202.
3988
3989 )0 P(The version option can be used to differentiate between source code versions.
3990 It was created to support legacy Tcl code that needs to maintain the 2.0.5
3991 calling sequence for xpaaccess. You can use a version test such as:
3992 ) 12 44 PR( if [catch { xparec "" version } version] {
3993 puts "pre-2.1.0e"
3994 } else {
3995 puts [split $version .]
3996 }
3997 ) 7 32 PR(
3998
3999
4000
4001 )0 P()0 0 1 A(Go to XPA Help Index)0 0 TN TL()Ec /AF f D(
4002
4003 )0 5 92 H(Last)WB 158 Sn( updated: September 10, 2003)EH(
4004 )WB NL
4005 /Cb Db D /Ct [16#00 16#00 16#00] D /Cl [16#00 16#00 16#00] D /CL -1 D Ct Sc
4006 DS
4007 /Ba f D /BO 0 D Bs
4008 /UR (env.html) D
4009 /Ti (The XPA Environment) D
4010 /Au () D
4011 /Df f D
4012 /ME [()] D
4013
4014 0 BO R
4015 ()1 Sl()WB 40 Sn(
4016
4017
4018 )0 2 93 H(XPAEnv:)WB 160 Sn()WB 159 Sn( Environment Variables for XPA Messaging)EA()EH(
4019
4020
4021 )0 2 94 H(Summary)WB 161 Sn()EH(
4022 Describes the environment variables which can be used to tailor the overall
4023 XPA environment.
4024
4025
4026 )0 2 95 H(Description)WB 162 Sn()EH(
4027 )0 P(The following environment variables are supported by XPA:
4028 )0 DL()0 P()0 DT()BD(XPA_ACL)ES(
4029 )DD( If )EM(XPA_ACL)ES( is )EM(true)ES(, then
4030 host-based )0 41 1 A(XPA Access Control)41 0 TN TL()Ec /AF f D(
4031 is turned on and only specified machines can access specified access
4032 points. If )EM(false)ES(, then access control is turned off and any
4033 machine can access point. The default is turn turn access control on.
4034
4035 )0 P()0 DT()BD(XPA_ACLFILE)ES(
4036 )DD( If
4037 )0 41 1 A(XPA Access Control)41 0 TN TL()Ec /AF f D(
4038 is turned on, this variable specifies the name of the file containing
4039 access control information for all access points started by this user.
4040 The default file name is: )EM($HOME/acls.xpa)ES(.
4041
4042 )0 P()0 DT()BD(XPA_CONNECT_TIMEOUT)ES(
4043 )DD( When an XPA server first starts up, it immediately tries to
4044 connect to the XPA name server program \201xpans\202 on the host specified by
4045 the )EM(XPA_NSINET)ES( variable. \201If this connection fails on the
4046 local host, and if xpans can be found in the path, then the name
4047 server is started automatically.\202 Unfortunately, a mis-configured
4048 network can cause this connect attempt to hang for many seconds while
4049 the connect\201\202 system call times out. Therefore, an alarm is started
4050 to interrupt the connect\201\202 call and prevent a long hang. The initial
4051 value of the alarm timeout is 10 seconds, but can be changed by setting
4052 this environment variable. If you want to disable the alarm and allow
4053 the initial connect\201\202 to time out, set the value of this variable to
4054 0. Normally, users would not change this variable at all.
4055
4056 )0 P()0 DT()BD(XPA_CLIENT_DOXPA)ES(
4057 )DD( Normally, an XPA client \201xpaget, xpaset, etc.\202 will process incoming
4058 XPA server requests while awaiting the completion of the client request.
4059 Setting this variable to "false" will prevent XPA server requests from
4060 being processed by the client.
4061
4062 )0 P()0 DT()BD(XPA_DEFACL)ES(
4063 )DD( If
4064 )0 41 1 A(XPA Access Control)41 0 TN TL()Ec /AF f D(
4065 is turned on, this variable specifies the default access control
4066 condition for all access points, if the )EM(XPA_ACLFILE)ES( file does
4067 not exist. The default acl is: )EM($host:* $host +)ES(, meaning that
4068 all processes on the host machine have full access to all access points.
4069
4070 )0 P()0 DT()BD(XPA_HOST)ES(
4071 )DD(For the INET socket method, XPA utilizes the canonical hostname \201as
4072 returned by the gethostname\201\202 routine\202 to construct the IP part of the
4073 method id. Under some circumstances, this might not be a correct choice
4074 of name and IP. For example, if an XPA server is started on a machine
4075 running VPN, you might want to use the VPN name and IP instead of the
4076 canonical host name, so that other machines in the VPN network can
4077 access the server. In this case, you can set the XPA_HOST to be
4078 the VPN name \201if resolvable\202 or, more easily, the VPN IP.
4079
4080 )0 P()0 DT()BD(XPA_IOCALLSXPA)ES(
4081 )DD(
4082 Setting this variable causes all XPA socket IO calls to process
4083 outstanding XPA requests whenever the primary socket is not ready for
4084 IO. This means that a server making a client call will \201recursively\202
4085 process incoming server requests while waiting for client completion.
4086 This inter-IO XPA processing avoids a rare
4087 )0 26 1 A(XPA Race Condition)26 0 TN TL()Ec /AF f D(: two or more
4088 XPA servers sending messages to one another using an XPA client
4089 routine such as XPASet\201\202 can deadlock while each waits for the other
4090 server to respond. This can happen, for example, if the servers call
4091 XPAPoll\201\202 with a time limit, and send messages in between the polling call.
4092
4093 )0 P(By default, this option is turned off, because we judge that the added
4094 code complication and overhead involved will not be justified by the
4095 amount of its use. Moreover, processing XPA requests within socket IO
4096 can lead to non-intuitive results, since incoming server requests will
4097 not necessarily be processed to completion in the order in which they
4098 are received.
4099
4100 )0 P()0 DT()BD(XPA_LOGNAME)ES(
4101 )DD(XPA preferentially uses the de facto standard environment variable
4102 LOGNAME to determine the username when registering an access point in
4103 the name server. If this environment variable has been used for
4104 something other than the actual user name \201such as a log file name\202,
4105 unexpected results can ensue. In such cases, use the XPA_LOGNAME
4106 variable to set the user name. \201If neither exists, then getpwuid\201geteuid\201\202\202
4107 is used as a last resort\202.
4108
4109 )0 P()0 DT()BD(XPA_LONG_TIMEOUT)ES(
4110 )DD( XPA is designed to allow data to be sent from one process to
4111 another over a long period of time \201i.e., a program that generates
4112 image data sends that data to an image display, but slowly\202 but it
4113 also seeks to prevent hangs. This is done by supporting 2 timeout
4114 periods: a )EM(short)ES( timeout for protocol communication
4115 and a )EM(long)ES( for data communication.
4116 )0 P(The )EM(XPA_LONG_TIMEOUT)ES( variable controls the )EM(long)ES(
4117 timeout and is used to prevent hangs in cases where communication
4118 between the client and server that is )EM(not)ES( controlled by the
4119 XPA interface itself. Transfer of data between client and server, or a
4120 client's wait for a status message after completion of the server
4121 callback, are two examples of this sort of communication. By default,
4122 the )EM(long)ES( timeout is set to 180 seconds.
4123 Setting the value to -1 will disable )EM(long)ES( timeouts and allow
4124 an infinite amount of time.
4125
4126 )0 P()0 DT()BD(XPA_MAXHOSTS)ES(
4127 )DD( The maximum number of access points that the programs
4128 )EM(xpaset)ES(, )EM(xpaget)ES(, and )EM(xpainfo)ES( will
4129 communicate with at one time. The default is 64, meaning, for
4130 example, that the )EM(xpaset)ES( program will not send a message
4131 to more than 100 access points at one time and )EM(xpaget)ES( will
4132 not retrieve from more than 100 access points at one time.
4133
4134 )0 P()0 DT()BD(XPA_METHOD)ES(
4135 )DD(Determines the socket connection method used by this session of XPA.
4136 The choices are: )EM(inet)ES( \201to use INET or Internet-based
4137 sockets\202, )EM(localhost)ES( \201to use the machines localhost inet
4138 socket\202, or )EM(local \201unix\202)ES( \201to use UNIX sockets\202. The default
4139 is )EM(INET)ES(. Using the )EM(inet)ES( method will allow access
4140 from other machines \201subject to access controls\202 but using
4141 )EM(localhost)ES( or )EM(local)ES( will not. Localhost is most useful
4142 for private access and when the machine in question is not connected
4143 to the Internet. The unix method also can be used for private access
4144 and non-Internet connections \201Unix platforms only\202.
4145 )0 P(Once defined, the first registration of an XPA access point will
4146 ensure that an instance of the
4147 )0 14 1 A(XPA Name Server \201xpans\202)14 0 TN TL()Ec /AF f D(
4148 is running that handles that connection method. All new access points
4149 will use the new connection method but existing access points will use
4150 the original method.
4151
4152 )0 P()0 DT()BD(XPA_NSINET)ES(
4153 )DD( For the )EM(inet)ES( method of socket connection, this variable
4154 specifies the host and port on which the
4155 )0 14 1 A(XPA Name Server \201xpans\202)14 0 TN TL()Ec /AF f D(
4156 is listens for new access points. The default is )EM($host:$port)ES(,
4157 meaning that the default XPA port \20114285\202 on the current machine
4158 \201as returned by gethostname\201\202\202 is used. If several machines were all
4159 accessing the same XPA access points, you would use this variable to
4160 specify that they all use the same name server to find out about these
4161 access points. For example, a value of )EM(myhost:$port)ES( would
4162 mean that the xpans name server is running on myhost and uses the
4163 default port 12345. All machines would then get the XPA access points
4164 registered with that name server, subject to access controls.
4165 )0 P(The port used by xpans to register its XPA access point normally is
4166 taken to be one greater than the port on which it receives new access
4167 points from XPA servers. You can specify a specific access point port
4168 using the syntax machine:port1,port2, i.e., the access point port is
4169 specified after the comma. For example, $host:12345,23456 will listen
4170 for new access ports on 12345 and will accept XPA commands on 23456.
4171
4172 )0 P()0 DT()BD(XPA_NSREGISTER)ES(
4173 )DD(This boolean variable specifies whether a server registers its XPA
4174 access point with the specified xpans name server. The default is
4175 )EM(true)ES(. If set to )EM(false)ES(, the access point still is
4176 set up but it is not registered with xpans and therefore cannot be
4177 accessed by name. \201It can be accessed by method, if the latter is
4178 known.\202 Note that an access point can be registered later on \201using
4179 -remote or -proxy, for example\202. This variable mainly is useful in
4180 cases where the Internet configuration is broken \201so that registration
4181 causes a DNS hang\202 but you still wish to and can use the server with a
4182 remote xpans \201e.g., ds9's Virtual Observatory capability\202.
4183
4184 )0 P()0 DT()BD(XPA_NSUNIX)ES(
4185 )DD( For the )EM(local)ES( method of socket connection, this variable
4186 specifies the name of the Unix file that will be used to access the
4187 )0 14 1 A(XPA Name Server \201xpans\202)14 0 TN TL()Ec /AF f D(. The default is
4188 )EM(xpans_unix)ES(. This variable is not usually needed. Note that
4189 is the )EM(local)ES( socket method is used, then remote machines will
4190 not be able to access the xpans name server or the registered XPA access
4191 points.
4192
4193 )0 P()0 DT()BD(XPA_NSUSERS)ES(
4194 )DD(This variable specifies whether other users' access points will be
4195 returned by the
4196 )0 14 1 A(XPA Name Server \201xpans\202)14 0 TN TL()Ec /AF f D( for use by
4197 )EM(xpaget)ES(, )EM(xpaset)ES(, etc.
4198 Generally speaking, it is sufficient to run one xpans name server per
4199 machine and register the access points for all users with that xpans.
4200 This means, for example, that if you request information from
4201 ds9 by running:
4202 ) 1 21 PR( xpaget ds9 colormap)RP(
4203 you might get information from your own ds9 as well as
4204 from another user running ds9 on the same machine. The
4205 )EM(XPA_NSUSERS)ES( variable controls whether you want such access
4206 to the access points of other users.
4207 By default, only your own access points are returned, so
4208 that, in the example above, you would only get the colormap information
4209 from the ds9 you registered. If, however, you had set the value of the
4210 )EM(XPA_NSUSERS)ES( variable to )EM(eric,fred)ES(, then you would be
4211 able to communicate with both eric and fred's access points. Note that
4212 this variable can be overridden using the )EM(-u)ES( switch on the
4213 )EM(xpaget)ES(, )EM(xpaset)ES(, and )EM(xpainfo)ES( programs.
4214
4215 )0 P()0 DT()BD(XPA_PORT)ES(
4216 )DD(
4217 A semi-colon delimited list of user specified ports to use for specific
4218 XPA access points. The format is each specification is:
4219 ) 1 28 PR(class:template port1[ port2])RP(
4220 where )BD(port1)ES( is the main \201command\202 port for the access point and
4221 )BD(port2)ES( is the \201secondary\202 data port. If port2 is not specified,
4222 it defaults to a value of 0 \201meaning the system assigns the port\202.
4223
4224 )0 P(Specification of specific ports is useful, for example, when a machine
4225 outside a firewall needs to communicate with a machine inside a
4226 firewall. In such a case, the firewall should be configured to allow
4227 socket connections to both the command and data port from the outside
4228 machine, and the inside XPA program should be started up with the
4229 outside machine in its ACL list. Then, when the inside program is
4230 started with specified ports, outside XPA programs can use
4231 "machine:port" to contact the inside access points, instead of the
4232 access point names. That is, the machine outside the firewall does not
4233 need access to the XPA name server:
4234 ) 2 62 PR(export XPA_PORT="DS9:ds9 12345 12346" # on machine "inside"
4235 cat foo.fits | xpaset inside:12345 fits # on machine "outside")RP(
4236 Note that 2 ports are required for full XPA communication and
4237 therefore 2 ports should be specified to go through a firewall. The
4238 second port assignment is not important if you simply are assigning
4239 the command port in order to communicate commands with a known
4240 port \201e.g., to bypass the xpans name server\202. If only one \201command\202
4241 port is specified, the system will negotiate a random data port and
4242 everything will work properly.
4243
4244 )0 P(This support is somewhat experimental. If you run into problems, please
4245 let us know.
4246
4247 )0 P()0 DT()BD(XPA_PORTFILE)ES(
4248 )DD(
4249 A list of user-specified port to use for specific xpa access points.
4250 The format of the file is:
4251 ) 1 28 PR(class:template port1 [port2])RP(
4252 where )BD(port1)ES( is the main port for the access point and
4253 )BD(port2)ES( is the data port. If port2 is not specified, it defaults
4254 to a value of 0 \201meaning the system assigns the port\202. See
4255 )BD(XPA_PORT)ES( above for an explanation of user-specified ports.
4256
4257 )0 P()0 DT()BD(XPA_SHORT_TIMEOUT)ES(
4258 )DD( XPA is designed to allow data to be sent from one process to
4259 another over a long period of time \201i.e., a program that generates
4260 image data sends that data to an image display, but slowly\202 but it
4261 also seeks to prevent hangs. This is done by supporting 2 timeout
4262 periods: a )EM(short)ES( timeout for protocol communication
4263 and a )EM(long)ES( for data communication.
4264 )0 P(The )EM(XPA_SHORT_TIMEOUT)ES( variable
4265 controls the )EM(short)ES( timeout and is used to prevent hangs
4266 in cases where the XPA protocol requires internal communication between
4267 the client and server that is controlled by the XPA interface
4268 itself. Authentication is an example of this sort of communication,
4269 as is the establishment of a data channel between the two processes.
4270 The default value for the )EM(short)ES( is 30 seconds \201which is
4271 a pretty long time, actually\202. Setting the value to -1 will disable
4272 )EM(short)ES( timeouts and allow an infinite amount of time.
4273
4274 )0 P()0 DT()BD(XPA_SIGUSR1)ES(
4275 )DD( If the value of this variable is )EM(true)ES(, then XPA will
4276 catch SIGUSR1 signals when performing an I/O operation in order to
4277 curtail that operation. This facility allows users to send a SIGUSR1
4278 signal to an XPA server if a client is hanging up the server by
4279 sending or receiving data too slowly \201timeouts also can be used -- see
4280 above\202. When enabled in this way, the SIGUSR1 signal is ignored at all other
4281 times, so that its safe to send the signal at any time. If the
4282 variable is set to )EM(false)ES(, then SIGUSR1 is not used at
4283 all. Turning off SIGUSR1 would be desired in cases there the program
4284 uses SIGUSR1 for some other reason and does not want XPA interfering.
4285 The default is to use the signal.
4286
4287 )0 P()0 DT()BD(XPA_TIMESTAMP_ERRORS)ES(
4288 )DD( If )EM(XPA_TIMESTAMP_ERRORS)ES( is )EM(true)ES(, then error
4289 messages will include a date/time string. This can be useful when
4290 XPA errors are being saved in an error log \201e.g. Web/CGI use\202. The
4291 default is false.)LD(
4292
4293 )0 P()0 DT()BD(XPA_TMPDIR)ES(
4294 )DD( This variable specifies the directory into which XPA logs, Unix
4295 socket files \201when )EM(XPA_METHOD)ES( is )EM(local)ES(\202, etc. are
4296 stored. The default is )EM(/tmp/.xpa)ES(.
4297
4298 )0 P()0 DT()BD(XPA_VERBOSITY)ES(
4299 )DD( Specify the verbosity level of error messages. If the value is
4300 set to )EM(0)ES(, )EM(false)ES(, or )EM(off)ES(, then no error
4301 messages are printed to stderr. If the value is )EM(1)ES(, then
4302 important XPA error messages will be output. If the value is
4303 set to )EM(2)ES(, XPA warnings about out-of-sync messages will also
4304 be output. These latter almost always can be ignored.
4305
4306 )0 P()0 DT()BD(XPA_VERSIONCHECK)ES(
4307 )DD( Specify whether a new access point should check its major and minor XPA
4308 version number against the version used by the xpans name server at
4309 registration time. The default is )EM(true)ES(. When checking is
4310 performed, a warning is issued if the server major version is found to
4311 be greater than the xpans version. Note that the check is performed
4312 both by the XPA server and by the xpans process and warnings will be
4313 issued by each. Also, instead of the values of )EM(true)ES( or
4314 )EM(false)ES(, you can give this variable an integer value n. In this
4315 case, each version checking process \201i.e., the XPA-enabled server or
4316 xpans\202 will print out a maximum of n warning messages \201after which
4317 version warnings are silently swallowed\202.
4318 )0 P(In general, it is a bad idea to run an XPA-enabled server program
4319 using a version of XPA newer than the basic xpaset, xpaget, xpaaccess,
4320 xpans programs. This sort of mismatch usually will not work due to
4321 protocol changes.
4322
4323
4324
4325
4326
4327 )0 P()0 0 1 A(Go to XPA Help Index)0 0 TN TL()Ec /AF f D(
4328
4329 )0 5 96 H(Last)WB 163 Sn( updated: December 23, 2009)EH(
4330
4331 )WB NL
4332 /Cb Db D /Ct [16#00 16#00 16#00] D /Cl [16#00 16#00 16#00] D /CL -1 D Ct Sc
4333 DS
4334 /Ba f D /BO 0 D Bs
4335 /UR (acl.html) D
4336 /Ti (XPA Access Control) D
4337 /Au () D
4338 /Df f D
4339 /ME [()] D
4340
4341 0 BO R
4342 ()1 Sl()WB 41 Sn(
4343
4344
4345 )0 2 97 H(XPAAcl:)WB 165 Sn()WB 164 Sn( Access Control for XPA Messaging)EA()EH(
4346
4347
4348 )0 2 98 H(Summary)WB 166 Sn()EH(
4349 )0 P(XPA supports host-based access control for each XPA access point. You
4350 can enable/disable access control using the XPA_ACL environment
4351 variable. You can specify access to specific XPA access points for
4352 specific machines using the XPA_DEFACL and XPA_ACLFILE environment
4353 variables. By default, an XPA access point is accessible only to
4354 processes running on the same machine \201same as X Windows\202.
4355
4356
4357 )0 2 99 H(Description)WB 167 Sn()EH(
4358 )0 P(When INET sockets are in use \201the default, as specified by the
4359 )EM(XPA_METHOD)ES( environment variable\202, XPA supports a host-based
4360 access control mechanism for individual access points. This mean that
4361 access can be specified for get, set, or info operations for each
4362 access point on a machine by machine basis. For LOCAL sockets, access
4363 is restricted \201by definition\202 to the host machine.
4364
4365 )0 P(XPA access control is enabled by default, but can be turned off by
4366 setting the )EM(XPA_ACL)ES( environment variable to )EM(false)ES(.
4367 In this case, any process can access any XPA server.
4368
4369 )0 P(Assuming that access control is turned on, the ACL for an individual
4370 XPA access point is set up when that access point is registered
4371 \201although it can be changed later on; see below\202. This can be done in
4372 one of two ways:
4373
4374 Firstly, the )EM(XPA_ACLFILE)ES( environment variable can defined to
4375 point to a file of access controls for individual access points. The format
4376 of this file is:
4377 ) 1 18 PR( class:name ip acl)RP(
4378 The first argument is a template that specifies the class:name of the
4379 access point covered by this ACL. See
4380 )0 3 1 A(XPA Access Points and Templates)3 0 TN TL()Ec /AF f D(
4381 for more information about xpa templates.
4382
4383 )0 P(The second argument is the IP address \201in human-readable format\202 of
4384 the machine which is being given access. This argument can be
4385 )EM(*)ES( to match all IP addresses. It also can be )EM($host)ES(
4386 to match the IP address of the current host.
4387
4388 )0 P(The third argument is a string combination of )EM(s)ES(, )EM(g)ES(,
4389 or )EM(i)ES( to allow )EM(xpaset)ES(, )EM(xpaget)ES(, or
4390 )EM(xpainfo)ES( access respectively. The ACL argument can be
4391 )EM(+)ES( to give )EM(sgi)ES( access or it can be )EM(-)ES( to turn
4392 off all access.
4393
4394 )0 P(For example,
4395 ) 3 21 PR( *:xpa1 somehost sg
4396 *:xpa1 myhost +
4397 * * g)RP(
4398 will allow processes on the machine somehost to make xpaget and xpaset calls,
4399 allow processes on myhost to make any call, and allow all other hosts to
4400 make xpaget \201but not xpaset\202 calls.
4401
4402 Secondly, if the )EM(XPA_ACLFILE)ES( does not exist, then a single
4403 default value for all access points can be specified using the
4404 )EM(XPA_DEFACL)ES( environment variable. The default value for this
4405 variable is:
4406 ) 1 34 PR( #define XPA_DEFACL "*:* $host +")RP(
4407 meaning that all access points are fully accessible to all processes
4408 on the current host. Thus, in the absence of any ACL environment variables,
4409 processes on the current host have full access to all access points
4410 created on that host. This parallels the X11 xhost mechanism.
4411
4412 )0 P(Access to an individual XPA access point can be changed using the -acl
4413 parameter for that access point. For example:
4414 ) 1 34 PR( xpaset -p xpa1 -acl "somehost -")RP(
4415 will turn off all access control for somehost to the xpa1 access point, while:
4416 ) 1 38 PR( xpaset -p XPA:xpa1 -acl "beberly gs")RP(
4417 will give beberly xpaget and xpaset access to the access point whose
4418 class is XPA and whose name is xpa1.
4419 )0 P(Similarly, the current ACL for a given access point can be retrieved using:
4420 ) 1 18 PR( xpaget xpa1 -acl)RP(
4421 Of course, you must have xpaget access to this XPA access point to
4422 retrieve its ACL.
4423
4424 )0 P(Note that the XPA access points registered in the )EM(xpans)ES(
4425 program also behave according to the ACL rules. That is, you cannot
4426 use xpaget to view the access points registered with xpans unless
4427 you have the proper ACL.
4428
4429 )0 P(Note also when a client request is made to an XPA server, the access
4430 control is checked when the initial connection is established. This
4431 access in effect at this time remains in effect so long as the client
4432 connection is maintained, regardless of whether the access fro that
4433 XPA is changed later on.
4434
4435 )0 P(We recognize that host-based access control is only relatively secure
4436 and will consider more stringent security \201e.g., private key\202 in the
4437 future if the community requires such support.
4438
4439
4440
4441
4442
4443 )0 P()0 0 1 A(Go to XPA Help Index)0 0 TN TL()Ec /AF f D(
4444
4445 )0 5 100 H(Last)WB 168 Sn( updated: September 10, 2003)EH(
4446
4447 )WB NL
4448 /Cb Db D /Ct [16#00 16#00 16#00] D /Cl [16#00 16#00 16#00] D /CL -1 D Ct Sc
4449 DS
4450 /Ba f D /BO 0 D Bs
4451 /UR (changelog.html) D
4452 /Ti (XPA ChangeLog) D
4453 /Au () D
4454 /Df f D
4455 /ME [()] D
4456
4457 0 BO R
4458 ()1 Sl()WB 42 Sn(
4459 )0 2 101 H(XPA)WB 169 Sn( ChangeLog)EH(
4460
4461 )0 P(This ChangeLog covers the XPA 2 implementation. It will be updated
4462 as we continue to develop and improve XPA. The up-to-date version can be
4463 found )R1 2 A(here)EA(.
4464
4465 )0 2 102 H()WB 170 Sn( Public Release 2.1.15 \201July 23, 2013\202)EH(
4466 )UL()0 P()-1 LI( Added support for large data transfers
4467 )0 P()-1 LI( XPAGet and XPASet now pass size_t instead of int for lengths
4468 )0 P()-1 LI( Send and receive callbacks now pass size_t instead of int for lengths
4469 )0 P()-1 LI( Port to mingw \201Windows\202)LU(
4470
4471
4472 )0 2 103 H()WB 171 Sn( Public Release 2.1.14 \201June 7, 2012\202)EH(
4473 )UL()0 P()-1 LI( Fixed several memory leaks in the Tcl wrappers \201tcl.c\202.
4474 )0 P()-1 LI( Use Tcl stubs library for linking shared Tcl, if available.)LU(
4475
4476 )0 2 104 H()WB 172 Sn( Public Release 2.1.13 \201April 14, 2011\202)EH(
4477 )UL()0 P()-1 LI( An atexit handler is no longer installed automatically \201it crashes
4478 Tcl 8.5.8 applications\202. Call XPAAtExit\201void\202 to install the handler.
4479 )0 P()-1 LI( Removed permission checking from Find\201\202 on cygwin systems. This was broken
4480 by Windows 7.
4481 )0 P()-1 LI( Removed addition of -no-cpp-precomp flag from gcc 4.2 and beyond \201Mac\202.)LU(
4482
4483 )0 2 105 H()WB 173 Sn( Public Release 2.1.12 \201January 26, 2010\202)EH(
4484 )UL()0 P()-1 LI( Added XPA_HOST environment variable to allow users to specify
4485 the hostname \201and hence, ip\202 component of the INET method id. This is
4486 useful, for example, if you want to register an access point using a
4487 VPN-generated IP instead of the canonical IP.
4488 )0 P()-1 LI( Fix typo in Tcl binding to xpainfo causing a crash after 2 invocations.)LU(
4489
4490 )0 2 106 H()WB 174 Sn( Public Release 2.1.11 \201December 7, 2009\202)EH(
4491 )UL()0 P()-1 LI( Generalized XPANSKeepAlive\201\202 to send messages to xpans, proxy xpans, or
4492 both. The default is to send just to proxies \201e.g. chandra-ed\202.
4493 )0 P()-1 LI( Changed XPANSKeepAlive\201\202 to send an in-band new-line char to
4494 xpans, changed xpans to handle an in-band new-line as a keep-alive
4495 message. Necessitated by Cisco routers that clear the URG flag in
4496 a TCP packet, breaking OOB data transfer for the whole Internet, as
4497 well as the OOB-based keep-alive implemented in xpans.
4498 )0 P()-1 LI( In xpans, print warning when the keep-alive option switch is used.
4499 )0 P()-1 LI( Port to mingw \201thanks to B.Schoenhammer\202
4500 )0 P()-1 LI( Change OOB character sent by xpans keepalive to a space, trying to working around cisco routers that force OOB data into the inbound stream.
4501 )0 P()-1 LI( fix gcc fprintf warning in xpans.c)LU(
4502
4503 )0 2 107 H()WB 175 Sn( Public Release 2.1.10 \201September 1, 2009\202)EH(
4504 )UL()0 P()-1 LI( Update mklib and configure.ac to support 64-bit builds on Macs.
4505 )0 P()-1 LI( Fixed bug in XPAAccess\201\202 in which the returned names could have an extra
4506 \201bogus\202 character when the target is an explicit ip:port or local socket file.
4507 )0 P()-1 LI( Add setjmp/longjmp support to xalloc.
4508 )0 P()-1 LI( Add XPASaveJmp\201void *env\202 as a high-level interface to xalloc_savejmp\201\202;)LU(
4509
4510 )0 2 108 H()WB 176 Sn( Internal Release 2.1.9)EH(
4511 )UL()0 P()-1 LI( Fixed a bug that prevented an access point starting with a number
4512 from being recognized peoperly. NB: a pure number still signifies a
4513 port on the current machine. Also num:num signifies ip:port, where ip
4514 can be a pure hex value or the canonical form vvv.xxx.yyy.zzz.
4515 )0 P()-1 LI( Modified internal Launch\201\202 routine to use posix_spawn\201\202, if necessary.
4516 This is required for OS X 10.5 \201leopard\202, which frowns upon use of fork\201\202
4517 and exec\201\202. Also modified zprocess routines to use Launch\201\202.
4518 )0 P()-1 LI( Added XPASetFree\201xpa, void \201*myfree\202\201void *\202\202 routine to allow callbacks
4519 to specify a free routine other than malloc free \201e.g. Perl garbage collection\202.
4520 )0 P()-1 LI( XPACmdAdd\201\202 now checks to ensure that it was passed an XPA struct created
4521 by XPACmdNew\201\202.
4522 )0 P()-1 LI( Change launch.h to xlaunch.h to avoid conflict with OS X.)LU(
4523
4524 )0 2 109 H()WB 177 Sn( Public Release 2.1.8 \2011 November 2007\202)EH(
4525 )UL()0 P()-1 LI( A public release to complete current XPA development work.)LU(
4526
4527 )0 2 110 H()WB 178 Sn( Patch Release 2.1.7b[1,2] \201Feb 22, 2006; March 8, 2007\202)EH(
4528 )UL(
4529 )0 P()-1 LI( Added a convenience null to the end of the buffers returned by XPAGet.
4530
4531 )0 P()-1 LI( Added code to avoid calling atexit routine if a fork'ed child
4532 calls exit\201\202 instead of _exit\201\202.
4533
4534 )0 P()-1 LI( Added XPA_CLIENT_DOXPA environment variable to turn off client
4535 processing of xpa server requests.
4536
4537 )0 P()-1 LI( Added --version to xpaset, xpaget, xpainfo, xpaaccess, xpans to
4538 display XPA version and exit.
4539
4540 )0 P()-1 LI( Added support for integrating XPA into a Gtk loop.
4541
4542 )0 P()-1 LI( xpaaccess now returns its answer in the error code as well as to stdout
4543 \201without the -n switch, it returns 1 for a match, with the -n switch,
4544 the number of matches is returned\202.
4545
4546 )0 P()-1 LI( Fixed bug which prevented xpans from being started up automatically
4547 by an xpa server if its pathname contained a space character.
4548
4549 )0 P()-1 LI( Fixed bug in MINGW port of xpans in which an XPA server that
4550 terminated via an interrupt was not being properly removed from the
4551 list of registered access points.
4552
4553 )0 P()-1 LI( Added XPA_LOGNAME to override LOGNAME when registering username
4554
4555 )0 P()-1 LI( Upgraded swish-e indexing code to 2.4.5.
4556 )LU(
4557
4558 )0 2 111 H()WB 179 Sn( Patch Release 2.1.6 \2014 May 2005\202)EH(
4559 )UL(
4560 )0 P()-1 LI( Added -P switch to xpans to enable experimental proxy support
4561 \201default is disabled\202. An argument of 1 processes proxy requests in
4562 the same thread as xpans requests, while an argument of 2 processes
4563 proxy requests in a separate thread. \201The latter is recommended to
4564 avoid xpans timeouts, since xpa callback processing can take a long
4565 time.\202
4566
4567 )0 P(
4568 )-1 LI( Added ability to build shared libraries \201done automatically with
4569 configure --enable-shared\202 with compilers other than gcc.
4570
4571 )0 P()-1 LI( Made yet another attempt to build shared libraries under OS X.
4572
4573 )0 P()-1 LI( Fixed a server bug in Tcl support under Windows \201introduced early
4574 in 2.1.6\202 which caused an occasional SEGV.
4575
4576 )0 P()-1 LI( Fixed race condition in cases where 2 or more servers makes client calls
4577 to one another.
4578
4579 )0 P()-1 LI( Fixed bug in the XPA handler routine in which an access point was
4580 turned off if an error occurred in that routine \201as opposed to the
4581 user-defined callback routine\202.
4582
4583 )0 P()-1 LI( Fixed race condition when "ack=false" flag \201or -n\202 is used with XPASet\201\202
4584 \201or xpaset\202.
4585
4586 )0 P()-1 LI( Added defensive code to XPA handler to ensure that the passed XPA record
4587 is valid.
4588
4589 )0 P()-1 LI( Tcl/XPA servers such as ds9 were not turning off select\201\202 on the
4590 xpa channels inside an xpa callback, as required. This is now fixed.
4591
4592 )0 P()-1 LI( Added timestamps to most server and client error messages if the
4593 XPA_TIMESTAMP_ERRORS variable is set. This is useful when XPA errors are
4594 being logged in an error log \201e.g. Web/CGI use\202.
4595
4596 )0 P()-1 LI( Generated PostScript and PDF versions of the help pages.
4597
4598 )0 P()-1 LI( Moved OPTIONS section before \201often-lengthy\202 DESCRIPTION section in
4599 man pages.
4600
4601 )0 P()-1 LI( All memory allocation now performs error checking on the result.
4602
4603 )0 P()-1 LI( Removed some compiler warnings that surfaced when using gcc -O2.
4604
4605 )0 P()-1 LI( Updated configure.ac to better support Tcl in Panther with Apple
4606 Frameworks.
4607 )LU(
4608
4609 )0 2 112 H()WB 180 Sn( Patch Release 2.1.5 \20112 January 2004\202)EH(
4610 )UL(
4611 )0 P()-1 LI( Fixed bug in XPAPoll\201\202. Erroneously, no requests were being
4612 processed when maxreq==0. Now, all pending events are processed, as
4613 per the documentation.
4614
4615 )0 P()-1 LI( Added ack=false to XPAInfo\201\202 \201and corresponding -n to xpainfo\202
4616 so that client does not wait for a response from the server. This is
4617 essential in cases where XPA servers wish to send info messages to
4618 one another without causing a race condition.
4619
4620 )0 P()-1 LI( Generated man pages from the html pages. These are installed
4621 automatically at build time.
4622
4623 )0 P()-1 LI( The xpans program with Unix sockets now uses a lock file to signal
4624 that it is running, in order to avoid a potential \201but rare\202 race
4625 condition at startup.
4626
4627 )0 P()-1 LI( Code that calls Unix-type bind\201\202 now manipulate umask\201\202 to ensure that
4628 all users have write permissions to the socket file \201OS X apparently uses
4629 these permissions while previous platforms ignore them\202.
4630
4631 )0 P()-1 LI( Configure now checks for socklen_t type \201OS X does not define it\202.
4632
4633 )0 P(
4634 )-1 LI( Added an atexit function to run XPAFree. The aim here is to delete Unix
4635 socket files on exiting.
4636
4637 )0 P()-1 LI( Under Windows, the Tcl event-handling code now blocks for 1/1000 of a
4638 second instead of not blocking at all \201which inadvertently used 100% of cpu\202.
4639
4640 )0 P()-1 LI( Upgraded Tcl/Tk support to 8.4.
4641
4642 )0 P()-1 LI( Made another round of checks was made through all instances of
4643 strcat, strcpy, etc. to look for potential buffer overflows. Changed
4644 all instances of sprintf\201\202 to snprintf\201\202.
4645
4646 )0 P()-1 LI( Class and name designators are now limited to 1024 characters, for
4647 no particular reason.
4648
4649 )0 P()-1 LI( The obsolete $SAORD_BIN variable was being added to the path when
4650 searching for xpans. This is no longer the case.
4651
4652 )0 P()-1 LI( Fixed non-ANSI compiler errors in both xpa.c and xpans.c.
4653
4654 )0 P()-1 LI( Fixed minor problems to support compilation with g++.
4655
4656 )0 P()-1 LI( Ported to Intel icc and gcc 3.3 compilers.
4657
4658 )0 P()-1 LI( Upgraded autoconf to 2.57. Included in this upgrade is a change that
4659 makes gcc the default compiler \201use "configure CC=cc" to change this\202.
4660 Also, by default, the Tcl shared object is no longer automatically built
4661 if the Tcl libraries are used. Use the --enable-tclshlib switch in
4662 configure to enable this feature.
4663
4664 )0 P()-1 LI( Changed license from public domain to GNU GPL.
4665 )LU(
4666
4667 )0 2 113 H()WB 181 Sn( Patch Release 2.1.4 \20124 March 2003\202)EH(
4668 )UL(
4669 )0 P()-1 LI( Made inet method unique, even when hosts are behind a firewall using
4670 the same ports \201on different local machines\202.
4671
4672 )0 P()-1 LI( The initial connection from an xpa server to a local xpans now is
4673 controlled by a timeout \201default 5 sec, controlled by XPA_CONNECT_TIMEOUT
4674 variable\202. This should prevent a hang on connect\201\202 if the network
4675 is not set up correctly.
4676
4677 )0 P()-1 LI( Fixed rare race condition when an XPA server callback performed its own
4678 XPAGet or XPASet call to another XPA server.
4679
4680 )0 P()-1 LI( Use POSIX O_NONBLOCK for non-blocking I/O in fcntl call if it
4681 exists, instead of O_NDELAY.
4682 )LU(
4683
4684 )0 2 114 H()WB 182 Sn( Patch Release 2.1.3 \20126 September 2002\202)EH(
4685 )UL(
4686 )0 P()-1 LI( Added -k [sec] switch to xpans to support sending one-byte keepalive
4687 messages from xpans to registered xpa servers.
4688
4689 )0 P()-1 LI( Added XPANSKeepAlive routine \201and Tcl equivalent\202 to allow
4690 xpa servers to send a one-byte keepalive message to xpans.
4691 )LU(
4692
4693 )0 2 115 H()WB 183 Sn( Patch Release 2.1.2 \20118 July 2002\202)EH(
4694 )UL(
4695 )0 P()-1 LI( The "-help" reserved command now also displays the XPA version, if
4696 no explicit sub-commands are specified.
4697
4698 )0 P()-1 LI( Change internal state of xpans proxy to save ip:port value of a
4699 server behind a NAT firewall. This is required to give some hope of
4700 distinguishing multiple instances of ds9 running behind NAT.
4701 )LU(
4702
4703 )0 2 116 H()WB 184 Sn( Patch Release 2.1.1 \20120 June 2002\202)EH(
4704 )UL(
4705 )0 P()-1 LI( Added a version check between xpans and an access point,
4706 performed when it gets registered by an XPA server. If the server
4707 has a version greater than the xpans version, a warning is issued by
4708 both programs.
4709
4710 )0 P()-1 LI( Added a boolean XPA_NSREGISTER environment variable to allow an
4711 XPA server to skip xpans registration. The default is to register with
4712 the name server. If set to "false", the access point still is set up
4713 but it is not registered with an xpans. It can be registered later on
4714 \201using -remote or -proxy, for example\202.
4715
4716 )0 P()-1 LI( Fixed bug in which xpans was still listening on any interface when
4717 XPA_METHOD was localhost \201instead of just listening on localhost\202.
4718 )LU(
4719
4720 )0 2 117 H()WB 185 Sn( Public Release 2.1.0 \20122 April 2002\202)EH(
4721
4722 )0 P(New features include:
4723
4724 )UL()0 P()-1 LI( Support for proxy access to XPA servers \201e.g. ds9\202 situated
4725 behind a firewall \201useful for NVO-type applications\202.
4726
4727 )0 P()-1 LI( Improved support for allowing remote machines access rights to the
4728 XPA access points \201useful for NVO-type applications\202.
4729
4730 )0 P()-1 LI( Ability for XPAAccess\201\202 routine and xpaaccess program to contact XPA
4731 directly.
4732
4733 )0 P()-1 LI( Support for a clipboard access point that allows clients to store ASCII
4734 state information in an XPA-enabled server.
4735
4736 )0 P()-1 LI( Improved support for Windows platform, as well as new support for Mac OSX.)LU(
4737
4738 )0 2 118 H()WB 186 Sn( Pre-Release 2.1.0e \2012 April 2002\202)EH(
4739 )UL(
4740 )0 P()-1 LI( Removed the environment variable generated by each XPA access
4741 point \201of the form XPA_name=method\202. The putenv\201\202 call was causing ds9
4742 to crash under both Linux and LinuxPPC during a socket operation. We
4743 suspect a bug in putenv but cannot prove it and this feature is not
4744 essential, so ...
4745 )LU(
4746
4747 )0 2 119 H()WB 187 Sn( Pre-Release 2.1.0e \2011 April 2002\202)EH(
4748 )UL(
4749 )0 P()-1 LI( Fixed an uninitialized variable in xpamb which prevented it from
4750 working at all on some systems.
4751
4752 )0 P()-1 LI( Changed xpamb switch from "-add" to "-data" \201to store named data\202.
4753
4754 )0 P()-1 LI( Changed how xpamb works with xpaget so that xpamb can return data
4755 from XPA access points as well as from stored data. \201Previous versions
4756 only returned stored data.\202 Now, you can retrieve stored data
4757 explicitly using the -info and/or -data switches. For example:
4758 ) 1 24 PR( xpaget xpamb -info foo)RP(
4759 will return info about the previously stored data named foo. If
4760 neither switch is present, then the name is assumed to be an XPA access
4761 point.)LU(
4762
4763 )0 2 120 H()WB 188 Sn( Pre-Release 2.1.0e \20125 March 2002\202)EH(
4764 )UL(
4765 )0 P()-1 LI( Changed symbol for default port from "*" to "$port" to avoid
4766 a syntactical conflict between class:* and machine:* when processing an
4767 XPA access point class:name specification. Thus, the default inet
4768 method now is '$host:$port' instead of '$host:*'.
4769 )LU(
4770
4771 )0 2 121 H()WB 189 Sn( Pre-Release 2.1.0e \20119 March 2002\202)EH(
4772 )UL(
4773 )0 P()-1 LI( Removed timeout check when reading data \201in clients using xpaget
4774 and servers filling the data buffer\202. We have more and more cases
4775 where we need to wait a long time to retrieve data \201e.g., slow
4776 networks or receiving data being compressed on the fly\202.
4777
4778 )0 P()-1 LI( Moved call to sigaction\201SIGCHLD,...\202 out of XPAOpen\201\202, so that it
4779 is only executed when needed by XPAGet\201\202/XPASet\201\202 routines called from
4780 within xpans/proxy. But then changed logic to use a double fork\201\202 instead
4781 of sigaction\201\202 to prevent zombies \201Stevens Adv. Programming p 202\202.
4782
4783 )0 P()-1 LI( Each XPA access point now generates an environment variable of the
4784 form XPA_name=method so that children can communicate with the parent access
4785 point more easily.
4786
4787 )0 P()-1 LI( Added version option to Tcl xparec:
4788 ) 5 44 PR( if [catch { xparec "" version } version] {
4789 puts "pre-2.1.0e"
4790 } else {
4791 puts [split $version .]
4792 })RP(
4793 to help differentiate between XPA versions within Tcl code.
4794 )LU(
4795
4796 )0 2 122 H()WB 190 Sn( Pre-Release 2.1.0e \20114 February 2002\202)EH(
4797 )UL()0 P()-1 LI( Fixed client handling of out-of-sync messages.)LU(
4798
4799 )0 2 123 H()WB 191 Sn( Pre-Release 2.1.0e \20111 February 2002\202)EH(
4800 )UL(
4801 )0 P()-1 LI( Fixed client.c/xopen\201\202 so that it does not open an extra socket.
4802
4803 )0 P()-1 LI( Fixed xpainfo/xopen\201\202 to prevent client from hanging waiting for ack.
4804
4805 )0 P(
4806 )-1 LI( Modified stest to generate xpaaccess points xpa, xpa1, c_xpa, and
4807 i_xpa \201or more generally, , 1, c_, i\202 to allow
4808 more flexible testing of templates. Also added -a for testing XPAAccess\201\202.
4809 )LU(
4810
4811 )0 2 124 H()WB 192 Sn( Beta Release 2.1.0b10 \20131 January 2002\202)EH(
4812 )UL(
4813 )0 P()-1 LI( Added support for Mac OSX/Darwin to configure file.
4814 )LU(
4815
4816 )0 2 125 H()WB 193 Sn( Beta Release 2.1.0b9 \20126 January 2002\202)EH(
4817 )UL(
4818 )0 P()-1 LI( Fixed bug in client library that caused XPAAccess\201\202 call to hang.
4819 )LU(
4820
4821 )0 2 126 H()WB 194 Sn( Beta Release 2.1.0b8 \2014 January 2002\202)EH(
4822 )UL(
4823 )0 P()-1 LI( Made modifications to Makefile.in to make releases easier.
4824
4825 )0 P()-1 LI( Added instructions to Makefile.in so that xpa.h will always have
4826 correct #defines for XPA_VERSION, XPA_MAJOR_VERSION, XPA_MINOR_VERSION,
4827 and XPA_PATCH_LEVEL.
4828 )LU(
4829
4830 )0 2 127 H()WB 195 Sn( Beta Release 2.1.0b7 \20121 December 2001\202)EH(
4831 )UL(
4832 )0 P()-1 LI( Added -proxy switch to -remote sub-command to allow remote access
4833 through a firewall, using xpans as a proxy server. The support for proxy
4834 processing required a change to the client/server protocol. This means
4835 that new xpa servers will not work with old xpa clients \201although new
4836 xpa clients will work with old xpa servers\202. For details about proxy
4837 firewall support, see http://hea-www.harvard.edu/RD/xpa/inet.html.
4838
4839 )0 P()-1 LI( Fixed Tcl support for XPA under Windows/Cygwin by re-writing
4840 the code used to add XPA to the Tcl event loop. This fix makes ds9
4841 support for XPA much more stable under Windows.
4842
4843 )0 P()-1 LI( Added the shutdown\201\202 call to XPA under Cygwin/Windows before
4844 closing send\201\202 sockets. It appears that a Cygwin recv\201\202 socket call
4845 does not always sense when the other end closes the socket using
4846 close\201\202. This measure must be considered a hack, since the actual
4847 problem was never resolved.
4848
4849 )0 P()-1 LI( Added code to protect accept\201\202 and select\201\202 calls from interrupts.
4850
4851 )0 P()-1 LI( Extended syntax of the environment variable XPA_NSINET to:
4852 ) 1 43 PR( setenv XPA_NSINET host:port[,port[,port]])RP(
4853 to allow specification of the XPA access point port for xpans,
4854 as well as the proxy data port.
4855
4856 )0 P()-1 LI( Modified xpans log file so that it contains the xpaset commands
4857 required to reconnect with xpa servers.
4858
4859 )0 P()-1 LI( xpans now deletes its Unix socket files.
4860 )LU(
4861
4862 )0 2 128 H()WB 196 Sn( Beta Release 2.1.0b6 \20129 October 2001\202)EH(
4863 )UL(
4864 )0 P()-1 LI( Implemented a reserve public access point named -clipboard so
4865 that clients can store ASCII state information on any number of named
4866 clipboards. Clipboards of the same name created by clients on
4867 different machines are kept separate. The syntax for creating a
4868 clipboard is:
4869 ) 3 65 PR( [data] | xpaset [server] -clipboard add|append [clipboard_name]
4870 xpaset -p [server] -clipboard delete [clipboard_name]
4871 xpaget [server] -clipboard [clipboard_name])RP(
4872 Use "add" to create a new clipboard or replace the contents of an existing
4873 one. Use "append" to append to an existing clipboard.
4874 )LU(
4875
4876 )0 2 129 H()WB 197 Sn( Beta Release 2.1.0b5 \20122 October 2001\202)EH(
4877 )UL(
4878 )0 P()-1 LI( Use FD_SETSIZE instead of getdtablesize\201\202 to determine how many files
4879 to check during select\201\202;
4880
4881 )0 P()-1 LI( Under Cygwin, the launch\201\202 routine now uses the Cygwin spawnvp\201\202
4882 instead of fork\201\202/exec\201\202 where possible \201i.e., if no stdfiles are
4883 being redirected\202. This is recommended by Cygwin's \201skimpy\202 on-line
4884 documentation and seems to fix the problems ds9 had when starting xpans
4885 automatically.
4886
4887 )0 P()-1 LI( Added error check to select\201\202 call in xpans.
4888 )LU(
4889
4890 )0 2 130 H()WB 198 Sn( Beta Release 2.1.0b4 \20124 September 2001\202)EH(
4891 )UL(
4892 )0 P()-1 LI( The launch\201\202 now can return an error code if the execv\201\202 system
4893 call fails \201something system\201\202 does not do\202.
4894
4895 )0 P()-1 LI( INET socket calls between xpa clients and servers now will use
4896 localhost if they are on the same machine. This protects against
4897 Linux systems where the hostname is hardwired \201wrongly\202 in a DHCP
4898 environment.
4899 )LU(
4900
4901 )0 2 131 H()WB 199 Sn( Beta Release 2.1.0b3 \2016 September 2001\202)EH(
4902 )UL(
4903 )0 P()-1 LI( Modified xpans so that, in the case of a firewall, it tries to
4904 correct the specified ip:port by matching against the ip found in
4905 the socket packet at accept\201\202 time.
4906
4907 )0 P()-1 LI( Replaced system\201\202 call used to start xpans automatically with
4908 a special launch\201\202 call, which performs execvp\201\202 directly without going
4909 through sh. \201launch\201\202 works under DOS and has fewer security problems.\202
4910
4911 )0 P()-1 LI( Fixed bug in xpans in which its xpa port was always being set to 14286.
4912 )LU(
4913
4914 )0 2 132 H()WB 200 Sn( Beta Release 2.1.0b2 \20117 August 2001\202)EH(
4915 )UL(
4916 )0 P()-1 LI(Added support for -remote command, which registers the access
4917 point in the XPA name server of the specified remote server, and gives
4918 the remote server access rights to the access point. This is used, for
4919 example, to give data servers xpa access to ds9 so that data can be
4920 sent to ds9 as a result of a CGI-based Web query.
4921
4922 )0 P()-1 LI(Reserved commands \201except "-help" and "-version"\202 now can only be
4923 executed on the machine on which the xpa service is running \201not
4924 through -remote servers\202.
4925
4926 )0 P()-1 LI(Fixed bug in xpans in which a bad telnet command could hang the program.
4927
4928 )0 P()-1 LI(Added -s [security file] to xpans to allow logging of all external
4929 connections.
4930 )LU(
4931
4932 )0 2 133 H()WB 201 Sn( Beta Release 2.1.0b1 \2016 August 2001\202)EH(
4933 )UL()0 P()-1 LI( The xpaaccess client program and XPAAccess\201\202 client subroutine
4934 were modified so that an access-type query can directly contact the
4935 xpa servers matching the requested xpa template, instead of just
4936 querying the name server for registered access points. This avoid the
4937 race condition in which an access point is registered but is not yet
4938 available, perhaps because the server has not yet entered its event
4939 loop. Note that the calling sequence of the XPAAccess\201\202 routine was
4940 changed to return all matching access points and their availability
4941 status \201instead of just returning the number of registered access
4942 points\202. Because of this, we are calling this a minor release instead
4943 of a patch.
4944
4945 )0 P()-1 LI( Added support for XPA_PORT and XPA_PORTFILE environment variables
4946 to allow specification of the port to be used by the command channel
4947 \201and data channel, if an optional second port is specified\202 for a given
4948 access point.
4949
4950 )0 P()-1 LI( Added -m switch to xpaget, xpaset, xpainfo, xpaaccess to allow
4951 override of the XPA_METHOD environment variable.
4952
4953 )0 P()-1 LI( Changed the default name of the ACL file from xpa.acl to acls.xpa.
4954
4955 )0 P()-1 LI( Fixed bug in which it was not possible to send a "set ACL"
4956 command to an XPA server which did not have a receive callback \201i.e.,
4957 did not allow xpaset\202. The xpans program is one such server. It now is
4958 possible to set the ACL on xpans.
4959
4960 )0 P()-1 LI( We have discovered that Tcl support for datachan and cmdchan is
4961 broken under Windows due to an unexplained incompatibility between
4962 Cygwin sockets and Win32 sockets. We therefore have removed datachan
4963 and cmdchan from the Windows/Tcl support until further notice.
4964
4965 )0 P()-1 LI( Extended the behavior of the XPA_DEFACL environment variable so that
4966 it can support more than one acl, using a list of semi-colon delimited
4967 controls such as: setenv XPA_DEFACL '*:* $host +; *:foo1 otherhost +'.
4968
4969 )0 P()-1 LI( Fixed bug in which the class:name specifier "*:*" was erroneously
4970 trying to access the xpans name server, instead of accessing all
4971 access points.
4972
4973 )0 P()-1 LI( Support TMPDIR and TMP environment variables as well as XPA_TMPDIR.
4974 )LU(
4975
4976 )0 2 134 H()WB 202 Sn( Patch Release 2.0.5 \20110 November 2000\202)EH(
4977 )UL()0 P()-1 LI( Added support for Tcl on Windows where there is no select\201\202-based
4978 event loop \201i.e., where there is no Tcl_CreateFileHandler call in Tcl\202
4979 )0 P()-1 LI( Minor fixes in Makefile for installing on Windows
4980 )0 P()-1 LI( Minor compiler fixes from gcc -Wall.)LU(
4981
4982 )0 2 135 H()WB 203 Sn( Patch Release 2.0.4 \20120 September 2000\202 )EH(
4983 )UL()0 P()-1 LI( Removed extraneous include of varargs.h from find.c.
4984 )0 P()-1 LI( Ported to SGI C compiler, which caught lots of unused variables, etc.
4985 )0 P()-1 LI( Ported to Cygwin/Windows, which required that we change socket read\201\202
4986 and write\201\202 calls to recv\201\202 and send\201\202 respectively. Also had to ensure that
4987 we only did socket I/O on sockets \201no fileio\202.)LU(
4988
4989 )0 2 136 H()WB 204 Sn( Patch Release 2.0.3 \20115 June 2000\202 )EH(
4990 )UL(
4991 )0 P()-1 LI( Fixed the client XPASet\201\202 and XPASetFd\201\202 calls to handle the specified
4992 max number of connections \201they were ignoring this argument, leading to
4993 memory overwrites\202.
4994 )0 P()-1 LI( Fixed Makefile.in so that CFLAGS and LDFLAGS are not hard-wired values.
4995 )0 P()-1 LI( Fixed word.h to load malloc.h and stdlib.h only if they exist.
4996 )0 P()-1 LI( Documentation fixes to programs.html \201in xpaaccess\202 and client.html
4997 \201XPANSLookup\202.
4998 )0 P()-1 LI( Added explicit typecast to strlen\201\202 argument to MAX #define in
4999 XPAClientStart \201strlen\201\202 is unsigned in Linux, which can break MAX\202.
5000 )0 P()-1 LI( Removed bogus Imakefile from directory.
5001 )0 P()-1 LI( Changed directory name to include patch level \201i.e., xpa-2.0.3\202.)LU(
5002
5003 )0 2 137 H()WB 205 Sn( Patch Release 2.0.2 \2019 September 1999\202)EH(
5004 )UL(
5005 )0 P()-1 LI( Fixed server mode \201-s\202 in the xpaset program by properly cleaning up
5006 the input buffers \201sending commands and data in server mode was broken\202.)LU(
5007
5008 )0 2 138 H()WB 206 Sn( Patch Release 2.0.1 \2016 August 1999\202)EH(
5009 )UL(
5010 )0 P()-1 LI( Fixed the Tcl binding code \201tcl.c\202 for 64-bit machines \201Dec Alpha\202
5011 \201erroneously used %x instead of %p when converting pointers to ASCII\202.
5012 )0 P()-1 LI( Got rid of a few compiler warnings on 64-bit machines \201a few are
5013 unavoidable since we must cast int to void * and back when passing around
5014 client data\202.)LU(
5015
5016 )0 2 139 H()WB 207 Sn( Public Release 2.0 \20127 May 1999\202)EH(
5017 )UL(
5018 )0 P()-1 LI( "a new day with no mistakes ... yet")LU(
5019
5020 )2 1 1 HR()0 P()0 0 1 A(Index to the XPA Help Pages)0 0 TN TL()Ec /AF f D(
5021
5022 )2 1 1 HR()0 5 140 H(Last)WB 208 Sn( updated: 22 April 2002)EH(
5023 )WB NL
5024 /Cb Db D /Ct [16#00 16#00 16#00] D /Cl [16#00 16#00 16#00] D /CL -1 D Ct Sc
5025 DS
5026 /Ba f D /BO 0 D Bs
5027 /UR (examples.html) D
5028 /Ti (Where to Find Example/Test Code) D
5029 /Au () D
5030 /Df f D
5031 /ME [()] D
5032
5033 0 BO R
5034 ()1 Sl()WB 43 Sn(
5035
5036
5037 )0 2 141 H(XPACode:)WB 210 Sn()WB 209 Sn( Where to Find Example/Test Code)EA()EH(
5038
5039
5040 )0 2 142 H(Summary)WB 211 Sn()EH(
5041 )0 P(The XPA source code directory contains two test programs,
5042 )EM(stest.c)ES(, and )EM(ctest.c)ES( that can serve as
5043 examples for writing XPA servers and clients, respectively.
5044 They also can be used to test various features of XPA.
5045
5046
5047 )0 2 143 H(Description)WB 212 Sn()EH(
5048 )0 P(To build the XPA test programs, execute:
5049 ) 1 11 PR( make All)RP(
5050 in the XPA source directory to generate the )EM(stest)ES( and
5051 )EM(ctest)ES( programs. \201NB: this should work on all platforms,
5052 although we have had problems with unresolved externals on one
5053 Sun/Solaris machine, for reasons still unknown.\202
5054 )0 P(The stest program can be executed with no arguments to start
5055 an XPA server that contains the access points: xpa, xpa1,
5056 c_xpa \201containing sub-commands cmd1 and cmd2\202, and i_xpa.
5057 You then can use xpaset and xpaget to interact with these access points:
5058 ) 4 57 PR( cat xpa.c | xpaset xpa # send to xpa
5059 cat xpa.c | xpaset "xpa*" # send to xpa and xpa1
5060 xpaget xpa # receive from xpa
5061 xpaget xpa* # receive from xpa and xpa1)RP(
5062 etc. You also can use ctest to do the same thing, or to iterate:
5063 ) 4 66 PR( ctest -s -l 100 xpa # send to xpa 100 times
5064 ctest -s -l 100 "xpa*" # send to xpa and xpa1 100 times
5065 ctest -g -l 100 xpa # receive from xpa 100 times
5066 ctest -g -l 100 "xpa*" # receive from xpa and xpa1 100 times)RP(
5067 More options are available: see the stest.c and ctest.c code itself, which
5068 were used extensively to debug XPA.
5069
5070 )0 P(The file test.tcl in the XPA source directory gives examples for using the
5071 )0 39 1 A(XPATcl)39 0 TN TL()Ec /AF f D(Interface.
5072
5073
5074
5075
5076
5077 )0 P()0 0 1 A(Go to XPA Help Index)0 0 TN TL()Ec /AF f D(
5078
5079 )0 5 144 H(Last)WB 213 Sn( updated: September 10, 2003)EH(
5080 )WB NL
5081 /Cb Db D /Ct [16#00 16#00 16#00] D /Cl [16#00 16#00 16#00] D /CL -1 D Ct Sc
5082 DS
5083 /Ba f D /BO 0 D Bs
5084 /UR (changes.html) D
5085 /Ti (Changes For Users from XPA 1.0 and 2.0) D
5086 /Au () D
5087 /Df f D
5088 /ME [()] D
5089
5090 0 BO R
5091 ()1 Sl()WB 44 Sn(
5092
5093
5094 )0 2 145 H(XPA)WB 215 Sn()WB 214 Sn( Changes: Changes For Users from XPA 1.0 and 2.0)EA()EH(
5095
5096
5097 )0 2 146 H(Summary)WB 216 Sn()EH(
5098 )0 P(This document describes changes that will affect users who migrate
5099 from XPA 1.0 to XPA 2.0.
5100
5101
5102 )0 2 147 H(Description)WB 217 Sn()EH(
5103 )0 P(There have been a few changes that affect users who upgrade XPA
5104 from version 1.0 to version 2.0. These changes are detailed below.
5105 )UL()0 P()-1 LI(XPA commands no longer have a resolver routine \201this is open to
5106 negotiations, but we decided the idea was dumb\202. For the SAOtng
5107 program, this means that you must explicitly specify the access
5108 point, i.e.,:
5109 ) 1 35 PR( cat foo.fits | xpaset SAOtng fits)RP(
5110
5111 )0 P(instead of:
5112 ) 1 30 PR( cat foo.fits | xpaset SAOtng)RP(
5113 )0 P()-1 LI(By default, xpaset, xpaget, etc. now wait for the server callback to
5114 complete; i.e., the old -W is implied \201and the switch is ignored\202.
5115 This allows support for better error handling. If you want xpaset, etc.
5116 to return before the callback is complete, use -n switch:
5117 ) 1 41 PR( echo "file foo.fits" | xpaset -n SAOtng)RP(
5118 )0 P()-1 LI(The old -w switch in xpaset and xpaget is no longer necessary \201and is
5119 ignored\202, since you can have more than one process communicating with
5120 an xpa access point at one time.
5121
5122 )0 P()-1 LI(The new -p switch on xpaset means you need not read from stdout:
5123 ) 2 30 PR(
5124 xpaset -p SAOtng colormap I8)RP(
5125 )0 P(will send the paramlist to the SAOtng callback without reading from stdin.
5126 )LU(
5127
5128
5129
5130
5131
5132 )0 P()0 0 1 A(Go to XPA Help Index)0 0 TN TL()Ec /AF f D(
5133
5134 )0 5 148 H(Last)WB 218 Sn( updated: September 10, 2003)EH(
5135 )WB NL
5136 /Cb Db D /Ct [16#00 16#00 16#00] D /Cl [16#00 16#00 16#00] D /CL -1 D Ct Sc
5137 DS
5138 /Ba f D /BO 0 D Bs
5139 /UR (convert.html) D
5140 /Ti (Converting the XPA API to 2.0) D
5141 /Au () D
5142 /Df f D
5143 /ME [()] D
5144
5145 0 BO R
5146 ()1 Sl()WB 45 Sn(
5147
5148
5149 )0 2 149 H(XPAConvert:)WB 220 Sn()WB 219 Sn( Converting the XPA API to 2.0)EA()EH(
5150
5151
5152 )0 2 150 H(Summary)WB 221 Sn()EH(
5153 )0 P(This document describes tips for converting from xpa 1.0 \201Xt-based
5154 xpa\202 to xpa 2.0 \201socket-based xpa\202.
5155
5156
5157 )0 2 151 H(Description)WB 222 Sn()EH(
5158 )0 P(The following are tips for converting from xpa 1.0 \201Xt-based xpa\202 to
5159 xpa 2.0 \201socket-based xpa\202. The changes are straight-forward and
5160 almost can be done automatically \201we used editor macros for most of
5161 the conversion\202.
5162 )UL()0 P()-1 LI(The existence of the cpp XPA_VERSION directive to distinguish between 1.0
5163 \201where it is not defined\202 and 2.0 \201where it is defined\202.
5164
5165 )0 P()-1 LI(Remove the first widget argument from all send and receive server
5166 callbacks. Also change first 2 arguments from XtPointer to void
5167 *. For example:
5168 ) 16 74 PR(#ifdef XPA_VERSION
5169 static void XPAReceiveFile\201client_data, call_data, paramlist, buf, len\202
5170 void *client_data;
5171 void *call_data;
5172 char *paramlist;
5173 char *buf;
5174 int len;
5175 #else
5176 static void XPAReceiveFile\201w, client_data, call_data, paramlist, buf, len\202
5177 Widget w;
5178 XtPointer client_data;
5179 XtPointer call_data;
5180 char *paramlist;
5181 char *buf;
5182 int len;
5183 #endif)RP(
5184 )0 P()-1 LI(Server callbacks should be declared as returning int instead
5185 of void. They now should return 0 for no errors, -1 for error.
5186
5187 )0 P()-1 LI( The mode flags have changed when defining XPA server callbacks.
5188 The old )EM(S)ES( flag \201save buffer\202 is replaced by )EM(freebuf=false)ES(.
5189 The old )EM(E)ES( flag \201empty buffer is OK\202 is no longer used \201it
5190 was an artifact of the X implementation\202.
5191
5192 )0 P()-1 LI(Change NewXPACommand\201\202 to XPAcmdNew\201\202, with the new calling sequence:
5193 ) 1 52 PR( xpa = NewXPACommand\201toplevel, NULL, prefix, NULL\202;)RP(
5194 is changed to:
5195 ) 1 32 PR( xpa = XPACmdNew\201xclass, name\202;)RP(
5196 )0 P()-1 LI(Change the AddXPACommand\201\202 subroutine name to XPACmdAdd \201with the same
5197 calling sequence\202:
5198 ) 3 53 PR( AddXPACommand\201xpa, "file",
5199 "\200tdisplay a new file\200n\200t\200t requires: filename",
5200 NULL, NULL, NULL, XPAReceiveFile, text, NULL\202;)RP(
5201 is changed to:
5202 ) 3 53 PR( XPACmdAdd\201xpa, "file",
5203 "\200tdisplay a new file\200n\200t\200t requires: filename",
5204 NULL, NULL, NULL, XPAReceiveFile, text, NULL\202;)RP(
5205 )0 P()-1 LI(The XPAXtAppInput\201\202 routine should be called just before XtAppMainLoop\201\202
5206 to add xpa fds to the Xt event loop:
5207 ) 5 35 PR( /* add the xpas to the Xt loop */
5208 XPAXtAddInput\201app, NULL\202;
5209
5210 /* process events */
5211 XtAppMainLoop\201app\202;)RP(
5212 )0 P()-1 LI(Change NewXPA\201\202 to XPANew\201\202 and call XPAXtAddInput\201\202 if the XtAppMainLoop
5213 routine already has been entered:
5214 ) 4 71 PR( xpa = NewXPA\201saotng->xim->toplevel, prefix, xparoot,
5215 "FITS data or image filename\200n\200t\200t options: file type",
5216 XPASendData, new, NULL,
5217 XPAReceiveData, new, "SE"\202;)RP(
5218 is changed to:
5219 ) 6 74 PR( sprintf\201tbuf, "%s.%s", prefix, xparoot\202;
5220 xpa = XPANew\201"SAOTNG", tbuf,
5221 "FITS data or image filename\200n\200t\200t options: file type",
5222 XPASendData, new, NULL,
5223 XPAReceiveData, new, "SE"\202;
5224 XPAXtAddInput\201XtWidgetToApplicationContext\201saotng->xim->toplevel\202, xpa\202;)RP(
5225 )0 P()-1 LI(Change XPAInternalReceiveCommand\201\202 to XPACmdInternalReceive\201\202
5226 remove first argument in the calling sequence\202:
5227 ) 3 61 PR( XPAInternalReceiveCommand\201im->saotng->xim->toplevel,
5228 im->saotng, im->saotng->commands,
5229 "zoom reset", NULL, 0\202;)RP(
5230 is changed to:
5231 ) 2 57 PR( XPACmdInternalReceive\201im->saotng, im->saotng->commands,
5232 "zoom reset", NULL, 0\202;)RP(
5233 )0 P()-1 LI(Change DestroyXPA to XPAFree:
5234 ) 1 26 PR( DestroyXPA\201im->dataxpa\202;)RP(
5235 is changed to:
5236 ) 1 23 PR( XPAFree\201im->dataxpa\202;)RP()LU(
5237
5238
5239
5240
5241
5242 )0 P()0 0 1 A(Go to XPA Help Index)0 0 TN TL()Ec /AF f D(
5243
5244 )0 5 152 H(Last)WB 223 Sn( updated: September 10, 2003)EH(
5245
5246 )WB NL
5247 /Cb Db D /Ct [16#00 16#00 16#00] D /Cl [16#00 16#00 16#00] D /CL -1 D Ct Sc
5248 DS
5249 /Ba f D /BO 0 D Bs
5250 /UR (name.html) D
5251 /Ti (What does XPA stand for?) D
5252 /Au () D
5253 /Df f D
5254 /ME [()] D
5255
5256 0 BO R
5257 ()1 Sl()WB 46 Sn(
5258
5259
5260 )0 2 153 H(XPAName:)WB 225 Sn()WB 224 Sn( What does XPA stand for?)EA()EH(
5261
5262
5263 )0 2 154 H(Summary)WB 226 Sn()EH(
5264 )0 P(What does XPA stand for? Who knows anymore!
5265
5266
5267 )0 2 155 H(Description)WB 227 Sn()EH(
5268 )0 P(What does XPA stand for? Dunno! The XPA messaging system originally
5269 was built on top of the X Window System and XPA was the mnemonic for
5270 )EM(X Public Access)ES(, to emphasize that we were providing public
5271 access to previously private data and algorithms in Xt programs. Now
5272 that XPA no longer is tied to X, it can be argued that we ought to
5273 change the name \201how about )EM(SPAM: simple public access mechanism)ES(\202, but XPA is in wide-spread use in the astronomical community of
5274 its birth, and the name has taken on a life of its own. If anyone can
5275 think of what XPA now means, please let us know.
5276
5277 )0 P(If you think this is bad, consider the MMT Telescope on Mount Hopkins,
5278 Arizona. When first installed twenty years ago, it featured an array
5279 of six 72-inch diameter mirrors. from which came its name: the
5280 )EM(Multiple Mirror Telescope)ES(. In spring of 1999, these mirrors
5281 were replaced by a single 21 and 1/2 -foot diameter primary mirror,
5282 the largest single-piece glass reflector on the North American
5283 continent. And now MMT stands for ... MMT!
5284
5285
5286
5287
5288
5289 )0 P()0 0 1 A(Go to XPA Help Index)0 0 TN TL()Ec /AF f D(
5290
5291 )0 5 156 H(Last)WB 228 Sn( updated: September 10, 2003)EH(
5292
5293 )WB NL
5294 /TE t D NP TU PM 0 eq and{/Pn () D showpage}if end restore