source: rtems/cpukit/include/rtems/pty.h @ 878487b0

5
Last change on this file since 878487b0 was 0dc303f, checked in by Sebastian Huber <sebastian.huber@…>, on 10/10/18 at 08:40:21

telnetd: Create sessions at start

Update #3543.

  • Property mode set to 100644
File size: 1.3 KB
Line 
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 {
24  rtems_termios_device_context  base;
25  rtems_termios_tty            *ttyp;
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")];
35} rtems_pty_context;
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
Note: See TracBrowser for help on using the repository browser.