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

/*****************************************************************************
 *                                                                           *
 * (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.        *
 *                                                                           *
 *****************************************************************************


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


  ORIGINAL AUTHOR:  David Jeffries
  SUBJECT MATTER 
      SPECIALIST:   Deepak Shahane

  REVISION HISTORY:

  Date     Version  Name          Description
  -------- -------  ------------  --------------------------------------------
  01-16-92 1.10A    XXXXXXXXXXXX  Original
  10-16-92 2.00D    H&J (DJ)      Add FRS_RCV_NOTIFY option.

  09/28/93 2.00H    H&J (GB)      Added macros for target systems that use
                                   big-endian or little-endian memory storage.
                                  Added USES_LITTLE_ENDIAN compile option.
                                  Changed the default BUFSIZE from 272 to 278
                                   to reflect changes needed for support of
                                   RFC1490.
           Other    H&J           See H&J's bug report

  $Log: frssys.h,v $
  Revision 1.8  1997/09/23 16:38:21  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:12:22  gary
  Rearranged the location of certain API definitions, so that all API-related
  material can be found in a single header file.

  Revision 1.6  1996/07/03 19:26:52  gary
  Minor correction:
  The number of allowable DLCI's was incorrect for 4 meg builds.

  Revision 1.5  1996/06/21 21:37:37  gary
  Backflowing now implemented on the Frame Relay stack!
  This minimizes the amount of loss encountered under
  Forced and Buffered injection.

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

  Revision 1.3  1995/11/01 23:10:44  andyw
  Make the declaration of curtime() uniformly "unsigned long", and
  also introduce two macros (EARLIER_THAN() & LATER_THAN()), to be
  used when comaring timestamps to the current time.

  Revision 1.2  1995/04/07 17:29:29  garyp
  added func prototype

 * Revision 1.11  1994/07/27  20:31:09  stavrosm
 * Release 2.2
 *
 * Revision 1.10  1994/07/13  15:55:07  stavrosm
 * Added default values for link state and PLL state.
 *
 * Revision 1.9  1994/06/01  19:55:55  stavrosm
 * Name for sys_proc_oui() is wrong. Changed to sys_oui_proc().
 *
 * Revision 1.8  1994/03/16  21:46:13  deepak
 * Dropped FRS_MAX_PLL_PER_LINK and added FRS_MAX_LINKS, FRS_LAX_CHANNELS.
 *
 * Revision 1.7  1993/11/02  11:14:43  stavrosm
 * Release 2.1
 *
..............................................................................

  DESCRIPTION:

  This header file contains all target specific definitions for the
  integration of the H&J FRS software to a specific target system.

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

  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
..............................................................................
*/

/* #include <string.h> 
*/

#ifndef FRSSYS_H
#define FRSSYS_H


#ifndef TRUE
#define TRUE                    1
#endif

#ifndef FALSE
#define FALSE                   0
#endif

#ifndef NULL
#define NULL                    (void *)0
#endif


/*............................................................................

  The FRS system expects the following declarations defined in here. Each
  declaration is followed by a comment explaining its significance and syntax.

............................................................................*/

/** The following typedefs are user definable. They can be used to declare
 ** implementation specific 'extensions' to several data structures defined
 ** within this base code. 
 **/
typedef void * USRBUF_EXTENT;/* user definable extension within USEBUF */
typedef void * SYS_EXTENT;   /* user definable extension within FRS_SYS_CFG */

typedef u_short proc_id;

#define TASKID_FRSTX  16    /* Task Id for Transmit Process */
#define TASKID_FRSRX  17    /* Task Id for Receive Process */
#define TASKID_FRSLMI 18    /* Task Id for LMI Process */

#define PRI_FRSTX     127   /* Transmit Process Priority */
#define PRI_FRSRX     128   /* Receive Process Priority */
#define PRI_FRSLMI    129   /* LMI Process Priority */

