Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2000, 2001 Jeff Dike (jdike@karaya.com) |
| 3 | * Licensed under the GPL |
| 4 | */ |
| 5 | |
| 6 | #ifndef __CHAN_KERN_H__ |
| 7 | #define __CHAN_KERN_H__ |
| 8 | |
| 9 | #include "linux/tty.h" |
| 10 | #include "linux/list.h" |
| 11 | #include "linux/console.h" |
| 12 | #include "chan_user.h" |
| 13 | #include "line.h" |
| 14 | |
| 15 | struct chan { |
| 16 | struct list_head list; |
| 17 | char *dev; |
| 18 | unsigned int primary:1; |
| 19 | unsigned int input:1; |
| 20 | unsigned int output:1; |
| 21 | unsigned int opened:1; |
| 22 | int fd; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 23 | struct chan_ops *ops; |
| 24 | void *data; |
| 25 | }; |
| 26 | |
| 27 | extern void chan_interrupt(struct list_head *chans, struct work_struct *task, |
| 28 | struct tty_struct *tty, int irq); |
Jeff Dike | 88890b8 | 2006-01-06 00:18:52 -0800 | [diff] [blame] | 29 | extern int parse_chan_pair(char *str, struct list_head *chans, int device, |
| 30 | struct chan_opts *opts); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 31 | extern int open_chan(struct list_head *chans); |
| 32 | extern int write_chan(struct list_head *chans, const char *buf, int len, |
| 33 | int write_irq); |
| 34 | extern int console_write_chan(struct list_head *chans, const char *buf, |
| 35 | int len); |
| 36 | extern int console_open_chan(struct line *line, struct console *co, |
| 37 | struct chan_opts *opts); |
| 38 | extern void close_chan(struct list_head *chans); |
| 39 | extern void chan_enable_winch(struct list_head *chans, struct tty_struct *tty); |
| 40 | extern void enable_chan(struct list_head *chans, struct tty_struct *tty); |
| 41 | extern int chan_window_size(struct list_head *chans, |
| 42 | unsigned short *rows_out, |
| 43 | unsigned short *cols_out); |
| 44 | extern int chan_out_fd(struct list_head *chans); |
| 45 | extern int chan_config_string(struct list_head *chans, char *str, int size, |
| 46 | char **error_out); |
| 47 | |
| 48 | #endif |