#ident "$Id: frscfg.h,v 1.8 1997/09/23 16:38:20 gary 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.
 * 
 *****************************************************************************/

/*****************************************************************************
 *                                                                           *
 * (c) COPYRIGHT 1991, 1992 HARRIS & JEFFRIES, INC.                          *
 *                          888 WASHINGTON STREET                            *
 *                          SUITE 130                                        *
 *                          DEDHAM, MA  02026                                *
 * ALL RIGHTS RESERVED                                                       *
 *                                                                           *
 * This software is the property of Harris & Jeffries, Inc. and is furnished *
 * under license by Harris & Jeffries, Inc. and this software may be used    *
 * only in accordance with the terms of said license.  This copyright notice *
 * may not be removed, modified or obliterated without the prior written     *
 * permission of Harris & Jeffries, Inc.                                     *
 *                                                                           *
 * This software may not be copied, transmitted, provided to or otherwise    *
 * made available to any other person, company, corporation or other entiry  *
 * except as specified in the terms of said license.                         *
 *                                                                           *
 * No right, title, ownership or other interest in the software is hereby    *
 * granted or transferred.                                                   *
 *                                                                           *
 * The information contained herein is subject to change without notice and  *
 * should not be construed as a commitment by Harris & Jeffries, Inc.        *
 *                                                                           *
 *****************************************************************************

   MODULE NAME:


	   @@@@@@  @@@@@    @@@@    @@@@   @@@@@@   @@@@           @    @
	   @       @    @  @       @    @  @       @    @          @    @
	   @@@@@   @    @   @@@@   @       @@@@@   @               @@@@@@
	   @       @@@@@        @  @       @       @  @@@   @@@    @    @
	   @       @   @   @    @  @    @  @       @    @   @@@    @    @
	   @       @    @   @@@@    @@@@   @        @@@@    @@@    @    @


   ORIGINAL AUTHOR:  David Jeffries
   SUBJECT MATTER
	  SPECIALIST:   Deepak Shahane

   REVISION HISTORY:

   Date     Version  Name          Description
   -------- -------  ------------  --------------------------------------------
   01-16-92 1.10A    H&J (DJ)      Original
   11-20-92 2.00E    H&J (DJ)      Add Parameter Validation.
		  
   $Log: frscfg.h,v $
   Revision 1.8  1997/09/23 16:38:20  gary
   The Frame Relay and X.25 API's consist of 32-bit fields only.  This is
   to simplify structure alignment considerations, and make endian issues
   less cumbersome.

   In addition, the Frame Relay API now uses SNID's instead of links, thereby
   making it more compatible with the X.25 and ISDN API's.

   These changes span a large number of files.

   Revision 1.7  1996/10/21 19:26:51  gary
   Removed dead code.

   Revision 1.6  1996/10/21 19:12:20  gary
   Rearranged the location of certain API definitions, so that all API-related
   material can be found in a single header file.

   Revision 1.5  1996/10/17 14:46:18  gary
   Activated FRF.9 code.

   Revision 1.4  1996/10/14 22:10:48  gary
   SNMP API commands added (see RAF015 for more details)

   Revision 1.3  1996/06/21 16:36:50  gary
   Next stage of FRF.9 implementation complete.  The appropriate functions
   have been inserted into the transmit and receive path, but are not
   active yet.  Development is being put on hold until a more pressing
   issue (flow control) is dealt with.

   Revision 1.2  1996/04/26 19:58:08  gary
   First rev of changes: Frame Relay on PRI card.
   Bug fix: sequence number on segmented frames was wrong.

   Revision 1.1  1995/03/16 17:02:26  garyp
   Initial revision

 * Revision 1.12  1994/07/27  20:31:09  stavrosm
 * Release 2.2
 *
 * Revision 1.11  1994/07/15  15:47:36  stavrosm
 * Changed mP1 (Max number of PLLs on a link) from 992 to 976.
 * The valid DLCI numbers are 16-991, so mP1 can never be 992.
 *
 * Revision 1.10  1994/07/12  18:37:26  stavrosm
 * Changed comment for default value of Tc from 1/2 sec to 1 sec.
 *
 * Revision 1.9  1994/07/08  14:43:31  stavrosm
 * Added support for configuration of PLL state, link state,
 * forward node, forward link, and forward DLCI.
 *
 * Revision 1.8  1994/06/16  15:42:26  akullber
 * Changed release id to 2.20.  Also made a comment change.
 *
 * Revision 1.7  1994/03/16  21:31:43  deepak
 * Many changes reflecting change in config database organisation resulting in
 * data space savings.
 *
 * Revision 1.6  1994/02/25  20:18:42  guest
 * Add support for Q.933 Annex A.  Bug Report SA-101.
 *
 * Revision 1.5  93/11/02  11:14:39  stavrosm
 * Release 2.1
 * 
..............................................................................

   DESCRIPTION:

   This include file contains configuration related declarations & structures.
   It is included by frs.h.

..............................................................................

  REF DOCUMENTS:

  (a) U.S Sprint Frame Relay Service Interface Specification Doc #: 5136.02
  (b) Frame Relay Interface Specification, Stratacom Inc., Doc #: 001-207460
  (c) Frame Relay Stack Functional Specification Rel 1.2 Harris & Jeffries Inc.
  (d) Frame Relay Stack External Specification Rel 1.2 Harris & Jeffries Inc.
  (e) MIB for Frame Relay DTEs - RFC Draft from Internet Engr Task Force (IETF).
  (f) Multiprotocol Interconnect over Frame Relay Networks - T. Bradley, C.Brown
	 Wellfleet Communications, Inc. A. Malis BBN Communications Oct 14, 1991.

..............................................................................

  SPECIAL COMPILE/LINK INSTRUCTIONS:

	   see notes/instructions in frs.h
..............................................................................
*/
#ifndef FRSCFG_H
#define FRSCFG_H

