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

irlap_frame.c File Reference

#include <linux/skbuff.h>
#include <linux/if.h>
#include <linux/if_ether.h>
#include <linux/netdevice.h>
#include <linux/irda.h>
#include <net/pkt_sched.h>
#include <net/sock.h>
#include <asm/byteorder.h>
#include <net/irda/irda.h>
#include <net/irda/irda_device.h>
#include <net/irda/irlap.h>
#include <net/irda/wrapper.h>
#include <net/irda/timer.h>
#include <net/irda/irlap_frame.h>
#include <net/irda/qos.h>

Include dependency graph for irlap_frame.c:

Go to the source code of this file.

Functions

static void irlap_insert_info (struct irlap_cb *self, struct sk_buff *skb)
void irlap_queue_xmit (struct irlap_cb *self, struct sk_buff *skb)
void irlap_send_snrm_frame (struct irlap_cb *self, struct qos_info *qos)
static void irlap_recv_snrm_cmd (struct irlap_cb *self, struct sk_buff *skb, struct irlap_info *info)
void irlap_send_ua_response_frame (struct irlap_cb *self, struct qos_info *qos)
void irlap_send_dm_frame (struct irlap_cb *self)
void irlap_send_disc_frame (struct irlap_cb *self)
void irlap_send_discovery_xid_frame (struct irlap_cb *self, int S, __u8 s, __u8 command, discovery_t *discovery)
static void irlap_recv_discovery_xid_rsp (struct irlap_cb *self, struct sk_buff *skb, struct irlap_info *info)
static void irlap_recv_discovery_xid_cmd (struct irlap_cb *self, struct sk_buff *skb, struct irlap_info *info)
void irlap_send_rr_frame (struct irlap_cb *self, int command)
void irlap_send_rd_frame (struct irlap_cb *self)
static void irlap_recv_rr_frame (struct irlap_cb *self, struct sk_buff *skb, struct irlap_info *info, int command)
void irlap_send_frmr_frame (struct irlap_cb *self, int command)
static void irlap_recv_rnr_frame (struct irlap_cb *self, struct sk_buff *skb, struct irlap_info *info, int command)
static void irlap_recv_rej_frame (struct irlap_cb *self, struct sk_buff *skb, struct irlap_info *info, int command)
static void irlap_recv_srej_frame (struct irlap_cb *self, struct sk_buff *skb, struct irlap_info *info, int command)
static void irlap_recv_disc_frame (struct irlap_cb *self, struct sk_buff *skb, struct irlap_info *info, int command)
static void irlap_recv_ua_frame (struct irlap_cb *self, struct sk_buff *skb, struct irlap_info *info)
void irlap_send_data_primary (struct irlap_cb *self, struct sk_buff *skb)
void irlap_send_data_primary_poll (struct irlap_cb *self, struct sk_buff *skb)
void irlap_send_data_secondary_final (struct irlap_cb *self, struct sk_buff *skb)
void irlap_send_data_secondary (struct irlap_cb *self, struct sk_buff *skb)
void irlap_resend_rejected_frames (struct irlap_cb *self, int command)
void irlap_resend_rejected_frame (struct irlap_cb *self, int command)
void irlap_send_ui_frame (struct irlap_cb *self, struct sk_buff *skb, __u8 caddr, int command)
void irlap_send_i_frame (struct irlap_cb *self, struct sk_buff *skb, int command)
static void irlap_recv_i_frame (struct irlap_cb *self, struct sk_buff *skb, struct irlap_info *info, int command)
static void irlap_recv_ui_frame (struct irlap_cb *self, struct sk_buff *skb, struct irlap_info *info)
static void irlap_recv_frmr_frame (struct irlap_cb *self, struct sk_buff *skb, struct irlap_info *info)
void irlap_send_test_frame (struct irlap_cb *self, __u8 caddr, __u32 daddr, struct sk_buff *cmd)
static void irlap_recv_test_frame (struct irlap_cb *self, struct sk_buff *skb, struct irlap_info *info, int command)
int irlap_driver_rcv (struct sk_buff *skb, struct device *dev, struct packet_type *ptype)


