patch-2.2.0-pre9 linux/include/net/irda/irobex.h

Next file: linux/include/net/irda/irport.h
Previous file: linux/include/net/irda/irmod.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.0-pre8/linux/include/net/irda/irobex.h linux/include/net/irda/irobex.h
@@ -6,7 +6,7 @@
  * Status:        Experimental.
  * Author:        Dag Brattli <dagb@cs.uit.no>
  * Created at:    Sat Jul  4 22:43:57 1998
- * Modified at:   Mon Oct 19 12:32:33 1998
+ * Modified at:   Wed Jan 13 15:55:28 1999
  * Modified by:   Dag Brattli <dagb@cs.uit.no>
  * 
  *     Copyright (c) 1998 Dag Brattli, All Rights Reserved.
@@ -50,21 +50,29 @@
 #define IROBEX_IOCSDISCONNECT _IOW(IROBEX_IOC_MAGIC, 2, 4)
 #define IROBEX_IOC_MAXNR 2
 
-
 #define IROBEX_MAX_HEADER (TTP_HEADER+LMP_HEADER+LAP_HEADER)
 
+typedef enum {
+	OBEX_IDLE,       /* Doing nothing */
+	OBEX_DISCOVER,   /* Trying to discovery remote device */
+	OBEX_QUERY,      /* Querying remote LM-IAS */
+	OBEX_CONN,       /* Trying to connect to remote device */
+	OBEX_DATA,       /* Data transfer ready */
+} OBEX_STATE;
+
 struct irobex_cb {
 	QUEUE queue;        /* Must be first! */
 
         int magic;          /* magic used to detect corruption of the struct */
 
+	OBEX_STATE state;   /* Current state */
+
 	__u32 saddr;        /* my local address */
 	__u32 daddr;        /* peer address */
 	unsigned long time_discovered;
 
         char devname[9];    /* name of the registered device */
 	struct tsap_cb *tsap;
-	int connected;
 	int eof;
 
 	__u8 dtsap_sel;         /* remote TSAP address */
@@ -81,11 +89,6 @@
 	struct wait_queue *read_wait;
 	struct wait_queue *write_wait;
 
-	/* These wait queues are used for setting up a connections */
-	struct wait_queue *connect_wait;
-	struct wait_queue *discover_wait;
-	struct wait_queue *ias_wait;
-
 	struct fasync_struct *async;
 
 	struct timer_list watchdog_timer;
@@ -121,13 +124,11 @@
 
 void irobex_watchdog_timer_expired( unsigned long data);
 
-inline void irobex_start_watchdog_timer( struct irobex_cb *self, 
-						int timeout) 
+inline void irobex_start_watchdog_timer( struct irobex_cb *self, int timeout) 
 {
 	irda_start_timer( &self->watchdog_timer, timeout, (unsigned long) self,
 			  irobex_watchdog_timer_expired);
 }
-
 
 extern struct irobex_cb *irobex;
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov