#ident "$Id: il3_user.h,v 1.3 1996/03/25 17:05:51 meern 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.
 * 
 *****************************************************************************/

/*
 *
 * Copyright (c) 1993-1994 Spider Systems Limited
 *
 * This Source Code is furnished under Licence, and may not be
 * copied or distributed without express written agreement.
 *
 * All rights reserved.  Made in Scotland.
 *
 * Authors: Harry Bryson
 *
 * il3_user.h of il3 module
 *
 * SpiderISDN
 * Release 3.0.0 94/12/20
 * 
 * SpiderISDN Release 3 - Official Release.
 *
 */
 
/*
 * il3_user.h
 */

#define	UO_DONT			0x4000	/* (Hard-coded) don't do an option */
#define UO_DO			0x8000	/* (Hard-coded) do an option */

#define UO_LLC_GEN              0x0002  /* Generate Low-Layer Compatibility */
#define	UO_SELF_ID		0x0001	/* Self-identification */
#define	UO_MSN			0x0004	/* Multiple subscriber number */
#define	UO_INIT_DL_UP		0x0008	/* Start immediately with datalink up */
#define	UO_HLC_GEN		0x0010	/* Generate high layer compability */
#define	UO_HLC_CHK		0x0020	/* Check high layer compability */
#define	UO_HLC_CHK		0x0020	/* Check high layer compability */
#define UO_ADD_HASH		0x0040	/* Add '#' at end of called party no */

/*
 * Process out of sequence IEs in messages.
 */
#define	UO_PROCESS_ALL_IES	0x0080	/* Process all IEs in a message. */
#define	UO_CONNECT_ACK		0x0100	/* Send a connect ACK */
#define	UO_RELEASE		0x0200	/* Release option. */

/*
 * Can distinguish between unimplemented and incompatible implemented
 * messages.
 */
#define	UO_IMPLEM		0x0400	/* Implementation option. */

/*
 * Send release complete upon user rejection; otherwise send nought.
 */
#define	UO_REJECT		UO_DO	/* Reject option. */

/*
 * Uncertain whether should be used or not; see Annex D
 */
#define	UO_ANNEX_D		UO_DO	/* Perform Annex D processing. */

/*
 * Give continuous charging info.
 */
#define	UO_CHARGING_CONT	UO_DO	/* Continuous charging info required. */

/*
 * Give charging info at end.
 */
#define	UO_CHARGING_END		UO_DO	/* Charging info required at end. */

/*
 * Send a status enquiry (usually instead of a status)
 */
#define	UO_STATUS_ENQUIRY	UO_DONT	/* Send a status enquiry. */

/*
 * Release after receiving a disconnect.
 */
#define	UO_DISCON_RELEASE	UO_DO	/* Send release when receive disconnect */

/*
 * Send status messages.
 */
#define	UO_STATUS		UO_DO	/* Send a STATUS message */

/*
 * Send an alerting message after receiving a setup.
 */
#define	UO_ALERTING		UO_DO	/* Send ALERTING when SETUP received. */
#define	UO_CALL_ALL_ISDN	0x0800	/* Call is end-to-end ISDN */
#define	UO_P2P			0x1000	/* Point to point link */
#define	UO_BROADCAST		0x2000	/* SETUP delivered on broadcast link */

/*
 * Here follows more user options which are stored in the global
 * variable extra.
 */
#define UO_B_CHANNEL_CUT_THROUGH		0x00010000
#define UO_USE_DIRECTORY_NUMBERS		0x00020000
#define UO_LOOPBACK                             0x00040000
#define UO_CHAN_FIXED                           0x00080000
#define UO_CHAN_SCATTERED                       0x00100000
#define UO_CHAN_SEQUENTIAL                      0x00200000

/*
 * Following used by state-machine functions
 * to send messages up to user. If canput fails/insufficient info
 * etc, then user message encoder can fail in which case state-machine
 * function exits prematurely.
 */
#define	IL3_ENC_USER(il3cb, command)	\
	{ \
		uint8 err; \
		if ((err = il3_xn_encode_rq(il3cb, command)) \
			!= IL3_ENCODE_SUCCESS) \
		return err; \
	}
