/*++
*******************************************************************************
* Copyright (c) 1990-97 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 copyrighted work of Digi International
* Inc.	Except as permitted by federal law, 17 USC 117, copying is strictly
* prohibited.
*
* Restricted Rights Legend
*
* Use, duplication, or disclosure by the Government is subject to
* restrictions set forth in sub-paragraph (c)(1)(ii) of The Rights in
* Technical Data and Computer Software clause at DFARS 252.227-7031 or
* subparagraphs (c)(1) and (2) of the Commercial Computer Software -
* Restricted Rights at 48 CFR 52.227-19, as applicable.
*
* Digi International Inc. 11001 Bren Road East, Minnetonka, MN 55343
*
*******************************************************************************

Module Name:

   queue.h

Abstract:

   This file contains prototypes of queue routines.

Author:

   Ron Gredvig

File Id:

   $Id: queue.h,v 1.1 1997/10/22 21:52:24 gary Exp $

Revision History:

   $History: queue.h $
 * 
 * *****************  Version 2  *****************
 * User: Ron          Date: 10/23/97   Time: 9:54a
 * Updated in $/Components/Windows/NT/Sync/Build/Streams/common
 * These Streams files were updated with Gary Parnes latest versions. Gary
 * included my revisions to these files for DigiSOH.
 *
 * *****************  Version 1	 *****************
 * User: Ron	      Date: 10/09/97   Time: 2:52p
 * Created in $/Components/Windows/NT/Sync/Build/Streams/common
 * Initial check-in for Sandy. Functional with external loopback for 570.

--*/

/*
 * External Prototypes
*/

#ifndef _QUEUE_D
#define _QUEUE_D

void initq(queue_t *q, struct qinit *rinit, struct qinit *winit);

void linkq(queue_t *hq, queue_t *q);
void unlinkq(queue_t *q);

queue_t * backq(register queue_t *q);

int qenable(queue_t *q);
int qsize(queue_t *q);
int canput(queue_t *q);
void flushq(queue_t *q, int flag);

void insq(queue_t *q, mblk_t *emp, mblk_t *nmp);
int putctl(queue_t *q, int type);
int putctl1(queue_t *q,unsigned char  type, char p);
mblk_t * getq(queue_t *q);
void putq(queue_t *q, mblk_t *mp);
void putbq(queue_t *q, mblk_t *mp);
void qreply(queue_t *q, mblk_t *mp);
void rmvq(queue_t *q, mblk_t  *mp);

int runq();
int unrunq(queue_t *q);

strm_t *allocs() ;
queue_t *allocq() ;


#endif