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