#ident "$Id: Space.c,v 1.3 1997/10/21 20:48:21 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.
 * 
 *****************************************************************************/

/******************************************************************
 *
 *  SpiderX25 Protocol Streams Component
 *
 *  Copyright 1991 Spider Systems Limited
 *
 *  LAPBSPACE.C or 'Space.c'
 *
 *    LAPB space-declaration Module.
 *
 ******************************************************************/

/*
 *	 /projects/common/PBRAIN/SCCS/pbrainF/dev/sys/lapb/0/s.Space.c
 *	@(#)Space.c	1.17
 *
 *	Last delta created	18:46:13 2/21/92
 *	This file extracted	22:30:11 11/19/92
 *
 */


/* LAPB slot counts */
#define NDEVS		     16 /* Total number of clone slots		    */
#define NWANS		     4  /* Number of WAN devices supported          */

/* Read queue control */
#define RQHWM		     4  /* High water mark of queued read messages  */
#define RQLWM		     1  /* Low water mark of queued read messages   */

/* LAPB default tuning values */
#define N2_DFLT		    20  /* Maximum number of retries		    */
#define T1_DFLT		     9  /* Acknowledgement time     (unit 0.1 sec)  */
#define TPF_DFLT             7  /* P/F cycle retry time     (unit 0.1 sec)  */
#define TREJ_DFLT           24  /* Reject retry time        (unit 0.1 sec)  */
#define TBUSY_DFLT          96  /* Remote busy check time   (unit 0.1 sec)  */
#define TIDLE_DFLT         240  /* Idle P/F cycle time      (unit 0.1 sec)  */
#define ACKDLY_DFLT          4  /* RR delay time            (unit 0.1 sec)  */
#define NACKMAX_DFLT         3  /* Maximum number of unack'ed Rx I-frames   */
#define TXWIND_DFLT          7  /* Transmit window size			    */
#define TXPROBE_DFLT         0  /* P-bit position before end of Tx window   */
#define MAXILEN_DFLT       261  /* Maximum I-frame length		    */
#define CONFORM_DFLT         0  /* LAPB PSDN Conformance                    */


/* --------------  C O U N T S   A N D   S T R U C T U R E S  ------------- */


#define STATIC

#include "types.h"
#include "stream.h"
#include "ll_control.h"
#include "timer.h"
#include "lapb.h"


/* Slot counts */
uint	lapb_ndevs = NDEVS;
uint	lapb_nwans = NWANS;

/* Read queue length limits */
uint	lapb_rqhwm = RQHWM;
uint	lapb_rqlwm = RQLWM;

/* Slot structures */
unchar  lapb_dtab[NDEVS];
lapb_t  lapb_wtab[NWANS];


/* LAPB default tuning value table */
lapbtune_t lapb_tdflt = {
    N2_DFLT,      /* N2:            Maximum number of retries		    */
    T1_DFLT,      /* T1:            Acknowledgement time    (unit 0.1 sec)  */
    TPF_DFLT,     /* Tpf:           P/F cycle retry time    (unit 0.1 sec)  */
    TREJ_DFLT,    /* Trej:          Reject retry time       (unit 0.1 sec)  */
    TBUSY_DFLT,   /* Tbusy:         Remote busy check time  (unit 0.1 sec)  */
    TIDLE_DFLT,   /* Tidle:         Idle P/F cycle time     (unit 0.1 sec)  */
    ACKDLY_DFLT,  /* ack_delay:     RR delay time           (unit 0.1 sec)  */
    NACKMAX_DFLT, /* notack_max:    Maximum number of unack'ed Rx I-frames  */
    TXWIND_DFLT,  /* tx_window:     Transmit window size		    */
    TXPROBE_DFLT, /* tx_probe:      P-bit position before end of Tx window  */
    MAXILEN_DFLT, /* max_I_len:     Maximum I-frame length		    */
    CONFORM_DFLT  /* llconform:     LAPB PSDN Conformance                   */
};