Function Documentation

int irlap_driver_rcv struct sk_buff skb,
struct device *  dev,
struct packet_type *  ptype
 

Definition at line 1291 of file irlap_frame.c.

References irlap_info::caddr, CBROADCAST, CMD_FRAME, command(), irlap_info::control, sk_buff::data, dev_kfree_skb, DISC_CMD, DM_RSP, ERROR, FRMR_RSP, IRDA_DEBUG, irlap_do_event(), irlap_recv_disc_frame(), irlap_recv_discovery_xid_cmd(), irlap_recv_discovery_xid_rsp(), irlap_recv_frmr_frame(), irlap_recv_i_frame(), irlap_recv_rej_frame(), irlap_recv_rnr_frame(), irlap_recv_rr_frame(), irlap_recv_snrm_cmd(), irlap_recv_srej_frame(), irlap_recv_test_frame(), irlap_recv_ua_frame(), irlap_recv_ui_frame(), LAP_MAGIC, sk_buff::len, irlap_info::pf, PF_BIT, RECV_DM_RSP, REJ, RNR, RR, SNRM_CMD, SREJ, TEST_CMD, UA_RSP, UI_FRAME, WARNING, x01, x02, x0f, XID_CMD, and XID_RSP.

Here is the call graph for this function:

static void irlap_insert_info struct irlap_cb self,
struct sk_buff skb
[inline, static]
 

Definition at line 52 of file irlap_frame.c.

References sk_buff::cb, LAP_MAGIC, irda_skb_cb::magic, irda_skb_cb::mtt, irda_skb_cb::speed, and irda_skb_cb::xbofs.

Referenced by irlap_queue_xmit().

void irlap_queue_xmit struct irlap_cb self,
struct sk_buff skb
 

Definition at line 84 of file irlap_frame.c.

References sk_buff::data, sk_buff::dev, dev_queue_xmit(), ETH_P_IRDA, sk_buff::h, htons(), irlap_insert_info(), sk_buff::mac, sk_buff::nh, sk_buff::priority, sk_buff::protocol, and TC_PRIO_BESTEFFORT.

Referenced by irlap_send_disc_frame(), irlap_send_discovery_xid_frame(), irlap_send_dm_frame(), irlap_send_frmr_frame(), irlap_send_i_frame(), irlap_send_rd_frame(), irlap_send_rr_frame(), irlap_send_snrm_frame(), irlap_send_test_frame(), irlap_send_ua_response_frame(), and irlap_send_ui_frame().

Here is the call graph for this function:

static void irlap_recv_disc_frame struct irlap_cb self,
struct sk_buff skb,
struct irlap_info info,
int  command
[static]
 

Definition at line 691 of file irlap_frame.c.

References IRDA_DEBUG, irlap_do_event(), RECV_DISC_CMD, and RECV_RD_RSP.

Referenced by irlap_driver_rcv().

Here is the call graph for this function:

static void irlap_recv_discovery_xid_cmd struct irlap_cb self,
struct sk_buff skb,
struct irlap_info info
[static]
 

Definition at line 461 of file irlap_frame.c.

References BROADCAST, __u16_host_order::byte, discovery_t::charset, discovery_t::daddr, xid_frame::daddr, irlap_info::daddr, sk_buff::data, dev_kfree_skb, irlap_info::discovery, xid_frame::flags, HINT_EXTENSION, discovery_t::hints, IRDA_DEBUG, irlap_do_event(), jiffies, kmalloc(), le32_to_cpu, sk_buff::len, discovery_t::name_len, discovery_t::nickname, NICKNAME_MAX_LEN, NULL, RECV_DISCOVERY_XID_CMD, irlap_info::s, irlap_info::S, discovery_t::saddr, irlap_cb::saddr, irlap_info::saddr, xid_frame::saddr, xid_frame::slotnr, strlen, strncpy, text, discovery_t::timestamp, WARNING, x03, and xff.

