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

irlap.h File Reference

#include <linux/config.h>
#include <linux/types.h>
#include <linux/skbuff.h>
#include <linux/netdevice.h>
#include <linux/ppp_defs.h>
#include <linux/ppp-comp.h>
#include <linux/timer.h>
#include <net/irda/irlap_event.h>

Include dependency graph for irlap.h:

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

Go to the source code of this file.

Defines

#define CONFIG_IRDA_DYNAMIC_WINDOW   1
#define LAP_RELIABLE   1
#define LAP_UNRELIABLE   0
#define LAP_ADDR_HEADER   1
#define LAP_CTRL_HEADER   1
#define LAP_COMP_HEADER   1
#define LAP_MAX_HEADER   (LAP_ADDR_HEADER + LAP_CTRL_HEADER)
#define BROADCAST   0xffffffff
#define CBROADCAST   0xfe
#define XID_FORMAT   0x01
#define LAP_WINDOW_SIZE   8
#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)   2
#define IRLAP_GET_TX_QUEUE_LEN(self)   skb_queue_len(&self->txq)

Functions

int irlap_init (void)
void irlap_cleanup (void)
irlap_cbirlap_open (struct device *dev, struct qos_info *qos)
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 (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_change_speed (struct irlap_cb *self, __u32 speed, int now)
void irlap_wait_min_turn_around (struct irlap_cb *, struct qos_info *)
void irlap_init_qos_capabilities (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)
void irlap_set_local_busy (struct irlap_cb *self, int status)

Variables

hashbin_tirlap


Define Documentation

#define BROADCAST   0xffffffff
 

Definition at line 56 of file irlap.h.

#define CBROADCAST   0xfe
 

Definition at line 57 of file irlap.h.

Referenced by irlap_driver_rcv(), irlap_recv_test_frame(), irlap_send_discovery_xid_frame(), irlap_send_dm_frame(), irlap_send_snrm_frame(), irlap_send_test_frame(), and irlap_state_ndm().

#define CONFIG_IRDA_DYNAMIC_WINDOW   1
 

Definition at line 39 of file irlap.h.

#define IRLAP_GET_HEADER_SIZE self   )     2
 

Definition at line 243 of file irlap.h.

Referenced by irlmp_connect_confirm(), and irlmp_connect_indication().

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

Definition at line 244 of file irlap.h.

Referenced by irlmp_get_lap_tx_queue_len().

#define LAP_ADDR_HEADER   1
 

Definition at line 44 of file irlap.h.

Referenced by irlap_data_indication(), irlap_data_request(), irlap_send_test_frame(), and irlap_state_nrm_s().

#define LAP_COMP_HEADER   1
 

Definition at line 46 of file irlap.h.

Referenced by irlap_compress_frame(), and irlap_decompress_frame().

#define LAP_CTRL_HEADER   1
 

Definition at line 45 of file irlap.h.

Referenced by irlap_data_indication(), irlap_data_request(), irlap_send_test_frame(), and irlap_state_nrm_s().

#define LAP_MAX_HEADER   (LAP_ADDR_HEADER + LAP_CTRL_HEADER)
 

Definition at line 53 of file irlap.h.

Referenced by irlap_compress_frame().

#define LAP_MAX_QUEUE   10
 

Definition at line 61 of file irlap.h.

Referenced by irttp_run_tx_queue().

#define LAP_RELIABLE   1
 

Definition at line 41 of file irlap.h.

#define LAP_UNRELIABLE   0
 

Definition at line 42 of file irlap.h.

#define LAP_WINDOW_SIZE   8
 

Definition at line 60 of file irlap.h.

#define NR_EXPECTED   1
 

Definition at line 63 of file irlap.h.

Referenced by irlap_state_nrm_p(), irlap_state_nrm_s(), and irlap_validate_nr_received().

#define NR_INVALID   -1
 

Definition at line 65 of file irlap.h.

Referenced by irlap_state_nrm_p(), irlap_state_nrm_s(), and irlap_validate_nr_received().

#define NR_UNEXPECTED   0
 

Definition at line 64 of file irlap.h.

Referenced by irlap_state_nrm_p(), irlap_state_nrm_s(), and irlap_validate_nr_received().

#define NS_EXPECTED   1
 

Definition at line 67 of file irlap.h.

Referenced by irlap_state_nrm_p(), irlap_state_nrm_s(), and irlap_validate_ns_received().

#define NS_INVALID   -1
 

Definition at line 69 of file irlap.h.

Referenced by irlap_state_nrm_p(), and irlap_state_nrm_s().

#define NS_UNEXPECTED   0
 

Definition at line 68 of file irlap.h.

Referenced by irlap_state_nrm_p(), irlap_state_nrm_s(), and irlap_validate_ns_received().

#define XID_FORMAT   0x01
 

Definition at line 58 of file irlap.h.

Referenced by irlap_send_discovery_xid_frame().


Function Documentation

void irlap_apply_connection_parameters struct irlap_cb self  ) 
 

