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