1XAddHost(3)                     XLIB FUNCTIONS                     XAddHost(3)
2
3
4

NAME

6       XAddHost, XAddHosts, XListHosts, XRemoveHost, XRemoveHosts, XSetAccess‐
7       Control,  XEnableAccessControl,  XDisableAccessControl,   XHostAddress,
8       XServerInterpretedAddress - control host access and host control struc‐
9       ture
10

SYNTAX

12       int XAddHost(Display *display, XHostAddress *host);
13
14       int XAddHosts(Display *display, XHostAddress *hosts, int num_hosts);
15
16       XHostAddress *XListHosts(Display  *display,  int  *nhosts_return,  Bool
17              *state_return);
18
19       int XRemoveHost(Display *display, XHostAddress *host);
20
21       int XRemoveHosts(Display *display, XHostAddress *hosts, int num_hosts);
22
23       int XSetAccessControl(Display *display, int mode);
24
25       int XEnableAccessControl(Display *display);
26
27       int XDisableAccessControl(Display *display);
28

ARGUMENTS

30       display   Specifies the connection to the X server.
31
32       host      Specifies the host that is to be added or removed.
33
34       hosts     Specifies each host that is to be added or removed.
35
36       mode      Specifies  the mode.  You can pass EnableAccess or DisableAc‐
37                 cess.
38
39       nhosts_return
40                 Returns the number of hosts currently in the  access  control
41                 list.
42
43       num_hosts Specifies the number of hosts.
44
45       state_return
46                 Returns the state of the access control.
47

DESCRIPTION

49       The  XAddHost  function  adds  the specified host to the access control
50       list for that display.  The server must be on  the  same  host  as  the
51       client issuing the command, or a BadAccess error results.
52
53       XAddHost can generate BadAccess and BadValue errors.
54
55       The  XAddHosts  function adds each specified host to the access control
56       list for that display.  The server must be on  the  same  host  as  the
57       client issuing the command, or a BadAccess error results.
58
59       XAddHosts can generate BadAccess and BadValue errors.
60
61       The XListHosts function returns the current access control list as well
62       as whether the use of the list at connection setup was enabled or  dis‐
63       abled.   XListHosts allows a program to find out what machines can make
64       connections.  It also returns a pointer to a list  of  host  structures
65       that  were allocated by the function.  When no longer needed, this mem‐
66       ory should be freed by calling XFree.
67
68       The XRemoveHost function removes the specified  host  from  the  access
69       control  list for that display.  The server must be on the same host as
70       the client process, or a BadAccess error results.  If you  remove  your
71       machine from the access list, you can no longer connect to that server,
72       and this operation cannot be reversed unless you reset the server.
73
74       XRemoveHost can generate BadAccess and BadValue errors.
75
76       The XRemoveHosts function removes each specified host from  the  access
77       control  list  for that display.  The X server must be on the same host
78       as the client process, or a BadAccess error  results.   If  you  remove
79       your  machine  from  the access list, you can no longer connect to that
80       server, and this operation cannot be  reversed  unless  you  reset  the
81       server.
82
83       XRemoveHosts can generate BadAccess and BadValue errors.
84
85       The  XSetAccessControl  function  either enables or disables the use of
86       the access control list at each connection setup.
87
88       XSetAccessControl can generate BadAccess and BadValue errors.
89
90       The XEnableAccessControl function enables the use of the access control
91       list at each connection setup.
92
93       XEnableAccessControl can generate a BadAccess error.
94
95       The  XDisableAccessControl function disables the use of the access con‐
96       trol list at each connection setup.
97
98       XDisableAccessControl can generate a BadAccess error.
99

STRUCTURES

101       The XHostAddress structure contains:
102
103       typedef struct {
104               int family;     /* for example FamilyInternet */
105               int length;     /* length of address, in bytes */
106               char *address;  /* pointer to where to find the address */
107       } XHostAddress;
108
109       The family member specifies which protocol address family to  use  (for
110       example,  TCP/IP or DECnet) and can be FamilyInternet, FamilyInternet6,
111       FamilyServerInterpreted, FamilyDECnet, or FamilyChaos.  The length mem‐
112       ber  specifies  the length of the address in bytes.  The address member
113       specifies a pointer to the address.
114
115       For the ServerInterpreted family, the length is ignored and the address
116       member is a pointer to a XServerInterpretedAddress structure which con‐
117       tains:
118
119       typedef struct {
120               int typelength;         /* length of type string, in bytes */
121               int valuelength;        /* length of value string, in bytes */
122               char *type;             /* pointer to where to find the type string */
123               char *value;            /* pointer to where to find the address */
124       } XServerInterpretedAddress;
125
126       The type and value members point to strings representing the  type  and
127       value  of the server interpreted entry.  These strings may not be NULL-
128       terminated so care should be used when accessing them.  The  typelength
129       and  valuelength  members  specify  the  length in byte of the type and
130       value strings.
131

DIAGNOSTICS

133       BadAccess A client attempted to modify the  access  control  list  from
134                 other than the local (or otherwise authorized) host.
135
136       BadValue  Some numeric value falls outside the range of values accepted
137                 by the request.  Unless a specific range is specified for  an
138                 argument,  the  full  range defined by the argument's type is
139                 accepted.  Any argument defined as a set of alternatives  can
140                 generate this error.
141

SEE ALSO

143       XFree(3)
144       Xlib - C Language X Interface
145
146
147
148X Version 11                    libX11 1.7.3.1                     XAddHost(3)
Impressum