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