//#ident "$Id: config.c,v 1.10 1997/03/05 17:44:52 tharianj Exp $"
/*****************************************************************************
 * Copyright (c) 1988-95 Digi International Inc., All Rights Reserved
 *
 * This  software  contains  proprietary  and  confidential   information   of
 * Digi International  Inc.   By  accepting  transfer  of this copy, Recipient
 * agrees to retain this software in  confidence,  to  prevent  disclosure  to
 * others,  and  to make no  use of this software other than that for which it
 * was delivered.  This is an unpublished copyright work  Digi   International
 * Inc.    Except   as   permitted   by  federal  law,  17 USC 117, copying is
 * strictly prohibited.
 *
 * Digi  International  Inc.  CONFIDENTIAL  -   (Digi    International    Inc.
 * Confidential  when   combined   with   the   aggregated  modules  for  this
 * product) OBJECT CODE ONLY SOURCE MATERIALS
 *
 * (C) COPYRIGHT Digi International Inc. 1995
 *
 * All Rights Reserved
 *
 * US   Government   Users   Restricted   Rights   -   Use,   duplication   or
 * disclosure  restricted by GSA ADP Schedule Contract with Digi International
 * Inc.
 *
 *****************************************************************************/


/******************************************************************
 *
 *  SpiderNET - Network Board Streams Driver
 *
 *  Copyright 1990  Spider Systems Limited
 *
 *  CONFIG.C
 *
 *    Board end code: configuration functions.
 *
 ******************************************************************/

/*
 *	 /projects/common/PBRAIN/SCCS/pbrainF/dev/embed/sxbus/0/s.config.c
 *	@(#)config.c	1.1
 *
 *	Last delta created	17:39:05 6/25/92
 *	This file extracted	12:44:35 10/29/92
 *
 *	Modifications:
 *
 *	GSA	15 Oct 90	New file created
 *
 *
 */


#include "types.h"
#include "stream.h"
#include "sohdstrm.h"
#include "config.h"

// Everything interesting is in ..\common\config.h. Config.c includes config.h 
// to aid building in different environments while keeping most everything 
// common.


/*
 * The entries in the cdevs and fmods tables must be ordered according to
 * the device/module numbers defined in config.h.
 *
 * Note to Spider users:
 * New devices should be ADDED to this table, in preference to replacing
 * existing entries if the common source is to be updated
 */

struct streamtab *cdevs[] = {
#ifdef ETH
		&ethinfo,			/* 0 */
#else
		0,				/* 0 */
#endif

#ifdef TCP
		&ipinfo, &tcpinfo, &udpinfo,	/* 1, 2, 3 */
#ifdef SLIP
		&slipinfo, 			/* 4 */
#else
		0,	 			/* 4 */ 
#endif
#else
		0, 0, 0, 0,			/* 1, 2, 3, 4 */
#endif /* TCP */

#ifdef X25
		&x25info,			/* 5 */
#else
		0,				/* 5 */
#endif
#ifdef LLC2
		&llc2info,			/* 6 */
#else
		0,				/* 6 */
#endif
#ifdef LAPB
		&lapbinfo,			/* 7 */
#else
		0,				/* 7 */
#endif
#ifdef WAN
		&waninfo,			/* 8 */
#else
		0,				/* 8 */
#endif
#ifdef XPC
                &xpcinfo,                       /* 9 */
#else
                0,                              /* 9 */
#endif
#ifdef IXE
		&ixeinfo,			/* 10 */
#else
		0,				/* 10 */
#endif
#ifdef CXE
		&cxe_info,			/* 11 */
#else
		0,				/* 11 */
#endif
#ifdef UDS
		&udsinfo,			/* 12 */
#else
		0,				/* 12 */
#endif
#ifdef LOOP
		&loopinfo,			/* 13 */
#else
		0,				/* 13 */
#endif
#ifdef SIO
		&sioinfo,			/* 14 */
#else
		0,				/* 14 */
#endif
#ifdef SLOOP
		&sloopinfo,			/* 15 */
#else
		0,				/* 15 */
#endif
#ifdef SCSK
		&scskinfo,			/* 16 */
#else
		0,				/* 16 */
#endif
#ifdef	FR

		&frinfo,			/* 17 */
#else

		0,				/* 17 */
#endif
#ifdef	IFRE

		&ifreinfo,			/* 18 */
#else

		0,				/* 18 */
#endif
#ifdef	IL3

		&il3info,			/* 19 */
#else

		0,				/* 19 */
#endif
#ifdef	LAPD

		&lapdinfo,			/* 20 */
#else

		0,				/* 20 */
#endif
#ifdef	IWAN

		&iwaninfo,			/* 21 */
#else

		0,				/* 21 */
#endif
#ifdef	T1E1

