root/include/linux/tty_ldisc.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 #ifndef _LINUX_TTY_LDISC_H
   2 #define _LINUX_TTY_LDISC_H
   3 
   4 /*
   5  * Definitions for the tty line discipline
   6  */
   7 
   8 struct tty_ldisc {
   9         int     magic;
  10         int     num;
  11         int     flags;
  12         /*
  13          * The following routines are called from above.
  14          */
  15         int     (*open)(struct tty_struct *);
  16         void    (*close)(struct tty_struct *);
  17         void    (*flush_buffer)(struct tty_struct *tty);
  18         int     (*chars_in_buffer)(struct tty_struct *tty);
  19         int     (*read)(struct tty_struct * tty, struct file * file,
  20                         unsigned char * buf, unsigned int nr);
  21         int     (*write)(struct tty_struct * tty, struct file * file,
  22                          unsigned char * buf, unsigned int nr); 
  23         int     (*ioctl)(struct tty_struct * tty, struct file * file,
  24                          unsigned int cmd, unsigned long arg);
  25         void    (*set_termios)(struct tty_struct *tty, struct termios * old);
  26         int     (*select)(struct tty_struct * tty, struct inode * inode,
  27                           struct file * file, int sel_type,
  28                           struct select_table_struct *wait);
  29         
  30         /*
  31          * The following routines are called from below.
  32          */
  33         void    (*receive_buf)(struct tty_struct *, unsigned char *cp,
  34                                char *fp, int count);
  35         int     (*receive_room)(struct tty_struct *);
  36         void    (*write_wakeup)(struct tty_struct *);
  37 };
  38 
  39 #define TTY_LDISC_MAGIC 0x5403
  40 
  41 #define LDISC_FLAG_DEFINED      0x00000001
  42 
  43 #endif /* _LINUX_TTY_LDISC_H */

/* [previous][next][first][last][top][bottom][index][help] */