patch-2.2.3 linux/include/net/irda/irttp.h
Next file: linux/include/net/irda/irtty.h
Previous file: linux/include/net/irda/irobex.h
Back to the patch index
Back to the overall index
- Lines: 145
- Date:
Sun Mar 7 15:26:44 1999
- Orig file:
v2.2.2/linux/include/net/irda/irttp.h
- Orig date:
Tue Dec 22 14:16:58 1998
diff -u --recursive --new-file v2.2.2/linux/include/net/irda/irttp.h linux/include/net/irda/irttp.h
@@ -1,12 +1,12 @@
/*********************************************************************
*
* Filename: irttp.h
- * Version: 0.3
+ * Version: 1.0
* Description: Tiny Transport Protocol (TTP) definitions
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Sun Aug 31 20:14:31 1997
- * Modified at: Sat Dec 5 13:48:12 1998
+ * Modified at: Tue Feb 2 10:55:18 1999
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
* Copyright (c) 1998 Dag Brattli <dagb@cs.uit.no>, All Rights Reserved.
@@ -33,21 +33,21 @@
#include <net/irda/qos.h>
#include <net/irda/irqueue.h>
-#define TTP_MAX_CONNECTIONS LM_MAX_CONNECTIONS
-#define TTP_HEADER 1
-#define TTP_HEADER_WITH_SAR 6
-#define TTP_PARAMETERS 0x80
-#define TTP_MORE 0x80
+#define TTP_MAX_CONNECTIONS LM_MAX_CONNECTIONS
+#define TTP_HEADER 1
+#define TTP_HEADER_WITH_SAR 6
+#define TTP_PARAMETERS 0x80
+#define TTP_MORE 0x80
#define DEFAULT_INITIAL_CREDIT 22
-#define LOW_THRESHOLD 4
-#define HIGH_THRESHOLD 8
-#define TTP_MAX_QUEUE 22
+#define LOW_THRESHOLD 4
+#define HIGH_THRESHOLD 8
+#define TTP_MAX_QUEUE 22
/* Some priorities for disconnect requests */
-#define P_NORMAL 0
-#define P_HIGH 1
+#define P_NORMAL 0
+#define P_HIGH 1
#define SAR_DISABLE 0
@@ -56,13 +56,13 @@
* connection.
*/
struct tsap_cb {
- QUEUE queue; /* For linking it into the hashbin */
- int magic; /* Just in case */
+ QUEUE queue; /* For linking it into the hashbin */
+ int magic; /* Just in case */
- int max_seg_size; /* Max data that fit into an IrLAP frame */
+ int max_seg_size; /* Max data that fit into an IrLAP frame */
- __u8 stsap_sel; /* Source TSAP */
- __u8 dtsap_sel; /* Destination TSAP */
+ __u8 stsap_sel; /* Source TSAP */
+ __u8 dtsap_sel; /* Destination TSAP */
struct lsap_cb *lsap; /* Corresponding LSAP to this TSAP */
@@ -85,8 +85,8 @@
struct irda_statistics stats;
struct timer_list todo_timer;
- int rx_sdu_busy; /* RxSdu.busy */
- int rx_sdu_size; /* The current size of a partially received frame */
+ int rx_sdu_busy; /* RxSdu.busy */
+ int rx_sdu_size; /* Current size of a partially received frame */
int rx_max_sdu_size; /* Max receive user data size */
int tx_sdu_busy; /* TxSdu.busy */
@@ -94,7 +94,8 @@
int no_defrag; /* Don't reassemble received fragments */
- int disconnect_pend; /* Disconnect, but still data to send */
+ int close_pend; /* Close, but disconnect_pend */
+ int disconnect_pend; /* Disconnect, but still data to send */
struct sk_buff *disconnect_skb;
};
@@ -107,28 +108,39 @@
int irttp_init(void);
void irttp_cleanup(void);
-struct tsap_cb *irttp_open_tsap( __u8 stsap, int credit,
- struct notify_t *notify);
-void irttp_close_tsap( struct tsap_cb *self);
-
-int irttp_data_request( struct tsap_cb *self, struct sk_buff *skb);
-int irttp_udata_request( struct tsap_cb *self, struct sk_buff *skb);
-
-void irttp_connect_request( struct tsap_cb *self, __u8 dtsap_sel, __u32 daddr,
- struct qos_info *qos, int max_sdu_size,
+struct tsap_cb *irttp_open_tsap(__u8 stsap_sel, int credit,
+ struct notify_t *notify);
+int irttp_close_tsap(struct tsap_cb *self);
+
+int irttp_data_request(struct tsap_cb *self, struct sk_buff *skb);
+int irttp_udata_request(struct tsap_cb *self, struct sk_buff *skb);
+
+void irttp_connect_request(struct tsap_cb *self, __u8 dtsap_sel,
+ __u32 saddr, __u32 daddr,
+ struct qos_info *qos, int max_sdu_size,
+ struct sk_buff *userdata);
+void irttp_connect_confirm(void *instance, void *sap, struct qos_info *qos,
+ int max_sdu_size, struct sk_buff *skb);
+void irttp_connect_response(struct tsap_cb *self, int max_sdu_size,
struct sk_buff *userdata);
-void irttp_connect_confirm( void *instance, void *sap, struct qos_info *qos,
- int max_sdu_size, struct sk_buff *skb);
-void irttp_connect_response( struct tsap_cb *self, int max_sdu_size,
- struct sk_buff *userdata);
-
-void irttp_disconnect_request( struct tsap_cb *self, struct sk_buff *skb,
- int priority);
-void irttp_flow_request( struct tsap_cb *self, LOCAL_FLOW flow);
-static __inline__ void irttp_no_reassemble( struct tsap_cb *self)
+void irttp_disconnect_request(struct tsap_cb *self, struct sk_buff *skb,
+ int priority);
+void irttp_flow_request(struct tsap_cb *self, LOCAL_FLOW flow);
+
+static __inline__ void irttp_no_reassemble(struct tsap_cb *self)
{
self->no_defrag = TRUE;
+}
+
+static __inline __u32 irttp_get_saddr(struct tsap_cb *self)
+{
+ return irlmp_get_saddr(self->lsap);
+}
+
+static __inline __u32 irttp_get_daddr(struct tsap_cb *self)
+{
+ return irlmp_get_daddr(self->lsap);
}
extern struct irttp_cb *irttp;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)