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 |
---|
16 | extern "C" { |
---|
17 | #endif |
---|
18 | |
---|
19 | #include <rtems.h> |
---|
20 | |
---|
21 | /* Number of ptys to setup */ |
---|
22 | extern size_t rtems_pty_maximum_ptys; |
---|
23 | |
---|
24 | /* Return the devname for a free pty slot. |
---|
25 | * If no slot available (socket>=0) |
---|
26 | * then the socket argument is closed |
---|
27 | */ |
---|
28 | char * rtems_pty_get(int socket); |
---|
29 | |
---|
30 | |
---|
31 | /* OBSOLETE */ |
---|
32 | #define get_pty rtems_pty_get |
---|
33 | |
---|
34 | rtems_device_driver pty_initialize( |
---|
35 | rtems_device_major_number major, |
---|
36 | rtems_device_minor_number minor, |
---|
37 | void *arg); |
---|
38 | rtems_device_driver pty_open( |
---|
39 | rtems_device_major_number major, |
---|
40 | rtems_device_minor_number minor, |
---|
41 | void * arg); |
---|
42 | rtems_device_driver pty_close( |
---|
43 | rtems_device_major_number major, |
---|
44 | rtems_device_minor_number minor, |
---|
45 | void * arg); |
---|
46 | rtems_device_driver pty_read( |
---|
47 | rtems_device_major_number major, |
---|
48 | rtems_device_minor_number minor, |
---|
49 | void * arg); |
---|
50 | rtems_device_driver pty_write( |
---|
51 | rtems_device_major_number major, |
---|
52 | rtems_device_minor_number minor, |
---|
53 | void * arg); |
---|
54 | rtems_device_driver pty_control( |
---|
55 | rtems_device_major_number major, |
---|
56 | rtems_device_minor_number minor, |
---|
57 | void * arg); |
---|
58 | |
---|
59 | |
---|
60 | #define PTY_DRIVER_TABLE_ENTRY \ |
---|
61 | { pty_initialize , pty_open , pty_close , \ |
---|
62 | pty_read , pty_write , pty_control } |
---|
63 | |
---|
64 | #ifdef __cplusplus |
---|
65 | } |
---|
66 | #endif |
---|
67 | |
---|
68 | #endif |
---|