Cover V06, I01
Article
Figure 1
Listing 1

jan97.tar


Listing 1: Excerpt from include file

* int  (*open)(struct tty_struct * tty, struct file * filp);
*
*      This routine is called when a particular tty device is opened.
*      This routine is mandatory; if this routine is not filled in,
*      the attempted open will fail with ENODEV.
*
* void (*close)(struct tty_struct * tty, struct file * filp);
*
*      This routine is called when a particular tty device is closed.
*
* int (*write)(struct tty_struct * tty, int from_user,
*               const unsigned char *buf, int count);
*
*      This routine is called by the kernel to write a series of
*      characters to the tty device.  The characters may come from
*      user space or kernel space.  This routine will return the
*      number of characters actually accepted for writing.  This
*      routine is mandatory.
*
* void (*put_char)(struct tty_struct *tty, unsigned char ch);
*
*      This routine is called by the kernel to write a single
*      character to the tty device.  If the kernel uses this routine,
*      it must call the flush_chars() routine (if defined) when it is
*      done stuffing characters into the driver.  If there is no room
*      in the queue, the character is ignored.
*
* void (*flush_chars)(struct tty_struct *tty);
*
*      This routine is called by the kernel after it has written a
*      series of characters to the tty device using put_char().
*
* int  (*write_room)(struct tty_struct *tty);
*
*      This routine returns the numbers of characters the tty driver
*      will accept for queuing to be written.  This number is subject
*      to change as output buffers get emptied, or if the output flow
*      control is acted.
*
* int  (*ioctl)(struct tty_struct *tty, struct file * file,
*          unsigned int cmd, unsigned long arg);
*
*      This routine allows the tty driver to implement
*      device-specific ioctl's.  If the ioctl number passed in cmd
*      is not recognized by the driver, it should return ENOIOCTLCMD.
*
* void (*set_termios)(struct tty_struct *tty, struct termios * old);
*
*      This routine allows the tty driver to be notified when
*      device's termios settings have changed.  Note that a
*      well-designed tty driver should be prepared to accept the  case
*      where old == NULL, and try to do something rational.
*
* void (*set_ldisc)(struct tty_struct *tty);
*
*      This routine allows the tty driver to be notified when the
*      device's termios settings have changed.
*
* void (*throttle)(struct tty_struct * tty);
*
*      This routine notifies the tty driver that input buffers  for
*      the line discipline are close to full, and it should somehow
*      signal that no more characters should be sent to the tty.
*
* void (*unthrottle)(struct tty_struct * tty);
*
*      This routine notifies the tty drivers that it should  signal
*      that characters can now be sent to the tty without fear of
*      overrunning the input buffers of the line disciplines.
*
* void (*stop)(struct tty_struct *tty);
*
*      This routine notifies the tty driver that it should stop
*      outputting characters to the tty device.
*
* void (*start)(struct tty_struct *tty);
*
*      This routine notifies the tty driver that it resume sending
*      characters to the tty device.
*
* void (*hangup)(struct tty_struct *tty);
*
*      This routine notifies the tty driver that it should hangup the
*      tty device.
*