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

irlan_common.h File Reference

#include <asm/param.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/skbuff.h>
#include <linux/netdevice.h>
#include <net/irda/irqueue.h>
#include <net/irda/irttp.h>

Include dependency graph for irlan_common.h:

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

Go to the source code of this file.

Defines

#define IRLAN_MTU   1518
#define IRLAN_TIMEOUT   10*HZ
#define CMD_GET_PROVIDER_INFO   0
#define CMD_GET_MEDIA_CHAR   1
#define CMD_OPEN_DATA_CHANNEL   2
#define CMD_CLOSE_DATA_CHAN   3
#define CMD_RECONNECT_DATA_CHAN   4
#define CMD_FILTER_OPERATION   5
#define RSP_SUCCESS   0
#define RSP_INSUFFICIENT_RESOURCES   1
#define RSP_INVALID_COMMAND_FORMAT   2
#define RSP_COMMAND_NOT_SUPPORTED   3
#define RSP_PARAM_NOT_SUPPORTED   4
#define RSP_VALUE_NOT_SUPPORTED   5
#define RSP_NOT_OPEN   6
#define RSP_AUTHENTICATION_REQUIRED   7
#define RSP_INVALID_PASSWORD   8
#define RSP_PROTOCOL_ERROR   9
#define RSP_ASYNCHRONOUS_ERROR   255
#define MEDIA_802_3   1
#define MEDIA_802_5   2
#define DATA_CHAN   1
#define FILTER_TYPE   2
#define FILTER_MODE   3
#define IRLAN_DIRECTED   0x01
#define IRLAN_FUNCTIONAL   0x02
#define IRLAN_GROUP   0x04
#define IRLAN_MAC_FRAME   0x08
#define IRLAN_MULTICAST   0x10
#define IRLAN_BROADCAST   0x20
#define IRLAN_IPX_SOCKET   0x40
#define ALL   1
#define FILTER   2
#define NONE   3
#define GET   1
#define CLEAR   2
#define ADD   3
#define REMOVE   4
#define DYNAMIC   5
#define ACCESS_DIRECT   1
#define ACCESS_PEER   2
#define ACCESS_HOSTED   3
#define IRLAN_BYTE   0
#define IRLAN_SHORT   1
#define IRLAN_ARRAY   2
#define IRLAN_MAX_HEADER   (TTP_HEADER+LMP_HEADER+LAP_MAX_HEADER)

Functions

irlan_cbirlan_open (__u32 saddr, __u32 daddr)
void irlan_close (struct irlan_cb *self)
void irlan_close_tsaps (struct irlan_cb *self)
void irlan_mod_inc_use_count (void)
void irlan_mod_dec_use_count (void)
int irlan_register_netdev (struct irlan_cb *self)
void irlan_ias_register (struct irlan_cb *self, __u8 tsap_sel)
void irlan_open_data_tsap (struct irlan_cb *self)
int irlan_run_ctrl_tx_queue (struct irlan_cb *self)
void irlan_get_provider_info (struct irlan_cb *self)
void irlan_get_unicast_addr (struct irlan_cb *self)
void irlan_get_media_char (struct irlan_cb *self)
void irlan_open_data_channel (struct irlan_cb *self)
void irlan_close_data_channel (struct irlan_cb *self)
void irlan_set_multicast_filter (struct irlan_cb *self, int status)
void irlan_set_broadcast_filter (struct irlan_cb *self, int status)
void irlan_open_unicast_addr (struct irlan_cb *self)
int irlan_insert_byte_param (struct sk_buff *skb, char *param, __u8 value)
int irlan_insert_short_param (struct sk_buff *skb, char *param, __u16 value)
int irlan_insert_string_param (struct sk_buff *skb, char *param, char *value)
int irlan_insert_array_param (struct sk_buff *skb, char *name, __u8 *value, __u16 value_len)
int irlan_extract_param (__u8 *buf, char *name, char *value, __u16 *len)
void print_ret_code (__u8 code)

Variables

hashbin_tirlan


Define Documentation

#define ACCESS_DIRECT   1
 

Definition at line 94 of file irlan_common.h.

Referenced by irlan_check_response_param(), irlan_client_state_open(), irlan_client_wakeup(), irlan_eth_init(), and irlan_provider_send_reply().

#define ACCESS_HOSTED   3
 

Definition at line 96 of file irlan_common.h.

Referenced by irlan_check_response_param(), irlan_client_state_open(), and irlan_provider_send_reply().