#include "fr_cont.h"

#define FRS_SFWR_RELID    "2.20"

#define FRS_SFWR_REL_STR_LEN    15   /* Software Rel Notice String Length */
#define FRS_LINK_NAME_SIZE      17   /* Link Name String length */
#define FRS_PLL_NAME_SIZE       19   /* PLL Name String Length */
#define FRS_MIN_FRAME_SIZE      (128+16)
/**/
#ifndef DEFINESONLY

/** Database layout:

    The database layout has undergone changes to minimise the data space used
    by FRS in storing its configuration records.

    Previously (r2.10 and before), each link record was comprised of two
    parts: the configuration of the link proper and an array of
    MAX_PLLS_PER_LINK channel records. A signature within the channel record
    was used to indicate whether the channel record contained meaningful
    information or if it was "unused".  Since this resulted in significant
    wastage of data space, the database has been re-organised to achieve
    savings.

    The notion of MAX_PLLS_PER_LINK has been eliminated. This restriction was 
    an artifact of the database and has no bearing on the run-time FRS which 
    does not care how a given number of channels are spread over a set of links.
    
    Two separate tables (arrays) have been created: a link control table of size
    FRS_MAX_LINKS and a channel control table of size FRS_MAX_CHANNELS. A Link
    record "points" to a chain of channel control records which describe the
    channels available on this link.
    
    The top-level structure is 'frs_sys_cfg' which contains global information
    about the internal configuration of the links and plls.


    Database layout
    ---------------

    frs_sys_cfg (Database starting point)
	 [Global Config Info]
	 .
	 .
	 ARRAY of (frmrly_lkcfg)...SIZE(1..FRS_MAX_LINKS)
	 ARRAY of (frmrly_pllcfg)...SIZE(1..FRS_MAX_CHANNELS)

 **/

/**/
/****************************************************************************** 
 * This is the top level frame relay configuration structure. It contains info
 * concerning the total number of links and plls configured, etc. It also 
 * contains an array of pointers to 'link record' structures (see above). The
 * array is indexed by (link number - 1). If the pointer entry is NULL then
 * no link record exists for that link.
 ******************************************************************************/

typedef struct frs_sys_cfg
{
    char       frsSfwrRel[FRS_SFWR_REL_STR_LEN+1];  /* Software Rel Id */
    u_short    frsTotalLinks;            /* Max active links */
    u_short    frsTotalPLLs;             /* Max PLLs */

#if FRS_DCE_SUPPORT
    u_short    frsNodeNum;               /* Node Number */
    u_short    frsCMI_mT1;               /* CMI polling interval */
#endif

    u_short    frsMaxBufSize;            /* Size of USRBUF payload area. */
    FRS_LINK_CFG _frmrly_lkcfg[FRS_MAX_LINKS];
    FRS_PLL_CFG  _frmrly_ccbcfg[FRS_MAX_CHANNELS];

    /** ........................................................................
	** The following field may be used by the target system as an extension
	** to this structure. Note that this field does not have a corresponding
	** OID in the H & J standard MIB. The OID for this field must be defined
	** by the target system. The typedef SYS_EXTENT can be defined by the
	** target system to be whatever is required.
	** ........................................................................
	**/

    SYS_EXTENT sys_extent;             /* target system defined extension */
}
FRS_SYS_CFG;

