Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

irtty.h

Go to the documentation of this file.
00001 /*********************************************************************
00002  *                
00003  * Filename:      irtty.h
00004  * Version:       1.0
00005  * Description:   
00006  * Status:        Experimental.
00007  * Author:        Dag Brattli <dagb@cs.uit.no>
00008  * Created at:    Tue Dec  9 21:13:12 1997
00009  * Modified at:   Tue Jan 11 12:32:03 2000
00010  * Modified by:   Dag Brattli <dagb@cs.uit.no>
00011  *  
00012  *     Copyright (c) 1997, 1999-2000 Dag Brattli, All Rights Reserved.
00013  *      
00014  *     This program is free software; you can redistribute it and/or 
00015  *     modify it under the terms of the GNU General Public License as 
00016  *     published by the Free Software Foundation; either version 2 of 
00017  *     the License, or (at your option) any later version.
00018  *  
00019  *     Neither Dag Brattli nor University of Tromsų admit liability nor
00020  *     provide warranty for any of this software. This material is 
00021  *     provided "AS-IS" and at no charge.
00022  *     
00023  ********************************************************************/
00024 
00025 #ifndef IRTTY_H
00026 #define IRTTY_H
00027 
00028 #include <linux/if.h>
00029 #include <linux/skbuff.h>
00030 #include <linux/termios.h>
00031 #include <linux/netdevice.h>
00032 
00033 #include <net/irda/irda.h>
00034 #include <net/irda/irqueue.h>
00035 #include <net/irda/irda_device.h>
00036 
00037 /* Used by ioctl */
00038 struct irtty_info {
00039         char name[6];
00040 };
00041 
00042 #define IRTTY_IOC_MAGIC 'e'
00043 #define IRTTY_IOCTDONGLE  _IO(IRTTY_IOC_MAGIC, 1)
00044 #define IRTTY_IOCGET     _IOR(IRTTY_IOC_MAGIC, 2, struct irtty_info)
00045 #define IRTTY_IOC_MAXNR   2
00046 
00047 struct irtty_cb {
00048         queue_t q;     /* Must be first */
00049         magic_t magic;
00050 
00051         struct device *netdev; /* Yes! we are some kind of netdevice */
00052         struct irda_task *task;
00053         struct net_device_stats stats;
00054 
00055         struct tty_struct  *tty;
00056         struct irlap_cb    *irlap; /* The link layer we are binded to */
00057 
00058         chipio_t io;               /* IrDA controller information */
00059         iobuff_t tx_buff;          /* Transmit buffer */
00060         iobuff_t rx_buff;          /* Receive buffer */
00061 
00062         struct qos_info qos;       /* QoS capabilities for this device */
00063         dongle_t *dongle;          /* Dongle driver */
00064 
00065         __u32 new_speed;
00066         __u32 flags;               /* Interface flags */
00067 
00068         INFRARED_MODE mode;
00069 };
00070  
00071 int irtty_register_dongle(struct dongle_reg *dongle);
00072 void irtty_unregister_dongle(struct dongle_reg *dongle);
00073 
00074 #endif
00075 
00076 
00077 
00078 
00079