BSD 4_3_Reno release
[unix-history] / usr / src / sbin / 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
1c15e888
C
6 * provided that: (1) source distributions retain this entire copyright
7 * notice and comment, and (2) distributions including binaries display
8 * the following acknowledgement: ``This product includes software
9 * developed by the University of California, Berkeley and its contributors''
10 * in the documentation or other materials provided with the distribution
11 * and in all advertising materials mentioning features or use of this
12 * software. Neither the name of the University nor the names of its
13 * contributors may be used to endorse or promote products derived
b8c620d6
KB
14 * from this software without specific prior written permission.
15 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
1c15e888 17 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
0eb85d71 18 *
1c15e888 19 * @(#)af.h 5.7 (Berkeley) 6/1/90
5ff67f98 20 */
8c55761d
SL
21
22/*
23 * Routing table management daemon.
24 */
25
26/*
27 * Per address family routines.
28 */
29struct afswitch {
30 int (*af_hash)(); /* returns keys based on address */
31 int (*af_netmatch)(); /* verifies net # matching */
32 int (*af_output)(); /* interprets address for sending */
33 int (*af_portmatch)(); /* packet from some other router? */
d5568f13 34 int (*af_portcheck)(); /* packet from privileged peer? */
4fad5a6e
MK
35 int (*af_checkhost)(); /* tells if address is valid */
36 int (*af_rtflags)(); /* get flags for route (host or net) */
7892134c 37 int (*af_sendroute)(); /* check bounds of subnet broadcast */
8c55761d 38 int (*af_canon)(); /* canonicalize address for compares */
17fe297f 39 char *(*af_format)(); /* convert address to string */
8c55761d
SL
40};
41
42/*
43 * Structure returned by af_hash routines.
44 */
45struct afhash {
46 u_int afh_hosthash; /* host based hash */
47 u_int afh_nethash; /* network based hash */
48};
49
17fe297f
MK
50struct afswitch afswitch[]; /* table proper */
51int af_max; /* number of entries in table */