/*
 * $Copyright:	$
 * Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 
 * Sequent Computer Systems, Inc.   All rights reserved.
 *  
 * This software is furnished under a license and may be used
 * only in accordance with the terms of that license and with the
 * inclusion of the above copyright notice.   This software may not
 * be provided or otherwise made available to, or used by, any
 * other person.  No title to or ownership of the software is
 * hereby transferred.
 */

#ident "$Header: ptyms.h 1.6 89/08/07 $"

#ifndef	_SYS_PTYMS_H_

/*
 * ptyms.h
 *	Structures and definitions supporting the STREAMS
 *	pseudo terminal drivers.
 */

/* $Log:	ptyms.h,v $
 */


/*	Copyright (c) 1984 AT&T	*/
/*	  All Rights Reserved  	*/

/*	THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T	*/
/*	The copyright notice above does not evidence any   	*/
/*	actual or intended publication of such source code.	*/

/*#ident	"@(#)kern-port:sys/ptms.h	10.2"*/
/*
 *	         Copyright (c) 1987 AT&T
 *		   All Rights Reserved
 *
 *     THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T
 *   The copyright notice above does not evidence any actual
 *   or intended publication of such source code.
 */


struct pt_ttys {
	ushort	 pt_state;	/* state of master/slave pair */

	queue_t *ptm_wrq; 	/* master's write queue pointer: */
				/*    non-zero => slave -> master msgs ok */
	queue_t *pts_wrq; 	/* slave's write queue pointer: */
				/*    non-zero => master -> slave msgs ok */

	ulong	 pts_cflag;	/* slave's line discipline c_cflag */
				/*    cflags we honor: CLOCAL, B0 baudrate */
	struct winsize  pts_wd;	/* slave's window size information */

	lock_t   pt_lock;	/* lock access to this structure */
	sema_t   pts_openwait;	/* slave open wait for master open */
};

/*
 * pt_state values
 */
#define PTMOPEN 01  	/* master side is open */
#define PTSOPEN 02	/* slave side is open */

/*
 * parameter values for ptx[rw]srv().
 */
#define ISSLAVE  0
#define ISMASTER 1

#define	_SYS_PTYMS_H_
#endif	/* _SYS_PTYMS_H_ */
