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