/* Copyright 1984 by the Massachusetts Institute of Technology */


/* Per site static data. This includes hand initialized network
 * interface tables. By default, this also allocates the whole table.
 * Also, node name and various other stuff.
 */

/*
 *------------------------------------------------------------------
 *
 * $Source: /mit/cgw/conf/mitgw/RCS/mitgw.c,v $
 * $Revision: 1.9 $
 * $Date: 89/04/09 23:08:31 $
 * $State: Exp $
 * $Author: jon $
 * $Locker: jon $
 *
 * $Log:	mitgw.c,v $
 * Revision 1.9  89/04/09  23:08:31  jon
 * turn off egp hacks, let's try the butterflies
 * 
 * Revision 1.8  88/06/09  00:02:13  jon
 * Really fix rcsid.
 * 
 * Revision 1.7  88/06/09  00:00:19  jon
 * Fix rcsid.
 * 
 * Revision 1.6  88/06/08  23:48:35  jon
 * Change name to mitgw and use include file to default flag values.
 * 
 * Revision 1.5  88/05/30  21:15:44  jon
 * Add egp_control_flags and change name from netcnf.c to mitgw.c
 * 
 * Revision 1.4  88/05/05  00:14:08  jon
 * Stop logging to the net by default.
 * 
 * Revision 1.3  87/11/08  17:17:41  jon
 * Changes ARPA trailer size to 0 from 4.  See also gw/nets/arconst.h where
 * ARMAX is now 1022 from 1020.  The goal is to get a MTU of 1006 (not 1004).
 * 
 * Revision 1.2  87/10/12  22:46:39  jon
 * Adds nipflg, in_flush_rvd, and in_flush_rvd_spin_mode so we can link 
 * against the new libraries.
 * 
 * Revision 1.1  87/10/12  22:44:38  jon
 * Initial revision
 * 
 * 
 *------------------------------------------------------------------
 */

#ifndef lint
static char *rcsid_mitgw_c = "$Header: mitgw.c,v 1.9 89/04/09 23:08:31 jon Locked $";
#endif	lint

#include	<types.h>
#include	<sys.h>
#include	<gw/src/const.h>
#include	<gw/src/param.h>
#include	<gw/src/defs.h>
#include	<gw/src/net.h>

#include	"netcnf.h"

#include	<gw/nets/vii.h>
#include	<gw/in/in.h>
#include	<gw/nets/arpa.h>
#include	<gw/nets/arconst.h>
#include	<gw/nets/ether.h>

/* Node name and type */

char	name[]	= "mitgw";
int	mach_type = M_uVAX2;

#define DEFINED_MSGFLG
#define DEFINED_EGPFLG
#define DEFINED_EGP_CONTROL_FLAG

bitw msgflg = 0xffff;		/* General message flag */
bitf egpflg = 0xffff;		/* EGP message flag */
bitf egp_control_flag = 0x0;    /* Control EGP reach -> routing algorithm */

#include "../default_flag_values.h"

/* Actual network configuration table */

ext	 vii_prinit(), vii_in();
ext word vii_out();
ext	 ar_init(), ar_prinit();
ext iorb *ar_get();
ext word ar_out();
ext	e10_prinit(), e10_in();
ext word	e10_out();
ext dct  viidct[], dmadct[], qnadct[];

net	nets[NNETS] =	/* Make it explicit to prevent errors */
{ { ar_init, ar_prinit, ar_out, NULL, NULL, ar_get, NULL, /* ARPANet */
    4, 3, 0, 0, ARMAX, sizeof(arpkt), 0,
    dmadct, &dmadct[0], &dmadct[1], T_ARPA, 0 },

  { NULL, vii_prinit, vii_out, NULL, vii_in, NULL, NULL, /* Vii Ring Net */
    4, 4, 3, 0, VIIMAX, sizeof(struct viipkt), 0,
    viidct, &viidct[0], &viidct[1], T_VII, C_BRD },

  { NULL, e10_prinit, e10_out, NULL, e10_in, NULL, NULL, /* 10Mbit Ethernet */
    2, 2, 0, 0, EMAX, sizeof(e10pkt) + 4, 0,
    qnadct, &qnadct[0], &qnadct[1], T_E10, C_BRD },
};


/* Various per site externals that can be set at compile time.
 * Do not touch anything here!
 */

unsw	nnets = NNETS;			/* Number of networks */
net	*lstnet	= &nets[NNETS];		/* Pointer after last net */