/**/
/** ...........................................................................
 ** Configuration change directives 
 ** These values appear in the action field of the CONF_UPDATE structure
 ** and indicate what action has been taken against the database. A pointer
 ** the the structure is passed to the target system callback function:
 ** 'sys_update_config' enabling the target system to perform any coordinated
 ** database processing.
 ** ...........................................................................
 **/
#define FRS_CONFIG_LINK_INSERTED          1
#define FRS_CONFIG_LINK_REMOVED           2
#define FRS_CONFIG_LNK_PARAMETER_UPDATE   3
#define FRS_CONFIG_PLL_INSERTED           4
#define FRS_CONFIG_PLL_REMOVED            5
#define FRS_CONFIG_PLL_PARAMETER_UPDATE   6
#define FRS_CONFIG_SYS_PARAMETER_UPDATE   7

/** The following structure is used to hold information about a particular
 ** change or update to the frame relay database. Members within the structure
 ** hold meaningful information only within the context of the command 
 ** directive (action). Link and dlci are always meaningful regardless of the
 ** action. Param_id, param_value and will contain the appropriate information 
 ** when the action field indicates that a link, pll or system parameter has
 ** changed. The record_ptr field will contain the address of the changed
 ** link or pll record whenever the action was applied to a link or pll. The
 ** structure member: config is a pointer to the top level configuration 
 ** structure.
 **/

typedef struct cfg_update
    {
    u_short action;               /* FRS_CONFIG_* constant                  */
    u_long link;                  /* link number of updated record          */
    u_long dlci;                 /* dlci number of updated record          */
    u_long param_id;             /* Parameter id within record             */
    char *param_value;            /* Changed parameter value                */
    FRS_SYS_CFG *config;          /* Pointer to the entire configuration    */
    void *record_ptr;             /* Pointer to the database record changed */
    } CFG_UPDATE, * PCFG_UPDATE;

/****************************************************************************** 
 * The following structures are used in conjunction with the configuration
 * parameter validation routines. The structure: frscfg_vals is an array
 * of pointers. Each entry contains a series of legal parameter values for
 * a particular 'type' of configurable.
 ******************************************************************************/
#define MAX_ELEMENTS             8   /* # of elements in a value table entry */
typedef struct frscfg_vals
{
    char *vals[MAX_ELEMENTS];
}
FRSCFG_VALS;

/****************************************************************************** 
 * The following structure contains one of the configurable parameter ids 
 * (defined below) and the 'type' of parameter it represents (i.e WORD,
 * STRING, etc). 
 ******************************************************************************/
typedef struct frscfg_pars
{
    u_short par_id;         /* Parameter identifier */
    u_short par_type;       /* Parameter type       */
}
FRSCFG_PARS;

#endif /* ifndef DEFINESONLY */

/**/
/****************************************************************************** 
 * The following macros are used to determine the current setting for a
 * particular link option in the off-line database. Similar macros are defined
 * in frs.h for runtime information.
 ******************************************************************************/
#define FRS_CFG_DELIMITER       0xFFFF
#define FRS_DELETED             0x0000   /* A Deleted PLL or Link number */
#define dbLINK(lnk) gGlobalCfg._frmrly_lkcfg[lnk].frs_link_flags

