Add support for named line disciplines.

This commit is contained in:
eeh 2000-11-01 23:48:34 +00:00
parent 48a167c784
commit 7607061e3f
1 changed files with 19 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: conf.h,v 1.82 2000/10/27 22:29:36 matt Exp $ */
/* $NetBSD: conf.h,v 1.83 2000/11/01 23:48:34 eeh Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -380,6 +380,9 @@ extern const char devioc[], devcls[];
* Line discipline switch table
*/
struct linesw {
char *l_name; /* Linesw name */
int l_no; /* Linesw number (compatibility) */
int (*l_open) __P((dev_t dev, struct tty *tp));
int (*l_close) __P((struct tty *tp, int flags));
int (*l_read) __P((struct tty *tp, struct uio *uio,
@ -394,7 +397,21 @@ struct linesw {
};
#ifdef _KERNEL
extern struct linesw linesw[];
extern struct linesw **linesw;
extern int nlinesw;
extern void ttyldisc_init __P((void));
int ttyldisc_add __P((struct linesw *disc, int no));
struct linesw *ttyldisc_remove __P((char *name));
struct linesw *ttyldisc_lookup __P((char *name));
/* For those defining their own line disciplines: */
#define ttynodisc ((int (*) __P((dev_t, struct tty *)))enodev)
#define ttyerrclose ((int (*) __P((struct tty *, int flags)))enodev)
#define ttyerrio ((int (*) __P((struct tty *, struct uio *, int)))enodev)
#define ttyerrinput ((int (*) __P((int c, struct tty *)))enodev)
#define ttyerrstart ((int (*) __P((struct tty *)))enodev)
int nullioctl __P((struct tty *, u_long, caddr_t, int, struct proc *));
#endif
/*