2 * ntp_tty.h - header file for serial lines handling
8 #if defined(HAVE_BSD_TTYS)
10 #define TTY struct sgttyb
11 #endif /* HAVE_BSD_TTYS */
13 #if defined(HAVE_SYSV_TTYS)
15 #define TTY struct termio
17 #define tcsetattr(fd, cmd, arg) ioctl(fd, cmd, arg)
20 #define TCSANOW TCSETA
32 #define tcflush(fd, arg) ioctl(fd, TCFLSH, arg)
34 #endif /* HAVE_SYSV_TTYS */
36 #if defined(HAVE_TERMIOS)
37 # ifdef TERMIOS_NEEDS__SVID3
41 # ifdef TERMIOS_NEEDS__SVID3
44 #define TTY struct termios
47 #if defined(HAVE_SYS_MODEM_H)
48 #include <sys/modem.h>
51 #if !defined(SYSV_TTYS) && !defined(STREAM) & !defined(BSD_TTYS)
53 #endif /* SYSV_TTYS STREAM BSD_TTYS */
56 * Line discipline flags. These require line discipline or streams
57 * modules to be installed/loaded in the kernel. If specified, but not
58 * installed, the code runs as if unspecified.
60 #define LDISC_STD 0x0 /* standard */
61 #define LDISC_CLK 0x1 /* tty_clk \n intercept */
62 #define LDISC_CLKPPS 0x2 /* tty_clk \377 intercept */
63 #define LDISC_ACTS 0x4 /* tty_clk #* intercept */
64 #define LDISC_CHU 0x8 /* depredated */
65 #define LDISC_PPS 0x10 /* ppsclock, ppsapi */
66 #define LDISC_RAW 0x20 /* raw binary */
68 #endif /* NTP_TTY_H */