/** PORTING NOTE:
 ** These default values should be customized for the target system. They
 ** are used in the routine FRSCONF_InsertLink (frscfg.c) and in
 ** FRSCONF_InsertPLL (frscfg.c). Set these values to the desired defaults.
 **/
#define FRS_LINK_DFLT_NAME     "** UNNAMED LINK **"
#define FRS_LINK_DFLT_FLAGS    FRS_OPT_LINK_ENBL | FRS_OPT_INJ_MGR_STD
#define FRS_LINK_DFLT_LMIDLCI  0
#define FRS_LINK_DFLT_FRSIZE   PAYLOAD_BUF_SIZE
#define FRS_LINK_DFLT_mN1      1
#define FRS_LINK_DFLT_mN2      1
#define FRS_LINK_DFLT_mN3      4
#define FRS_LINK_DFLT_mN4      0
#define FRS_LINK_DFLT_mP10     0
#define FRS_LINK_DFLT_mT1      5
#define FRS_LINK_DFLT_mT2      5
#define FRS_LINK_DFLT_mT3      5
#define FRS_LINK_DFLT_STATE    1       /* ENABLED */
#define	FRS_LINK_DFLT_TSLOTMAP 0x00FFFFFF

#define FRS_PLL_DFLT_NAME     "** UNNAMED PLL **"
#define FRS_PLL_DFLT_BcMax    256000
#define FRS_PLL_DFLT_BcMin    128000
#define FRS_PLL_DFLT_Be       0
#define FRS_PLL_DFLT_CIR      256000
#define FRS_PLL_DFLT_CMP      10
#define FRS_PLL_DFLT_STATE    1       /* ENABLED */


/* Timer Codes */

#define FRS_TMO_FOREVER             1
#define FRS_PERIODIC_TIMER_FLAG     FALSE

#define INJTIMR       0         /* Injection Rate timer - 1 per PLL */
#define LMITIMR       1         /* LMI polling timer - 1 per link */
#define CMPTIMR       2         /* Congestion mgmt timer - 1 per PLL */
#define CHKTIMR       3         /* LMI excess poll check timer - 1 per link */

/* Config Limits */
#if EPC
#if SOH
#define FRS_MAX_LINKS           16  /* Total number of configurable links */
#else
#define FRS_MAX_LINKS           2   /* Total number of configurable links */
#endif
#else
#define FRS_MAX_LINKS           8   /* Total number of configurable links */
#endif
#define FRS_MAX_CHANNELS        64   /* Total number of configurable channels */

/*****************************************************************************
*
*                 MEMORY MANAGER MACROS AND PRIMITIVES
*
*  The following macros provide the front-end to the target system memory
*  manager. These macros must be changed such that the desired operation is
*  accomplished by using the target system memory manager primitives.
*
*
*  PORTING NOTE:
*    If the target system wishes to have the payload area within the USRBUF
*    structure defined as an array characters that is BUFSIZE in length then
*    set the option USE_CONTIGUOUS_DATA non-zero in FRSOPT.H
*    
*    However, if the payload area is to be defined as a pointer, implying that
*    the payload area is created as a separate allocation then set the
*    option USE_CONTIGUOUS_DATA to zero in FRSOPT.H 
*  
*****************************************************************************/

#define BUFSIZE  278             /* default size of packet_data buffers */
#define BNULL    (USRBUF *)0     /* a null usrbuf pointer */

/** PORTING NOTE:
 ** If your target machine uses little-endian format for storing numeric values
 ** then set the USES_LITTLE_ENDIAN option to a non-zero value in FRSOPT.H
 ** If your target machine uses big-endian format, set the USES_LITTLE_ENDIAN
 ** option to zero.
 **/

/** little-endian macros. LSB = low address byte
 **/
#ifndef	CHAR_BIT
#define	CHAR_BIT 8
#endif