Definition at line 1046 of file irlap.c.

References ASSERT, qos_info::baud_rate, FALSE, HZ, IRDA_DEBUG, irda_set_compression(), irlap_change_speed(), irlap_compressor_init(), irlap_max_line_capacity(), LAP_MAGIC, qos_info::link_disc_time, irlap_cb::magic, qos_info::max_turn_time, irlap_cb::N1, irlap_cb::N2, NULL, irlap_cb::qos_tx, and qos_value_t::value.

Referenced by irlap_state_conn(), and irlap_state_setup().

Here is the call graph for this function:

void irlap_apply_default_connection_parameters struct irlap_cb self  ) 
 

Definition at line 988 of file irlap.c.

References ASSERT, irlap_cb::caddr, FALSE, FINAL_TIMEOUT, get_random_bytes(), IRDA_DEBUG, irda_device_set_media_busy(), irlap_change_speed(), irlap_flush_all_queues(), LAP_MAGIC, irlap_cb::magic, irlap_cb::netdev, NULL, POLL_TIMEOUT, sysctl_slot_timeout, TRUE, WD_TIMEOUT, and x00.

Referenced by irlap_open(), irlap_state_nrm_p(), irlap_state_nrm_s(), irlap_state_pclose(), irlap_state_reset(), and irlap_state_sclose().

Here is the call graph for this function:

void irlap_change_speed struct irlap_cb self,
__u32  speed,
int  now
 

Definition at line 864 of file irlap.c.

References ASSERT, IRDA_DEBUG, irda_device_change_speed(), LAP_MAGIC, irlap_cb::magic, irlap_cb::netdev, and NULL.

Referenced by irlap_apply_connection_parameters(), and irlap_apply_default_connection_parameters().

Here is the call graph for this function:

void irlap_cleanup void   ) 
 

Definition at line 93 of file irlap.c.

References __irlap_close(), ASSERT, hashbin_delete(), irlap_compressors, kfree(), and NULL.

Here is the call graph for this function:

void irlap_close struct irlap_cb self  ) 
 

Definition at line 198 of file irlap.c.

References __irlap_close(), ASSERT, hashbin_remove(), IRDA_DEBUG, irlap_disconnect_indication(), irlmp_unregister_link(), LAP_DISC_INDICATION, LAP_MAGIC, irlap_cb::magic, NULL, and irlap_cb::saddr.

Referenced by irport_net_close(), irtty_net_close(), nsc_ircc_net_close(), toshoboe_net_close(), and w83977af_net_close().

Here is the call graph for this function:

void irlap_connect_confirm struct irlap_cb ,
struct sk_buff skb
 

Definition at line 288 of file irlap.c.

References ASSERT, notify_t::instance, IRDA_DEBUG, irlmp_link_connect_confirm(), LAP_MAGIC, irlap_cb::magic, irlap_cb::notify, NULL, and irlap_cb::qos_tx.

Referenced by irlap_state_setup().

Here is the call graph for this function:

void irlap_connect_indication struct irlap_cb self,
struct sk_buff skb
 

Definition at line 227 of file irlap.c.

References ASSERT, irlap_cb::daddr, notify_t::instance, IRDA_DEBUG, irlap_init_qos_capabilities(), irlmp_link_connect_indication(), LAP_MAGIC, irlap_cb::magic, irlap_cb::notify, NULL, irlap_cb::qos_tx, and irlap_cb::saddr.

Referenced by irlap_state_ndm().

Here is the call graph for this function:

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

Definition at line 260 of file irlap.c.

References ASSERT, CONNECT_REQUEST, IRDA_DEBUG, irlap_do_event(), irlap_init_qos_capabilities(), LAP_MAGIC, LAP_NDM, irlap_cb::magic, irlap_cb::media_busy, NULL, irlap_cb::state, and TRUE.

Referenced by irlmp_state_standby().

Here is the call graph for this function:

void irlap_connect_response struct irlap_cb self,
struct sk_buff skb
 

Definition at line 246 of file irlap.c.

References CONNECT_RESPONSE, IRDA_DEBUG, irlap_do_event(), and NULL.

Referenced by irlmp_state_standby(), and irlmp_state_u_connect().

Here is the call graph for this function:

void irlap_data_indication struct irlap_cb ,
struct sk_buff ,
int  unreliable
 

Definition at line 305 of file irlap.c.

References notify_t::instance, IRDA_DEBUG, irlap_decompress_frame(), irlmp_link_data_indication(), LAP_ADDR_HEADER, LAP_CTRL_HEADER, irlap_cb::notify, and irlap_cb::qos_tx.