		&t1info,			/* 22 */
#else

		0,				/* 22 */
#endif
#ifdef	MP

		&mpinfo,			/* 23 */
#else

		0,				/* 23 */
#endif
#ifdef	XWAN
	&xwaninfo,			/* 24 */
#else
		0,				/* 24 */
#endif
		0		/* End of list */

};

struct streamtab *fmods[] = {
#ifdef TCP
		&arpinfo,			/* 0 */
#else
		0,				/* 0 */
#endif

#ifdef ECHO
		&echoinfo,			/* 1 */
#else
		0,				/* 1 */
#endif
#ifdef TN
		&tninfo,			/* 2 */
#else
		0,				/* 2 */
#endif
#ifdef TLI
		&timinfo,			/* 3 */
#else
		0,				/* 3 */
#endif
#ifdef MCOPY
		&mcopyinfo,			/* 4 */
#else
		0,				/* 4 */
#endif
#ifdef XXX
		&xxxinfo,			/* 5 */
#else
		0,				/* 5 */
#endif
#ifdef SLD
		&sldinfo,			/* 6 */
#else
		0,				/* 6 */
#endif
#ifdef NPI
		&npiinfo,			/* 7 */
#else
		0,				/* 7 */
#endif
#ifdef STAC
		&stacinfo,			/* 8 */
#else
		0,				/* 8 */
#endif
#ifdef FSTF
		&fstfinfo,			/* 9 */
#else
		0,				/* 9 */
#endif
	0 };

struct devtab devtab [] = {
	{"ETH", makedev(CLONEDEV, ETHDEV)},
	{"IP",  makedev(CLONEDEV, IPDEV)},
	{"TCP", makedev(CLONEDEV, TCPDEV)},
	{"UDP", makedev(CLONEDEV, UDPDEV)},
	{"SLP0", makedev(SLIPDEV, 0)},
	{"SLP1", makedev(SLIPDEV, 1)},
	{"SLP2", makedev(SLIPDEV, 2)},
	{"SLP3", makedev(SLIPDEV, 3)},
	{"X250", makedev(CLONEDEV,X250DEV)},
	{"LLC2", makedev(CLONEDEV, LLC2DEV)},
	{"LAPB", makedev(CLONEDEV,LAPB0DEV)},
	{"FR",makedev(CLONEDEV,FRDEV)},
	{"IFRE",makedev(CLONEDEV,IFREDEV)},
	{"IL3",makedev(CLONEDEV,IL3DEV)},
	{"LAPD",makedev(CLONEDEV,LAPDDEV)},
	{"WAN", makedev(WANDEV, 0)},
	{"WAN0", makedev(WANDEV, 0)},
	{"WAN1", makedev(WANDEV, 1)},
	{"WAN2", makedev(WANDEV, 2)},
	{"WAN3", makedev(WANDEV, 3)},
	{"IWAN", makedev(CLONEDEV, IWANDEV)},
	{"XWAN", makedev( CLONEDEV, XWANDEV )},
	{"T1", makedev(CLONEDEV, T1DEV)},
	{"MP", makedev(CLONEDEV, MPDEV)},
        {"XPC0", makedev(XPCDEV,0)},
        {"XPC1", makedev(XPCDEV,1)},
        {"XPCS", makedev(CLONEDEV,XPCDEV)},
	{"IXE0", makedev(CLONEDEV,IXEDEV)},
	{"CXE", makedev(CLONEDEV,CXEDEV)},
	{"UDS", makedev(CLONEDEV, UDSDEV)},
	{"SIO", makedev(SIODEV, 0)},
#ifdef SOH
	{"WANS", makedev(CLONEDEV, XWANDEV)},
#else
	{"WANS", makedev(CLONEDEV, WANDEV)},
#endif
	{"SLO0", makedev(SLOOPDEV, 0)},
	{"SLO1", makedev(SLOOPDEV, 1)},
	{"SLO2", makedev(SLOOPDEV, 2)},
	{"SLO3", makedev(SLOOPDEV, 3)},
	{"SLO4", makedev(SLOOPDEV, 4)},
	{"SRCE", makedev(SCSKDEV, 1)},
	{"SINK", makedev(SCSKDEV, 0)},
	{(char *)0, 0}
};

struct devtab modtab[] = {
	{"ARP", ARPMOD},
	{"ECHO", ECHOMOD},
	{"TNMD", TNMOD},
	{"TIMD", TIMOD},
	{"MCPY", MCMOD},
	{"XXX", XXXMOD},
	{"SLD", SLDMOD},
	{"NPI", NPIMOD},
	{"STAC", STACMOD},
	{"FSTF", FSTFMOD},
	{(char *)0, 0}
};

