Commit | Line | Data |
---|---|---|
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 | * |
6ecf3d85 | 8 | * %sccs.include.redist.c% |
3565c602 | 9 | * |
6ecf3d85 | 10 | * @(#)protocol.h 5.6 (Berkeley) %G% |
e69f81e0 KS |
11 | */ |
12 | ||
33ec2536 KS |
13 | /* |
14 | * Xerox Routing Information Protocol | |
15 | * | |
16 | */ | |
17 | ||
18 | struct netinfo { | |
84f93e8f KS |
19 | union ns_net rip_dst; /* destination net */ |
20 | u_short rip_metric; /* cost of route */ | |
33ec2536 KS |
21 | }; |
22 | ||
23 | struct rip { | |
24 | u_short rip_cmd; /* request/response */ | |
25 | struct netinfo rip_nets[1]; /* variable length */ | |
26 | }; | |
27 | ||
28 | /* | |
29 | * Packet types. | |
30 | */ | |
31 | #define RIPCMD_REQUEST 1 /* want info */ | |
32 | #define RIPCMD_RESPONSE 2 /* responding to request */ | |
33 | ||
34 | #define RIPCMD_MAX 3 | |
35 | #ifdef RIPCMDS | |
36 | char *ripcmds[RIPCMD_MAX] = | |
37 | { "#0", "REQUEST", "RESPONSE" }; | |
38 | #endif | |
39 | ||
40 | #define HOPCNT_INFINITY 16 /* per Xerox NS */ | |
84f93e8f | 41 | #define DSTNETS_ALL 0xffffffff /* per Xerox NS */ |
33ec2536 KS |
42 | #define MAXPACKETSIZE 512 /* max broadcast size */ |
43 | ||
84f93e8f KS |
44 | extern union ns_net ns_anynet; |
45 | extern union ns_net ns_zeronet; | |
46 | ||
33ec2536 KS |
47 | /* |
48 | * Timer values used in managing the routing table. | |
49 | * Every update forces an entry's timer to be reset. After | |
50 | * EXPIRE_TIME without updates, the entry is marked invalid, | |
51 | * but held onto until GARBAGE_TIME so that others may | |
52 | * see it "be deleted". | |
53 | */ | |
54 | #define TIMER_RATE 30 /* alarm clocks every 30 seconds */ | |
55 | ||
56 | #define SUPPLY_INTERVAL 30 /* time to supply tables */ | |
57 | ||
58 | #define EXPIRE_TIME 180 /* time to mark entry invalid */ | |
59 | #define GARBAGE_TIME 240 /* time to garbage collect */ |