2 * Copyright (C) 2000, 2001 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
6 #ifndef __CHAN_KERN_H__
7 #define __CHAN_KERN_H__
10 #include <linux/list.h>
11 #include <linux/console.h>
12 #include "chan_user.h"
16 struct list_head list
;
17 struct list_head free_list
;
20 unsigned int primary
:1;
22 unsigned int output
:1;
23 unsigned int opened
:1;
24 unsigned int enabled
:1;
26 const struct chan_ops
*ops
;
30 extern void chan_interrupt(struct line
*line
, int irq
);
31 extern int parse_chan_pair(char *str
, struct line
*line
, int device
,
32 const struct chan_opts
*opts
, char **error_out
);
33 extern int write_chan(struct chan
*chan
, const char *buf
, int len
,
35 extern int console_write_chan(struct chan
*chan
, const char *buf
,
37 extern int console_open_chan(struct line
*line
, struct console
*co
);
38 extern void deactivate_chan(struct chan
*chan
, int irq
);
39 extern void reactivate_chan(struct chan
*chan
, int irq
);
40 extern void chan_enable_winch(struct chan
*chan
, struct tty_port
*port
);
41 extern int enable_chan(struct line
*line
);
42 extern void close_chan(struct line
*line
);
43 extern int chan_window_size(struct line
*line
,
44 unsigned short *rows_out
,
45 unsigned short *cols_out
);
46 extern int chan_config_string(struct line
*line
, char *str
, int size
,