2011-03-08 22:13:54 +01:00
|
|
|
/*
|
|
|
|
* wl_definitions.h
|
|
|
|
*
|
|
|
|
* Created on: Mar 6, 2011
|
|
|
|
* Author: dlafauci
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef WL_DEFINITIONS_H_
|
|
|
|
#define WL_DEFINITIONS_H_
|
|
|
|
|
|
|
|
// Maximum size of a SSID
|
|
|
|
#define WL_SSID_MAX_LENGTH 32
|
|
|
|
// Length of passphrase. Valid lengths are 8-63.
|
|
|
|
#define WL_WPA_KEY_MAX_LENGTH 63
|
|
|
|
// Length of key in bytes. Valid values are 5 and 13.
|
|
|
|
#define WL_WEP_KEY_MAX_LENGTH 13
|
|
|
|
// Size of a MAC-address or BSSID
|
|
|
|
#define WL_MAC_ADDR_LENGTH 6
|
|
|
|
// Size of a MAC-address or BSSID
|
|
|
|
#define WL_IPV4_LENGTH 4
|
|
|
|
// Maximum size of a SSID list
|
2011-04-05 23:24:17 +02:00
|
|
|
#define WL_NETWORKS_LIST_MAXNUM 10
|
2011-03-08 22:13:54 +01:00
|
|
|
// Maxmium number of socket
|
|
|
|
#define MAX_SOCK_NUM 4
|
2011-04-21 07:47:54 +02:00
|
|
|
//Maximum number of attempts to establish wifi connection
|
2011-04-21 19:16:39 +02:00
|
|
|
#define WL_MAX_ATTEMPT_CONNECTION 10
|
2011-03-08 22:13:54 +01:00
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
WL_IDLE_STATUS,
|
|
|
|
WL_NO_SSID_AVAIL,
|
|
|
|
WL_SCAN_COMPLETED,
|
|
|
|
WL_CONNECTED,
|
|
|
|
WL_CONNECT_FAILED,
|
|
|
|
WL_CONNECTION_LOST,
|
|
|
|
WL_DISCONNECTED
|
|
|
|
} wl_status_t;
|
|
|
|
|
2012-03-04 11:42:48 +01:00
|
|
|
/* Encryption modes */
|
|
|
|
enum wl_enc_type { /* Values map to 802.11 encryption suites... */
|
|
|
|
ENC_TYPE_WEP = 5,
|
|
|
|
ENC_TYPE_TKIP = 2,
|
|
|
|
ENC_TYPE_CCMP = 4,
|
|
|
|
/* ... except these two, 7 and 8 are reserved in 802.11-2007 */
|
|
|
|
ENC_TYPE_NONE = 7,
|
|
|
|
ENC_TYPE_AUTO = 8
|
|
|
|
};
|
|
|
|
|
2011-03-08 22:13:54 +01:00
|
|
|
|
|
|
|
#endif /* WL_DEFINITIONS_H_ */
|