#if (USES_LITTLE_ENDIAN)
#define mGetMSB(n)  (u_char) ((((u_short) (n) >> CHAR_BIT) & 0x00FF))
#define mGetLSB(n)  (u_char) (((u_short) (n) & 0x00FF))
#define mMAKEUSHORT(msb, lsb) ((u_short) (lsb) | ((u_short) (msb) << CHAR_BIT))
#endif

/** Big-endian macros. MSB = low address byte
 **/
#if (!USES_LITTLE_ENDIAN)
#define mGetMSB(n)  (u_char) (((u_short) (n) & 0x00FF))
#define mGetLSB(n)  (u_char) ((((u_short) (n) >> CHAR_BIT) & 0x00FF))
#define mMAKEUSHORT(msb, lsb) ((u_short) (msb) | ((u_short) (lsb) << CHAR_BIT))
#endif


/** This macro assumes the correct r-value for l-value expressions that
 ** are used to store the maximum size of the payload area in USRBUF.
 **/
#if !(USE_CONTIGUOUS_DATA)
#define PAYLOAD_BUF_SIZE gGlobalCfg.frsMaxBufSize     /* configurable */
#else
#define PAYLOAD_BUF_SIZE BUFSIZE                      /* constant     */
#endif

/** User buffer structure
 **/
#ifndef	STREAM_MESSAGES

typedef struct usrbuf
{
    /** Pointer to the next usrbuf structure (used in queueing).
     **/
    struct usrbuf *next;

    /** Pointer to a 'linked' usrbuf structure - used whenever
     ** the user frame spans multiple usrbufs. All linked usrbuf
     ** structures comprise a single upper layer frame.
     **/
    struct usrbuf *link;

    /** structures required for fragmentation of a usrbuf
     **/
    struct usrbuf *first_frag; /* first fragment in the frame */
    struct usrbuf *next_frag;  /* next fragment in the frame  */
    u_short code;              /* status code of the fragment */

    /** The total number of octets used (for this usrbuf) in the data 
     ** area pointed to by 'payload'.
     **/
    u_short count;

    /** An offset in the 'payload' buffer where the upper layer's data
     ** begins. This can be represented as *(payload+start).
     **/
    u_short start;

    /** This member is intended for use by the target system if it requires
     ** implementation specific data to be associated with this structure.
     ** The base implementation code does not maintain or reference this 
     ** structure member. It must be maintained by target system code.
     **
     ** WARNING: If this field is used to reference user allocated data,
     **          the memory associated with this pointer should be freed BEFORE
     **          calling m_MMGR_FREE_BUFR to free the USRBUF structure.
     **/
    USRBUF_EXTENT userbuf_extent;

#if !(USE_CONTIGUOUS_DATA) /* --- see porting note above -------------- */

    /** Pointer to a buffer that contains the upper layer's data. This memory
     ** area is allocated separately from this structure.
     **/
    u_char *payload;

#else

    /** An array containing the upper layer's data.
     **/
    u_char payload[ BUFSIZE ];

#endif /* ---------------------------------------------------------------- */
}
USRBUF;

#else

typedef	struct msgb USRBUF ;

#endif

/* Memory manager primitives...
 *  Populate accordingly during portation.
 */

/**
 ** NOTES:
 ** The arguments used by the m_MMGR_* macros defined below are as follows:
 **     p - a pointer
 **     t - a data type that will be used for casting.
 **     n - a numeric value.
 **     c - a character value.
 **/

/** Target specific release and allocation of frame buffers for user data.
 ** The routines 'sys_alloc_pkt' and 'sys_free_pkt' can be found in frstargt.c
 ** An explaination of their use can be found in the source file...
 **/
#define m_MMGR_ALLOC_BUFR(n)  sys_alloc_pkt(n) /* Usr frame alloc routine */
#define m_MMGR_FREE_BUFR(p)   sys_free_pkt(p)  /* Frees Usr frame */

