Module Name:    src
Committed By:   dyoung
Date:           Tue Feb  1 15:53:31 UTC 2011

Modified Files:
        src/share/man/man4: pty.4

Log Message:
Describe TIOCEXT.  Improve description of TIOCPKT_IOCTL.  Tell the
width of some TIOCxxx parameters.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/share/man/man4/pty.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man4/pty.4
diff -u src/share/man/man4/pty.4:1.12 src/share/man/man4/pty.4:1.13
--- src/share/man/man4/pty.4:1.12	Fri Oct 13 20:30:16 2006
+++ src/share/man/man4/pty.4	Tue Feb  1 15:53:31 2011
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pty.4,v 1.12 2006/10/13 20:30:16 wiz Exp $
+.\"	$NetBSD: pty.4,v 1.13 2011/02/01 15:53:31 dyoung Exp $
 .\"
 .\" Copyright (c) 1983, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"     @(#)pty.4	8.2 (Berkeley) 11/30/93
 .\"
-.Dd October 7, 2006
+.Dd February 1, 2011
 .Dt PTY 4
 .Os
 .Sh NAME
@@ -72,6 +72,21 @@
 .Xr ioctl 2
 calls apply only to pseudo terminals:
 .Bl -tag -width TIOCREMOTE
+.It Dv TIOCEXT
+Enable/disable
+.Dq "external processing" .
+This affects delivery of
+.Dv TIOCPKT_IOCTL
+packets.
+External processing is enabled by specifying (by reference) a nonzero
+.Vt int
+parameter and disabled by specifying (by reference) a zero
+.Vt int
+parameter.
+.Pp
+.Dv TIOCEXT
+is reset to its default (disabled) when the slave closes the
+.Nm .
 .It Dv TIOCSTOP
 Stops output to a terminal (e.g. like typing
 .Ql ^S ) .
@@ -88,7 +103,10 @@
 .Em packet
 mode.
 Packet mode is enabled by specifying (by reference) a nonzero
-parameter and disabled by specifying (by reference) a zero parameter.
+.Vt int
+parameter and disabled by specifying (by reference) a zero
+.Vt int
+parameter.
 When applied to the master side of a pseudo
 terminal, each subsequent
 .Xr read 2
@@ -139,13 +157,28 @@
 .It Dv TIOCPKT_IOCTL
 When this bit is set, the slave has changed the
 .Xr termios 4
-structure (TTY state), and the remainder of the data read from
+structure (TTY state),
+and the remainder of the data read from
 the master side of the
 .Nm
-is a copy of the new
+is the new
+.Xr termios 4
+structure.
+The master side of the
+.Nm
+can also use
+.Xr tcgetattr 3
+to read the new
 .Xr termios 4
 structure.
 .Pp
+The master will not read packets with the bit
+.Dv TIOCPKT_IOCTL
+set until it has activated
+.Dq "external processing"
+using 
+.Dv TIOCEXT .
+.Pp
 This is used by
 .Xr telnetd 8
 to implement TELNET "line mode" - it allows the
@@ -168,8 +201,12 @@
 modes are mutually exclusive.
 This mode is enabled from the master side of a pseudo terminal
 by specifying (by reference)
-a nonzero parameter and disabled by specifying (by reference)
-a zero parameter.
+a nonzero
+.Vt int
+parameter and disabled by specifying (by reference)
+a zero
+.Vt int
+parameter.
 Each subsequent
 .Xr read 2
 from the master side will return data written on the slave part of

Reply via email to