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

NAME

6       XPA Server Callback Macros
7

SYNOPSIS

9         #include <xpa.h>
10
11         xpa_class, xpa_name, xpa_method, xpa_cmdfd, xpa_datafd,
12         xpa_sendian, xpa_cendian
13

DESCRIPTION

15       Server routines have  access to information about the XPA being called
16       via the following macros (each of which takes the xpa handle as an
17       argument):
18
19         macro                 explanation
20         ------                -----------
21         xpa_class             class of this xpa
22         xpa_name              name of this xpa
23         xpa_method            method string (inet or local connect info)
24         xpa_cmdfd             fd of command socket
25         xpa_datafd            fd of data socket
26         xpa_sendian           endian-ness of server ("little" or "big")
27         xpa_cendian           endian-ness of client ("little" or "big"
28
29       The argument to these macros is the call_data pointer that is passed to
30       the server procedure.  This pointer should be type case to XPA in the
31       server routine:
32
33         XPA xpa = (XPA)call_data;
34
35       The most important of these macros is xpa_datafd().  A server routine
36       that sets "fillbuf=false" in receive_mode or send_mode can use this
37       macro to perform I/O directly to/from the client, rather than using
38       buf.
39
40       The xpa_cendian and xpa_sendian macros can be used together to
41       determine if the data transferred from the client is byte swapped with
42       respect to the server. Values for these macros are: "little", "big", or
43       "?".  In order to do a proper conversion, you still need to know the
44       format of the data (i.e., byte swapping is dependent on the size of the
45       data element being converted).
46

SEE ALSO

48       See xpa(n) for a list of XPA help pages
49
50
51
52version 2.1.15                   July 23, 2013                    xpamacros(3)
Impressum