Commit | Line | Data |
---|---|---|
5ff67f98 DF |
1 | /* |
2 | * Copyright (c) 1983 Regents of the University of California. | |
3 | * All rights reserved. The Berkeley software License Agreement | |
4 | * specifies the terms and conditions for redistribution. | |
5 | * | |
4fad5a6e | 6 | * @(#)af.h 5.3 (Berkeley) %G% |
5ff67f98 | 7 | */ |
8c55761d SL |
8 | |
9 | /* | |
10 | * Routing table management daemon. | |
11 | */ | |
12 | ||
13 | /* | |
14 | * Per address family routines. | |
15 | */ | |
16 | struct afswitch { | |
17 | int (*af_hash)(); /* returns keys based on address */ | |
18 | int (*af_netmatch)(); /* verifies net # matching */ | |
19 | int (*af_output)(); /* interprets address for sending */ | |
20 | int (*af_portmatch)(); /* packet from some other router? */ | |
d5568f13 | 21 | int (*af_portcheck)(); /* packet from privileged peer? */ |
4fad5a6e MK |
22 | int (*af_checkhost)(); /* tells if address is valid */ |
23 | int (*af_rtflags)(); /* get flags for route (host or net) */ | |
24 | int (*af_sendsubnet)(); /* check bounds of subnet broadcast */ | |
8c55761d | 25 | int (*af_canon)(); /* canonicalize address for compares */ |
17fe297f | 26 | char *(*af_format)(); /* convert address to string */ |
8c55761d SL |
27 | }; |
28 | ||
29 | /* | |
30 | * Structure returned by af_hash routines. | |
31 | */ | |
32 | struct afhash { | |
33 | u_int afh_hosthash; /* host based hash */ | |
34 | u_int afh_nethash; /* network based hash */ | |
35 | }; | |
36 | ||
17fe297f MK |
37 | struct afswitch afswitch[]; /* table proper */ |
38 | int af_max; /* number of entries in table */ |