RTEMS 5.2
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
pty.h
1/*
2 * /dev/ptyXX (A first version for pseudo-terminals)
3 *
4 * Author: Fernando RUIZ CASAS (fernando.ruiz@ctv.es)
5 * May 2001
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 */
11
12#ifndef _RTEMS_PTY_H
13#define _RTEMS_PTY_H
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19#include <rtems/termiostypes.h>
20
21#define RTEMS_PTY_SB_MAX 16
22
23typedef struct {
26 tcflag_t c_cflag;
27 int socket;
28 int last_cr;
29 unsigned iac_mode;
30 unsigned char sb_buf[RTEMS_PTY_SB_MAX];
31 int sb_ind;
32 int width;
33 int height;
34 char name[sizeof("/dev/pty18446744073709551615")];
36
37const char *rtems_pty_initialize(rtems_pty_context *pty, uintptr_t unique);
38
39RTEMS_INLINE_ROUTINE const char *rtems_pty_get_path(const rtems_pty_context *pty)
40{
41 return pty->name;
42}
43
44void rtems_pty_close_socket(rtems_pty_context *pty);
45
46void rtems_pty_set_socket(rtems_pty_context *pty, int socket);
47
48#ifdef __cplusplus
49}
50#endif
51
52#endif
#define RTEMS_INLINE_ROUTINE
Definition: basedefs.h:66
Definition: pty.h:23
Termios device context.
Definition: termiostypes.h:75
Definition: termiostypes.h:283
Definition: mongoose.c:456