|
|
1.1 root 1: /*
2: * Copyright (c) 1983 Regents of the University of California.
3: * All rights reserved.
4: *
5: * Redistribution and use in source and binary forms are permitted
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
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
17: * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
18: *
19: * @(#)af.h 5.7 (Berkeley) 6/1/90
20: */
21:
22: /*
23: * Routing table management daemon.
24: */
25:
26: /*
27: * Per address family routines.
28: */
29: struct 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? */
34: int (*af_portcheck)(); /* packet from privileged peer? */
35: int (*af_checkhost)(); /* tells if address is valid */
36: int (*af_rtflags)(); /* get flags for route (host or net) */
37: int (*af_sendroute)(); /* check bounds of subnet broadcast */
38: int (*af_canon)(); /* canonicalize address for compares */
39: char *(*af_format)(); /* convert address to string */
40: };
41:
42: /*
43: * Structure returned by af_hash routines.
44: */
45: struct afhash {
46: u_int afh_hosthash; /* host based hash */
47: u_int afh_nethash; /* network based hash */
48: };
49:
50: struct afswitch afswitch[]; /* table proper */
51: int af_max; /* number of entries in table */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.