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

irttp.h File Reference

#include <linux/types.h>
#include <linux/skbuff.h>
#include <asm/spinlock.h>
#include <net/irda/irda.h>
#include <net/irda/irlmp.h>
#include <net/irda/qos.h>
#include <net/irda/irqueue.h>

Include dependency graph for irttp.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define TTP_MAX_CONNECTIONS   LM_MAX_CONNECTIONS
#define TTP_HEADER   1
#define TTP_MAX_HEADER   (TTP_HEADER + LMP_MAX_HEADER)
#define TTP_SAR_HEADER   5
#define TTP_PARAMETERS   0x80
#define TTP_MORE   0x80
#define DEFAULT_INITIAL_CREDIT   14
#define TTP_LOW_THRESHOLD   4
#define TTP_HIGH_THRESHOLD   10
#define TTP_MAX_QUEUE   14
#define P_NORMAL   0
#define P_HIGH   1
#define TTP_SAR_DISABLE   0
#define TTP_SAR_UNBOUND   0xffffffff
#define TTP_MAX_SDU_SIZE   0x01

Functions

int irttp_init (void)
void irttp_cleanup (void)
tsap_cbirttp_open_tsap (__u8 stsap_sel, int credit, 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)
int irttp_connect_request (struct tsap_cb *self, __u8 dtsap_sel, __u32 saddr, __u32 daddr, struct qos_info *qos, __u32 max_sdu_size, struct sk_buff *userdata)
int irttp_connect_response (struct tsap_cb *self, __u32 max_sdu_size, struct sk_buff *userdata)
int irttp_disconnect_request (struct tsap_cb *self, struct sk_buff *skb, int priority)
void irttp_flow_request (struct tsap_cb *self, LOCAL_FLOW flow)
tsap_cbirttp_dup (struct tsap_cb *self, void *instance)
static __inline __u32 irttp_get_saddr (struct tsap_cb *self)
static __inline __u32 irttp_get_daddr (struct tsap_cb *self)
static __inline __u32 irttp_get_max_seg_size (struct tsap_cb *self)

Variables

irttp_cbirttp


Define Documentation

#define DEFAULT_INITIAL_CREDIT   14
 

Definition at line 45 of file irttp.h.

Referenced by ircomm_open_tsap(), irda_open_tsap(), irlan_client_open_ctrl_tsap(), and irlan_open_data_tsap().

#define P_HIGH   1
 

Definition at line 53 of file irttp.h.

Referenced by irttp_disconnect_request().

#define P_NORMAL   0
 

Definition at line 52 of file irttp.h.

Referenced by ircomm_ttp_disconnect_request(), irda_destroy_socket(), irda_shutdown(), irlan_close_tsaps(), irttp_close_tsap(), irttp_disconnect_request(), and irttp_todo_expired().

#define TTP_HEADER   1
 

Definition at line 39 of file irttp.h.

Referenced by irttp_connect_confirm(), irttp_connect_indication(), irttp_connect_request(), irttp_connect_response(), irttp_data_request(), irttp_do_data_indication(), irttp_fragment_skb(), irttp_reassemble_skb(), and irttp_run_rx_queue().

#define TTP_HIGH_THRESHOLD   10
 

Definition at line 48 of file irttp.h.

Referenced by irttp_data_request().

#define TTP_LOW_THRESHOLD   4
 

Definition at line 47 of file irttp.h.

Referenced by irttp_data_indication(), irttp_run_tx_queue(), and irttp_todo_expired().

#define TTP_MAX_CONNECTIONS   LM_MAX_CONNECTIONS
 

Definition at line 38 of file irttp.h.

#define TTP_MAX_HEADER   (TTP_HEADER + LMP_MAX_HEADER)
 

Definition at line 40 of file irttp.h.

Referenced by irttp_connect_request(), irttp_connect_response(), and irttp_disconnect_request().

#define TTP_MAX_QUEUE   14
 

Definition at line 49 of file irttp.h.

Referenced by irttp_data_request(), and irttp_open_tsap().

#define TTP_MAX_SDU_SIZE   0x01
 

Definition at line 59 of file irttp.h.

#define TTP_MORE   0x80
 

Definition at line 43 of file irttp.h.

Referenced by irttp_fragment_skb().

#define TTP_PARAMETERS   0x80
 

Definition at line 42 of file irttp.h.

Referenced by irttp_connect_request(), and irttp_connect_response().

