include/alp/wifi.h File Reference


Detailed Description

The ALP Public Wifi API.

>

#include <stdlib.h>
#include <time.h>
#include <alp/types.h>
#include <alp/sysclass.h>
#include <alp/cnc.h>

Go to the source code of this file.

Data Structures

struct  _AlpWifiAccessPoint
struct  _AlpWifiAuthentication
struct  _AlpWifiDeviceInformation
struct  _AlpWifiFavoriteNetwork
struct  _AlpWifiSecureParameter

Defines

#define ALP_NOTIFY_APP_ID_WIFI   ALP_NOTIFY_APP_ID_CNC_SERVER
 notifications are sent through the Connection Manager Server
#define ALP_NOTIFY_EVENT_WIFI_RADIO_STATE   "/alp/wifi/radio"
 notify event for Wifi radio ON/OFF, data are just a boolean
#define ALP_STATUS_WIFI_DRIVER_ERROR   ((alp_status_t) (ALP_CLASS_WIFI | 0x00030000))
 Kernel Wifi driver returns an error (in this case the value of errno is ORed to the error).
#define ALP_STATUS_WIFI_INVALID_KEY_LENGTH   ((alp_status_t) (ALP_CLASS_WIFI | 0x00050000))
 The key length is invalid.
#define ALP_STATUS_WIFI_INVALID_PARAM   ((alp_status_t) (ALP_CLASS_WIFI | 0x00020000))
 Invalid paremeter in a function call.
#define ALP_STATUS_WIFI_IPC_ERROR   ((alp_status_t) (ALP_CLASS_WIFI | 0x00060000))
 an IPC call returns an error (in this case the value of errno is ORed to the error)
#define ALP_STATUS_WIFI_MEMORY   ((alp_status_t) (ALP_CLASS_WIFI | 0x00010000))
 Out of memory.
#define ALP_STATUS_WIFI_NO_ERROR   ALP_STATUS_OK
 No error.
#define ALP_STATUS_WIFI_NOT_CONNECTED   ((alp_status_t) (ALP_CLASS_WIFI | 0x00040000))
 No Wifi active connected.
#define ALP_WIFI_ESSID_SIZE   33
 Maximum length for ESSID.
#define ALP_WIFI_FAVORITE_NETWORK_SIZE   ALP_WIFI_ESSID_SIZE+13
 Maximum length of the favorite network name.
#define ALP_WIFI_IP_SIZE   40
 Length of a MAC address string.
#define ALP_WIFI_MAC_ADDRESS_SIZE   18
 Length of a MAC address string.
#define ALP_WIFI_MAXIMUM_PROFILE_NUMBER   25
#define ALP_WIFI_PRESHARED_KEY_LENGTH_ASCII_WEP_104   13
 Size of WEP key 104/128 bits in ASCII format.
#define ALP_WIFI_PRESHARED_KEY_LENGTH_ASCII_WEP_40   5
 Size of WEP key 40/64 bits in ASCII format.
#define ALP_WIFI_PRESHARED_KEY_LENGTH_ASCII_WPA_PSK_MAX   63
 Maximal size of WPA key in ASCII format.
#define ALP_WIFI_PRESHARED_KEY_LENGTH_ASCII_WPA_PSK_MIN   8
 Minimal size of WPA key in ASCII format.
#define ALP_WIFI_PRESHARED_KEY_LENGTH_HEX_WEP_104   26
 Size of WEP key 104/128 bits in hexadecimal format.
#define ALP_WIFI_PRESHARED_KEY_LENGTH_HEX_WEP_40   10
 Size of WEP key 40/64 bits in hexadecimal format.
#define ALP_WIFI_PRESHARED_KEY_LENGTH_HEX_WPA_PSK   64
 Size of WPA key in hexadecimal format.
#define ALP_WIFI_RADIO_80211_A   0x01
 802.11a
#define ALP_WIFI_RADIO_80211_B   0x02
 802.11b
#define ALP_WIFI_RADIO_80211_G   0x04
 802.11g
#define ALP_WIFI_RADIO_80211_MASK   0x0f
#define ALP_WIFI_RADIO_80211_N   0x08
 802.11n
