|
|
1.1 ! root 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: * ! 6: * @(#)protocol.h 5.4 (Berkeley) 2/14/86"; ! 7: * ! 8: * Includes material written at Cornell University by Bill Nesheim, ! 9: * by permission of the author. ! 10: */ ! 11: ! 12: /* ! 13: * Xerox Routing Information Protocol ! 14: * ! 15: */ ! 16: ! 17: struct netinfo { ! 18: union ns_net rip_dst; /* destination net */ ! 19: u_short rip_metric; /* cost of route */ ! 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 */ ! 40: #define DSTNETS_ALL 0xffffffff /* per Xerox NS */ ! 41: #define MAXPACKETSIZE 512 /* max broadcast size */ ! 42: ! 43: extern union ns_net ns_anynet; ! 44: extern union ns_net ns_zeronet; ! 45: ! 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 */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.