blob: d8f886d76a3d95e55f8b61340efbdeead12692a6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
/*
* /dev/ptyXX (A first version for pseudo-terminals)
*
* Author: Fernando RUIZ CASAS (fernando.ruiz@ctv.es)
* May 2001
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
#ifndef _RTEMS_PTY_H
#define _RTEMS_PTY_H
#ifdef __cplusplus
extern "C" {
#endif
#include <rtems/termiostypes.h>
#define RTEMS_PTY_SB_MAX 16
typedef struct {
rtems_termios_device_context base;
rtems_termios_tty *ttyp;
tcflag_t c_cflag;
int socket;
int last_cr;
unsigned iac_mode;
unsigned char sb_buf[RTEMS_PTY_SB_MAX];
int sb_ind;
int width;
int height;
char name[sizeof("/dev/pty18446744073709551615")];
} rtems_pty_context;
char *telnet_get_pty(rtems_pty_context *ctx, int socket);
#ifdef __cplusplus
}
#endif
#endif
|