#define ALP_WIFI_RADIO_MODE_ADHOC   0x10
 For ad-hoc networks, not supported for now.
#define ALP_WIFI_RADIO_MODE_INFRASTRUCTURE   0x20
 For infrastructure networks.
#define ALP_WIFI_RADIO_MODE_MASK   0x30
#define ALP_WIFI_RADIO_SCAN_HIDDEN   0x40
 For hidden networks.
#define ALP_WIFI_RADIO_SCAN_VISIBLE   0x80
 For visible networks.
#define ALP_WIFI_SECURE_PARAMETER_TYPE_AUTHENTICATION   2
 For 802.1X/WPA-EAP with login/password (such as EAP-CHAP).
#define ALP_WIFI_SECURE_PARAMETER_TYPE_CERTIFICATE   3
 For 802.1X/WPA-EAP with certificate (such as EAP-TLS).
#define ALP_WIFI_SECURE_PARAMETER_TYPE_PRE_SHARED_KEY   1
 For WEP/WPA-PSK keys.
#define ALP_WIFI_SECURE_PARAMETER_TYPE_UNDEFINED   0
 Undefined type of security parameter.
#define ALP_WIFI_SECURITY_MODE_8021X   0x0008
 802.1X authentication, not supported for now
#define ALP_WIFI_SECURITY_MODE_MASK   0x000f
 Mask for security modes.
#define ALP_WIFI_SECURITY_MODE_OPEN   0x0000
 Open.
#define ALP_WIFI_SECURITY_MODE_WEP   0x0001
 WEP.
#define ALP_WIFI_SECURITY_MODE_WPA_EAP   0x0004
 WPA/WPA-2 EAP, not supported for now.
#define ALP_WIFI_SECURITY_MODE_WPA_PSK   0x0002
 WPA/WPA-2 PSK.
#define ALP_WIFI_SECURITY_WEP_104   0x0020
 104 bits WEP key (128 bits)
#define ALP_WIFI_SECURITY_WEP_40   0x0010
 40 bits WEP key (64 bits)
#define ALP_WIFI_SECURITY_WEP_MASK   0x00f0
 Mask for security encryption.
#define ALP_WIFI_SECURITY_WEP_OPEN   0x0040
 Open authentication in WEP mode.
#define ALP_WIFI_SECURITY_WEP_SHARED   0x0080
 Shared authentication in WEP mode.
#define ALP_WIFI_SECURITY_WPA_EAP_PEAP   0x0800
 EAP-PEAP, not supported for now.
#define ALP_WIFI_SECURITY_WPA_EAP_TLS   0x0400
 EAP-TLS, not supported for now.
#define ALP_WIFI_SECURITY_WPA_EAP_TTLS   0x1000
 EAP-TTLS, not supported for now.
#define ALP_WIFI_SECURITY_WPA_GROUP_CCMP   0x0200
 CCMP.
#define ALP_WIFI_SECURITY_WPA_GROUP_TKIP   0x0100
 TKIP.
#define ALP_WIFI_SECURITY_WPA_PAIRWISE_CCMP   0x0080
 CCMP.
#define ALP_WIFI_SECURITY_WPA_PAIRWISE_TKIP   0x0040
 TKIP.
#define ALP_WIFI_SECURITY_WPA_WPA1   0x0010
 WPA 1.
#define ALP_WIFI_SECURITY_WPA_WPA2   0x0020
 WPA 2.
#define ALP_WIFI_SIGNAL_STRENGTH_AVERAGE   2
 average signal
#define ALP_WIFI_SIGNAL_STRENGTH_EXCELLENT   4
 excellent signal
#define ALP_WIFI_SIGNAL_STRENGTH_GOOD   3
 good signal
#define ALP_WIFI_SIGNAL_STRENGTH_LOW   1
 low signal
#define ALP_WIFI_SIGNAL_STRENGTH_RANGE_LIMIT   0
 Very very low signal.

Typedefs

typedef _AlpWifiAccessPoint AlpWifiAccessPoint
 A discovered wifi access point.
typedef _AlpWifiAuthentication AlpWifiAuthentication
 A couple login/password.
