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.  NB: if specified, the
34       name and messages arrays must be of size n or greater.
35
36       The returned message string will be of the form:
37
38         XPA$ERROR error-message (class:name ip:port)
39
40       Note that names of matching registered access points are always
41       returned but may not be valid; it is not sufficient to assume that the
42       returned number of access points is the number of valid access points.
43       Rather, it is essential to check the messages array for error messages.
44       Any string in the messages array is an error message and indicated that
45       the associated access point is not available.
46
47       For example, assume that a server registers a number of access points
48       but delays entering its event loop. If a call to XPAAccess() is made
49       before the event loop is entered, the call will timeout (after waiting
50       for the long timeout period) and return an error of the form:
51
52         XPA$ERROR: timeout waiting for server authentication (XPA:xpa1)
53
54       The error means that the XPA access point has been registered but is
55       not yet available (because events are not being processed). When the
56       server finally enters its event loop, subsequent calls to XPAAccess()
57       will return successfully.
58
59       NB: This routine only works with XPA servers built with XPA 2.1.x and
60       later.  Servers with older versions of XPA will return the error mes‐
61       sage:
62
63         XPA$ERROR invalid xpa command in initialization string
64
65       If you get this error message, then the old server actually is ready
66       for access, since it got to the point of fielding the query! The xpaac‐
67       cess program, for example, ignores this message in order to work prop‐
68       erly with older servers.
69
70       The third argument for XPAAccess() is the type of access and can be any
71       combination of:
72
73         type          explanation
74         ------        -----------
75         g             xpaget calls can be made on this access point
76         s             xpaset calls can be made on this access point
77         i             xpainfo calls can be made on this access point
78
79       The mode string argument is of the form: "key1=value1,key2=value2,..."
80       The following keywords are recognized:
81
82         key           value           default         explanation
83         ------        --------        --------        -----------
84         ack           true/false      true            if false, don't wait for ack from server (after callback completes)
85
86       The ack keyword is not very useful, since the server completes the
87       callback in order to return the data anyway.  It is here for completion
88       (and perhaps for future usefulness).
89

SEE ALSO

91       See xpa(n) for a list of XPA help pages
92
93
94
95version 2.1.12                 January 26, 2010                   xpaaccess(3)
Impressum