Referenced by irlap_driver_rcv().

Here is the call graph for this function:

static void irlap_recv_discovery_xid_rsp struct irlap_cb self,
struct sk_buff skb,
struct irlap_info info
[static]
 

Definition at line 388 of file irlap_frame.c.

References ASSERT, BROADCAST, __u16_host_order::byte, discovery_t::charset, discovery_t::daddr, xid_frame::daddr, irlap_info::daddr, sk_buff::data, dev_kfree_skb, irlap_info::discovery, HINT_EXTENSION, discovery_t::hints, IRDA_DEBUG, irlap_do_event(), jiffies, kmalloc(), LAP_MAGIC, le32_to_cpu, sk_buff::len, irlap_cb::magic, memset, discovery_t::name_len, discovery_t::nickname, NICKNAME_MAX_LEN, NULL, RECV_DISCOVERY_XID_RSP, discovery_t::saddr, irlap_cb::saddr, irlap_info::saddr, xid_frame::saddr, strlen, strncpy, text, discovery_t::timestamp, and WARNING.

Referenced by irlap_driver_rcv().

Here is the call graph for this function:

static void irlap_recv_frmr_frame struct irlap_cb self,
struct sk_buff skb,
struct irlap_info info
[static]
 

Definition at line 1158 of file irlap_frame.c.

References ASSERT, sk_buff::data, IRDA_DEBUG, irlap_do_event(), LAP_MAGIC, irlap_cb::magic, irlap_info::nr, irlap_info::ns, NULL, irlap_info::pf, PF_BIT, RECV_FRMR_RSP, w, x, y, and z.

Referenced by irlap_driver_rcv().

Here is the call graph for this function:

static void irlap_recv_i_frame struct irlap_cb self,
struct sk_buff skb,
struct irlap_info info,
int  command
[inline, static]
 

Definition at line 1121 of file irlap_frame.c.

References sk_buff::data, irlap_do_event(), irlap_info::nr, irlap_info::ns, irlap_info::pf, PF_BIT, RECV_I_CMD, and RECV_I_RSP.

Referenced by irlap_driver_rcv().

Here is the call graph for this function:

static void irlap_recv_rej_frame struct irlap_cb self,
struct sk_buff skb,
struct irlap_info info,
int  command
[static]
 

Definition at line 663 of file irlap_frame.c.

References sk_buff::data, IRDA_DEBUG, irlap_do_event(), irlap_info::nr, RECV_REJ_CMD, and RECV_REJ_RSP.

Referenced by irlap_driver_rcv().

Here is the call graph for this function:

static void irlap_recv_rnr_frame struct irlap_cb self,
struct sk_buff skb,
struct irlap_info info,
int  command
[static]
 

Definition at line 650 of file irlap_frame.c.

References sk_buff::data, IRDA_DEBUG, irlap_do_event(), jiffies, irlap_info::nr, RECV_RNR_CMD, and RECV_RNR_RSP.

Referenced by irlap_driver_rcv().

Here is the call graph for this function:

static void irlap_recv_rr_frame struct irlap_cb self,
struct sk_buff skb,
struct irlap_info info,
int  command
[inline, static]
 

Definition at line 603 of file irlap_frame.c.

References sk_buff::data, irlap_do_event(), irlap_info::nr, RECV_RR_CMD, and RECV_RR_RSP.

Referenced by irlap_driver_rcv().

Here is the call graph for this function:

static void irlap_recv_snrm_cmd struct irlap_cb self,
struct sk_buff skb,
struct irlap_info info
[static]
 

Definition at line 152 of file irlap_frame.c.