#define m_dbFRS_IS_LINK_ENBL(lnk)        (dbLINK(lnk) & FRS_OPT_LINK_ENBL)
#define m_dbFRS_IS_STATS_ENBL(lnk)       (dbLINK(lnk) & FRS_OPT_STATS_ENBL)
#define m_dbFRS_IS_PJ_LMI_CFG(lnk)       (dbLINK(lnk) & FRS_OPT_PJ_LMI_CFG)
#define m_dbFRS_IS_S_LMI_CFG(lnk)        (dbLINK(lnk) & FRS_OPT_S_LMI_CFG)
#define m_dbFRS_IS_ANNEXD_CFG(lnk)       (dbLINK(lnk) & FRS_OPT_ANNEXD_CFG)
#define m_dbFRS_IS_ANNEXA_CFG(lnk)       (dbLINK(lnk) & FRS_OPT_ANNEXA_CFG)
#define m_dbFRS_IS_MULTI_CFG(lnk)        (dbLINK(lnk) & FRS_OPT_MULTI_CFG)
#define m_dbFRS_IS_LMI_XONXOFF(lnk)      (dbLINK(lnk) & FRS_OPT_LMI_XONXOFF)
#define m_dbFRS_IS_LMI_BW_CTRL(lnk)      (dbLINK(lnk) & FRS_OPT_LMI_BW_CTRL)
#define m_dbFRS_IS_LINK_DCE(lnk)         (dbLINK(lnk) & FRS_OPT_LINK_DCE)
#define m_dbFRS_IS_BECN_XONXOFF(lnk)     (dbLINK(lnk) & FRS_OPT_BECN_XONXOFF)
#define m_dbFRS_IS_LINK_ENCAP(lnk)       (dbLINK(lnk) & FRS_OPT_ENCAP_ENABLE)
#define m_dbFRS_IS_INJ_MGR_FORCED(lnk)   (dbLINK(lnk) & FRS_OPT_INJ_MGR_FORCED)
#define m_dbFRS_IS_INJ_MGR_BUFFERED(lnk) (dbLINK(lnk) & FRS_OPT_INJ_MGR_BUFRD)
#define m_dbFRS_IS_INJ_MGR_STANDARD(lnk) (dbLINK(lnk) & FRS_OPT_INJ_MGR_STD)
#define m_dbFRS_IS_ANY_LMI_CFG(lnk)      (dbLINK(lnk) & LMI_OPTS)

#define m_dbFRS_IS_LINK_CONFIGURED(lnk) \
	m_dbFRS_IS_LINK_ENBL(lnk)

#define m_dbFRS_MARK_PLL_DELETED(pdb) (pdb->frs_pll_link = FRS_DELETED)

#define m_dbFRS_GET_LINK_RECORD_PTR(lnk) \
    &gGlobalCfg._frmrly_lkcfg[lnk]

#define m_dbFRS_GET_PLL_PTR(lnk, slot) \
    FRSCFG_FetchPLLCfg(lnk, slot)

#define m_IS_SAME( a, b ) !(hj_strcmpi(a,b))

#define m_FRS_SYSTEM_PARAMETERS(l, d) (( l == 0 && d == 0 ) ? TRUE: FALSE)
#define m_FRS_LINK_PARAMETERS(l, d)   ((l > 0 && d == 0) ? TRUE: FALSE)
#define m_FRS_PLL_PARAMETERS(l, d)    (( l != 0 && d != 0 ) ? TRUE: FALSE)
#define m_FRS_SYSTEM_STATISTICS(l, d) m_FRS_SYSTEM_PARAMETERS(l, d)
#define m_FRS_LINK_STATISTICS(l, d)   m_FRS_LINK_PARAMETERS(l, d)

/**/
/*****************************************************************************
 * PLL Default parameter values.
 ******************************************************************************/
#define FRS_PLL_CFG_MIN_DLCI (16)
#define FRS_PLL_CFG_MAX_DLCI (1007)

/* default Bc = 16K bits */
#define FRS_PLL_CFG_DEFAULT_BCMAX (0xE000)
#define FRS_PLL_CFG_DEFAULT_BCMIN (0x2000)
#define FRS_PLL_CFG_MIN_BC (MAX8023FRAMESIZE + CRCCCITTSIZE + sizeof(FR_HDR))

/* default Be = 2K bits */
#define FRS_PLL_CFG_DEFAULT_BE    (0x800)

/* default Tc - 1 second */
#define FRS_PLL_CFG_DEFAULT_TC      1
#define FRS_PLL_CFG_MIN_TC          1

/* default CMP - 10 sec */
#define FRS_PLL_CFG_DEFAULT_CMP     10
#define FRS_PLL_CFG_MIN_CMP         10

/**/
/*****************************************************************************
 *  LINK Parameter Identifiers
 ******************************************************************************/