#define ACCESS_PEER   2
 

Definition at line 95 of file irlan_common.h.

Referenced by handle_filter_request(), irlan_check_response_param(), irlan_client_kick_timer_expired(), irlan_client_state_open(), irlan_client_state_query(), irlan_connect_indication(), irlan_ias_register(), irlan_provider_connect_indication(), irlan_provider_send_reply(), and irlan_provider_state_info().

#define ADD   3
 

Definition at line 89 of file irlan_common.h.

#define ALL   1
 

Definition at line 82 of file irlan_common.h.

#define CLEAR   2
 

Definition at line 88 of file irlan_common.h.

#define CMD_CLOSE_DATA_CHAN   3
 

Definition at line 46 of file irlan_common.h.

Referenced by irlan_close_data_channel(), and irlan_provider_data_indication().

#define CMD_FILTER_OPERATION   5
 

Definition at line 48 of file irlan_common.h.

Referenced by irlan_get_unicast_addr(), irlan_open_unicast_addr(), irlan_provider_data_indication(), irlan_provider_send_reply(), irlan_provider_state_data(), irlan_provider_state_open(), irlan_set_broadcast_filter(), and irlan_set_multicast_filter().

#define CMD_GET_MEDIA_CHAR   1
 

Definition at line 44 of file irlan_common.h.

Referenced by irlan_get_media_char(), irlan_provider_data_indication(), irlan_provider_send_reply(), and irlan_provider_state_info().

#define CMD_GET_PROVIDER_INFO   0
 

Definition at line 43 of file irlan_common.h.

Referenced by irlan_get_provider_info(), irlan_provider_data_indication(), irlan_provider_send_reply(), and irlan_provider_state_info().

#define CMD_OPEN_DATA_CHANNEL   2
 

Definition at line 45 of file irlan_common.h.

Referenced by irlan_open_data_channel(), irlan_parse_open_data_cmd(), irlan_provider_data_indication(), irlan_provider_send_reply(), and irlan_provider_state_info().

#define CMD_RECONNECT_DATA_CHAN   4
 

Definition at line 47 of file irlan_common.h.

Referenced by irlan_client_reconnect_data_channel(), and irlan_provider_data_indication().

#define DATA_CHAN   1
 

Definition at line 68 of file irlan_common.h.

#define DYNAMIC   5
 

Definition at line 91 of file irlan_common.h.

Referenced by handle_filter_request(), and irlan_check_command_param().

#define FILTER   2
 

Definition at line 83 of file irlan_common.h.

Referenced by handle_filter_request(), and irlan_check_command_param().

#define FILTER_MODE   3
 

Definition at line 70 of file irlan_common.h.

#define FILTER_TYPE   2
 

Definition at line 69 of file irlan_common.h.

#define GET   1
 

Definition at line 87 of file irlan_common.h.

#define IRLAN_ARRAY   2
 

Definition at line 100 of file irlan_common.h.

Referenced by __irlan_insert_param(), irlan_insert_array_param(), and irlan_insert_string_param().

#define IRLAN_BROADCAST   0x20
 

Definition at line 78 of file irlan_common.h.

Referenced by handle_filter_request(), irlan_check_command_param(), irlan_check_response_param(), and irlan_print_filter().

#define IRLAN_BYTE   0
 

Definition at line 98 of file irlan_common.h.

Referenced by __irlan_insert_param(), and irlan_insert_byte_param().

#define IRLAN_DIRECTED   0x01
 

Definition at line 73 of file irlan_common.h.

Referenced by handle_filter_request(), irlan_check_command_param(), irlan_check_response_param(), and irlan_print_filter().

#define IRLAN_FUNCTIONAL   0x02
 

Definition at line 74 of file irlan_common.h.

Referenced by irlan_check_response_param(), and irlan_print_filter().

#define IRLAN_GROUP   0x04
 

Definition at line 75 of file irlan_common.h.

Referenced by irlan_check_response_param(), and irlan_print_filter().

#define IRLAN_IPX_SOCKET   0x40
 

Definition at line 79 of file irlan_common.h.

Referenced by irlan_check_response_param(), and irlan_print_filter().

#define IRLAN_MAC_FRAME   0x08
 

Definition at line 76 of file irlan_common.h.

Referenced by irlan_check_response_param(), and irlan_print_filter().

#define IRLAN_MAX_HEADER   (TTP_HEADER+LMP_HEADER+LAP_MAX_HEADER)
 

Definition at line 102 of file irlan_common.h.

