resync with kernel, add metric and IFF_LOOPBACK
[unix-history] / usr / src / sbin / routed / af.h
CommitLineData
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 *
6 * @(#)af.h 5.1 (Berkeley) %G%
7 */
8c55761d
SL
8
9/*
10 * Routing table management daemon.
11 */
12
13/*
14 * Per address family routines.
15 */
16struct 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? */
8c55761d 22 int (*af_checkhost)(); /* tells if address for host or net */
d5568f13 23 int (*af_ishost)(); /* tells if address is valid */
8c55761d
SL
24 int (*af_canon)(); /* canonicalize address for compares */
25};
26
27/*
28 * Structure returned by af_hash routines.
29 */
30struct afhash {
31 u_int afh_hosthash; /* host based hash */
32 u_int afh_nethash; /* network based hash */
33};
34
35struct afswitch afswitch[AF_MAX]; /* table proper */