#define FRS_LINK_CONF_NAME  0
#define FRS_LINK_ADDRESS    1
#define FRS_LINK_NDX        2
#define FRS_LINK_FLAGS      3
#define FRS_LINK_ENABLE     4
#define FRS_LINK_MULTI      5
#define FRS_LINK_LMIXON     6
#define FRS_LINK_STATS      7
#define FRS_LINK_LMIBAND    8
#define FRS_LINK_TYPE       9
#define FRS_LINK_BECN       10
#define FRS_LINK_INJECT     11
#define FRS_LINK_ENCAP      12
#define FRS_LINK_LMI_DLCI   13
#define FRS_LINK_MAX_FRSIZE 14
#define FRS_LINK_mN1        15  /* Full Status Enq. Freq. */
#define FRS_LINK_mN2        16  /* Num. Errors Before Report  */
#define FRS_LINK_mN3        17  /* Error Recovery Count */
#define FRS_LINK_mN4        18  /* Max. # of Stat. Enq. Rcvd  */
#define FRS_LINK_mP1        19  /* Max. # of PLLs */
#define FRS_LINK_mP10       20  /* Max. # of Multicast groups */
#define FRS_LINK_mT1        21  /* Status Enq. Frequency   */
#define FRS_LINK_mT2        22  /* Expected Status Enq. Frequency   */
#define FRS_LINK_mT3        23  /* Measurement Interval for mN4  */
#define FRS_LINK_LMI        24  /* Type of LMI */
#define FRS_LINK_STATE      25  /* State of link */
#define FRS_LINK_TSLOTMAP   26  /* Timeslots occupied on T1 line */

/*****************************************************************************
 *  PLL Parameter Identifiers
 ******************************************************************************/
#define FRS_PLL_CONF_NAME  0
#define FRS_PLL_LINK       1
#define FRS_PLL_NUMBER     2
#define FRS_PLL_DLCI       3
#define FRS_PLL_BCMAX      4
#define FRS_PLL_BCMIN      5
#define FRS_PLL_BE         6
#define FRS_PLL_CIR        7
#define FRS_PLL_CMP        8
#ifdef FRS_DCE_SUPPORT
#define FRS_PLL_FWDNODE    9
#define FRS_PLL_FWDLINK   10
#define FRS_PLL_FWDDLCI   11
#endif
#define FRS_PLL_STATE     12
#define	FRS_PLL_TSLOTMAP  13

/**/
/*****************************************************************************
 *  SYSTEM Parameter Identifiers
 ******************************************************************************/
#define FRS_SYS_SW_REL       0
#define FRS_SYS_MAX_LINKS    1
#define FRS_SYS_MAX_PLLS     2

#if !(USE_CONTIGUOUS_DATA)
#define FRS_SYS_BUFSIZE      3
#endif

#if FRS_DCE_SUPPORT
#define FRS_SYS_NODE_NUM     4
#define FRS_SYS_CMI_mT1      5
#endif

#define FRS_FLAG_ON        1 /* indicates option is on */
#define FRS_FLAG_OFF       0 /* indicates option is off */

#define FRSCFG_FT_NONE     0
#define FRSCFG_FT_BYTE     1
#define FRSCFG_FT_WORD     2
#define FRSCFG_FT_LONG     3

#define FRS_LMI_NONE       0 /* LMI setting */
#define FRS_LMI_PLAIN      1 /* LMI setting */
#define FRS_LMI_STRAT      2 /* LMI setting */
#define FRS_LMI_ANXD       3 /* LMI setting */
#define FRS_LMI_ANXA       4 /* LMI setting */

#define FRS_INJ_FORCED     1 /* Injection management setting */
#define FRS_INJ_BUFFERED   2 /* Injection management setting */
#define FRS_INJ_STANDARD   3 /* Injection management setting */

/**/
/*****************************************************************************
 *  VALIDATION TABLE CONSTANTS
 ******************************************************************************/
#define FRS_VAL_YN         0  /* parameter 'type' identifier */
#define FRS_VAL_ONOFF      1  /* parameter 'type' identifier */
#define FRS_VAL_mP10       2  /* parameter 'type' identifier */
#define FRS_VAL_mP1        3  /* parameter 'type' identifier */
#define FRS_VAL_DLCI       4  /* parameter 'type' identifier */
#define FRS_VAL_FRSIZE     5  /* parameter 'type' identifier */
#define FRS_VAL_LMITYPE    6  /* parameter 'type' identifier */
#define FRS_VAL_LINKTYPE   7  /* parameter 'type' identifier */
#define FRS_VAL_INJECT     8  /* parameter 'type' identifier */
#define FRS_VAL_nNn        9  /* parameter 'type' identifier */
#define FRS_VAL_mTn       10  /* parameter 'type' identifier */
#define FRS_VAL_nN1       11  /* parameter 'type' identifier */
#define FRS_VAL_WORD      12  /* parameter 'type' identifier */
#define FRS_VAL_LONG      13  /* parameter 'type' identifier */
#define FRS_VAL_BYTE      14  /* parameter 'type' identifier */
/* ---------------------------------------------------------------------------*/

