/*
 * $Header: /smsa/bsd:include/net/af.h:bsd  1.6  $
 * $Source: /smsa/bsd:include/net/af.h: $
 *
 * Copyright (c) 1988 Acorn Computers Ltd., Cambridge, England
 */
/*	@(#)af.h	2.1 88/05/18 4.0NFSSRC SMI;	from UCB 7.1 6/5/86	*/
/*
 * Copyright (c) 1980, 1986 Regents of the University of California.
 * All rights reserved.  The Berkeley software License Agreement
 * specifies the terms and conditions for redistribution.
 *
 *	@(#)af.h	7.1 (Berkeley) 6/4/86
 */

#ifndef __net_af_h
#define __net_af_h

/*
 * Address family routines,
 * used in handling generic sockaddr structures.
 *
 * Hash routine is called
 *	af_hash(addr, h);
 *	struct sockaddr *addr; struct afhash *h;
 * producing an afhash structure for addr.
 *
 * Netmatch routine is called
 *	af_netmatch(addr1, addr2);
 * where addr1 and addr2 are sockaddr *.  Returns 1 if network
 * values match, 0 otherwise.
 */
struct afswitch {
	int	(*af_hash)();
	int	(*af_netmatch)();
};

struct afhash {
	u_int	afh_hosthash;
	u_int	afh_nethash;
};

#ifdef	_KERNEL
struct	afswitch afswitch[];
#endif

#endif/*__net_af_h*/

/* EOF af.h */
