Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
irlap.h File Reference
#include <linux/types.h>
#include <linux/skbuff.h>
#include <linux/netdevice.h>
#include <linux/timer.h>
#include <net/irda/irqueue.h>
#include <net/irda/qos.h>
#include <net/irda/discovery.h>
#include <net/irda/irlap_event.h>
#include <net/irda/irmod.h>

Go to the source code of this file.

Data Structures

struct  irlap_info
 
struct  irlap_cb
 

Macros

#define CONFIG_IRDA_DYNAMIC_WINDOW   1
 
#define LAP_RELIABLE   1
 
#define LAP_UNRELIABLE   0
 
#define LAP_ADDR_HEADER   1 /* IrLAP Address Header */
 
#define LAP_CTRL_HEADER   1 /* IrLAP Control Header */
 
#define LAP_MAX_HEADER   (LAP_ADDR_HEADER + LAP_CTRL_HEADER)
 
#define LAP_ALEN   4
 
#define BROADCAST   0xffffffff /* Broadcast device address */
 
#define CBROADCAST   0xfe /* Connection broadcast address */
 
#define XID_FORMAT   0x01 /* Discovery XID format */
 
#define LAP_WINDOW_SIZE   8
 
#define LAP_HIGH_THRESHOLD   2
 
#define LAP_MAX_QUEUE   10
 
#define NR_EXPECTED   1
 
#define NR_UNEXPECTED   0
 
#define NR_INVALID   -1
 
#define NS_EXPECTED   1
 
#define NS_UNEXPECTED   0
 
#define NS_INVALID   -1
 
#define IRLAP_GET_HEADER_SIZE(self)   (LAP_MAX_HEADER)
 
#define IRLAP_GET_TX_QUEUE_LEN(self)   skb_queue_len(&self->txq)
 

Functions

int irlap_init (void)
 
void irlap_cleanup (void)
 
struct irlap_cbirlap_open (struct net_device *dev, struct qos_info *qos, const char *hw_name)
 
void irlap_close (struct irlap_cb *self)
 
void irlap_connect_request (struct irlap_cb *self, __u32 daddr, struct qos_info *qos, int sniff)
 
void irlap_connect_response (struct irlap_cb *self, struct sk_buff *skb)
 
void irlap_connect_indication (struct irlap_cb *self, struct sk_buff *skb)
 
void irlap_connect_confirm (struct irlap_cb *, struct sk_buff *skb)
 
void irlap_data_indication (struct irlap_cb *, struct sk_buff *, int unreliable)
 
void irlap_data_request (struct irlap_cb *, struct sk_buff *, int unreliable)
 
void irlap_disconnect_request (struct irlap_cb *)
 
void irlap_disconnect_indication (struct irlap_cb *, LAP_REASON reason)
 
void irlap_status_indication (struct irlap_cb *, int quality_of_link)
 
void irlap_test_request (__u8 *info, int len)
 
void irlap_discovery_request (struct irlap_cb *, discovery_t *discovery)
 
void irlap_discovery_confirm (struct irlap_cb *, hashbin_t *discovery_log)
 
void irlap_discovery_indication (struct irlap_cb *, discovery_t *discovery)
 
void irlap_reset_indication (struct irlap_cb *self)
 
void irlap_reset_confirm (void)
 
void irlap_update_nr_received (struct irlap_cb *, int nr)
 
int irlap_validate_nr_received (struct irlap_cb *, int nr)
 
int irlap_validate_ns_received (struct irlap_cb *, int ns)
 
int irlap_generate_rand_time_slot (int S, int s)
 
void irlap_initiate_connection_state (struct irlap_cb *)
 
void irlap_flush_all_queues (struct irlap_cb *)
 
void irlap_wait_min_turn_around (struct irlap_cb *, struct qos_info *)
 
void irlap_apply_default_connection_parameters (struct irlap_cb *self)
 
void irlap_apply_connection_parameters (struct irlap_cb *self, int now)
 

Macro Definition Documentation

#define BROADCAST   0xffffffff /* Broadcast device address */

Definition at line 55 of file irlap.h.

#define CBROADCAST   0xfe /* Connection broadcast address */

Definition at line 56 of file irlap.h.

#define CONFIG_IRDA_DYNAMIC_WINDOW   1

Definition at line 41 of file irlap.h.

#define IRLAP_GET_HEADER_SIZE (   self)    (LAP_MAX_HEADER)

Definition at line 265 of file irlap.h.

#define IRLAP_GET_TX_QUEUE_LEN (   self)    skb_queue_len(&self->txq)

Definition at line 266 of file irlap.h.

#define LAP_ADDR_HEADER   1 /* IrLAP Address Header */

Definition at line 46 of file irlap.h.

#define LAP_ALEN   4

