[BACK]Return to pty.h CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Annotation of src/usr.bin/ssh/pty.h, Revision 1.6.2.1

1.1       deraadt     1: /*
1.6       markus      2:  *
1.2       deraadt     3:  * pty.h
1.6       markus      4:  *
1.2       deraadt     5:  * Author: Tatu Ylonen <ylo@cs.hut.fi>
1.6       markus      6:  *
1.2       deraadt     7:  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
                      8:  *                    All rights reserved
1.6       markus      9:  *
1.2       deraadt    10:  * Created: Fri Mar 17 05:03:28 1995 ylo
1.6       markus     11:  *
1.2       deraadt    12:  * Functions for allocating a pseudo-terminal and making it the controlling
                     13:  * tty.
                     14:  */
1.1       deraadt    15:
1.6.2.1 ! jason      16: /* RCSID("$OpenBSD: pty.h,v 1.7 2000/06/20 01:39:43 markus Exp $"); */
1.1       deraadt    17:
                     18: #ifndef PTY_H
                     19: #define PTY_H
                     20:
1.3       markus     21: /*
                     22:  * Allocates and opens a pty.  Returns 0 if no pty could be allocated, or
                     23:  * nonzero if a pty was successfully allocated.  On success, open file
                     24:  * descriptors for the pty and tty sides and the name of the tty side are
                     25:  * returned (the buffer must be able to hold at least 64 characters).
                     26:  */
1.4       deraadt    27: int     pty_allocate(int *ptyfd, int *ttyfd, char *ttyname, int ttynamelen);
1.1       deraadt    28:
1.3       markus     29: /*
                     30:  * Releases the tty.  Its ownership is returned to root, and permissions to
                     31:  * 0666.
                     32:  */
1.2       deraadt    33: void    pty_release(const char *ttyname);
1.1       deraadt    34:
1.3       markus     35: /*
                     36:  * Makes the tty the processes controlling tty and sets it to sane modes.
                     37:  * This may need to reopen the tty to get rid of possible eavesdroppers.
                     38:  */
1.2       deraadt    39: void    pty_make_controlling_tty(int *ttyfd, const char *ttyname);
1.1       deraadt    40:
                     41: /* Changes the window size associated with the pty. */
1.6       markus     42: void
1.2       deraadt    43: pty_change_window_size(int ptyfd, int row, int col,
                     44:     int xpixel, int ypixel);
1.5       markus     45:
                     46: void   pty_setowner(struct passwd *pw, const char *ttyname);
1.1       deraadt    47:
1.2       deraadt    48: #endif                         /* PTY_H */