BSD 4_3_Net_1 release
[unix-history] / routed / af.h
CommitLineData
5ff67f98
DF
1/*
2 * Copyright (c) 1983 Regents of the University of California.
0eb85d71 3 * All rights reserved.
5ff67f98 4 *
0eb85d71 5 * Redistribution and use in source and binary forms are permitted
b8c620d6
KB
6 * provided that the above copyright notice and this paragraph are
7 * duplicated in all such forms and that any documentation,
8 * advertising materials, and other materials related to such
9 * distribution and use acknowledge that the software was developed
10 * by the University of California, Berkeley. The name of the
11 * University may not be used to endorse or promote products derived
12 * from this software without specific prior written permission.
13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
0eb85d71 16 *
ca67e7b4 17 * @(#)af.h 5.6 (Berkeley) 6/18/88
5ff67f98 18 */
8c55761d
SL
19
20/*
21 * Routing table management daemon.
22 */
23
24/*
25 * Per address family routines.
26 */
27struct afswitch {
28 int (*af_hash)(); /* returns keys based on address */
29 int (*af_netmatch)(); /* verifies net # matching */
30 int (*af_output)(); /* interprets address for sending */
31 int (*af_portmatch)(); /* packet from some other router? */
d5568f13 32 int (*af_portcheck)(); /* packet from privileged peer? */
4fad5a6e
MK
33 int (*af_checkhost)(); /* tells if address is valid */
34 int (*af_rtflags)(); /* get flags for route (host or net) */
7892134c 35 int (*af_sendroute)(); /* check bounds of subnet broadcast */
8c55761d 36 int (*af_canon)(); /* canonicalize address for compares */
17fe297f 37 char *(*af_format)(); /* convert address to string */
8c55761d
SL
38};
39
40/*
41 * Structure returned by af_hash routines.
42 */
43struct afhash {
44 u_int afh_hosthash; /* host based hash */
45 u_int afh_nethash; /* network based hash */
46};
47
17fe297f
MK
48struct afswitch afswitch[]; /* table proper */
49int af_max; /* number of entries in table */