File indexing completed on 2025-05-11 08:24:13
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef _RTEMS_PTY_H
0016 #define _RTEMS_PTY_H
0017
0018 #ifdef __cplusplus
0019 extern "C" {
0020 #endif
0021
0022 #include <rtems/termiostypes.h>
0023
0024 #define RTEMS_PTY_SB_MAX 16
0025
0026 typedef struct {
0027 rtems_termios_device_context base;
0028 rtems_termios_tty *ttyp;
0029 tcflag_t c_cflag;
0030 int socket;
0031 int last_cr;
0032 unsigned iac_mode;
0033 unsigned char sb_buf[RTEMS_PTY_SB_MAX];
0034 int sb_ind;
0035 int width;
0036 int height;
0037 char name[sizeof("/dev/pty18446744073709551615")];
0038 } rtems_pty_context;
0039
0040 const char *rtems_pty_initialize(rtems_pty_context *pty, uintptr_t unique);
0041
0042 static inline const char *rtems_pty_get_path(const rtems_pty_context *pty)
0043 {
0044 return pty->name;
0045 }
0046
0047 void rtems_pty_close_socket(rtems_pty_context *pty);
0048
0049 void rtems_pty_set_socket(rtems_pty_context *pty, int socket);
0050
0051 #ifdef __cplusplus
0052 }
0053 #endif
0054
0055 #endif