


XAddHost(3X11)						       XAddHost(3X11)
X11R5									X11R5



NAME
  XAddHost, XAddHosts, XListHosts, XRemoveHost,	XRemoveHosts, XSetAccessCon-
  trol,	XEnableAccessControl, XDisableAccessControl, XHostAddress - control
  host access and host control structure

SYNTAX
  XAddHost(_d_i_s_p_l_a_y, _h_o_s_t)
	Display	*_d_i_s_p_l_a_y;
	XHostAddress *_h_o_s_t;

  XAddHosts(_d_i_s_p_l_a_y, _h_o_s_t_s, _n_u_m__h_o_s_t_s)
	Display	*_d_i_s_p_l_a_y;
	XHostAddress *_h_o_s_t_s;
	int _n_u_m__h_o_s_t_s;

  XHostAddress *XListHosts(_d_i_s_p_l_a_y, _n_h_o_s_t_s__r_e_t_u_r_n, _s_t_a_t_e__r_e_t_u_r_n)
	Display	*_d_i_s_p_l_a_y;
	int *_n_h_o_s_t_s__r_e_t_u_r_n;
	Bool *_s_t_a_t_e__r_e_t_u_r_n;

  XRemoveHost(_d_i_s_p_l_a_y, _h_o_s_t)
	Display	*_d_i_s_p_l_a_y;
	XHostAddress *_h_o_s_t;

  XRemoveHosts(_d_i_s_p_l_a_y,	_h_o_s_t_s, _n_u_m__h_o_s_t_s)
	Display	*_d_i_s_p_l_a_y;
	XHostAddress *_h_o_s_t_s;
	int _n_u_m__h_o_s_t_s;

  XSetAccessControl(_d_i_s_p_l_a_y, _m_o_d_e)
	Display	*_d_i_s_p_l_a_y;
	int _m_o_d_e;

  XEnableAccessControl(_d_i_s_p_l_a_y)
	Display	*_d_i_s_p_l_a_y;

  XDisableAccessControl(_d_i_s_p_l_a_y)
	Display	*_d_i_s_p_l_a_y;

ARGUMENTS

  _d_i_s_p_l_a_y   Specifies the connection to	the X server.

  _h_o_s_t	    Specifies the host that is to be added or removed.

  _h_o_s_t_s	    Specifies each host	that is	to be added or removed.

  _m_o_d_e	    Specifies the mode.	 You can pass _E_n_a_b_l_e_A_c_c_e_s_s or _D_i_s_a_b_l_e_A_c_c_e_s_s.

  _n_h_o_s_t_s__r_e_t_u_r_n
	    Returns the	number of hosts	currently in the access	control	list.

  _n_u_m__h_o_s_t_s Specifies the number of hosts.

  _s_t_a_t_e__r_e_t_u_r_n
	    Returns the	state of the access control.


DESCRIPTION
  The _X_A_d_d_H_o_s_t function	adds the specified host	to the access control list
  for that display.  The server	must be	on the same host as the	client issu-
  ing the command, or a	_B_a_d_A_c_c_e_s_s error	results.

  _X_A_d_d_H_o_s_t can generate	_B_a_d_A_c_c_e_s_s and _B_a_d_V_a_l_u_e errors.

  The _X_A_d_d_H_o_s_t_s	function adds each specified host to the access	control	list
  for that display.  The server	must be	on the same host as the	client issu-
  ing the command, or a	_B_a_d_A_c_c_e_s_s error	results.

  _X_A_d_d_H_o_s_t_s can	generate _B_a_d_A_c_c_e_s_s and _B_a_d_V_a_l_u_e	errors.

  The _X_L_i_s_t_H_o_s_t_s function returns the current access control list as well as
  whether the use of the list at connection setup was enabled or disabled.
  _X_L_i_s_t_H_o_s_t_s allows a program to find out what machines	can make connections.
  It also returns a pointer to a list of host structures that were allocated
  by the function. When	no longer needed, this memory should be	freed by cal-
  ling _X_F_r_e_e.

  The _X_R_e_m_o_v_e_H_o_s_t function removes the specified host from the access control
  list for that	display.  The server must be on	the same host as the client
  process, or a	_B_a_d_A_c_c_e_s_s error	results.  If you remove	your machine from the
  access list, you can no longer connect to that server, and this operation
  cannot be reversed unless you	reset the server.

  _X_R_e_m_o_v_e_H_o_s_t can generate _B_a_d_A_c_c_e_s_s and _B_a_d_V_a_l_u_e errors.

  The _X_R_e_m_o_v_e_H_o_s_t_s function removes each specified host	from the access	con-
  trol list for	that display. The X server must	be on the same host as the
  client process, or a _B_a_d_A_c_c_e_s_s error results.	 If you	remove your machine
  from the access list,	you can	no longer connect to that server, and this
  operation cannot be reversed unless you reset	the server.

  _X_R_e_m_o_v_e_H_o_s_t_s can generate _B_a_d_A_c_c_e_s_s and _B_a_d_V_a_l_u_e errors.

  The _X_S_e_t_A_c_c_e_s_s_C_o_n_t_r_o_l	function either	enables	or disables the	use of the
  access control list at each connection setup.

  _X_S_e_t_A_c_c_e_s_s_C_o_n_t_r_o_l can	generate _B_a_d_A_c_c_e_s_s and _B_a_d_V_a_l_u_e	errors.

  The _X_E_n_a_b_l_e_A_c_c_e_s_s_C_o_n_t_r_o_l function enables the	use of the access control
  list at each connection setup.

  _X_E_n_a_b_l_e_A_c_c_e_s_s_C_o_n_t_r_o_l can generate a _B_a_d_A_c_c_e_s_s	error.

  The _X_D_i_s_a_b_l_e_A_c_c_e_s_s_C_o_n_t_r_o_l function disables the use of the access control
  list at each connection setup.

  _X_D_i_s_a_b_l_e_A_c_c_e_s_s_C_o_n_t_r_o_l	can generate a _B_a_d_A_c_c_e_s_s error.

STRUCTURES
  The _X_H_o_s_t_A_d_d_r_e_s_s structure contains:

  typedef struct {
	  int family;	  /* for example FamilyInternet	*/
	  int length;	  /* length of address,	in bytes */
	  char *address;  /* pointer to	where to find the address */
  } XHostAddress;

  The family member specifies which protocol address family to use (for	exam-
  ple, TCP/IP or DECnet) and can be _F_a_m_i_l_y_I_n_t_e_r_n_e_t, _F_a_m_i_l_y_D_E_C_n_e_t, or _F_a_m_i_-
  _l_y_C_h_a_o_s.  The	length member specifies	the length of the address in bytes.
  The address member specifies a pointer to the	address.


DIAGNOSTICS

  _B_a_d_A_c_c_e_s_s A client attempted to modify the access control list from other
	    than the local (or otherwise authorized) host.

  _B_a_d_V_a_l_u_e  Some numeric value falls outside the range of values accepted by
	    the	request.  Unless a specific range is specified for an argu-
	    ment, the full range defined by the	argument's type	is accepted.
	    Any	argument defined as a set of alternatives can generate this
	    error.

SEE ALSO
  XFree(3X11)
  _X_l_i_b - _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e




















































