1 '\" te 2 .\" Copyright 1989 AT&T 3 .\" Copyright (C) 1999, Sun Microsystems, Inc. All Rights Reserved 4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. 5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. 6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] 7 .TH PTEM 7M "Jul 3, 1990" 8 .SH NAME 9 ptem \- STREAMS Pseudo Terminal Emulation module 10 .SH SYNOPSIS 11 .LP 12 .nf 13 \fBint ioctl(\fR\fIfd\fR, \fBI_PUSH\fR,\fB "ptem");\fR 14 .fi 15 16 .SH DESCRIPTION 17 .sp 18 .LP 19 \fBptem\fR is a STREAMS module that, when used in conjunction with a line 20 discipline and pseudo terminal driver, emulates a terminal. 21 .sp 22 .LP 23 The \fBptem\fR module must be pushed (see \fBI_PUSH\fR, \fBstreamio\fR(7I)) 24 onto the slave side of a pseudo terminal STREAM, before the \fBldterm\fR(7M) 25 module is pushed. 26 .sp 27 .LP 28 On the write-side, the \fBTCSETA\fR, \fBTCSETAF\fR, \fBTCSETAW\fR, 29 \fBTCGETA\fR, \fBTCSETS\fR, \fBTCSETSW\fR, \fBTCSETSF\fR, \fBTCGETS\fR, 30 \fBTCSBRK\fR, \fBJWINSIZE\fR, \fBTIOCGWINSZ\fR, and \fBTIOCSWINSZ\fR 31 \fBtermio\fR \fBioctl\fR(2) messages are processed and acknowledged. If remote 32 mode is not in effect, \fBptem\fR handles the \fBTIOCSTI\fR ioctl by copying 33 the argument bytes into an \fBM_DATA\fR message and passing it back up the 34 read side. Regardless of the remote mode setting, \fBptem\fR acknowledges the 35 ioctl and passes a copy of it downstream for possible further processing. A 36 hang up (that is, \fBstty 0\fR) is converted to a zero length \fBM_DATA\fR 37 message and passed downstream. Termio \fBcflags\fR and window row and column 38 information are stored locally one per stream. \fBM_DELAY\fR messages are 39 discarded. All other messages are passed downstream unmodified. 40 .sp 41 .LP 42 On the read-side all messages are passed upstream unmodified with the following 43 exceptions. All \fBM_READ\fR and \fBM_DELAY\fR messages are freed in both 44 directions. A \fBTCSBRK\fR ioctl is converted to an \fBM_BREAK\fR message and 45 passed upstream and an acknowledgement is returned downstream. A 46 \fBTIOCSIGNAL\fR ioctl is converted into an \fBM_PCSIG\fR message, and passed 47 upstream and an acknowledgement is returned downstream. Finally a 48 \fBTIOCREMOTE\fR ioctl is converted into an \fBM_CTL\fR message, acknowledged, 49 and passed upstream; the resulting mode is retained for use in subsequent 50 \fBTIOCSTI\fR parsing. 51 .SH FILES 52 .sp 53 .ne 2 54 .na 55 \fB<\fBsys/ptem.h\fR> \fR 56 .ad 57 .RS 17n 58 59 .RE 60 61 .SH SEE ALSO 62 .sp 63 .LP 64 \fBstty\fR(1), \fBioctl\fR(2), \fBldterm\fR(7M), \fBpckt\fR(7M), 65 \fBstreamio\fR(7I), \fBtermio\fR(7I) 66 .sp 67 .LP 68 \fISTREAMS Programming Guide\fR