1xpaaccess(3)                  SAORD Documentation                 xpaaccess(3)
2
3
4

NAME

6       XPAAccess: return XPA access points matching template (XPA 2.1 and
7       above)
8

SYNOPSIS

10         #include <xpa.h>
11
12         int XPAAccess(XPA xpa,
13                       char *template, char *paramlist, char *mode,
14                       char **names, char **messages, int n);
15

DESCRIPTION

17       The XPAAccess routine returns the public access points that match the
18       specified second argument template and have the specified access type.
19
20       A template of the form "class1:name1" is sent to the XPA name server,
21       which returns a list of at most n matching XPA servers.  A connection
22       is established with each of these servers and the paramlist string is
23       passed to the server as the data transfer request is initiated. If an
24       XPA struct is passed to the call, then the persistent connections are
25       updated as described above. Otherwise, temporary connections are made
26       to the servers (which will be closed when the call completes).
27
28       The XPAAccess() routine retrieves names from at most n XPA servers that
29       match the specified template and that were checked for access using the
30       specified mode.  The return string contains both the class:name and
31       ip:port.  If a given server returned an error or the server callback
32       sends a message back to the client, then the message will be stored in
33       the associated element of the messages array.  The returned message
34       string will be of the form:
35
36         XPA$ERROR error-message (class:name ip:port)
37
38       Note that names of matching registered access points are always
39       returned but may not be valid; it is not sufficient to assume that the
40       returned number of access points is the number of valid access points.
41       Rather, it is essential to check the messages array for error messages.
42       Any string in the messages array is an error message and indicated that
43       the associated access point is not available.
44
45       For example, assume that a server registers a number of access points
46       but delays entering its event loop. If a call to XPAAccess() is made
47       before the event loop is entered, the call will timeout (after waiting
48       for the long timeout period) and return an error of the form:
49
50         XPA$ERROR: timeout waiting for server authentication (XPA:xpa1)
51
52       The error means that the XPA access point has been registered but is
53       not yet available (because events are not being processed). When the
54       server finally enters its event loop, subsequent calls to XPAAccess()
55       will return successfully.
56
57       NB: This routine only works with XPA servers built with XPA 2.1.x and
58       later.  Servers with older versions of XPA will return the error mes‐
59       sage:
60
61         XPA$ERROR invalid xpa command in initialization string
62
63       If you get this error message, then the old server actually is ready
64       for access, since it got to the point of fielding the query! The xpaac‐
65       cess program, for example, ignores this message in order to work prop‐
66       erly with older servers.
67
68       The third argument for XPAAccess() is the type of access and can be any
69       combination of:
70
71         type          explanation
72         ------        -----------
73         g             xpaget calls can be made on this access point
74         s             xpaset calls can be made on this access point
75         i             xpainfo calls can be made on this access point
76
77       The mode string argument is of the form: "key1=value1,key2=value2,..."
78       The following keywords are recognized:
79
80         key           value           default         explanation
81         ------        --------        --------        -----------
82         ack           true/false      true            if false, don't wait for ack from server (after callback completes)
83
84       The ack keyword is not very useful, since the server completes the
85       callback in order to return the data anyway.  It is here for completion
86       (and perhaps for future usefulness).
87

SEE ALSO

89       See xpa(n) for a list of XPA help pages
90
91
92
93version 2.1.8                  November 1, 2007                   xpaaccess(3)
Impressum