* add p cc
[mascara-docs.git] / i386 / linux / linux-2.3.21 / include / net / irda / ircomm_tty.h
blob500baba378e9e17ca985bd6232aec7e930b72e2a
1 /*********************************************************************
2 *
3 * Filename: ircomm_tty.h
4 * Version:
5 * Description:
6 * Status: Experimental.
7 * Author: Dag Brattli <dagb@cs.uit.no>
8 * Created at: Sun Jun 6 23:24:22 1999
9 * Modified at: Tue Aug 31 10:22:02 1999
10 * Modified by: Dag Brattli <dagb@cs.uit.no>
12 * Copyright (c) 1999 Dag Brattli, All Rights Reserved.
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License as
16 * published by the Free Software Foundation; either version 2 of
17 * the License, or (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
27 * MA 02111-1307 USA
29 ********************************************************************/
31 #ifndef IRCOMM_TTY_H
32 #define IRCOMM_TTY_H
34 #include <linux/serial.h>
36 #include <net/irda/irias_object.h>
37 #include <net/irda/ircomm_core.h>
38 #include <net/irda/ircomm_param.h>
40 #define IRCOMM_TTY_PORTS 32
41 #define IRCOMM_TTY_MAGIC 0x3432
42 #define IRCOMM_TTY_MAJOR 161
43 #define IRCOMM_TTY_MINOR 0
46 * IrCOMM TTY driver state
48 struct ircomm_tty_cb {
49 QUEUE queue;
50 magic_t magic;
52 int state;
54 struct tty_struct *tty;
55 struct ircomm_cb *ircomm;
57 struct sk_buff_head tx_queue; /* Frames to be transmitted */
58 struct sk_buff *tx_skb;
59 struct sk_buff *ctrl_skb;
61 /* Parameters */
62 struct ircomm_params session;
64 __u8 service_type;
66 int line;
67 int flags;
69 __u8 dlsap_sel;
70 __u8 slsap_sel;
72 __u32 saddr;
73 __u32 daddr;
75 __u32 max_data_size;
76 __u32 max_header_size;
78 struct ias_object* obj;
79 int skey;
80 int ckey;
82 struct termios normal_termios;
83 struct termios callout_termios;
85 wait_queue_head_t open_wait;
86 wait_queue_head_t close_wait;
87 struct timer_list watchdog_timer;
88 struct tq_struct tqueue;
90 unsigned short close_delay;
91 unsigned short closing_wait; /* time to wait before closing */
93 long pgrp; /* pgrp of opening process */
94 int open_count;
95 int blocked_open; /* # of blocked opens */
98 void ircomm_tty_start(struct tty_struct *tty);
99 void ircomm_tty_stop(struct tty_struct *tty);
100 void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self);
102 extern void ircomm_tty_change_speed(struct ircomm_tty_cb *self);
103 extern int ircomm_tty_ioctl(struct tty_struct *tty, struct file *file,
104 unsigned int cmd, unsigned long arg);
105 extern void ircomm_tty_set_termios(struct tty_struct *tty,
106 struct termios *old_termios);
107 extern hashbin_t *ircomm_tty;
109 #endif