#define IRLAN_MTU   1518
 

Definition at line 39 of file irlan_common.h.

Referenced by irlan_client_state_arb(), irlan_client_state_open(), irlan_client_state_query(), and irlan_provider_connect_response().

#define IRLAN_MULTICAST   0x10
 

Definition at line 77 of file irlan_common.h.

Referenced by handle_filter_request(), irlan_check_command_param(), irlan_check_response_param(), and irlan_print_filter().

#define IRLAN_SHORT   1
 

Definition at line 99 of file irlan_common.h.

Referenced by __irlan_insert_param(), and irlan_insert_short_param().

#define IRLAN_TIMEOUT   10*HZ
 

Definition at line 40 of file irlan_common.h.

#define MEDIA_802_3   1
 

Definition at line 64 of file irlan_common.h.

Referenced by irlan_check_response_param(), irlan_open(), irlan_provider_send_reply(), and irlan_provider_state_info().

#define MEDIA_802_5   2
 

Definition at line 65 of file irlan_common.h.

Referenced by irlan_check_response_param(), and irlan_provider_send_reply().

#define NONE   3
 

Definition at line 84 of file irlan_common.h.

#define REMOVE   4
 

Definition at line 90 of file irlan_common.h.

#define RSP_ASYNCHRONOUS_ERROR   255
 

Definition at line 61 of file irlan_common.h.

#define RSP_AUTHENTICATION_REQUIRED   7
 

Definition at line 58 of file irlan_common.h.

#define RSP_COMMAND_NOT_SUPPORTED   3
 

Definition at line 54 of file irlan_common.h.

#define RSP_INSUFFICIENT_RESOURCES   1
 

Definition at line 52 of file irlan_common.h.

Referenced by irlan_provider_parse_command().

#define RSP_INVALID_COMMAND_FORMAT   2
 

Definition at line 53 of file irlan_common.h.

Referenced by irlan_extract_param().

#define RSP_INVALID_PASSWORD   8
 

Definition at line 59 of file irlan_common.h.

#define RSP_NOT_OPEN   6
 

Definition at line 57 of file irlan_common.h.

#define RSP_PARAM_NOT_SUPPORTED   4
 

Definition at line 55 of file irlan_common.h.

#define RSP_PROTOCOL_ERROR   9
 

Definition at line 60 of file irlan_common.h.

Referenced by irlan_provider_parse_command().

#define RSP_SUCCESS   0
 

Definition at line 51 of file irlan_common.h.

Referenced by irlan_provider_parse_command(), irlan_provider_state_data(), irlan_provider_state_info(), and irlan_provider_state_open().

#define RSP_VALUE_NOT_SUPPORTED   5
 

Definition at line 56 of file irlan_common.h.


Function Documentation

void irlan_close struct irlan_cb self  ) 
 

void irlan_close_data_channel struct irlan_cb self  ) 
 

Definition at line 663 of file irlan_common.c.

References ASSERT, irlan_cb::client, CMD_CLOSE_DATA_CHAN, irlan_cb::dtsap_sel_data, IRDA_DEBUG, irlan_ctrl_data_request(), irlan_insert_byte_param(), IRLAN_MAGIC, irlan_cb::magic, irlan_client_cb::max_header_size, NULL, and irlan_client_cb::tsap_ctrl.

Referenced by irlan_client_state_arb(), and irlan_eth_close().

Here is the call graph for this function:

void irlan_close_tsaps struct irlan_cb self  ) 
 

Definition at line 467 of file irlan_common.c.

References ASSERT, irlan_cb::client, IRDA_DEBUG, IRLAN_MAGIC, irttp_close_tsap(), irttp_disconnect_request(), irlan_cb::magic, NULL, P_NORMAL, irlan_cb::provider, irlan_provider_cb::tsap_ctrl, irlan_client_cb::tsap_ctrl, and irlan_cb::tsap_data.

Referenced by __irlan_close(), and irlan_eth_close().

Here is the call graph for this function:

int irlan_extract_param __u8 buf,
char *  name,
char *  value,
__u16 len
 

Definition at line 1013 of file irlan_common.c.

References IRDA_DEBUG, memcpy, n, and RSP_INVALID_COMMAND_FORMAT.

Referenced by irlan_client_parse_response(), and irlan_provider_parse_command().

void irlan_get_media_char struct irlan_cb self  ) 
 

Definition at line 854 of file irlan_common.c.