typedef _AlpWifiContext AlpWifiContext
 Wifi Context used in all function calls.
typedef _AlpWifiDeviceInformation AlpWifiDeviceInformation
 Information about the Wifi device.
typedef _AlpWifiFavoriteNetwork AlpWifiFavoriteNetwork
 A favorite wifi network.
typedef _AlpWifiSecureParameter AlpWifiSecureParameter
 A security parameter for Wifi networks (i.e. a WEP key).

Functions

alp_status_t alp_wifi_ap_get_mac_address (AlpWifiContext *wifi_context, char *ap_mac_address)
alp_status_t alp_wifi_bitrate_get (AlpWifiContext *wifi_context, int *bitrate)
void alp_wifi_close (AlpWifiContext *wifi_context)
alp_status_t alp_wifi_connect_ap (AlpWifiContext *wifi_context, const AlpWifiAccessPoint *ap, bool ui_required)
alp_status_t alp_wifi_disconnect (AlpWifiContext *wifi_context)
void alp_wifi_favorite_clear_details (AlpWifiFavoriteNetwork *favorite_details)
static alp_status_t alp_wifi_favorite_connect (AlpWifiContext *wifi_context, const char *favorite_name, bool ui_required)
alp_status_t alp_wifi_favorite_connect_id (AlpWifiContext *wifi_context, uint32_t favorite_id, bool ui_required)
static alp_status_t alp_wifi_favorite_delete (const char *favorite_name)
alp_status_t alp_wifi_favorite_delete_id (uint32_t favorite_id)
void alp_wifi_favorite_free_list (char **name_list, unsigned char count)
alp_status_t alp_wifi_favorite_get_details (const char *favorite_name, AlpWifiFavoriteNetwork *favorite_details)
alp_status_t alp_wifi_favorite_get_list (char ***name_list, unsigned char *count)
static alp_status_t alp_wifi_favorite_update (const char *favorite_name, char *essid, unsigned short security, const AlpWifiSecureParameter *secure_parameter)
alp_status_t alp_wifi_favorite_update_id (uint32_t favorite_id, char *essid, unsigned short security, const AlpWifiSecureParameter *secure_parameter)
alp_status_t alp_wifi_get_channel (AlpWifiContext *wifi_context, unsigned char *channel)
alp_status_t alp_wifi_get_connected_access_point (AlpWifiContext *wifi_context, AlpWifiAccessPoint *ap)
alp_status_t alp_wifi_get_connected_favorite_id (AlpWifiContext *wifi_context, uint32_t *favorite_id)
alp_status_t alp_wifi_get_device_information (AlpWifiContext *wifi_context, AlpWifiDeviceInformation *device_info)
alp_status_t alp_wifi_get_essid (AlpWifiContext *wifi_context, char *essid)
alp_status_t alp_wifi_get_ip_address (AlpWifiContext *wifi_context, char *ip)
alp_status_t alp_wifi_get_mac_address (AlpWifiContext *wifi_context, char *mac_address)
alp_status_t alp_wifi_is_connected (AlpWifiContext *wifi_context, bool *is_connected)
alp_status_t alp_wifi_network_status_get (AlpWifiContext *wifi_context, uint8_t *status)
AlpWifiContextalp_wifi_open ()
alp_status_t alp_wifi_power_set_state (AlpWifiContext *wifi_context, bool activate)
alp_status_t alp_wifi_radio_get_state (AlpWifiContext *wifi_context, bool *radio_enabled)
alp_status_t alp_wifi_radio_set_state (AlpWifiContext *wifi_context, bool radio_enabled)
alp_status_t alp_wifi_scan_get (AlpWifiContext *wifi_context, AlpWifiAccessPoint **discovered_ap, int *size)
alp_status_t alp_wifi_scan_refresh (AlpWifiContext *wifi_context, bool synchronous)
alp_status_t alp_wifi_signal_get_level (AlpWifiContext *wifi_context, unsigned char *signal_level)


Generated on Wed Jul 30 07:06:40 2008 by Doxygen 1.4.6 for ALP SDK + Hiker Documentation

Copyright © 1999-2008 ACCESS CO., LTD. All rights reserved.