#define FRS_VAL_HEX       90 /* not used as an index into the validation table*/
#define FRS_VAL_LINK_NAME 91 /* not used as an index into the validation table*/
#define FRS_VAL_PLL_NAME  92 /* not used as an index into the validation table*/
#define FRS_VAL_NONE      93 /* not used as an index into the validation table*/


#define FRS_MAX_LINK_CFG   26 /* max number of 'link' parameter ids */
#define FRS_MAX_PLL_CFG    13 /* max number of 'pll' parameter ids */
#define FRS_MAX_VAL_TYPES  15 /* max number of 'type' identifiers */

/**/
/******************************************************************************
*  VALIDATION DATA TABLE
******************************************************************************/
#ifdef FRSCFG_C

FRSCFG_VALS values[] = 
{
    /** If new validation data is added to this table, be sure to add a
	** new type constant above (FRS_VAL_*).
	**/

    /** STRING or NUMBER CONSTANTS  **/                         

    { "Y", "N", "YES", "NO", '\0' },                   /* FRS_VAL_YN      */
    { "ON", "OFF", "ENABLE","DISABLE","1", "0", '\0' },/* FRS_VAL_ONOFF   */
    { "0","1024", '\0' },                              /* FRS_VAL_mP10    */
    { "1", "976", '\0' },                              /* FRS_VAL_mP1    */
    { "0", "1023", '\0' },                             /* FRS_VAL_DLCI    */
    { "5", "8192", '\0' },                             /* FRS_VAL_FRSIZE    */
    { "LMI", "STRATACOM", "ANNEXD", "ANNEXA", "NONE", '\0' },    
											/* FRS_VAL_LMITYPE */
    { "DCE", "DTE", '\0' },                            /* FRS_VAL_LINKTYPE */
    { "STANDARD", "FORCED", "BUFFERED", '\0' },        /* FRS_VAL_INJECT */
    { "1", "10" },                                     /* FRS_VAL_nNn    */
    { "5", "10", "15", "20", "25", "30", '\0' },       /* FRS_VAL_mTn    */
    { "1", "255" },                                    /* FRS_VAL_nN1    */
    { "0", "65535" },                                  /* FRS_VAL_WORD    */
    { "0", "39683407295" },                            /* FRS_VAL_LONG    */
    { "0", "255"}                                      /* FRS_VAL_BYTE    */ 
};

/**/
/** Parameter data for LINK configurables: values are stored in frs_link_cfg.
 **/
