common.h File Reference

#include <sys/types.h>
#include <sys/socket.h>
#include <linux/types.h>
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
#include <linux/if_ether.h>
#include <iwlib.h>
#include <wireless.h>
#include <dbus/dbus.h>
#include <wlancond.h>

Include dependency graph for common.h:

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

Go to the source code of this file.

Data Structures

struct  scan_results_t
struct  wpa_ie_list_t
struct  wpa_ie_save_t
struct  connect_params_t
struct  pmksa_cache_t
struct  wlan_status_t
struct  wireless_iface

Defines

#define DBUS_API_SUBJECT_TO_CHANGE
#define PMK_CACHE_SIZE   32
#define WLANCOND_LOW   TRUE
#define WLANCOND_HIGH   FALSE
#define WLANCOND_TX_POWER10DBM   10
#define WLANCOND_TX_POWER100DBM   20
#define NULL_BSSID   (unsigned char*)"\x00\x00\x00\x00\x00\x00"
#define WLANCOND_DEFAULT_SLEEP_TIMEOUT   200000
#define WLANCOND_VERY_SHORT_CAM_TIMEOUT   100000
#define WLANCOND_LONG_CAM_TIMEOUT   4000000
#define MIC_FAILURE_TIMEOUT   60
#define NO_SIGNAL   0
#define DISCONNECTED_SIGNAL   1
#define WLANCOND_MAX_NETWORKS   30
#define WLANCOND_MAX_SCAN_TRIES   3
#define WLANCOND_INITIAL_ROAM_SCAN_DELAY   2
#define WLANCOND_ROAM_THRESHOLD   10
#define WLANCOND_MIN_ROAM_SCAN_INTERVAL   60
#define WLANCOND_MAX_ROAM_SCAN_INTERVAL   16*60
#define WLANCOND_RSSI_PENALTY   25
#define WLANCOND_MINIMUM_SIGNAL   -99
#define WLANCOND_MINIMUM_AUTOCONNECT_RSSI   -85
#define GCONF_PATH_PREFIX   "/system/osso/connectivity/IAP/"
#define SLEEP_GCONF_PATH   GCONF_PATH_PREFIX "wlan_sleep_timeout"
#define INACTIVE_SLEEP_GCONF_PATH   GCONF_PATH_PREFIX "inactive_wlan_sleep_timeout"
#define DEBUG_LEVEL   GCONF_PATH_PREFIX "wlancond_debug_level"
#define WLANCOND_ALLOW_ALL_CIPHERS   GCONF_PATH_PREFIX "allow_wep_ciphers_in_WPA"
#define WLANCOND_PRIO_HIGH   2
#define WLANCOND_PRIO_MEDIUM   1
#define WLANCOND_PRIO_LOW   0
#define WLANCOND_REASON_LEAVING   3
#define WLANCOND_REASON_MIC_FAILURE   14
#define PHONE_NET_DBUS_SERVICE   "com.nokia.phone.net"
#define PHONE_NET_DBUS_PATH   "/com/nokia/phone/net"
#define PHONE_NET_DBUS_INTERFACE   "Phone.Net"
#define PHONE_REGISTRATION_STATUS_CHANGE_SIG   "registration_status_change"
#define WLANCOND_WEP40   (1<<0)
#define WLANCOND_WEP104   (1<<1)
#define WLANCOND_WEP40_GROUP   (1<<2)
#define WLANCOND_WEP104_GROUP   (1<<3)
#define BLUEZ_SERVICE_NAME   "org.bluez"
#define BLUEZ_MANAGER_PATH_NAME   "/"
#define BLUEZ_MANAGER_INTERFACE_NAME   "org.bluez.Manager"
#define BLUEZ_MANAGER_DEFAULT_ADAPTER_METHOD   "DefaultAdapter"
#define BLUEZ_ADAPTER_SERVICE_NAME   "org.bluez.Adapter"
#define BLUEZ_ADAPTER_PROPERTY_CHANGED_SIG   "PropertyChanged"
#define BLUEZ_ADAPTER_PROPERTY_POWERED   "Powered"
#define BLUEZ_ADAPTER_GET_PROPERTIES_METHOD   "GetProperties"
#define BLUEZ_HEADSET_SERVICE_NAME   "org.bluez.Headset"
#define BLUEZ_HEADSET_PROPERTY_CHANGED_SIG   "PropertyChanged"
#define BLUEZ_HEADSET_PROPERTY_STATE   "State"
#define BLUEZ_HEADSET_PROPERTY_PLAYING   "playing"
#define BLUEZ_AUDIOSINK_SERVICE_NAME   "org.bluez.AudioSink"
#define BLUEZ_AUDIOSINK_PROPERTY_CHANGED_SIG   "PropertyChanged"
#define BLUEZ_AUDIOSINK_PROPERTY_STATE   "State"
#define BLUEZ_AUDIOSINK_PROPERTY_PLAYING   "playing"
#define POLICY_SERVICE_NAME   "com.nokia.policy"
#define POLICY_ACTIONS_SIG   "actions"
#define WLANCOND_BT_COEX_FILE   "/sys/devices/platform/wl12xx/bt_coex_mode"

Typedefs

typedef struct connect_params_t connect_params
typedef struct pmksa_cache_t pmksa_cache