References irlap_info::caddr, snrm_frame::daddr, irlap_info::daddr, sk_buff::data, dev_kfree_skb, IRDA_DEBUG, irlap_do_event(), le32_to_cpu, sk_buff::len, snrm_frame::ncaddr, NULL, RECV_SNRM_CMD, irlap_cb::saddr, irlap_info::saddr, snrm_frame::saddr, and x00.

Referenced by irlap_driver_rcv().

Here is the call graph for this function:

static void irlap_recv_srej_frame struct irlap_cb self,
struct sk_buff skb,
struct irlap_info info,
int  command
[static]
 

Definition at line 677 of file irlap_frame.c.

References sk_buff::data, IRDA_DEBUG, irlap_do_event(), irlap_info::nr, RECV_SREJ_CMD, and RECV_SREJ_RSP.

Referenced by irlap_driver_rcv().

Here is the call graph for this function:

static void irlap_recv_test_frame struct irlap_cb self,
struct sk_buff skb,
struct irlap_info info,
int  command
[static]
 

Definition at line 1248 of file irlap_frame.c.

References BROADCAST, irlap_info::caddr, CBROADCAST, test_frame::daddr, irlap_info::daddr, sk_buff::data, dev_kfree_skb, IRDA_DEBUG, irlap_do_event(), le32_to_cpu, sk_buff::len, RECV_TEST_CMD, RECV_TEST_RSP, irlap_cb::saddr, irlap_info::saddr, and test_frame::saddr.

Referenced by irlap_driver_rcv().

Here is the call graph for this function:

static void irlap_recv_ua_frame struct irlap_cb self,
struct sk_buff skb,
struct irlap_info info
[inline, static]
 

Definition at line 709 of file irlap_frame.c.

References irlap_do_event(), and RECV_UA_RSP.

Referenced by irlap_driver_rcv().

Here is the call graph for this function:

static void irlap_recv_ui_frame struct irlap_cb self,
struct sk_buff skb,
struct irlap_info info
[static]
 

Definition at line 1142 of file irlap_frame.c.

References sk_buff::data, IRDA_DEBUG, irlap_do_event(), irlap_info::pf, PF_BIT, and RECV_UI_FRAME.

Referenced by irlap_driver_rcv().

Here is the call graph for this function:

void irlap_resend_rejected_frame struct irlap_cb self,
int  command
 

Definition at line 1031 of file irlap_frame.c.

References ASSERT, IRDA_DEBUG, irlap_send_i_frame(), irlap_wait_min_turn_around(), LAP_MAGIC, sk_buff::list, irlap_cb::magic, sk_buff::next, NULL, PF_BIT, sk_buff::prev, sk_buff::sk, skb_copy(), skb_set_owner_w(), and irlap_cb::wx_list.

Referenced by irlap_state_nrm_p(), and irlap_state_nrm_s().

Here is the call graph for this function:

void irlap_resend_rejected_frames struct irlap_cb self,
int  command
 

Definition at line 943 of file irlap_frame.c.

References ASSERT, count, IRDA_DEBUG, irlap_send_data_primary(), irlap_send_data_primary_poll(), irlap_send_i_frame(), irlap_wait_min_turn_around(), LAP_MAGIC, sk_buff::list, irlap_cb::magic, sk_buff::next, NULL, PF_BIT, sk_buff::prev, sk_buff::sk, skb_copy(), skb_set_owner_w(), irlap_cb::txq, irlap_cb::window, and irlap_cb::wx_list.

Referenced by irlap_state_nrm_p(), and irlap_state_nrm_s().

Here is the call graph for this function:

void irlap_send_data_primary struct irlap_cb self,
struct sk_buff skb
 

Definition at line 722 of file irlap_frame.c.

References irlap_cb::caddr, CMD_FRAME, sk_buff::data, dev_kfree_skb, FALSE, I_FRAME, IRDA_DEBUG, irlap_send_i_frame(), irlap_send_ui_frame(), NULL, sk_buff::sk, skb_clone(), skb_set_owner_w(), and irlap_cb::wx_list.