Definition at line 53 of file irlap.h.

#define LAP_CTRL_HEADER   1 /* IrLAP Control Header */

Definition at line 47 of file irlap.h.

#define LAP_HIGH_THRESHOLD   2

Definition at line 68 of file irlap.h.

#define LAP_MAX_HEADER   (LAP_ADDR_HEADER + LAP_CTRL_HEADER)

Definition at line 50 of file irlap.h.

#define LAP_MAX_QUEUE   10

Definition at line 74 of file irlap.h.

#define LAP_RELIABLE   1

Definition at line 43 of file irlap.h.

#define LAP_UNRELIABLE   0

Definition at line 44 of file irlap.h.

#define LAP_WINDOW_SIZE   8

Definition at line 60 of file irlap.h.

#define NR_EXPECTED   1

Definition at line 86 of file irlap.h.

#define NR_INVALID   -1

Definition at line 88 of file irlap.h.

#define NR_UNEXPECTED   0

Definition at line 87 of file irlap.h.

#define NS_EXPECTED   1

Definition at line 90 of file irlap.h.

#define NS_INVALID   -1

Definition at line 92 of file irlap.h.

#define NS_UNEXPECTED   0

Definition at line 91 of file irlap.h.

#define XID_FORMAT   0x01 /* Discovery XID format */

Definition at line 57 of file irlap.h.

Function Documentation

void irlap_apply_connection_parameters ( struct irlap_cb self,
int  now 
)

Definition at line 1008 of file irlap.c.

void irlap_apply_default_connection_parameters ( struct irlap_cb self)

Definition at line 945 of file irlap.c.

void irlap_cleanup ( void  )

Definition at line 98 of file irlap.c.

void irlap_close ( struct irlap_cb self)

Definition at line 214 of file irlap.c.

void irlap_connect_confirm ( struct irlap_cb ,
struct sk_buff skb 
)

Definition at line 308 of file irlap.c.

void irlap_connect_indication ( struct irlap_cb self,
struct sk_buff skb 
)

Definition at line 247 of file irlap.c.

void irlap_connect_request ( struct irlap_cb self,
__u32  daddr,
struct qos_info qos,
int  sniff 
)

Definition at line 280 of file irlap.c.

void irlap_connect_response ( struct irlap_cb self,
struct sk_buff skb 
)

Definition at line 266 of file irlap.c.

void irlap_data_indication ( struct irlap_cb ,
struct sk_buff ,
int  unreliable 
)

Definition at line 325 of file irlap.c.

void irlap_data_request ( struct irlap_cb ,
struct sk_buff ,
int  unreliable 
)

Definition at line 341 of file irlap.c.

void irlap_disconnect_indication ( struct irlap_cb ,
LAP_REASON  reason 
)

Definition at line 473 of file irlap.c.

void irlap_disconnect_request ( struct irlap_cb )

Definition at line 438 of file irlap.c.

void irlap_discovery_confirm ( struct irlap_cb ,
hashbin_t discovery_log 
)

Definition at line 568 of file irlap.c.

void irlap_discovery_indication ( struct irlap_cb ,
discovery_t discovery 
)

Definition at line 599 of file irlap.c.

void irlap_discovery_request ( struct irlap_cb ,
discovery_t discovery 
)

Definition at line 506 of file irlap.c.

void irlap_flush_all_queues ( struct irlap_cb )

Definition at line 845 of file irlap.c.

int irlap_generate_rand_time_slot ( int  S,
int  s 
)

Definition at line 673 of file irlap.c.

int irlap_init ( void  )

Definition at line 78 of file irlap.c.

void irlap_initiate_connection_state ( struct irlap_cb )

Definition at line 789 of file irlap.c.

struct irlap_cb* irlap_open ( struct net_device dev,
struct qos_info qos,
const char hw_name 
)
read

Definition at line 111 of file irlap.c.

void irlap_reset_confirm ( void  )

Definition at line 661 of file irlap.c.

void irlap_reset_indication ( struct irlap_cb self)

Definition at line 645 of file irlap.c.

void irlap_status_indication ( struct irlap_cb ,
int  quality_of_link 
)

Definition at line 626 of file irlap.c.

void irlap_test_request ( __u8 info,
int  len 
)
void irlap_update_nr_received ( struct irlap_cb ,
int  nr 
)

Definition at line 698 of file irlap.c.

int irlap_validate_nr_received ( struct irlap_cb ,
int  nr 
)

Definition at line 759 of file irlap.c.

int irlap_validate_ns_received ( struct irlap_cb ,
int  ns 
)

Definition at line 740 of file irlap.c.

void irlap_wait_min_turn_around ( struct irlap_cb ,
struct qos_info  
)

Definition at line 816 of file irlap.c.