2 * linedisc.h -- includes for use with loadable line disciplines
5 #define KERNEL_FEATURES 1
8 #import <machine/reg.h>
27 #import <sys/kernel.h>
30 #import <machine/spl.h>
39 #import <nextdev/kmreg.h>
44 * Line discipline "kind"
45 * NORMAL_LDISC -- Normal line disciplines use tty struct clists in
47 * SPECIAL_LDISC -- Special line disciplines have private buffering
50 #define NORMAL_LDISC 0
51 #define SPECIAL_LDISC 1
53 extern int tty_ld_install(
56 int (*ld_open
)(dev_t dev
, struct tty
*tp
),
57 void (*ld_close
)(struct tty
*tp
),
58 int (*ld_read
)(struct tty
*tp
, struct uio
*uiop
),
59 int (*ld_write
)(struct tty
*tp
, struct uio
*uiop
),
60 int (*ld_ioctl
)(struct tty
*tp
, int command
, void *dataptr
, int flag
),
61 void (*ld_rint
)(int c
, struct tty
*tp
),
62 void (*ld_rend
)(char *cp
, u_int n
, struct tty
*tp
),
63 void (*ld_start
)(struct tty
*tp
),
64 int (*ld_modem
)(struct tty
*tp
, int dcd_on
),
65 int (*ld_select
)(struct tty
*tp
, int rw
)
67 extern int tty_ld_remove(int ld_number
);
68 extern void ttydevstart(struct tty
*tp
);
69 extern void ttydevstop(struct tty
*tp
);
70 extern void ttyselwait(struct tty
*tp
, int rw
);
71 extern void ttselwakeup(struct tty
*tp
);