#define TTP_SAR_DISABLE   0
 

Definition at line 55 of file irttp.h.

Referenced by ircomm_ttp_connect_confirm(), ircomm_ttp_connect_indication(), ircomm_ttp_connect_request(), ircomm_ttp_connect_response(), irda_create(), and irttp_run_rx_queue().

#define TTP_SAR_HEADER   5
 

Definition at line 41 of file irttp.h.

Referenced by irttp_connect_request(), and irttp_connect_response().

#define TTP_SAR_UNBOUND   0xffffffff
 

Definition at line 56 of file irttp.h.

Referenced by irda_create(), irttp_data_request(), and irttp_run_rx_queue().


Function Documentation

void irttp_cleanup void   ) 
 

int irttp_close_tsap struct tsap_cb self  ) 
 

Definition at line 228 of file irttp.c.

References __irttp_close_tsap(), ASSERT, tsap_cb::connected, tsap_cb::disconnect_pend, hashbin_remove(), HZ, IRDA_DEBUG, irlmp_close_lsap(), irttp_disconnect_request(), irttp_start_todo_timer(), tsap_cb::magic, NULL, P_NORMAL, TRUE, irttp_cb::tsaps, and TTP_TSAP_MAGIC.

Referenced by __ircomm_close(), irda_destroy_socket(), irda_shutdown(), irlan_close_tsaps(), irttp_disconnect_indication(), and irttp_todo_expired().

Here is the call graph for this function:

int irttp_connect_request struct tsap_cb self,
__u8  dtsap_sel,
__u32  saddr,
__u32  daddr,
struct qos_info qos,
__u32  max_sdu_size,
struct sk_buff userdata
 

Definition at line 640 of file irttp.c.

References ASSERT, tsap_cb::connected, cpu_to_be16, EBADR, EISCONN, ENOMEM, FALSE, IRDA_DEBUG, irlmp_connect_request(), tsap_cb::lsap, tsap_cb::magic, n, NULL, put_unaligned, TTP_HEADER, TTP_MAX_HEADER, TTP_PARAMETERS, TTP_SAR_HEADER, and TTP_TSAP_MAGIC.

Referenced by ircomm_ttp_connect_request(), irda_connect(), irlan_client_state_arb(), irlan_client_state_open(), and irlan_client_state_query().

Here is the call graph for this function:

int irttp_connect_response struct tsap_cb self,
__u32  max_sdu_size,
struct sk_buff userdata
 

Definition at line 887 of file irttp.c.

References ASSERT, cpu_to_be16, ENOMEM, FALSE, IRDA_DEBUG, irlmp_connect_response(), tsap_cb::lsap, tsap_cb::magic, n, NULL, put_unaligned, ret, tsap_cb::stsap_sel, TRUE, TTP_HEADER, TTP_MAX_HEADER, TTP_PARAMETERS, TTP_SAR_HEADER, and TTP_TSAP_MAGIC.

Referenced by ircomm_ttp_connect_response(), irda_connect_response(), and irlan_provider_connect_response().

Here is the call graph for this function:

int irttp_data_request struct tsap_cb self,
struct sk_buff skb
 

Definition at line 302 of file irttp.c.

References ASSERT, tsap_cb::connected, EMSGSIZE, ENOBUFS, ENOTCONN, ERROR, notify_t::flow_indication, FLOW_STOP, notify_t::instance, irttp_fragment_skb(), irttp_run_tx_queue(), sk_buff::len, tsap_cb::max_seg_size, tsap_cb::notify, TRUE, TTP_HEADER, TTP_HIGH_THRESHOLD, TTP_MAX_QUEUE, TTP_SAR_UNBOUND, tsap_cb::tx_max_sdu_size, tsap_cb::tx_queue, tsap_cb::tx_sdu_busy, and WARNING.

Referenced by ircomm_ttp_data_request(), irda_sendmsg(), irlan_client_reconnect_data_channel(), irlan_eth_xmit(), irlan_provider_send_reply(), and irlan_run_ctrl_tx_queue().

Here is the call graph for this function:

int irttp_disconnect_request struct tsap_cb self,
struct sk_buff skb,
int  priority
 

Definition at line 1011 of file irttp.c.