Referenced by irlap_state_nrm_p(), and irlap_state_nrm_s().

Here is the call graph for this function:

void irlap_data_request struct irlap_cb ,
struct sk_buff ,
int  unreliable
 

Definition at line 330 of file irlap.c.

References ASSERT, sk_buff::data, I_FRAME, IRDA_DEBUG, irlap_compress_frame(), irlap_do_event(), LAP_ADDR_HEADER, LAP_CTRL_HEADER, LAP_MAGIC, LAP_XMIT_P, LAP_XMIT_S, irlap_cb::magic, NULL, irlap_cb::qos_tx, SEND_I_CMD, irlap_cb::state, irlap_cb::txq, and UI_FRAME.

Referenced by irlmp_send_data_pdu(), and irlmp_send_lcf_pdu().

Here is the call graph for this function:

void irlap_disconnect_indication struct irlap_cb ,
LAP_REASON  reason
 

Definition at line 470 of file irlap.c.

References ASSERT, ERROR, notify_t::instance, IRDA_DEBUG, irda_free_compression(), irlap_do_event(), irlap_flush_all_queues(), irlmp_link_disconnect_indication(), LAP_DISC_INDICATION, LAP_FOUND_NONE, LAP_MAGIC, LAP_MEDIA_BUSY, LAP_NO_RESPONSE, lap_reasons, LAP_RESET_INDICATION, irlap_cb::magic, irlap_cb::notify, NULL, and RESET_REQUEST.

Referenced by irlap_close(), irlap_state_ndm(), irlap_state_nrm_p(), irlap_state_nrm_s(), irlap_state_pclose(), irlap_state_reset(), irlap_state_sclose(), and irlap_state_setup().

Here is the call graph for this function:

void irlap_disconnect_request struct irlap_cb  ) 
 

Definition at line 434 of file irlap.c.

References ASSERT, DISCONNECT_REQUEST, IRDA_DEBUG, irlap_do_event(), LAP_CONN, LAP_MAGIC, LAP_RESET_CHECK, LAP_RESET_WAIT, LAP_XMIT_P, LAP_XMIT_S, irlap_cb::magic, NULL, irlap_cb::state, TRUE, and irlap_cb::txq.

Referenced by irlmp_state_active().

Here is the call graph for this function:

void irlap_discovery_confirm struct irlap_cb ,
hashbin_t discovery_log
 

Definition at line 569 of file irlap.c.

References ASSERT, FALSE, HASHBIN_GET_SIZE, notify_t::instance, irda_device_set_media_busy(), irlmp_link_discovery_confirm(), LAP_MAGIC, irlap_cb::magic, irlap_cb::netdev, irlap_cb::notify, and NULL.

Referenced by irlap_discovery_request(), irlap_state_ndm(), and irlap_state_query().

Here is the call graph for this function:

void irlap_discovery_indication struct irlap_cb ,
discovery_t discovery
 

Definition at line 594 of file irlap.c.

References ASSERT, notify_t::instance, IRDA_DEBUG, irlmp_link_discovery_indication(), LAP_MAGIC, irlap_cb::magic, irlap_cb::notify, and NULL.

Referenced by irlap_state_reply().

Here is the call graph for this function:

void irlap_discovery_request struct irlap_cb ,
discovery_t discovery
 

Definition at line 506 of file irlap.c.

References ASSERT, irlap_info::discovery, irlap_cb::discovery_log, DISCOVERY_REQUEST, ERROR, hashbin_delete(), hashbin_new(), HB_LOCAL, HZ, IRDA_DEBUG, irlap_discovery_confirm(), irlap_do_event(), kfree(), LAP_MAGIC, LAP_NDM, irlap_cb::magic, discovery_t::nslots, NULL, irlap_info::S, irlap_info::s, irlap_cb::state, and sysctl_slot_timeout.

Referenced by irlmp_state_standby().

Here is the call graph for this function:

void irlap_flush_all_queues struct irlap_cb  ) 
 

Definition at line 832 of file irlap.c.

References ASSERT, dev_kfree_skb, LAP_MAGIC, irlap_cb::magic, NULL, irlap_cb::txq, irlap_cb::txq_ultra, and irlap_cb::wx_list.

Referenced by __irlap_close(), irlap_apply_default_connection_parameters(), irlap_disconnect_indication(), irlap_state_nrm_p(), irlap_state_nrm_s(), irlap_state_reset_check(), irlap_state_reset_wait(), irlap_state_xmit_p(), and irlap_state_xmit_s().

int irlap_generate_rand_time_slot int  S,
int  s
 

Definition at line 665 of file irlap.c.

References ASSERT, jiffies, and irlap_info::slot.

Referenced by irlap_state_ndm().

int irlap_init void   ) 
 

