xref: /titanic_52/usr/src/uts/common/net/af.h (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1*7c478bd9Sstevel@tonic-gate /*
2*7c478bd9Sstevel@tonic-gate  * Copyright (c) 1997-1998 by Sun Microsystems, Inc.
3*7c478bd9Sstevel@tonic-gate  * All rights reserved.
4*7c478bd9Sstevel@tonic-gate  */
5*7c478bd9Sstevel@tonic-gate 
6*7c478bd9Sstevel@tonic-gate /*
7*7c478bd9Sstevel@tonic-gate  * Copyright (c) 1980, 1986 Regents of the University of California.
8*7c478bd9Sstevel@tonic-gate  * All rights reserved.  The Berkeley software License Agreement
9*7c478bd9Sstevel@tonic-gate  * specifies the terms and conditions for redistribution.
10*7c478bd9Sstevel@tonic-gate  */
11*7c478bd9Sstevel@tonic-gate 
12*7c478bd9Sstevel@tonic-gate #ifndef	_NET_AF_H
13*7c478bd9Sstevel@tonic-gate #define	_NET_AF_H
14*7c478bd9Sstevel@tonic-gate 
15*7c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
16*7c478bd9Sstevel@tonic-gate /* af.h 1.10 88/08/19 SMI; from UCB 7.1	*/
17*7c478bd9Sstevel@tonic-gate 
18*7c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
19*7c478bd9Sstevel@tonic-gate extern "C" {
20*7c478bd9Sstevel@tonic-gate #endif
21*7c478bd9Sstevel@tonic-gate 
22*7c478bd9Sstevel@tonic-gate /*
23*7c478bd9Sstevel@tonic-gate  * Address family routines,
24*7c478bd9Sstevel@tonic-gate  * used in handling generic sockaddr structures.
25*7c478bd9Sstevel@tonic-gate  *
26*7c478bd9Sstevel@tonic-gate  * Hash routine is called
27*7c478bd9Sstevel@tonic-gate  *	af_hash(addr, h);
28*7c478bd9Sstevel@tonic-gate  *	struct sockaddr *addr; struct afhash *h;
29*7c478bd9Sstevel@tonic-gate  * producing an afhash structure for addr.
30*7c478bd9Sstevel@tonic-gate  *
31*7c478bd9Sstevel@tonic-gate  * Netmatch routine is called
32*7c478bd9Sstevel@tonic-gate  *	af_netmatch(addr1, addr2);
33*7c478bd9Sstevel@tonic-gate  * where addr1 and addr2 are sockaddr *.  Returns 1 if network
34*7c478bd9Sstevel@tonic-gate  * values match, 0 otherwise.
35*7c478bd9Sstevel@tonic-gate  */
36*7c478bd9Sstevel@tonic-gate struct afswitch {
37*7c478bd9Sstevel@tonic-gate 	int	(*af_hash)();
38*7c478bd9Sstevel@tonic-gate 	int	(*af_netmatch)();
39*7c478bd9Sstevel@tonic-gate };
40*7c478bd9Sstevel@tonic-gate 
41*7c478bd9Sstevel@tonic-gate struct afhash {
42*7c478bd9Sstevel@tonic-gate 	uint_t	afh_hosthash;
43*7c478bd9Sstevel@tonic-gate 	uint_t	afh_nethash;
44*7c478bd9Sstevel@tonic-gate };
45*7c478bd9Sstevel@tonic-gate 
46*7c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
47*7c478bd9Sstevel@tonic-gate }
48*7c478bd9Sstevel@tonic-gate #endif
49*7c478bd9Sstevel@tonic-gate 
50*7c478bd9Sstevel@tonic-gate #endif	/* _NET_AF_H */
51