References ASSERT, tsap_cb::connected, dev_kfree_skb, tsap_cb::disconnect_pend, ENOMEM, FALSE, IRDA_DEBUG, irlmp_disconnect_request(), irttp_flush_queues(), irttp_run_rx_queue(), irttp_run_tx_queue(), irttp_start_todo_timer(), tsap_cb::lsap, tsap_cb::magic, MSECS_TO_JIFFIES, NULL, P_HIGH, P_NORMAL, ret, TRUE, TTP_MAX_HEADER, TTP_TSAP_MAGIC, and tsap_cb::tx_queue.

Referenced by ircomm_ttp_disconnect_request(), irda_destroy_socket(), irda_shutdown(), irlan_close_tsaps(), irttp_close_tsap(), and irttp_todo_expired().

Here is the call graph for this function:

struct tsap_cb* irttp_dup struct tsap_cb self,
void *  instance
 

Definition at line 972 of file irttp.c.

References hashbin_find(), hashbin_insert(), init_timer(), IRDA_DEBUG, irlmp_dup(), kmalloc(), memcpy, NULL, and irttp_cb::tsaps.

Referenced by irda_accept().

Here is the call graph for this function:

void irttp_flow_request struct tsap_cb self,
LOCAL_FLOW  flow
 

Definition at line 611 of file irttp.c.

References ASSERT, FALSE, FLOW_START, FLOW_STOP, IRDA_DEBUG, irttp_run_rx_queue(), tsap_cb::magic, NULL, TRUE, and TTP_TSAP_MAGIC.

Referenced by ircomm_flow_request(), irda_recvmsg_dgram(), and irda_recvmsg_stream().

Here is the call graph for this function:

static __inline __u32 irttp_get_daddr struct tsap_cb self  )  [static]
 

Definition at line 139 of file irttp.h.

References irlmp_get_daddr(), and tsap_cb::lsap.

Referenced by irda_accept(), and irlan_provider_connect_indication().

Here is the call graph for this function:

static __inline __u32 irttp_get_max_seg_size struct tsap_cb self  )  [static]
 

Definition at line 144 of file irttp.h.

Referenced by ircomm_ttp_connect_confirm(), ircomm_ttp_connect_indication(), irda_connect_confirm(), and irda_connect_indication().

static __inline __u32 irttp_get_saddr struct tsap_cb self  )  [static]
 

Definition at line 134 of file irttp.h.

References irlmp_get_saddr(), and tsap_cb::lsap.

Referenced by irda_accept(), and irlan_provider_connect_indication().

Here is the call graph for this function:

int irttp_init void   ) 
 

Definition at line 80 of file irttp.c.

References ENOMEM, ERROR, hashbin_new(), HB_LOCAL, kmalloc(), memset, NULL, and TTP_MAGIC.

Referenced by irda_init().

Here is the call graph for this function:

struct tsap_cb* irttp_open_tsap __u8  stsap_sel,
int  credit,
notify_t notify
 

Definition at line 133 of file irttp.c.

References ASSERT, notify_t::connect_confirm, notify_t::connect_indication, notify_t::data_indication, notify_t::disconnect_indication, FALSE, hashbin_insert(), init_timer(), notify_t::instance, IRDA_DEBUG, irda_notify_init(), irlmp_open_lsap(), irttp_connect_confirm(), irttp_connect_indication(), irttp_data_indication(), irttp_disconnect_indication(), irttp_udata_indication(), kmalloc(), irttp_cb::magic, memset, notify_t::name, NOTIFY_MAX_NAME, NULL, lsap_cb::slsap_sel, spin_lock_init, strncpy, irttp_cb::tsaps, TTP_MAGIC, TTP_MAX_QUEUE, TTP_TSAP_MAGIC, notify_t::udata_indication, and WARNING.

Referenced by ircomm_open_tsap(), irda_open_tsap(), irlan_client_open_ctrl_tsap(), irlan_open_data_tsap(), and irlan_provider_open_ctrl_tsap().

Here is the call graph for this function:

int irttp_udata_request struct tsap_cb self,
struct sk_buff skb
 

Definition at line 271 of file irttp.c.

References ASSERT, tsap_cb::connected, IRDA_DEBUG, irlmp_udata_request(), sk_buff::len, tsap_cb::lsap, tsap_cb::magic, tsap_cb::max_seg_size, NULL, and TTP_TSAP_MAGIC.

Referenced by irda_sendmsg_dgram(), and irlan_eth_xmit().

Here is the call graph for this function:


Variable Documentation

struct irttp_cb* irttp