summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/net/af.h
blob: 8500eb5806043bf0bb33661a0e05a6af856ace71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
 * Copyright (c) 1997-1998 by Sun Microsystems, Inc.
 * All rights reserved.
 */

/*
 * 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.
 */

#ifndef	_NET_AF_H
#define	_NET_AF_H

#pragma ident	"%Z%%M%	%I%	%E% SMI"
/* af.h 1.10 88/08/19 SMI; from UCB 7.1	*/

#ifdef	__cplusplus
extern "C" {
#endif

/*
 * 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 {
	uint_t	afh_hosthash;
	uint_t	afh_nethash;
};

#ifdef	__cplusplus
}
#endif

#endif	/* _NET_AF_H */