Referenced by irlap_resend_rejected_frames(), and irlap_state_xmit_p().

Here is the call graph for this function:

void irlap_send_data_primary_poll struct irlap_cb self,
struct sk_buff skb
 

Definition at line 768 of file irlap_frame.c.

References irlap_cb::ack_required, irlap_cb::caddr, CMD_FRAME, sk_buff::data, del_timer(), dev_kfree_skb, FALSE, irlap_cb::final_timeout, I_FRAME, IRDA_DEBUG, irlap_send_i_frame(), irlap_send_rr_frame(), irlap_send_ui_frame(), irlap_start_final_timer(), NULL, PF_BIT, irlap_cb::poll_timer, sk_buff::sk, skb_clone(), skb_set_owner_w(), and irlap_cb::wx_list.

Referenced by irlap_resend_rejected_frames(), and irlap_state_xmit_p().

Here is the call graph for this function:

void irlap_send_data_secondary struct irlap_cb self,
struct sk_buff skb
 

Definition at line 900 of file irlap_frame.c.

References irlap_cb::caddr, sk_buff::data, dev_kfree_skb, FALSE, I_FRAME, irlap_send_i_frame(), irlap_send_ui_frame(), NULL, RSP_FRAME, sk_buff::sk, skb_clone(), skb_set_owner_w(), and irlap_cb::wx_list.

Referenced by irlap_state_xmit_s().

Here is the call graph for this function:

void irlap_send_data_secondary_final struct irlap_cb self,
struct sk_buff skb
 

Definition at line 840 of file irlap_frame.c.

References irlap_cb::ack_required, ASSERT, irlap_cb::caddr, sk_buff::data, dev_kfree_skb, FALSE, I_FRAME, irlap_send_i_frame(), irlap_send_rr_frame(), irlap_send_ui_frame(), irlap_start_wd_timer(), LAP_MAGIC, irlap_cb::magic, NULL, PF_BIT, RSP_FRAME, sk_buff::sk, skb_clone(), skb_set_owner_w(), irlap_cb::wd_timeout, and irlap_cb::wx_list.

Referenced by irlap_state_xmit_s().

Here is the call graph for this function:

void irlap_send_disc_frame struct irlap_cb self  ) 
 

Definition at line 269 of file irlap_frame.c.

References ASSERT, CMD_FRAME, DISC_CMD, IRDA_DEBUG, irlap_queue_xmit(), LAP_MAGIC, irlap_cb::magic, NULL, and PF_BIT.

Referenced by irlap_state_nrm_p(), irlap_state_pclose(), irlap_state_reset_wait(), and irlap_state_xmit_p().

Here is the call graph for this function:

void irlap_send_discovery_xid_frame struct irlap_cb self,
int  S,
__u8  s,
__u8  command,
discovery_t discovery
 

Definition at line 297 of file irlap_frame.c.

References ASSERT, BROADCAST, __u16_host_order::byte, xid_frame::caddr, CBROADCAST, discovery_t::charset, CMD_FRAME, xid_frame::control, cpu_to_le32, discovery_t::daddr, xid_frame::daddr, xid_frame::flags, HINT_EXTENSION, discovery_t::hints, xid_frame::ident, IRDA_DEBUG, IRDA_MIN, irlap_queue_xmit(), LAP_MAGIC, len, irlap_cb::magic, memcpy, discovery_t::name_len, discovery_t::nickname, NULL, PF_BIT, irlap_cb::saddr, xid_frame::saddr, xid_frame::slotnr, xid_frame::version, xff, XID_CMD, XID_FORMAT, and XID_RSP.

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

Here is the call graph for this function:

void irlap_send_dm_frame struct irlap_cb self  ) 
 

Definition at line 239 of file irlap_frame.c.

References ASSERT, CBROADCAST, DM_RSP, irlap_queue_xmit(), LAP_MAGIC, LAP_NDM, irlap_cb::magic, NULL, PF_BIT, and irlap_cb::state.