/** Target defined macros for conventional release and allocation of
 ** data structures, link-lists, etc.
 **/
#define m_MMGR_SPL_ALLOC(n)   ((void *)0) /* Conventional memory allocations */
#define m_MMGR_SPL_FREE(p)    ((void *)0) /* Frees conventional memory */

/** This macro is used to set a buffer area specified character. The 'p' 
 ** argument is a pointer to the destination memory area, 'c' is the character
 ** to set, 'n' is the number of characters. NOTE: 'memset' is the ANSI and
 ** UNIX standard call.
 **/
#define m_MMGR_MEMSET(p,c,n)  memset((void *)p, (int) c, n)


#ifndef	STREAM_MESSAGES

#define m_MMGR_DITTO_BUFR(p)  (os_ditto_bfr(p)) /* alloc and copy USRBUF */
#define m_MMGR_DATA_LEN(p)    ((p)->count)
#define m_MMGR_INC_LEN(p, n)  ((p)->count += n)
#define m_MMGR_DEC_LEN(p, n)  ((p)->count -= n)
#define m_MMGR_DATA(p, t)     ((t)(&((p)->payload[(p)->start])))
#define m_MMGR_INC_OFF(p, n)  ((p)->start += n)
#define m_MMGR_DEC_OFF(p, n)  ((p)->start -= n)
#define m_MMGR_FRAME_LEN(p)   FRSFrameSize((p))

#else

#define m_MMGR_DITTO_BUFR(p)  (os_ditto_bfr(p)) /* alloc and copy USRBUF */
#define m_MMGR_DATA_LEN(p)    ((p)->b_wptr - (p)->b_rptr)
#define m_MMGR_INC_LEN(p, n)  ((p)->b_wptr += n)
#define m_MMGR_DEC_LEN(p, n)  ((p)->b_wptr -= n)
#define m_MMGR_DATA(p, t)     ((t)((p)->b_rptr))
#define m_MMGR_INC_OFF(p, n)  ((p)->b_rptr += n)
#define m_MMGR_DEC_OFF(p, n)  ((p)->b_rptr -= n)
#define m_MMGR_FRAME_LEN(p)   FRSFrameSize((p))

#endif

#ifdef	STATIC_MEMORY

#define	m_MMGR_LCB_ALLOC(p)	sys_lcb_alloc(p) 
#define	m_MMGR_LCB_DEALLOC(p)	sys_lcb_dealloc((p))
#define	m_MMGR_CCB_ALLOC()	sys_ccb_alloc()
#define m_MMGR_CCB_DEALLOC(p)	sys_ccb_dealloc((p))
#define m_MMGR_LMICCB_ALLOC()	sys_lmiccb_alloc()
#define m_MMGR_LMICCB_DEALLOC(p) sys_lmiccb_dealloc((p))
#define m_MMGR_MULTIPROTOCOL_ALLOC() sys_multiprotocol_alloc()
#define m_MMGR_MULTIPROTOCOL_DEALLOC(p) sys_multiprotocol_dealloc((p))
#define m_MMGR_EVENT_ALLOC()	sys_event_alloc()
#define	m_MMGR_EVENT_DEALLOC(p) sys_event_dealloc((p))
#define m_MMGR_FRS_PROTOCOL_ENTRY_ALLOC() sys_frs_protocol_entry_alloc()
#define m_MMGR_FRS_PROTOCOL_ENTRY_DEALLOC(p) sys_frs_protocol_entry_dealloc((p))

#endif

/*****************************************************************************
*
*                 CRITICAL PATH PROTECTION MACROS
*                    defined during portation
*
****************************************************************************/

#define m_START_CRITICAL        /* defined for target system */
#define m_END_CRITICAL          /* defined for target system */


/*****************************************************************************
*
*                       QUEUEING PRIMITIVES
*
*  The following macros provide queueing structures.
*
*****************************************************************************/

