]> andersk Git - openssh.git/blame - pty.h
- Big OpenBSD CVS update (mainly beginnings of SSH2 infrastructure)
[openssh.git] / pty.h
CommitLineData
8efc0c15 1/*
5260325f 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 */
8efc0c15 15
16/* RCSID("$Id$"); */
17
18#ifndef PTY_H
19#define PTY_H
20
aa3378df 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 */
a408af76 27int pty_allocate(int *ptyfd, int *ttyfd, char *ttyname, int ttynamelen);
8efc0c15 28
aa3378df 29/*
30 * Releases the tty. Its ownership is returned to root, and permissions to
31 * 0666.
32 */
5260325f 33void pty_release(const char *ttyname);
8efc0c15 34
aa3378df 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 */
5260325f 39void pty_make_controlling_tty(int *ttyfd, const char *ttyname);
8efc0c15 40
41/* Changes the window size associated with the pty. */
5260325f 42void
43pty_change_window_size(int ptyfd, int row, int col,
44 int xpixel, int ypixel);
8efc0c15 45
817175bc 46void pty_setowner(struct passwd *pw, const char *ttyname);
47
5260325f 48#endif /* PTY_H */
This page took 0.063172 seconds and 5 git commands to generate.