#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>


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 | 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 | WLANCOND_REASON_LEAVING 3 |
| #define | WLANCOND_REASON_MIC_FAILURE 14 |
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 } |
Functions | |
| 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 (const char *message, guchar *mac) |
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.
| void clean_scan_results | ( | GSList ** | scan_results_save | ) |
Remove saved scan results.
| scan_results_save | structure where scan results are saved. |
Definition at line 85 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 888 of file dbus-signal.c.
| void disconnected_signal | ( | void | ) |
Send disconnected signal.
Definition at line 192 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.
| ifindex | Interface index. |
Definition at line 801 of file dbus-signal.c.
References index2name(), and socket_open().
Referenced by print_event_stream(), and scan_results_ioctl().

| void mode_change | ( | const char * | mode | ) |
Helper function for mode change.
| mode | New mode. |
Definition at line 215 of file dbus-handler.c.
References set_wlan_state().
Referenced by main().

| gboolean monitor_wi | ( | void | ) |
Starts monitoring of wireless events.
Definition at line 1108 of file dbus-signal.c.
References _monitor_cb(), and init_wi().
Referenced by main().

| int print_event_token | ( | struct iw_event * | event, | |
| struct scan_results_t * | scan_results, | |||
| int | ifindex, | |||
| gboolean | scan_event | |||
| ) |
Print or save wireless events.
| event | extracted token. | |
| scan_results | structure where scan results are saved. | |
| ifindex | Interface index. |
Definition at line 362 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().

| GSList* save_scan_results | ( | struct scan_results_t * | scan_results, | |
| GSList * | scan_results_save | |||
| ) |
Save scan results to list.
| scan_results | structure where scan results are. | |
| scan_results_save | structure where scan results are saved. |
Definition at line 101 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.
| scan_results_save | structure where scan results are saved. | |
| sender | The message is sent to this entity. |
Definition at line 118 of file dbus-signal.c.
Referenced by ask_scan_results(), and set_scan_state().
1.5.6