Definition at line 72 of file irlap.c.

References ENOMEM, ERROR, hashbin_new(), HB_LOCAL, irlap_compressors, NULL, and WARNING.

Referenced by irda_init().

Here is the call graph for this function:

void irlap_init_qos_capabilities struct irlap_cb ,
struct qos_info
 

Definition at line 930 of file irlap.c.

References ASSERT, qos_info::baud_rate, qos_value_t::bits, qos_info::data_size, IRDA_DEBUG, irda_init_max_qos_capabilies(), irda_qos_bits_to_value(), irda_qos_compute_intersection(), LAP_MAGIC, qos_info::link_disc_time, irlap_cb::magic, qos_info::max_turn_time, irlap_cb::netdev, NULL, irlap_cb::qos_dev, and irlap_cb::qos_rx.

Referenced by irlap_connect_indication(), and irlap_connect_request().

Here is the call graph for this function:

void irlap_initiate_connection_state struct irlap_cb  ) 
 

Definition at line 776 of file irlap.c.

References ASSERT, FALSE, IRDA_DEBUG, LAP_MAGIC, and NULL.

Referenced by irlap_state_conn(), irlap_state_reset(), irlap_state_reset_check(), and irlap_state_setup().

struct irlap_cb* irlap_open struct device *  dev,
struct qos_info qos
 

Definition at line 110 of file irlap.c.

References get_random_bytes(), hashbin_insert(), init_timer(), IRDA_DEBUG, irlap_apply_default_connection_parameters(), irlap_next_state(), irlmp_register_link(), kmalloc(), LAP_MAGIC, LAP_NDM, LAP_OFFLINE, memcpy, memset, and NULL.

Referenced by irport_net_open(), irtty_net_open(), nsc_ircc_net_open(), toshoboe_net_open(), and w83977af_net_open().

Here is the call graph for this function:

void irlap_reset_confirm void   ) 
 

Definition at line 653 of file irlap.c.

References IRDA_DEBUG.

Referenced by irlap_state_reset().

void irlap_reset_indication struct irlap_cb self  ) 
 

Definition at line 634 of file irlap.c.

References ASSERT, IRDA_DEBUG, irlap_do_event(), LAP_MAGIC, LAP_RESET_WAIT, irlap_cb::magic, NULL, RESET_REQUEST, RESET_RESPONSE, and irlap_cb::state.

Referenced by irlap_state_nrm_p(), and irlap_state_nrm_s().

Here is the call graph for this function:

void irlap_set_local_busy struct irlap_cb self,
int  status
 

Definition at line 1114 of file irlap.c.

References IRDA_DEBUG.

void irlap_status_indication int  quality_of_link  ) 
 

Definition at line 613 of file irlap.c.

References irlmp_status_indication(), LOCK_NO_CHANGE, MESSAGE, STATUS_NO_ACTIVITY, and STATUS_NOISY.

Referenced by irlap_state_nrm_p(), and irlap_state_nrm_s().

Here is the call graph for this function:

void irlap_test_request __u8 info,
int  len
 

void irlap_update_nr_received struct irlap_cb ,
int  nr
 

Definition at line 685 of file irlap.c.

References count, dev_kfree_skb, NULL, irlap_cb::va, irlap_cb::vs, and irlap_cb::wx_list.

Referenced by irlap_state_nrm_p(), and irlap_state_nrm_s().

int irlap_validate_nr_received struct irlap_cb ,
int  nr
 

Definition at line 746 of file irlap.c.

References IRDA_DEBUG, NR_EXPECTED, NR_INVALID, NR_UNEXPECTED, irlap_cb::va, and irlap_cb::vs.

Referenced by irlap_state_nrm_p(), and irlap_state_nrm_s().

int irlap_validate_ns_received struct irlap_cb ,
int  ns
 

Definition at line 727 of file irlap.c.

References NS_EXPECTED, NS_UNEXPECTED, and irlap_cb::vr.

Referenced by irlap_state_nrm_p(), and irlap_state_nrm_s().

void irlap_wait_min_turn_around struct irlap_cb ,
struct qos_info
 

Definition at line 803 of file irlap.c.

References qos_info::baud_rate, irlap_min_turn_time_in_bytes(), qos_info::min_turn_time, speed, and qos_value_t::value.

Referenced by irlap_resend_rejected_frame(), irlap_resend_rejected_frames(), irlap_send_test_frame(), irlap_state_nrm_p(), irlap_state_nrm_s(), irlap_state_pclose(), irlap_state_reset(), irlap_state_reset_check(), irlap_state_reset_wait(), irlap_state_sclose(), and irlap_state_xmit_p().

Here is the call graph for this function:


Variable Documentation

hashbin_t* irlap
 

Definition at line 51 of file irlap.c.