don't use anything from routed
[unix-history] / usr / src / sbin / XNSrouted / protocol.h
CommitLineData
e69f81e0 1/*
3565c602
KB
2 * Copyright (c) 1985 The Regents of the University of California.
3 * All rights reserved.
e69f81e0 4 *
3565c602
KB
5 * This file includes significant work done at Cornell University by
6 * Bill Nesheim. That work included by permission.
e69f81e0 7 *
3565c602
KB
8 * Redistribution and use in source and binary forms are permitted
9 * provided that the above copyright notice and this paragraph are
10 * duplicated in all such forms and that any documentation,
11 * advertising materials, and other materials related to such
12 * distribution and use acknowledge that the software was developed
13 * by the University of California, Berkeley. The name of the
14 * University may not be used to endorse or promote products derived
15 * from this software without specific prior written permission.
16 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
17 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
18 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
19 *
20 * @(#)protocol.h 5.5 (Berkeley) %G%
e69f81e0
KS
21 */
22
33ec2536
KS
23/*
24 * Xerox Routing Information Protocol
25 *
26 */
27
28struct netinfo {
84f93e8f
KS
29 union ns_net rip_dst; /* destination net */
30 u_short rip_metric; /* cost of route */
33ec2536
KS
31};
32
33struct rip {
34 u_short rip_cmd; /* request/response */
35 struct netinfo rip_nets[1]; /* variable length */
36};
37
38/*
39 * Packet types.
40 */
41#define RIPCMD_REQUEST 1 /* want info */
42#define RIPCMD_RESPONSE 2 /* responding to request */
43
44#define RIPCMD_MAX 3
45#ifdef RIPCMDS
46char *ripcmds[RIPCMD_MAX] =
47 { "#0", "REQUEST", "RESPONSE" };
48#endif
49
50#define HOPCNT_INFINITY 16 /* per Xerox NS */
84f93e8f 51#define DSTNETS_ALL 0xffffffff /* per Xerox NS */
33ec2536
KS
52#define MAXPACKETSIZE 512 /* max broadcast size */
53
84f93e8f
KS
54extern union ns_net ns_anynet;
55extern union ns_net ns_zeronet;
56
33ec2536
KS
57/*
58 * Timer values used in managing the routing table.
59 * Every update forces an entry's timer to be reset. After
60 * EXPIRE_TIME without updates, the entry is marked invalid,
61 * but held onto until GARBAGE_TIME so that others may
62 * see it "be deleted".
63 */
64#define TIMER_RATE 30 /* alarm clocks every 30 seconds */
65
66#define SUPPLY_INTERVAL 30 /* time to supply tables */
67
68#define EXPIRE_TIME 180 /* time to mark entry invalid */
69#define GARBAGE_TIME 240 /* time to garbage collect */