References ASSERT, irlan_cb::client, CMD_GET_MEDIA_CHAR, IRDA_DEBUG, irlan_ctrl_data_request(), irlan_insert_string_param(), IRLAN_MAGIC, irlan_cb::magic, irlan_client_cb::max_header_size, and NULL.

Referenced by irlan_client_state_info().

Here is the call graph for this function:

void irlan_get_provider_info struct irlan_cb self  ) 
 

Definition at line 599 of file irlan_common.c.

References ASSERT, irlan_cb::client, CMD_GET_PROVIDER_INFO, IRDA_DEBUG, irlan_ctrl_data_request(), IRLAN_MAGIC, irlan_cb::magic, irlan_client_cb::max_header_size, and NULL.

Referenced by irlan_client_state_conn().

Here is the call graph for this function:

void irlan_get_unicast_addr struct irlan_cb self  ) 
 

Definition at line 819 of file irlan_common.c.

References ASSERT, irlan_cb::client, CMD_FILTER_OPERATION, irlan_cb::dtsap_sel_data, IRDA_DEBUG, irlan_ctrl_data_request(), irlan_insert_byte_param(), irlan_insert_string_param(), IRLAN_MAGIC, irlan_cb::magic, irlan_client_cb::max_header_size, and NULL.

Referenced by irlan_connect_confirm(), and irlan_connect_indication().

Here is the call graph for this function:

void irlan_ias_register struct irlan_cb self,
__u8  tsap_sel
 

Definition at line 500 of file irlan_common.c.

References ACCESS_PEER, irlan_provider_cb::access_type, ASSERT, IAS_IRLAN_ID, IAS_PNP_ID, irias_add_integer_attrib(), irias_add_string_attrib(), irias_find_object(), irias_insert_object(), irias_new_integer_value(), irias_new_object(), irias_object_change_attribute(), IRLAN_MAGIC, irlan_cb::magic, NULL, irlan_cb::provider, and sysctl_devname.

Referenced by irlan_provider_open_ctrl_tsap().

Here is the call graph for this function:

int irlan_insert_array_param struct sk_buff skb,
char *  name,
__u8 value,
__u16  value_len
 

Definition at line 919 of file irlan_common.c.

References __irlan_insert_param(), and IRLAN_ARRAY.

Referenced by handle_filter_request(), irlan_client_reconnect_data_channel(), and irlan_provider_send_reply().

Here is the call graph for this function:

int irlan_insert_byte_param struct sk_buff skb,
char *  param,
__u8  value
 

Definition at line 889 of file irlan_common.c.

References __irlan_insert_param(), IRLAN_BYTE, and NULL.

Referenced by irlan_close_data_channel(), irlan_get_unicast_addr(), irlan_open_unicast_addr(), irlan_provider_send_reply(), irlan_set_broadcast_filter(), and irlan_set_multicast_filter().

Here is the call graph for this function:

int irlan_insert_short_param struct sk_buff skb,
char *  param,
__u16  value
 

Definition at line 894 of file irlan_common.c.

References __irlan_insert_param(), IRLAN_SHORT, and NULL.

Referenced by handle_filter_request(), and irlan_provider_send_reply().

Here is the call graph for this function:

int irlan_insert_string_param struct sk_buff skb,
char *  param,
char *  value
 

Definition at line 905 of file irlan_common.c.

References __irlan_insert_param(), IRLAN_ARRAY, and strlen.

Referenced by handle_filter_request(), irlan_get_media_char(), irlan_get_unicast_addr(), irlan_open_data_channel(), irlan_open_unicast_addr(), irlan_provider_send_reply(), irlan_set_broadcast_filter(), and irlan_set_multicast_filter().

Here is the call graph for this function:

void irlan_mod_dec_use_count void   ) 
 

Definition at line 1173 of file irlan_common.c.

References MOD_DEC_USE_COUNT.

Referenced by irlan_eth_close().

void irlan_mod_inc_use_count void   ) 
 

Definition at line 1166 of file irlan_common.c.

References MOD_INC_USE_COUNT.

Referenced by irlan_eth_open().

struct irlan_cb* irlan_open __u32  saddr,
__u32  daddr
 

Definition at line 206 of file irlan_common.c.

References access, ASSERT, hashbin_insert(), init_timer(), IRDA_DEBUG, irlan_eth_init(), IRLAN_IDLE, IRLAN_MAGIC, irlan_next_client_state(), irlan_next_provider_state(), irlan_register_netdev(), kmalloc(), MEDIA_802_3, memset, NULL, and sprintf().