FRSCFG_PARS link_vals[] = 
{
    /** If a new configurable is added to this table, be sure that there is
	** a valid 'type' constant that can be used as an index into the value
	** table above.
	**/

    /** PARAMETER       , VALIDATION TYPE     **/

    { FRS_LINK_CONF_NAME, FRS_VAL_LINK_NAME },/*  Name */
    { FRS_LINK_ADDRESS,   FRS_VAL_HEX     },  /*  Logical Address */
    { FRS_LINK_NDX     ,  FRS_VAL_WORD    },
    { FRS_LINK_FLAGS   ,  FRS_VAL_WORD    }, /*  Link Flags */
    { FRS_LINK_ENABLE  ,  FRS_VAL_ONOFF   }, /*  Link Enable */
    { FRS_LINK_MULTI   ,  FRS_VAL_ONOFF   }, /*  Multicast Support  */
    { FRS_LINK_LMIXON  ,  FRS_VAL_ONOFF   }, /*  LMI_XON/XOFF  */
    { FRS_LINK_STATS   ,  FRS_VAL_ONOFF   }, /*  Stats Collection */
    { FRS_LINK_LMIBAND ,  FRS_VAL_ONOFF   }, /*  LMI Bandwidth */
    { FRS_LINK_TYPE    ,  FRS_VAL_LINKTYPE}, /*  Link Type */
    { FRS_LINK_BECN    ,  FRS_VAL_ONOFF   }, /*  BECN XON/XOFF */
    { FRS_LINK_INJECT  ,  FRS_VAL_INJECT  }, /*  Injection Mngment */
    { FRS_LINK_ENCAP   ,  FRS_VAL_ONOFF   }, /*  Encapsulation */
    { FRS_LINK_LMI_DLCI,  FRS_VAL_DLCI    }, /*  DLCI for LMI */
    { FRS_LINK_MAX_FRSIZE,FRS_VAL_FRSIZE  }, /*  Max. Frame Size */
    { FRS_LINK_mN1     ,  FRS_VAL_nN1     }, /*  Full Status Enquiry Freq */   
    { FRS_LINK_mN2     ,  FRS_VAL_nNn     }, /*  Num. Errors Before Report */
    { FRS_LINK_mN3     ,  FRS_VAL_nNn     }, /*  Error Recovery Count */
    { FRS_LINK_mN4     ,  FRS_VAL_WORD    }, /*  Max. Status Enq. Received */
    { FRS_LINK_mP1     ,  FRS_VAL_mP1     }, /*  Max. No. of PLLs  */
    { FRS_LINK_mP10    ,  FRS_VAL_mP10    }, /*  Max. Multicast Groups */
    { FRS_LINK_mT1     ,  FRS_VAL_mTn     }, /*  Status Enq. Frequency */
    { FRS_LINK_mT2     ,  FRS_VAL_mTn     }, /*  Expected Stat. Enq. Freq. */
    { FRS_LINK_mT3     ,  FRS_VAL_mTn     }, /*  Measurement Interval */
    { FRS_LINK_LMI     ,  FRS_VAL_LMITYPE }, /*  Local Link Management */
    { FRS_LINK_STATE   ,  FRS_VAL_ONOFF   }  /*  Link state */   
};

/**/
/** Parameter data for PLL configurables: values are stored in frs_pll_cfg.
 **/
FRSCFG_PARS pll_vals[] = 
{
    /** If a new configurable is added to this table, be sure that there is
	** a valid 'type' constant that can be used as an index into the value
	** table above.
	**/

    /** PARAMETER       , VALIDATION TYPE     **/

    { FRS_PLL_CONF_NAME, FRS_VAL_PLL_NAME }, /*  PLL Name */
    { FRS_PLL_LINK   ,  FRS_VAL_LINK_NAME }, /*  Link Name */
    { FRS_PLL_NUMBER ,  FRS_VAL_WORD   }, /*  Link Number */
    { FRS_PLL_DLCI   ,  FRS_VAL_DLCI   }, /*  DLCI  */
    { FRS_PLL_BCMAX  ,  FRS_VAL_LONG   }, /*  Committed Burst Size  */
    { FRS_PLL_BCMIN  ,  FRS_VAL_LONG   }, /*  CBS for Back Traffic  */
    { FRS_PLL_BE     ,  FRS_VAL_LONG   }, /*  Excess Burst Size */
    { FRS_PLL_CIR    ,  FRS_VAL_LONG   }, /*  Committed Rate Measure Interval */
    { FRS_PLL_CMP    ,  FRS_VAL_WORD   }, /* Congestion Monitoring Period  */
#ifdef FRS_DCE_SUPPORT
    { FRS_PLL_FWDNODE,  FRS_VAL_WORD   }, /* DCE Forwarding Node */
    { FRS_PLL_FWDLINK,  FRS_VAL_WORD   }, /* DCE Forwarding Link */
    { FRS_PLL_FWDDLCI,  FRS_VAL_DLCI   }, /* DCE Forwarding DLCI */
#endif
    { FRS_PLL_STATE,  FRS_VAL_ONOFF  },  /* PLL enable/disable */
    { FRS_PLL_TSLOTMAP,  FRS_VAL_LONG  }  /* PLL enable/disable */
};

#else

/** Storage for parameters, types and validation data
 **/
extern FRSCFG_VALS values[];    /* parameter 'type' validation data */
extern FRSCFG_PARS link_vals[]; /* parameter ids and types for link info */
extern FRSCFG_PARS pll_vals[];  /* parameter ids and types for pll info */

#endif  /* ifdef FRSCFG_C */
#endif  /* ifndef FRSCFG_H */