/* Queue sub-structure...
*/
typedef struct tagQ
{
    void *qtop;
    void *qbot;
}
queue;

/* Queue Control Block...
*/
typedef struct tagQTCB
{
    u_short    qcnt;
    queue   Q;
}
QTCB;

/****************************************************************************
                        QUEING CONSTANTS
 ***************************************************************************/

/* Allow a couple of messages per potential DLCI */

#define MAX_Q_DEPTH		(FRS_MAX_CHANNELS*2)
#define	Q_LOW_WATER_MARK	(FRS_MAX_CHANNELS/2)
  
/****************************************************************************
                                                                    STACKS
****************************************************************************/

/* The default stack size of 256 may not be sufficient in certain
     environments.
*/
#define DEFAULT_STACK_SIZE                256

#ifdef FRSUTIL_C
u_char g_Stack_FrsTx[DEFAULT_STACK_SIZE];
u_char g_Stack_FrsRx[DEFAULT_STACK_SIZE];
#else
extern u_char g_Stack_FrsTx[DEFAULT_STACK_SIZE];
extern u_char g_Stack_FrsRx[DEFAULT_STACK_SIZE];
#endif


#if USE_PROTOTYPES

/** frstargt.c ----------------------------------------------------------------
 **/
#if USE_RECEIVE_NOTIFY
void sys_pll_rcvd_frame( struct ccb *);
#endif

#ifndef	STREAM_MESSAGES

struct usrbuf *sys_alloc_pkt( u_int );
u_char sys_pvc_stat( struct ccb * );
u_long sys_get_sys_uptime( void );
u_short sys_free_pkt( struct usrbuf * );
u_short sys_fwd_frame( struct usrbuf *, struct ccb *, struct ccb * );
int FRSTMR_timeout( caddr_t ); 
void FRSTMR_destroy( u_long );
void FRSTMR_start( u_short, u_short );
void FRSTMR_stop( u_short );
u_short FRSTMR_create( u_long , void ( * )( u_long ), u_short );
void os_queue_sleep( struct tagQTCB * );
void os_queue_unsleep( struct tagQTCB * );
void os_queue_wait( struct tagQTCB *, struct event ** );
void os_queue_wakeup( struct tagQTCB *, struct event * );
void os_task_create( u_int, u_int, u_int, TASK_FUNC_PTR, u_char *, u_int );
USRBUF *os_ditto_bfr( USRBUF * );
void sys_add_pll( struct lcb *, struct ccb **, u_short );
void sys_hdt_ccb( struct ccb * );
void sys_link_down( struct lcb * );
void sys_link_up( struct lcb * );
void sys_mark_frames_drop( struct ccb * );
void sys_sdt_ccb( struct ccb * );
void sys_throttle_ccb( struct ccb *, u_char );
void sys_trap_event( struct lcb *, struct ccb *, u_short );
u_short sys_send_cmi( u_short, USRBUF *);
u_short sys_update_config( struct cfg_update * );

#else
USRBUF *allocb(int, int ) ;
void    freeb(USRBUF *) ;

USRBUF *sys_alloc_pkt( u_int );
u_char sys_pvc_stat( struct ccb * );
u_long sys_get_sys_uptime( void );
u_short sys_free_pkt( USRBUF * );
u_short sys_fwd_frame( USRBUF *, struct ccb *, struct ccb * );
int FRSTMR_timeout( caddr_t ); 
void FRSTMR_destroy( u_long );
void FRSTMR_start( u_short, u_short );
void FRSTMR_stop( u_short );
u_short FRSTMR_create( u_long , void ( * )( u_long ), u_short );
void os_queue_sleep( struct tagQTCB * );
void os_queue_unsleep( struct tagQTCB * );
void os_queue_wait( struct tagQTCB *, struct event ** );
void os_queue_wakeup( struct tagQTCB *, struct event * );
void os_task_create( u_int, u_int, u_int, TASK_FUNC_PTR, u_char *, u_int );
USRBUF *os_ditto_bfr( USRBUF * );
void sys_add_pll( struct lcb *, struct ccb **, u_short );
void sys_hdt_ccb( struct ccb * );
void sys_link_down( struct lcb * );
void sys_link_up( struct lcb * );
void sys_mark_frames_drop( struct ccb * );
void sys_sdt_ccb( struct ccb * );
void sys_throttle_ccb( struct ccb *, u_char );
void sys_trap_event( struct lcb *, struct ccb *, u_short );
u_short sys_send_cmi( u_short, USRBUF *);
u_short sys_update_config( struct cfg_update * );

