~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/net/irda/ircomm_tty.h

Version: ~ [ linux-5.3-rc4 ] ~ [ linux-5.2.8 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.66 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.138 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.189 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.189 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.71 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  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:   Fri Jan 28 13:16:57 2000
 10  * Modified by:   Dag Brattli <dagb@cs.uit.no>
 11  * 
 12  *     Copyright (c) 1999-2000 Dag Brattli, All Rights Reserved.
 13  *     
 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.
 18  * 
 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.
 23  * 
 24  *     You should have received a copy of the GNU General Public License 
 25  *     along with this program; if not, see <http://www.gnu.org/licenses/>.
 26  *     
 27  ********************************************************************/
 28 
 29 #ifndef IRCOMM_TTY_H
 30 #define IRCOMM_TTY_H
 31 
 32 #include <linux/serial.h>
 33 #include <linux/termios.h>
 34 #include <linux/timer.h>
 35 #include <linux/tty.h>          /* struct tty_struct */
 36 
 37 #include <net/irda/irias_object.h>
 38 #include <net/irda/ircomm_core.h>
 39 #include <net/irda/ircomm_param.h>
 40 
 41 #define IRCOMM_TTY_PORTS 32
 42 #define IRCOMM_TTY_MAGIC 0x3432
 43 #define IRCOMM_TTY_MAJOR 161
 44 #define IRCOMM_TTY_MINOR 0
 45 
 46 /* This is used as an initial value to max_header_size before the proper
 47  * value is filled in (5 for ttp, 4 for lmp). This allow us to detect
 48  * the state of the underlying connection. - Jean II */
 49 #define IRCOMM_TTY_HDR_UNINITIALISED    16
 50 /* Same for payload size. See qos.c for the smallest max data size */
 51 #define IRCOMM_TTY_DATA_UNINITIALISED   (64 - IRCOMM_TTY_HDR_UNINITIALISED)
 52 
 53 /*
 54  * IrCOMM TTY driver state
 55  */
 56 struct ircomm_tty_cb {
 57         irda_queue_t queue;            /* Must be first */
 58         struct tty_port port;
 59         magic_t magic;
 60 
 61         int state;                /* Connect state */
 62 
 63         struct ircomm_cb *ircomm; /* IrCOMM layer instance */
 64 
 65         struct sk_buff *tx_skb;   /* Transmit buffer */
 66         struct sk_buff *ctrl_skb; /* Control data buffer */
 67 
 68         /* Parameters */
 69         struct ircomm_params settings;
 70 
 71         __u8 service_type;        /* The service that we support */
 72         int client;               /* True if we are a client */
 73         LOCAL_FLOW flow;          /* IrTTP flow status */
 74 
 75         int line;
 76 
 77         __u8 dlsap_sel;
 78         __u8 slsap_sel;
 79 
 80         __u32 saddr;
 81         __u32 daddr;
 82 
 83         __u32 max_data_size;   /* Max data we can transmit in one packet */
 84         __u32 max_header_size; /* The amount of header space we must reserve */
 85         __u32 tx_data_size;     /* Max data size of current tx_skb */
 86 
 87         struct iriap_cb *iriap; /* Instance used for querying remote IAS */
 88         struct ias_object* obj;
 89         void *skey;
 90         void *ckey;
 91 
 92         struct timer_list watchdog_timer;
 93         struct work_struct  tqueue;
 94 
 95         /* Protect concurent access to :
 96          *      o self->ctrl_skb
 97          *      o self->tx_skb
 98          * Maybe other things may gain to be protected as well...
 99          * Jean II */
100         spinlock_t spinlock;
101 };
102 
103 void ircomm_tty_start(struct tty_struct *tty);
104 void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self);
105 
106 int ircomm_tty_tiocmget(struct tty_struct *tty);
107 int ircomm_tty_tiocmset(struct tty_struct *tty, unsigned int set,
108                         unsigned int clear);
109 int ircomm_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
110                      unsigned long arg);
111 void ircomm_tty_set_termios(struct tty_struct *tty,
112                             struct ktermios *old_termios);
113 
114 #endif
115 
116 
117 
118 
119 
120 
121 
122 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp