NAME

XAddHost, XAddHosts, XListHosts, XRemoveHost, XRemoveHosts, XSetAccessControl, XEnableAccessControl, XDisableAccessControl, XHostAddress, XServerInterpretedAddress - control host access and host control structure

SYNTAX

int XAddHost(Display *_d_i_s_p_l_a_y, XHostAddress *_h_o_s_t); int XAddHosts(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(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); int XRemoveHost(Display *_d_i_s_p_l_a_y, XHostAddress *_h_o_s_t); int XRemoveHosts(Display *_d_i_s_p_l_a_y, XHostAddress *_h_o_s_t_s, int _n_u_m___h_o_s_t_s); int XSetAccessControl(Display *_d_i_s_p_l_a_y, int _m_o_d_e); int XEnableAccessControl(Display *_d_i_s_p_l_a_y); int XDisableAccessControl(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 issuing 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 issuing 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 calling _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 control 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 example, 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_I_n_t_e_r_n_e_t_6, _F_a_m_i_l_y_S_e_r_v_e_r_I_n_t_e_r_p_r_e_t_e_d, _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.

For the ServerInterpreted family, the length is ignored and the address member is a pointer to a _X_S_e_r_v_e_r_I_n_t_e_r_p_r_e_t_e_d_A_d_d_r_e_s_s structure which contains:


typedef struct {
     int typelength;          /* length of type string, in bytes */
     int valuelength;         /* length of value string, in bytes */
     char *type;              /* pointer to where to find the type string */
     char *value;             /* pointer to where to find the address */
} XServerInterpretedAddress;


The type and value members point to strings representing the type and value of the server interpreted entry. These strings may not be NULL-terminated so care should be used when accessing them. The typelength and valuelength members specify the length in byte of the type and value strings.

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 argument, 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