#endif
/** frsdrv.c
 **/
u_short FRSDRV_InitLink(struct frs_link_cfg *);
u_short FRSDRV_LinkControl(struct lcb *, u_short);
u_short FRSDRV_LinkUpEvent(struct lcb *);
u_short FRSDRV_LinkDownEvent(struct lcb *);
u_short FRSDRV_FrameRcvdEvent(struct lcb *, USRBUF *);
u_short FRSDRV_SendData(struct ccb *, USRBUF *);
u_short FRSDRV_TxDone(struct lcb *, USRBUF *);
void    FRSDRV_AddRcvBfr(struct lcb *);

#ifdef	STATIC_MEMORY
struct lcb *sys_lcb_alloc() ;
void	 sys_lcb_dealloc(struct lcb *) ;

struct	ccb *sys_ccb_alloc() ;
void	 sys_ccb_dealloc(struct ccb *) ;

struct  lmi_ccb *sys_lmiccb_alloc() ;
void	 sys_lmiccb_dealloc(struct lmi_ccb *) ;

struct tag_protocol_entry *sys_frs_protocol_entry_alloc() ;
void	 sys_frs_protocol_entry_dealloc(struct tag_protocol_entry *) ;

struct tag_multiprotocol *sys_multiprotocol_alloc() ;
void	 sys_multiprotocol_dealloc(struct tag_multiprotocol *) ;

struct event *sys_event_alloc() ;
void	sys_event_dealloc(struct event *) ;

#endif

#ifndef SOH
int	timeout(void (*)(u_short), int, int ) ;
unsigned long	curtime() ;
#endif

#else

/** frstargt.c ----------------------------------------------------------------
 **/
#if USE_RECEIVE_NOTIFY
void sys_pll_rcvd_frame();
#endif

USRBUF *sys_alloc_pkt();
u_char sys_pvc_stat();
u_long sys_get_sys_uptime();
u_short sys_free_pkt();
u_short sys_fwd_frame();
int FRSTMR_timeout();
void FRSTMR_destroy();
void FRSTMR_start();
void FRSTMR_stop();
u_short FRSTMR_create();
void os_queue_sleep();
void os_queue_unsleep();
void os_queue_wait();
void os_queue_wakeup();
void os_task_create();
USRBUF *os_ditto_bfr();
void sys_add_pll();
void sys_hdt_ccb();
void sys_link_down();
void sys_link_up();
void sys_mark_frames_drop();
void sys_sdt_ccb();
void sys_throttle_ccb();
void sys_trap_event();
u_short sys_send_cmi();
u_short sys_update_config();
u_short sys_oui_proc();
u_short sys_ins_oui();
struct tag_multiprotocol *sys_multiprotocol_alloc() ;

/** frsdrv.c
 **/
u_short FRSDRV_InitLink();
u_short FRSDRV_LinkControl();
u_short FRSDRV_LinkUpEvent();
u_short FRSDRV_LinkDownEvent();
u_short FRSDRV_FrameRcvdEvent();
u_short FRSDRV_SendData();
u_short FRSDRV_TxDone();
void    FRSDRV_AddRcvBfr();

#endif

#define PRINTF(s, v)

#endif    /* ifndef FRSSYS_H */
