111820Sjulian/* 211820Sjulian * Copyright (c) 1985, 1993 311820Sjulian * The Regents of the University of California. All rights reserved. 411820Sjulian * 511820Sjulian * Copyright (c) 1995 John Hay. All rights reserved. 611820Sjulian * 711820Sjulian * This file includes significant work done at Cornell University by 811820Sjulian * Bill Nesheim. That work included by permission. 911820Sjulian * 1011820Sjulian * Redistribution and use in source and binary forms, with or without 1111820Sjulian * modification, are permitted provided that the following conditions 1211820Sjulian * are met: 1311820Sjulian * 1. Redistributions of source code must retain the above copyright 1411820Sjulian * notice, this list of conditions and the following disclaimer. 1511820Sjulian * 2. Redistributions in binary form must reproduce the above copyright 1611820Sjulian * notice, this list of conditions and the following disclaimer in the 1711820Sjulian * documentation and/or other materials provided with the distribution. 1811820Sjulian * 3. All advertising materials mentioning features or use of this software 1911820Sjulian * must display the following acknowledgement: 2011820Sjulian * This product includes software developed by the University of 2111820Sjulian * California, Berkeley and its contributors. 2211820Sjulian * 4. Neither the name of the University nor the names of its contributors 2311820Sjulian * may be used to endorse or promote products derived from this software 2411820Sjulian * without specific prior written permission. 2511820Sjulian * 2611820Sjulian * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2711820Sjulian * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2811820Sjulian * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2911820Sjulian * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 3011820Sjulian * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 3111820Sjulian * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 3211820Sjulian * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 3311820Sjulian * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 3411820Sjulian * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3511820Sjulian * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3611820Sjulian * SUCH DAMAGE. 3711820Sjulian * 3811820Sjulian * @(#)protocol.h 8.1 (Berkeley) 6/5/93 3911820Sjulian * 4050479Speter * $FreeBSD$ 4111820Sjulian */ 4211820Sjulian 4311820Sjulian/* 4411820Sjulian * IPX Routing Information Protocol 4511820Sjulian * 4611820Sjulian */ 4711820Sjulian 4811820Sjulianstruct netinfo { 4911820Sjulian union ipx_net rip_dst; /* destination net */ 5011820Sjulian u_short rip_metric; /* cost of route */ 5111820Sjulian u_short rip_ticks; /* cost of route */ 5211820Sjulian}; 5311820Sjulian 5411820Sjulianstruct rip { 5511820Sjulian u_short rip_cmd; /* request/response */ 5611820Sjulian struct netinfo rip_nets[1]; /* variable length */ 5711820Sjulian}; 5811820Sjulian 5911820Sjulian/* 6011820Sjulian * Packet types. 6111820Sjulian */ 6211820Sjulian#define RIPCMD_REQUEST 1 /* want info */ 6311820Sjulian#define RIPCMD_RESPONSE 2 /* responding to request */ 6411820Sjulian 6511820Sjulian#define RIPCMD_MAX 3 6611820Sjulian#ifdef RIPCMDS 6711820Sjulianchar *ripcmds[RIPCMD_MAX] = 6811820Sjulian { "#0", "REQUEST", "RESPONSE" }; 6911820Sjulian#endif 7011820Sjulian 7111820Sjulian#define HOPCNT_INFINITY 16 /* per IPX */ 7211820Sjulian#define DSTNETS_ALL 0xffffffff /* per IPX */ 7315248Sjhay#define MAXRXPACKETSIZE 1500 /* max rx broadcast size */ 7415248Sjhay#define MAXRIPNETS 50 /* max nets in tx packet */ 7511820Sjulian 7611820Sjulianextern union ipx_net ipx_anynet; 7711820Sjulianextern union ipx_net ipx_zeronet; 7811820Sjulian 7911820Sjulian/* 8011820Sjulian * Timer values used in managing the routing table. 8111820Sjulian * Every update forces an entry's timer to be reset. After 8211820Sjulian * EXPIRE_TIME without updates, the entry is marked invalid, 8311820Sjulian * but held onto until GARBAGE_TIME so that others may 8411820Sjulian * see it "be deleted". 8511820Sjulian */ 8611820Sjulian#define TIMER_RATE 30 /* alarm clocks every 30 seconds */ 8711820Sjulian 8811820Sjulian#define SUPPLY_INTERVAL 30 /* time to supply tables */ 8911820Sjulian#define RIP_INTERVAL 60 /* time to supply rip tables */ 9011820Sjulian 9111820Sjulian#define EXPIRE_TIME 180 /* time to mark entry invalid */ 9211820Sjulian#define GARBAGE_TIME 240 /* time to garbage collect */ 93