xref: /csrg-svn/sbin/XNSrouted/af.h (revision 61474)
135590Sbostic /*
2*61474Sbostic  * Copyright (c) 1983, 1993
3*61474Sbostic  *	The Regents of the University of California.  All rights reserved.
435590Sbostic  *
542698Sbostic  * %sccs.include.redist.c%
635590Sbostic  *
735590Sbostic  *	@(#)af.h	5.1 (Berkeley) 6/4/85 (routed/af.h)
835590Sbostic  *
9*61474Sbostic  *	@(#)af.h	8.1 (Berkeley) 06/05/93
1035590Sbostic  */
1135590Sbostic 
1235590Sbostic /*
1335590Sbostic  * Routing table management daemon.
1435590Sbostic  */
1535590Sbostic 
1635590Sbostic /*
1735590Sbostic  * Per address family routines.
1835590Sbostic  */
1935590Sbostic struct afswitch {
2035590Sbostic 	int	(*af_hash)();		/* returns keys based on address */
2135590Sbostic 	int	(*af_netmatch)();	/* verifies net # matching */
2235590Sbostic 	int	(*af_output)();		/* interprets address for sending */
2335590Sbostic 	int	(*af_portmatch)();	/* packet from some other router? */
2435590Sbostic 	int	(*af_portcheck)();	/* packet from privileged peer? */
2535590Sbostic 	int	(*af_checkhost)();	/* tells if address for host or net */
2635590Sbostic 	int	(*af_ishost)();		/* tells if address is valid */
2735590Sbostic 	int	(*af_canon)();		/* canonicalize address for compares */
2835590Sbostic };
2935590Sbostic 
3035590Sbostic /*
3135590Sbostic  * Structure returned by af_hash routines.
3235590Sbostic  */
3335590Sbostic struct afhash {
3435590Sbostic 	u_int	afh_hosthash;		/* host based hash */
3535590Sbostic 	u_int	afh_nethash;		/* network based hash */
3635590Sbostic };
3735590Sbostic 
3835590Sbostic struct	afswitch afswitch[AF_MAX];	/* table proper */
39