Enumerations

enum  force_t { FORCE_NO, FORCE_YES }
enum  scan_state { SCAN_NOT_ACTIVE = 0, SCAN_ACTIVE }
enum  wlan_state {
  WLAN_NOT_INITIALIZED = 0, WLAN_INITIALIZED, WLAN_INITIALIZED_FOR_SCAN, WLAN_INITIALIZED_FOR_CONNECTION,
  WLAN_NO_ADDRESS, WLAN_CONNECTED
}
enum  wlan_power_state {
  WLANCOND_POWER_ON = 1, WLANCOND_LONG_CAM, WLANCOND_SHORT_CAM, WLANCOND_VERY_SHORT_CAM,
  WLANCOND_FULL_POWERSAVE
}
enum  bt_state { WLANCOND_BT_COEX_OFF, WLANCOND_BT_COEX_ON, WLANCOND_BT_COEX_MONOAUDIO }
enum  call_state { WLANCOND_CALL_NONE, WLANCOND_CALL_VOIP, WLANCOND_CALL_CELL, WLANCOND_CALL_UNKNOWN }

Functions

void init_logging (void)
void wlancond_print (guint priority, const char *debug,...)
gboolean monitor_wi (void)
void del_all_interface_data (void)
struct wireless_iface * get_interface_data (int ifindex)
int print_event_token (struct iw_event *event, struct scan_results_t *scan_results, int ifindex, gboolean scan_event)
void send_dbus_scan_results (GSList *scan_results_save, const char *sender, dbus_int32_t number_of_results)
GSList * save_scan_results (struct scan_results_t *scan_results, GSList *scan_results_save)
void clean_scan_results (GSList **scan_results_save)
void disconnected_signal (void)
void mode_change (const char *mode)
void clean_scan_results_item (gpointer data, gpointer user_data)
void print_mac (guint priority, const char *message, guchar *mac)


Detailed Description

Copyright (C) 2004 Nokia Corporation. All rights reserved.

Author:
Janne Ylälehto <janne.ylalehto@nokia.com>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

Definition in file common.h.


Function Documentation

void clean_scan_results ( GSList **  scan_results_save  ) 

Remove saved scan results.

Parameters:
scan_results_save structure where scan results are saved.

Definition at line 90 of file dbus-signal.c.

Referenced by ask_scan_results(), clean_roam_cache(), connect_from_scan_results(), and settings_and_connect_request().

void del_all_interface_data ( void   ) 

Deletes all interface data

Definition at line 957 of file dbus-signal.c.

void disconnected_signal ( void   ) 

Send disconnected signal.

Definition at line 201 of file dbus-signal.c.

Referenced by set_wlan_state().

struct wireless_iface* get_interface_data ( int  ifindex  )  [read]

Get interface data from cache or live interface.

Parameters:
ifindex Interface index.
Returns:
wireless_iface The wireless interface.

Definition at line 867 of file dbus-signal.c.

References index2name(), and socket_open().

Referenced by print_event_stream(), and scan_results_ioctl().

Here is the call graph for this function:

void init_logging ( void   ) 

Initialize logging.

Definition at line 251 of file dbus-handler.c.

References get_gconf_int().

Referenced by main().

Here is the call graph for this function:

void mode_change ( const char *  mode  ) 

Helper function for mode change.

Parameters:
mode New mode.

Definition at line 307 of file dbus-handler.c.

References set_wlan_state().

Referenced by main().

Here is the call graph for this function:

gboolean monitor_wi ( void   ) 

Starts monitoring of wireless events.

Returns:
status.

Definition at line 1194 of file dbus-signal.c.

References _monitor_cb(), and init_wi().

Referenced by main().

Here is the call graph for this function:

int print_event_token ( struct iw_event *  event,
struct scan_results_t *  scan_results,
int  ifindex,
gboolean  scan_event 
)

Print or save wireless events.

Parameters:
event extracted token.
scan_results structure where scan results are saved.
ifindex Interface index.
Returns:
status.

Definition at line 380 of file dbus-signal.c.

References ask_scan_results(), get_scan_state(), handle_custom_event(), handle_wap_event(), handle_wpa_ie_event_binary(), and set_wlan_state().

Referenced by print_event_stream(), and scan_results_ioctl().

Here is the call graph for this function:

GSList* save_scan_results ( struct scan_results_t *  scan_results,
GSList *  scan_results_save 
)

Save scan results to list.

Parameters:
scan_results structure where scan results are.
scan_results_save structure where scan results are saved.

Definition at line 106 of file dbus-signal.c.

Referenced by scan_results_ioctl().

void send_dbus_scan_results ( GSList *  scan_results_save,
const char *  sender,
dbus_int32_t  number_of_results 
)

Send scan results to DBUS.

Parameters:
scan_results_save structure where scan results are saved.
sender The message is sent to this entity.

Definition at line 123 of file dbus-signal.c.

Referenced by ask_scan_results(), and set_scan_state().

void wlancond_print ( guint  priority,
const char *  debug,
  ... 
)

Wlancond debug printing function.

Definition at line 82 of file dbus-handler.c.


Generated on Mon Jul 5 12:20:57 2010 for WLAN Connection Daemon by  doxygen 1.5.6