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

/*
 * $Id: ll_proto.h,v 1.3 1996/10/24 20:24:18 gary Exp $
 */

/******************************************************************
 *
 *  SpiderX25 Protocol Streams Component
 *
 *  Copyright 1991  Spider Systems Limited
 *
 *  LL_PROTO.H
 *
 *    LAPB Top-level STREAMS interface.
 *
 ******************************************************************/

/* Interface structures */
struct ll_reg {
    uint8	ll_type;
    uint8	ll_class;
    uint8	ll_regstatus;
    uint8	ll_spare;
    uint32	ll_snid;
    uint8	ll_mymacaddr[6];
    uint8	ll_normalSAP;
    uint8	ll_loopbackSAP;
};

struct ll_msg {
    uint8	ll_type;
    uint8	ll_command;
    uint16	ll_connID;
    uint32	ll_yourhandle;
    uint32	ll_status;
};

struct ll_msgc {
    uint8	ll_type;
    uint8	ll_command;
    uint16	ll_connID;
    uint32	ll_yourhandle;
    uint32	ll_myhandle;
    uint16	ll_service_class;
    uint8	ll_remsize;
    uint8	ll_locsize;
    uint8	ll_remaddr[12];
    uint8	ll_locaddr[12];
};

/* Values for 'll_type' */
#define LL_REG		 50
#define LL_CTL		 51
#define LL_DAT		 52

/* Values for 'll_command' */
#define LC_CONNECT        1
#define LC_CONCNF         2
#define LC_DATA		  3
#define LC_UDATA          4
#define LC_DISC		  5
#define LC_DISCNF         6
#define LC_RESET          7
#define LC_RSTCNF         8
#define LC_REPORT         9
#define LC_CONOK         10
#define LC_CONNAK        11
#define LC_PRGBRA        12
#define LC_PRGKET        13

/* Values of 'll_class' in 'll_reg' */
#define LC_LLC1          15
#define LC_LLC2          16
#define LC_LAPBDTE       17
#define LC_LAPBXDTE      18
#define LC_LAPBDCE       19
#define LC_LAPBXDCE      20
#define LC_LAPDTE        21
#define LC_LAPDCE        22

/* Values in 'll_regstatus' and 'll_status' */
#define LS_SUCCESS        1
#define LS_RESETTING      2
#define LS_RESETDONE      3
#define LS_DISCONNECT     4
#define LS_FAILED         5
#define LS_CONFLICT       6
#define LS_RST_FAILED     7
#define LS_RST_REFUSED    8
#define LS_RST_DECLINED   9
#define LS_FMR_RECEIVED  10
#define LS_FMR_SENT      11
#define LS_REM_BUSY      12
#define LS_REM_NOT_BUSY  13
#define LS_EXHAUSTED     14
#define LS_SSAPINUSE     15
#define LS_LSAPINUSE     16
#define LS_DUPLICATED    17
#define LS_LSAPWRONG     18