Referenced by irlap_state_conn().

Here is the call graph for this function:

void irlap_send_frmr_frame struct irlap_cb self,
int  command
 

Definition at line 616 of file irlap_frame.c.

References ASSERT, CMD_FRAME, IRDA_DEBUG, irlap_queue_xmit(), jiffies, LAP_MAGIC, irlap_cb::magic, NULL, PF_BIT, and irlap_cb::vr.

Here is the call graph for this function:

void irlap_send_i_frame struct irlap_cb self,
struct sk_buff skb,
int  command
 

Definition at line 1102 of file irlap_frame.c.

References CMD_FRAME, sk_buff::data, and irlap_queue_xmit().

Referenced by irlap_resend_rejected_frame(), irlap_resend_rejected_frames(), irlap_send_data_primary(), irlap_send_data_primary_poll(), irlap_send_data_secondary(), and irlap_send_data_secondary_final().

Here is the call graph for this function:

void irlap_send_rd_frame struct irlap_cb self  ) 
 

Definition at line 579 of file irlap_frame.c.

References irlap_queue_xmit(), PF_BIT, and RD_RSP.

Referenced by irlap_state_reset_check(), and irlap_state_xmit_s().

Here is the call graph for this function:

void irlap_send_rr_frame struct irlap_cb self,
int  command
 

Definition at line 554 of file irlap_frame.c.

References CMD_FRAME, irlap_queue_xmit(), PF_BIT, and RR.

Referenced by irlap_send_data_primary_poll(), irlap_send_data_secondary_final(), irlap_state_nrm_p(), irlap_state_nrm_s(), irlap_state_setup(), and irlap_state_xmit_p().

Here is the call graph for this function:

void irlap_send_snrm_frame struct irlap_cb self,
struct qos_info qos
 

Definition at line 102 of file irlap_frame.c.

References ASSERT, snrm_frame::caddr, CBROADCAST, CMD_FRAME, snrm_frame::control, cpu_to_le32, irlap_cb::daddr, snrm_frame::daddr, dev_kfree_skb, irlap_insert_qos_negotiation_params(), irlap_queue_xmit(), LAP_MAGIC, irlap_cb::magic, snrm_frame::ncaddr, NULL, PF_BIT, ret, irlap_cb::saddr, snrm_frame::saddr, and SNRM_CMD.

Referenced by irlap_state_ndm(), irlap_state_reset(), irlap_state_reset_wait(), and irlap_state_setup().

Here is the call graph for this function:

void irlap_send_test_frame struct irlap_cb self,
__u8  caddr,
__u32  daddr,
struct sk_buff cmd
 

Definition at line 1208 of file irlap_frame.c.

References test_frame::caddr, CBROADCAST, test_frame::control, cpu_to_le32, test_frame::daddr, sk_buff::data, irlap_queue_xmit(), irlap_wait_min_turn_around(), LAP_ADDR_HEADER, LAP_CTRL_HEADER, sk_buff::len, memcpy, PF_BIT, irlap_cb::qos_tx, irlap_cb::saddr, test_frame::saddr, and TEST_RSP.

Referenced by irlap_state_ndm(), and irlap_state_nrm_s().

Here is the call graph for this function:

void irlap_send_ua_response_frame struct irlap_cb self,
struct qos_info qos
 

Definition at line 193 of file irlap_frame.c.

References ASSERT, ua_frame::caddr, ua_frame::control, cpu_to_le32, irlap_cb::daddr, ua_frame::daddr, dev_kfree_skb, IRDA_DEBUG, irlap_insert_qos_negotiation_params(), irlap_queue_xmit(), jiffies, LAP_MAGIC, irlap_cb::magic, NULL, PF_BIT, ret, irlap_cb::saddr, ua_frame::saddr, and UA_RSP.

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

Here is the call graph for this function: