//Editor-Info: -*- C++ -*-
//
//Subject: TOVE project / SAAL layer module
//
//File: saal.h
//
//Version: $Revision: 1.10 $
//
//State: $State: Exp $
//
//Date: $Date: 1998/12/03 13:14:24 $
//
//Organisation:
//      Helsinki University of Technology
//      Laboratory of Telecommunications and Multimedia
//
//Author:
//      Juhana Räsänen
//
//Description:
//      General definitions of the SAAL layer
//
//Copyright:
//      Copyright 1999 Helsinki University of Technology
//      ALL RIGHTS RESERVED BETWEEN JANUARY 1996 AND JUNE 1999.
//
//Licence:
//
//
//History: 
//

#ifndef __SAAL_H__
#define __SAAL_H__

#include "pf/types.h"

// Protocol values common for all SAAL parts
const int SAAL_MAX_SDU_SIZE = 4096;


const int FACTOR = 5; // Factor is used to increase NNI timeout values 

// SSCOP protocol parameter values for NNI (Table 5/Q.2140)
const int NNI_SSCOP_MAX_SDU_SIZE = SAAL_MAX_SDU_SIZE;
const int NNI_SSCOP_MAX_UU_SIZE = 4;
const int NNI_SSCOP_MAX_CC = 4;
const int NNI_SSCOP_MAX_PD = 500;
const int NNI_SSCOP_TIMER_CC_TIMEOUT = FACTOR * 200;
const int NNI_SSCOP_TIMER_KEEP_ALIVE_TIMEOUT = FACTOR * 100;
const int NNI_SSCOP_TIMER_NO_RESPONSE_TIMEOUT = FACTOR * 1500;
const int NNI_SSCOP_TIMER_POLL_TIMEOUT = FACTOR * 100;
const int NNI_SSCOP_TIMER_IDLE_TIMEOUT = FACTOR * 100;


// Magic values for special retrieval sequence numbers.
const pfUlong NNI_RETRIEVE_UNKNOWN = 0xFFFFFFFE;
const pfUlong NNI_RETRIEVE_TOTAL = 0xFFFFFFFD;


// SSCOP protocol parameter values for UNI (Table 4/Q.2130)
const int UNI_SSCOP_MAX_SDU_SIZE = SAAL_MAX_SDU_SIZE;
const int UNI_SSCOP_MAX_UU_SIZE = SAAL_MAX_SDU_SIZE;
const int UNI_SSCOP_MAX_CC = 4;
const int UNI_SSCOP_MAX_PD = 25;
const int UNI_SSCOP_TIMER_CC_TIMEOUT = FACTOR * 2000;
const int UNI_SSCOP_TIMER_KEEP_ALIVE_TIMEOUT = FACTOR * 2000;
const int UNI_SSCOP_TIMER_NO_RESPONSE_TIMEOUT = FACTOR * 7000;
const int UNI_SSCOP_TIMER_POLL_TIMEOUT = FACTOR * 1000;
const int UNI_SSCOP_TIMER_IDLE_TIMEOUT = FACTOR * 15000;

#endif // __SAAL_H__

