124311Ssklower /* 2*35551Sbostic * Copyright (c) 1985 The Regents of the University of California. 3*35551Sbostic * All rights reserved. 424327Ssklower * 5*35551Sbostic * This file includes significant work done at Cornell University by 6*35551Sbostic * Bill Nesheim. That work included by permission. 724327Ssklower * 8*35551Sbostic * Redistribution and use in source and binary forms are permitted 9*35551Sbostic * provided that the above copyright notice and this paragraph are 10*35551Sbostic * duplicated in all such forms and that any documentation, 11*35551Sbostic * advertising materials, and other materials related to such 12*35551Sbostic * distribution and use acknowledge that the software was developed 13*35551Sbostic * by the University of California, Berkeley. The name of the 14*35551Sbostic * University may not be used to endorse or promote products derived 15*35551Sbostic * from this software without specific prior written permission. 16*35551Sbostic * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 17*35551Sbostic * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 18*35551Sbostic * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 19*35551Sbostic * 20*35551Sbostic * @(#)protocol.h 5.5 (Berkeley) 09/19/88 2124327Ssklower */ 2224327Ssklower 2324327Ssklower /* 2424311Ssklower * Xerox Routing Information Protocol 2524311Ssklower * 2624311Ssklower */ 2724311Ssklower 2824311Ssklower struct netinfo { 2926171Ssklower union ns_net rip_dst; /* destination net */ 3026171Ssklower u_short rip_metric; /* cost of route */ 3124311Ssklower }; 3224311Ssklower 3324311Ssklower struct rip { 3424311Ssklower u_short rip_cmd; /* request/response */ 3524311Ssklower struct netinfo rip_nets[1]; /* variable length */ 3624311Ssklower }; 3724311Ssklower 3824311Ssklower /* 3924311Ssklower * Packet types. 4024311Ssklower */ 4124311Ssklower #define RIPCMD_REQUEST 1 /* want info */ 4224311Ssklower #define RIPCMD_RESPONSE 2 /* responding to request */ 4324311Ssklower 4424311Ssklower #define RIPCMD_MAX 3 4524311Ssklower #ifdef RIPCMDS 4624311Ssklower char *ripcmds[RIPCMD_MAX] = 4724311Ssklower { "#0", "REQUEST", "RESPONSE" }; 4824311Ssklower #endif 4924311Ssklower 5024311Ssklower #define HOPCNT_INFINITY 16 /* per Xerox NS */ 5126171Ssklower #define DSTNETS_ALL 0xffffffff /* per Xerox NS */ 5224311Ssklower #define MAXPACKETSIZE 512 /* max broadcast size */ 5324311Ssklower 5426171Ssklower extern union ns_net ns_anynet; 5526171Ssklower extern union ns_net ns_zeronet; 5626171Ssklower 5724311Ssklower /* 5824311Ssklower * Timer values used in managing the routing table. 5924311Ssklower * Every update forces an entry's timer to be reset. After 6024311Ssklower * EXPIRE_TIME without updates, the entry is marked invalid, 6124311Ssklower * but held onto until GARBAGE_TIME so that others may 6224311Ssklower * see it "be deleted". 6324311Ssklower */ 6424311Ssklower #define TIMER_RATE 30 /* alarm clocks every 30 seconds */ 6524311Ssklower 6624311Ssklower #define SUPPLY_INTERVAL 30 /* time to supply tables */ 6724311Ssklower 6824311Ssklower #define EXPIRE_TIME 180 /* time to mark entry invalid */ 6924311Ssklower #define GARBAGE_TIME 240 /* time to garbage collect */ 70