Blame man/XAddHost.man

Packit 5bd3a9
.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996 X Consortium
Packit 5bd3a9
.\"
Packit 5bd3a9
.\" All rights reserved.
Packit 5bd3a9
.\" 
Packit 5bd3a9
.\" Permission is hereby granted, free of charge, to any person obtaining a
Packit 5bd3a9
.\" copy of this software and associated documentation files (the
Packit 5bd3a9
.\" "Software"), to deal in the Software without restriction, including
Packit 5bd3a9
.\" without limitation the rights to use, copy, modify, merge, publish,
Packit 5bd3a9
.\" distribute, and/or sell copies of the Software, and to permit persons
Packit 5bd3a9
.\" to whom the Software is furnished to do so, provided that the above
Packit 5bd3a9
.\" copyright notice(s) and this permission notice appear in all copies of
Packit 5bd3a9
.\" the Software and that both the above copyright notice(s) and this
Packit 5bd3a9
.\" permission notice appear in supporting documentation.
Packit 5bd3a9
.\" 
Packit 5bd3a9
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
Packit 5bd3a9
.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
Packit 5bd3a9
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
Packit 5bd3a9
.\" OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
Packit 5bd3a9
.\" HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
Packit 5bd3a9
.\" INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
Packit 5bd3a9
.\" FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
Packit 5bd3a9
.\" NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
Packit 5bd3a9
.\" WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Packit 5bd3a9
.\" 
Packit 5bd3a9
.\" Except as contained in this notice, the name of a copyright holder
Packit 5bd3a9
.\" shall not be used in advertising or otherwise to promote the sale, use
Packit 5bd3a9
.\" or other dealings in this Software without prior written authorization
Packit 5bd3a9
.\" of the copyright holder.
Packit 5bd3a9
.\" 
Packit 5bd3a9
.\" X Window System is a trademark of The Open Group.
Packit 5bd3a9
.\"
Packit 5bd3a9
.\" Copyright 2004 Oracle and/or its affiliates. All rights reserved.
Packit 5bd3a9
.\"
Packit 5bd3a9
.\" Permission is hereby granted, free of charge, to any person obtaining a
Packit 5bd3a9
.\" copy of this software and associated documentation files (the "Software"),
Packit 5bd3a9
.\" to deal in the Software without restriction, including without limitation
Packit 5bd3a9
.\" the rights to use, copy, modify, merge, publish, distribute, sublicense,
Packit 5bd3a9
.\" and/or sell copies of the Software, and to permit persons to whom the
Packit 5bd3a9
.\" Software is furnished to do so, subject to the following conditions:
Packit 5bd3a9
.\"
Packit 5bd3a9
.\" The above copyright notice and this permission notice (including the next
Packit 5bd3a9
.\" paragraph) shall be included in all copies or substantial portions of the
Packit 5bd3a9
.\" Software.
Packit 5bd3a9
.\"
Packit 5bd3a9
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
Packit 5bd3a9
.\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
Packit 5bd3a9
.\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
Packit 5bd3a9
.\" THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
Packit 5bd3a9
.\" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
Packit 5bd3a9
.\" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
Packit 5bd3a9
.\" DEALINGS IN THE SOFTWARE.
Packit 5bd3a9
.\"
Packit 5bd3a9
.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991 by
Packit 5bd3a9
.\" Digital Equipment Corporation
Packit 5bd3a9
.\"
Packit 5bd3a9
.\" Portions Copyright \(co 1990, 1991 by
Packit 5bd3a9
.\" Tektronix, Inc.
Packit 5bd3a9
.\"
Packit 5bd3a9
.\" Permission to use, copy, modify and distribute this documentation for
Packit 5bd3a9
.\" any purpose and without fee is hereby granted, provided that the above
Packit 5bd3a9
.\" copyright notice appears in all copies and that both that copyright notice
Packit 5bd3a9
.\" and this permission notice appear in all copies, and that the names of
Packit 5bd3a9
.\" Digital and Tektronix not be used in in advertising or publicity pertaining
Packit 5bd3a9
.\" to this documentation without specific, written prior permission.
Packit 5bd3a9
.\" Digital and Tektronix makes no representations about the suitability
Packit 5bd3a9
.\" of this documentation for any purpose.
Packit 5bd3a9
.\" It is provided ``as is'' without express or implied warranty.
Packit 5bd3a9
.\" 
Packit 5bd3a9
.\"
Packit 5bd3a9
.ds xT X Toolkit Intrinsics \- C Language Interface
Packit 5bd3a9
.ds xW Athena X Widgets \- C Language X Toolkit Interface
Packit 5bd3a9
.ds xL Xlib \- C Language X Interface
Packit 5bd3a9
.ds xC Inter-Client Communication Conventions Manual
Packit 5bd3a9
.na
Packit 5bd3a9
.de Ds
Packit 5bd3a9
.nf
Packit 5bd3a9
.\\$1D \\$2 \\$1
Packit 5bd3a9
.ft CW
Packit 5bd3a9
.\".ps \\n(PS
Packit 5bd3a9
.\".if \\n(VS>=40 .vs \\n(VSu
Packit 5bd3a9
.\".if \\n(VS<=39 .vs \\n(VSp
Packit 5bd3a9
..
Packit 5bd3a9
.de De
Packit 5bd3a9
.ce 0
Packit 5bd3a9
.if \\n(BD .DF
Packit 5bd3a9
.nr BD 0
Packit 5bd3a9
.in \\n(OIu
Packit 5bd3a9
.if \\n(TM .ls 2
Packit 5bd3a9
.sp \\n(DDu
Packit 5bd3a9
.fi
Packit 5bd3a9
..
Packit 5bd3a9
.de IN		\" send an index entry to the stderr
Packit 5bd3a9
..
Packit 5bd3a9
.de Pn
Packit 5bd3a9
.ie t \\$1\fB\^\\$2\^\fR\\$3
Packit 5bd3a9
.el \\$1\fI\^\\$2\^\fP\\$3
Packit 5bd3a9
..
Packit 5bd3a9
.de ZN
Packit 5bd3a9
.ie t \fB\^\\$1\^\fR\\$2
Packit 5bd3a9
.el \fI\^\\$1\^\fP\\$2
Packit 5bd3a9
..
Packit 5bd3a9
.de hN
Packit 5bd3a9
.ie t <\fB\\$1\fR>\\$2
Packit 5bd3a9
.el <\fI\\$1\fP>\\$2
Packit 5bd3a9
..
Packit 5bd3a9
.ny0
Packit 5bd3a9
.TH XAddHost __libmansuffix__ __xorgversion__ "XLIB FUNCTIONS"
Packit 5bd3a9
.SH NAME
Packit 5bd3a9
XAddHost, XAddHosts, XListHosts, XRemoveHost, XRemoveHosts, XSetAccessControl, XEnableAccessControl, XDisableAccessControl, XHostAddress, XServerInterpretedAddress \- control host access and host control structure
Packit 5bd3a9
.SH SYNTAX
Packit 5bd3a9
.HP
Packit 5bd3a9
int XAddHost\^(\^Display *\fIdisplay\fP, XHostAddress *\fIhost\fP\^); 
Packit 5bd3a9
.HP
Packit 5bd3a9
int XAddHosts\^(\^Display *\fIdisplay\fP, XHostAddress *\fIhosts\fP, 
Packit 5bd3a9
int \fInum_hosts\fP\^);
Packit 5bd3a9
.HP
Packit 5bd3a9
XHostAddress *XListHosts\^(\^Display *\fIdisplay\fP, int *\fInhosts_return\fP,
Packit 5bd3a9
Bool \fIstate_return\fP\^);
Packit 5bd3a9
.HP
Packit 5bd3a9
int XRemoveHost\^(\^Display *\fIdisplay\fP, XHostAddress *\fIhost\fP\^);
Packit 5bd3a9
.HP
Packit 5bd3a9
int XRemoveHosts\^(\^Display *\fIdisplay\fP, XHostAddress *\fIhosts\fP, int \fInum_hosts\fP\^);
Packit 5bd3a9
.HP
Packit 5bd3a9
int XSetAccessControl\^(\^Display *\fIdisplay\fP, int \fImode\fP\^);
Packit 5bd3a9
.HP
Packit 5bd3a9
int XEnableAccessControl\^(\^Display *\fIdisplay\fP\^);
Packit 5bd3a9
.HP
Packit 5bd3a9
int XDisableAccessControl\^(\^Display *\fIdisplay\fP\^);
Packit 5bd3a9
.SH ARGUMENTS
Packit 5bd3a9
.IP \fIdisplay\fP 1i
Packit 5bd3a9
Specifies the connection to the X server.
Packit 5bd3a9
.ds Ho added or removed
Packit 5bd3a9
.IP \fIhost\fP 1i
Packit 5bd3a9
Specifies the host that is to be \*(Ho.
Packit 5bd3a9
.ds Ho added or removed
Packit 5bd3a9
.IP \fIhosts\fP 1i
Packit 5bd3a9
Specifies each host that is to be \*(Ho.
Packit 5bd3a9
.IP \fImode\fP 1i
Packit 5bd3a9
Specifies the mode.
Packit 5bd3a9
You can pass
Packit 5bd3a9
.ZN EnableAccess
Packit 5bd3a9
or
Packit 5bd3a9
.ZN DisableAccess .
Packit 5bd3a9
.IP \fInhosts_return\fP 1i
Packit 5bd3a9
Returns the number of hosts currently in the access control list.
Packit 5bd3a9
.IP \fInum_hosts\fP 1i
Packit 5bd3a9
Specifies the number of hosts.
Packit 5bd3a9
.IP \fIstate_return\fP 1i
Packit 5bd3a9
Returns the state of the access control.
Packit 5bd3a9
.SH DESCRIPTION
Packit 5bd3a9
The
Packit 5bd3a9
.ZN XAddHost
Packit 5bd3a9
function adds the specified host to the access control list for that display.
Packit 5bd3a9
The server must be on the same host as the client issuing the command, or a
Packit 5bd3a9
.ZN BadAccess
Packit 5bd3a9
error results.
Packit 5bd3a9
.LP
Packit 5bd3a9
.ZN XAddHost
Packit 5bd3a9
can generate
Packit 5bd3a9
.ZN BadAccess
Packit 5bd3a9
and
Packit 5bd3a9
.ZN BadValue
Packit 5bd3a9
errors.
Packit 5bd3a9
.LP
Packit 5bd3a9
The
Packit 5bd3a9
.ZN XAddHosts
Packit 5bd3a9
function adds each specified host to the access control list for that display.
Packit 5bd3a9
The server must be on the same host as the client issuing the command, or a
Packit 5bd3a9
.ZN BadAccess
Packit 5bd3a9
error results.
Packit 5bd3a9
.LP
Packit 5bd3a9
.ZN XAddHosts
Packit 5bd3a9
can generate
Packit 5bd3a9
.ZN BadAccess
Packit 5bd3a9
and
Packit 5bd3a9
.ZN BadValue
Packit 5bd3a9
errors.
Packit 5bd3a9
.LP
Packit 5bd3a9
The
Packit 5bd3a9
.ZN XListHosts
Packit 5bd3a9
function returns the current access control list as well as whether the use 
Packit 5bd3a9
of the list at connection setup was enabled or disabled.
Packit 5bd3a9
.ZN XListHosts
Packit 5bd3a9
allows a program to find out what machines can make connections.
Packit 5bd3a9
It also returns a pointer to a list of host structures that
Packit 5bd3a9
were allocated by the function. 
Packit 5bd3a9
When no longer needed,
Packit 5bd3a9
this memory should be freed by calling
Packit 5bd3a9
.ZN XFree .
Packit 5bd3a9
.LP
Packit 5bd3a9
The
Packit 5bd3a9
.ZN XRemoveHost
Packit 5bd3a9
function removes the specified host from the access control list 
Packit 5bd3a9
for that display.
Packit 5bd3a9
The server must be on the same host as the client process, or a
Packit 5bd3a9
.ZN BadAccess
Packit 5bd3a9
error results.
Packit 5bd3a9
If you remove your machine from the access list,
Packit 5bd3a9
you can no longer connect to that server,
Packit 5bd3a9
and this operation cannot be reversed unless you reset the server.
Packit 5bd3a9
.LP
Packit 5bd3a9
.ZN XRemoveHost
Packit 5bd3a9
can generate
Packit 5bd3a9
.ZN BadAccess
Packit 5bd3a9
and
Packit 5bd3a9
.ZN BadValue
Packit 5bd3a9
errors.
Packit 5bd3a9
.LP
Packit 5bd3a9
The
Packit 5bd3a9
.ZN XRemoveHosts
Packit 5bd3a9
function removes each specified host from the access control list for that 
Packit 5bd3a9
display.  
Packit 5bd3a9
The X server must be on the same host as the client process, or a
Packit 5bd3a9
.ZN BadAccess
Packit 5bd3a9
error results.
Packit 5bd3a9
If you remove your machine from the access list, 
Packit 5bd3a9
you can no longer connect to that server,
Packit 5bd3a9
and this operation cannot be reversed unless you reset the server.
Packit 5bd3a9
.LP
Packit 5bd3a9
.ZN XRemoveHosts
Packit 5bd3a9
can generate
Packit 5bd3a9
.ZN BadAccess
Packit 5bd3a9
and
Packit 5bd3a9
.ZN BadValue
Packit 5bd3a9
errors.
Packit 5bd3a9
.LP
Packit 5bd3a9
The
Packit 5bd3a9
.ZN XSetAccessControl
Packit 5bd3a9
function either enables or disables the use of the access control list 
Packit 5bd3a9
at each connection setup.
Packit 5bd3a9
.LP
Packit 5bd3a9
.ZN XSetAccessControl
Packit 5bd3a9
can generate
Packit 5bd3a9
.ZN BadAccess
Packit 5bd3a9
and
Packit 5bd3a9
.ZN BadValue 
Packit 5bd3a9
errors.
Packit 5bd3a9
.LP
Packit 5bd3a9
The
Packit 5bd3a9
.ZN XEnableAccessControl
Packit 5bd3a9
function enables the use of the access control list at each connection setup.
Packit 5bd3a9
.LP
Packit 5bd3a9
.ZN XEnableAccessControl
Packit 5bd3a9
can generate a
Packit 5bd3a9
.ZN BadAccess 
Packit 5bd3a9
error.
Packit 5bd3a9
.LP
Packit 5bd3a9
The
Packit 5bd3a9
.ZN XDisableAccessControl
Packit 5bd3a9
function disables the use of the access control list at each connection setup.
Packit 5bd3a9
.LP
Packit 5bd3a9
.ZN XDisableAccessControl
Packit 5bd3a9
can generate a
Packit 5bd3a9
.ZN BadAccess 
Packit 5bd3a9
error.
Packit 5bd3a9
.SH STRUCTURES
Packit 5bd3a9
The
Packit 5bd3a9
.ZN XHostAddress
Packit 5bd3a9
structure contains:
Packit 5bd3a9
.LP
Packit 5bd3a9
.Ds 0
Packit 5bd3a9
typedef struct {
Packit 5bd3a9
        int family;     /\&* for example FamilyInternet */
Packit 5bd3a9
        int length;     /\&* length of address, in bytes */
Packit 5bd3a9
        char *address;  /\&* pointer to where to find the address */
Packit 5bd3a9
} XHostAddress;
Packit 5bd3a9
.De
Packit 5bd3a9
.LP
Packit 5bd3a9
The family member specifies which protocol address family to use 
Packit 5bd3a9
(for example, TCP/IP or DECnet) and can be
Packit 5bd3a9
.ZN FamilyInternet ,
Packit 5bd3a9
.ZN FamilyInternet6 ,
Packit 5bd3a9
.ZN FamilyServerInterpreted ,
Packit 5bd3a9
.ZN FamilyDECnet ,
Packit 5bd3a9
or
Packit 5bd3a9
.ZN FamilyChaos .
Packit 5bd3a9
The length member specifies the length of the address in bytes.
Packit 5bd3a9
The address member specifies a pointer to the address.
Packit 5bd3a9
.LP
Packit 5bd3a9
For the ServerInterpreted family, the length is ignored and the address 
Packit 5bd3a9
member is a pointer to a 
Packit 5bd3a9
.ZN XServerInterpretedAddress
Packit 5bd3a9
structure which contains:
Packit 5bd3a9
.LP
Packit 5bd3a9
.Ds 0
Packit 5bd3a9
typedef struct {
Packit 5bd3a9
        int typelength;         /\&* length of type string, in bytes */
Packit 5bd3a9
        int valuelength;        /\&* length of value string, in bytes */
Packit 5bd3a9
        char *type;             /\&* pointer to where to find the type string */
Packit 5bd3a9
        char *value;            /\&* pointer to where to find the address */
Packit 5bd3a9
} XServerInterpretedAddress;
Packit 5bd3a9
.De
Packit 5bd3a9
.LP
Packit 5bd3a9
The type and value members point to strings representing the type and value of
Packit 5bd3a9
the server interpreted entry.  These strings may not be NULL-terminated so care
Packit 5bd3a9
should be used when accessing them.  The typelength and valuelength members
Packit 5bd3a9
specify the length in byte of the type and value strings.
Packit 5bd3a9
.SH DIAGNOSTICS
Packit 5bd3a9
.TP 1i
Packit 5bd3a9
.ZN BadAccess
Packit 5bd3a9
A client attempted
Packit 5bd3a9
to modify the access control list from other than the local
Packit 5bd3a9
(or otherwise authorized) host.
Packit 5bd3a9
.TP 1i
Packit 5bd3a9
.ZN BadValue
Packit 5bd3a9
Some numeric value falls outside the range of values accepted by the request.
Packit 5bd3a9
Unless a specific range is specified for an argument, the full range defined
Packit 5bd3a9
by the argument's type is accepted.  Any argument defined as a set of
Packit 5bd3a9
alternatives can generate this error.
Packit 5bd3a9
.SH "SEE ALSO"
Packit 5bd3a9
XFree(__libmansuffix__)
Packit 5bd3a9
.br
Packit 5bd3a9
\fI\*(xL\fP