AFAddHost(3)							 AFAddHost(3)



NAME
  AFAddHost, AFAddHosts, AFListHosts, AFRemoveHost, AFRemoveHosts, AFSetAc-
  cessControl, AFEnableAccessControl, AFDisableAccessControl, AFHostAddress -
  control host access and host control structure

SYNTAX
  #include <AF/AFlib.h>

  void AFAddHost(AFAudioConn *aud, AFHostAddress *host)

  void AFAddHosts(AFAudioConn *aud, AFHostAddress *hosts, int n)

  AFHostAddress	*AFListHosts(AFAudioConn *aud, int *nhosts_ret,
					  ABool	*enabled_ret)

  void AFRemoveHost(AFAudioConn	*aud, AFHostAddress *host)

  void AFRemoveHosts(AFAudioConn *aud, AFHostAddress *hosts, int n)

  void AFSetAccessControl(AFAudioConn *aud, int	mode)

  void AFEnableAccessControl(AFAudioConn *aud)

  void AFDisableAccessControl(AFAudioConn *aud)

ARGUMENTS

  aud	    Specifies the connection to	the AF server.

  enabled_ret
	    Returns the	current	state of access	control.

  host	    Specifies the host that is to be added or removed.

  hosts	    Specifies each host	that is	to be added or removed.

  mode	    Specifies the mode.

  n	    Specifies the number of hosts in the host list.  You can pass
	    AEnableAccess or ADisableAccess.

  nhosts_ret
	    Returns the	number of hosts	currently in the access	control	list.

  num_hosts Specifies the number of hosts.

  state_return
	    Returns the	state of the access control.

DESCRIPTION
  The AFAddHost	function adds the specified host to the	access control list
  for that aud.	 The server must be on the same	host as	the client issuing
  the command, or a ABadAccess error results.

  AFAddHost can	generate ABadAccess and	ABadValue errors.

  The AFAddHosts function adds each specified host to the access control list
  for that aud.	 The server must be on the same	host as	the client issuing
  the command, or a ABadAccess error results.

  AFAddHosts can generate ABadAccess and ABadValue errors.

  The AFListHosts function returns the current access control list as well as
  whether the use of the list at connection setup was enabled or disabled.
  AFListHosts allows a program to find out what	machines can make connec-
  tions.  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 AFFree.

  The AFRemoveHost function removes the	specified host from the	access con-
  trol list for	that aud.  The server must be on the same host as the client
  process, or a	ABadAccess error results.  If you remove your machine from
  the access list, you can no longer connect to	that server, and this opera-
  tion cannot be reversed unless you reset the server.

  AFRemoveHost can generate ABadAccess and ABadValue errors.

  The AFRemoveHosts function removes each specified host from the access con-
  trol list for	that aud. The AF server	must be	on the same host as the
  client process, or a ABadAccess 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.

  AFRemoveHosts	can generate ABadAccess	and ABadValue errors.

  The AFSetAccessControl function either enables or disables the use of	the
  access control list at each connection setup.

  AFSetAccessControl can generate ABadAccess and ABadValue errors.

  The AFEnableAccessControl function enables the use of	the access control
  list at each connection setup.

  AFEnableAccessControl	can generate a ABadAccess error.

  The AFDisableAccessControl function disables the use of the access control
  list at each connection setup.

  AFDisableAccessControl can generate a	ABadAccess error.

STRUCTURES
  The AFHostAddress structure contains:

  typedef struct {
       int family;		/* e.g., AFamilyInternet */
       int length;		/* length of address, in bytes */
       char *address;		/* pointer to where to find the	address	*/
  } AFHostAddress;

  The family member specifies which protocol address family to use (for	exam-
  ple, TCP/IP or DECnet) and can be AFamilyInternet, AFamilyDECnet, or AFami-
  lyChaos.  The	length member specifies	the length of the address in bytes.
  The address member specifies a pointer to the	address.

DIAGNOSTICS

  ABadAccess
	    A client attempted to modify the access control list from other
	    than the local (or otherwise authorized) host.

  ABadValue 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
  AFFree(3)
  AF(1)



BUGS
  If you encounter a reproducible bug, please submit a problem report to
  (af-bugs@crl.dec.com).

COPYRIGHT
  Copyright 1990-1994, Digital Equipment Corporation.
  See AF(1) for	a full statement of rights and permissions.

AUTHORS
  Digital Cambridge Research Lab