chan_kern.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * Copyright (C) 2000, 2001 Jeff Dike (jdike@karaya.com)
  3. * Licensed under the GPL
  4. */
  5. #ifndef __CHAN_KERN_H__
  6. #define __CHAN_KERN_H__
  7. #include "linux/tty.h"
  8. #include "linux/list.h"
  9. #include "linux/console.h"
  10. #include "chan_user.h"
  11. #include "line.h"
  12. struct chan {
  13. struct list_head list;
  14. char *dev;
  15. unsigned int primary:1;
  16. unsigned int input:1;
  17. unsigned int output:1;
  18. unsigned int opened:1;
  19. int fd;
  20. enum chan_init_pri pri;
  21. struct chan_ops *ops;
  22. void *data;
  23. };
  24. extern void chan_interrupt(struct list_head *chans, struct work_struct *task,
  25. struct tty_struct *tty, int irq);
  26. extern int parse_chan_pair(char *str, struct list_head *chans, int pri,
  27. int device, struct chan_opts *opts);
  28. extern int open_chan(struct list_head *chans);
  29. extern int write_chan(struct list_head *chans, const char *buf, int len,
  30. int write_irq);
  31. extern int console_write_chan(struct list_head *chans, const char *buf,
  32. int len);
  33. extern int console_open_chan(struct line *line, struct console *co,
  34. struct chan_opts *opts);
  35. extern void close_chan(struct list_head *chans);
  36. extern void chan_enable_winch(struct list_head *chans, struct tty_struct *tty);
  37. extern void enable_chan(struct list_head *chans, struct tty_struct *tty);
  38. extern int chan_window_size(struct list_head *chans,
  39. unsigned short *rows_out,
  40. unsigned short *cols_out);
  41. extern int chan_out_fd(struct list_head *chans);
  42. extern int chan_config_string(struct list_head *chans, char *str, int size,
  43. char **error_out);
  44. #endif
  45. /*
  46. * Overrides for Emacs so that we follow Linus's tabbing style.
  47. * Emacs will notice this stuff at the end of the file and automatically
  48. * adjust the settings for this buffer only. This must remain at the end
  49. * of the file.
  50. * ---------------------------------------------------------------------------
  51. * Local variables:
  52. * c-file-style: "linux"
  53. * End:
  54. */