Referenced by irlan_init().

Here is the call graph for this function:

void irlan_open_data_channel struct irlan_cb self  ) 
 

Definition at line 631 of file irlan_common.c.

References ASSERT, irlan_cb::client, CMD_OPEN_DATA_CHANNEL, IRDA_DEBUG, irlan_ctrl_data_request(), irlan_insert_string_param(), IRLAN_MAGIC, irlan_cb::magic, irlan_client_cb::max_header_size, and NULL.

Referenced by irlan_client_state_media().

Here is the call graph for this function:

void irlan_open_data_tsap struct irlan_cb self  ) 
 

Definition at line 428 of file irlan_common.c.

References ASSERT, notify_t::connect_confirm, notify_t::connect_indication, notify_t::data_indication, DEFAULT_INITIAL_CREDIT, notify_t::disconnect_indication, notify_t::instance, IRDA_DEBUG, irda_notify_init(), irlan_connect_confirm(), irlan_connect_indication(), irlan_disconnect_indication(), irlan_eth_receive(), IRLAN_MAGIC, irttp_open_tsap(), LSAP_ANY, irlan_cb::magic, notify_t::name, tsap_cb::notify, NOTIFY_MAX_NAME, NULL, strncpy, tsap_cb::stsap_sel, irlan_cb::tsap_data, and notify_t::udata_indication.

Referenced by irlan_client_wakeup(), and irlan_parse_open_data_cmd().

Here is the call graph for this function:

void irlan_open_unicast_addr struct irlan_cb self  ) 
 

Definition at line 702 of file irlan_common.c.

References ASSERT, CMD_FILTER_OPERATION, irlan_cb::dtsap_sel_data, IRDA_DEBUG, irlan_ctrl_data_request(), irlan_insert_byte_param(), irlan_insert_string_param(), IRLAN_MAGIC, irlan_cb::magic, irlan_cb::max_header_size, and NULL.

Referenced by irlan_connect_confirm(), and irlan_connect_indication().

Here is the call graph for this function:

int irlan_register_netdev struct irlan_cb self  ) 
 

Definition at line 178 of file irlan_common.c.

References irlan_cb::dev, dev_get(), eth, i, irlan_cb::ifname, IRDA_DEBUG, register_netdev, and sprintf().

Referenced by irlan_open().

Here is the call graph for this function:

int irlan_run_ctrl_tx_queue struct irlan_cb self  ) 
 

Definition at line 548 of file irlan_common.c.

References irlan_cb::client, dev_kfree_skb, EBUSY, FALSE, IRDA_DEBUG, irda_lock(), IRLAN_IDLE, irttp_data_request(), NULL, irlan_client_cb::state, irlan_client_cb::tsap_ctrl, irlan_client_cb::tx_busy, and irlan_client_cb::txq.

Referenced by irlan_client_ctrl_data_indication(), and irlan_ctrl_data_request().

Here is the call graph for this function:

void irlan_set_broadcast_filter struct irlan_cb self,
int  status
 

Definition at line 740 of file irlan_common.c.

References ASSERT, irlan_cb::client, CMD_FILTER_OPERATION, irlan_cb::dtsap_sel_data, IRDA_DEBUG, irlan_ctrl_data_request(), irlan_insert_byte_param(), irlan_insert_string_param(), IRLAN_MAGIC, irlan_cb::magic, irlan_client_cb::max_header_size, and NULL.

Referenced by irlan_connect_confirm(), and irlan_eth_set_multicast_list().

Here is the call graph for this function:

void irlan_set_multicast_filter struct irlan_cb self,
int  status
 

Definition at line 779 of file irlan_common.c.

References ASSERT, irlan_cb::client, CMD_FILTER_OPERATION, irlan_cb::dtsap_sel_data, IRDA_DEBUG, irlan_ctrl_data_request(), irlan_insert_byte_param(), irlan_insert_string_param(), IRLAN_MAGIC, irlan_cb::magic, irlan_client_cb::max_header_size, and NULL.

Referenced by irlan_connect_confirm(), and irlan_eth_set_multicast_list().

Here is the call graph for this function:

void print_ret_code __u8  code  ) 
 

Definition at line 1127 of file irlan_common.c.

References KERN_INFO, printk, and WARNING.

Referenced by irlan_client_parse_response().


Variable Documentation

hashbin_t* irlan
 

Definition at line 65 of file irlan_common.c.

Referenced by irlan_client_discovery_indication().