le_wifiDefs_interface.h File Reference

#include "legato.h"

Go to the source code of this file.

Macros

#define LE_WIFIDEFS_MAX_IP_LENGTH   15
 
#define LE_WIFIDEFS_MIN_CHANNEL_VALUE   1
 
#define LE_WIFIDEFS_MAX_CHANNEL_VALUE   14
 
#define LE_WIFIDEFS_MAX_WEPKEY_LENGTH   63
 
#define LE_WIFIDEFS_MAX_WEPKEY_BYTES   64
 
#define LE_WIFIDEFS_MIN_PASSPHRASE_LENGTH   8
 
#define LE_WIFIDEFS_MAX_PASSPHRASE_LENGTH   63
 
#define LE_WIFIDEFS_MAX_PASSPHRASE_BYTES   64
 
#define LE_WIFIDEFS_MAX_PSK_LENGTH   64
 
#define LE_WIFIDEFS_MAX_PSK_BYTES   65
 
#define LE_WIFIDEFS_MAX_USERNAME_LENGTH   63
 
#define LE_WIFIDEFS_MAX_USERNAME_BYTES   64
 
#define LE_WIFIDEFS_MAX_PASSWORD_LENGTH   130
 
#define LE_WIFIDEFS_MAX_PASSWORD_BYTES   131
 
#define LE_WIFIDEFS_MIN_SSID_LENGTH   1
 
#define LE_WIFIDEFS_MAX_SSID_LENGTH   32
 
#define LE_WIFIDEFS_MAX_SSID_BYTES   33
 
#define LE_WIFIDEFS_MAX_BSSID_LENGTH   17
 
#define LE_WIFIDEFS_MAX_BSSID_BYTES   18
 

Typedefs

typedef void(* le_wifiDefs_DisconnectHandler_t) (void *)
 

Functions

void le_wifiDefs_ConnectService (void)
 
le_result_t le_wifiDefs_TryConnectService (void)
 
void le_wifiDefs_SetServerDisconnectHandler (le_wifiDefs_DisconnectHandler_t disconnectHandler, void *contextPtr)
 
void le_wifiDefs_DisconnectService (void)
 

Detailed Description

Definition file common to multiple wifi related services.

Macro Definition Documentation

◆ LE_WIFIDEFS_MAX_BSSID_BYTES

#define LE_WIFIDEFS_MAX_BSSID_BYTES   18

Maximum length of the Basic Service set identifier (BSSID). One extra byte is added for the null character.

◆ LE_WIFIDEFS_MAX_BSSID_LENGTH

#define LE_WIFIDEFS_MAX_BSSID_LENGTH   17

The maximum length of octets of the Basic Service set identifier (BSSID). The length is derived from 6 bytes represented as hexadecimal character string with bytes separated by colons.

◆ LE_WIFIDEFS_MAX_CHANNEL_VALUE

#define LE_WIFIDEFS_MAX_CHANNEL_VALUE   14

The last WiFi channel.

Note
This is only valid for 2,4 GHz WiFi frequencies.

◆ LE_WIFIDEFS_MAX_IP_LENGTH

#define LE_WIFIDEFS_MAX_IP_LENGTH   15

The maximum length of the textual representation of an IP address.

◆ LE_WIFIDEFS_MAX_PASSPHRASE_BYTES

#define LE_WIFIDEFS_MAX_PASSPHRASE_BYTES   64

Maximum length of PSK, Pre Shared Key. One extra byte is added for the null character.

◆ LE_WIFIDEFS_MAX_PASSPHRASE_LENGTH

#define LE_WIFIDEFS_MAX_PASSPHRASE_LENGTH   63

The maximum length of the pass-phrase used to generate PSK is 63 bytes. See 802.11-2007: H4.2.

◆ LE_WIFIDEFS_MAX_PASSWORD_BYTES

#define LE_WIFIDEFS_MAX_PASSWORD_BYTES   131

Maximum length of the User-Name. One extra byte is added for the null character.

◆ LE_WIFIDEFS_MAX_PASSWORD_LENGTH

#define LE_WIFIDEFS_MAX_PASSWORD_LENGTH   130

Maximum length of the User-Name. RFC2865 recommends at least 130.

◆ LE_WIFIDEFS_MAX_PSK_BYTES

#define LE_WIFIDEFS_MAX_PSK_BYTES   65

Maximum length of PSK, Pre Shared Key. One extra byte is added for the null character.

◆ LE_WIFIDEFS_MAX_PSK_LENGTH

#define LE_WIFIDEFS_MAX_PSK_LENGTH   64

The length of the PSK, Pre Shared Key, is 64 bytes. See 802.11-2007: H4.2.

◆ LE_WIFIDEFS_MAX_SSID_BYTES

#define LE_WIFIDEFS_MAX_SSID_BYTES   33

The maximum length of octets of the Service set identification (SSID).

Note
While the values are probably human readable, this is not a string.

◆ LE_WIFIDEFS_MAX_SSID_LENGTH

#define LE_WIFIDEFS_MAX_SSID_LENGTH   32

The maximum length of octets of the Service set identification (SSID).

Note
While the values are probably human readable, this is not a string.

◆ LE_WIFIDEFS_MAX_USERNAME_BYTES

#define LE_WIFIDEFS_MAX_USERNAME_BYTES   64

Maximum length of the User-Name. One extra byte is added for the null character.

◆ LE_WIFIDEFS_MAX_USERNAME_LENGTH

#define LE_WIFIDEFS_MAX_USERNAME_LENGTH   63

Maximum length of the User-Name. RFC2865 recommends the ability to handle at least 63 octets.

◆ LE_WIFIDEFS_MAX_WEPKEY_BYTES

#define LE_WIFIDEFS_MAX_WEPKEY_BYTES   64

The maximum number of bytes of the wep key One extra byte is added for the null character.

◆ LE_WIFIDEFS_MAX_WEPKEY_LENGTH

#define LE_WIFIDEFS_MAX_WEPKEY_LENGTH   63

The maximum length of the wep key.

◆ LE_WIFIDEFS_MIN_CHANNEL_VALUE

#define LE_WIFIDEFS_MIN_CHANNEL_VALUE   1

The first WiFi channel.

Note
This is only valid for 2,4 GHz WiFi frequencies.

◆ LE_WIFIDEFS_MIN_PASSPHRASE_LENGTH

#define LE_WIFIDEFS_MIN_PASSPHRASE_LENGTH   8

The minimum length of the pass-phrase used to generate PSK is 8 bytes. See 802.11-2007: H4.2.

◆ LE_WIFIDEFS_MIN_SSID_LENGTH

#define LE_WIFIDEFS_MIN_SSID_LENGTH   1

The minimum length of octets of the Service set identification (SSID).

Note
While the values are probably human readable, this is not a string.

Typedef Documentation

◆ le_wifiDefs_DisconnectHandler_t

typedef void(* le_wifiDefs_DisconnectHandler_t) (void *)

Type for handler called when a server disconnects.

Function Documentation

◆ le_wifiDefs_ConnectService()

void le_wifiDefs_ConnectService ( void  )

Connect the current client thread to the service providing this API. Block until the service is available.

For each thread that wants to use this API, either ConnectService or TryConnectService must be called before any other functions in this API. Normally, ConnectService is automatically called for the main thread, but not for any other thread. For details, see Client-specific Functions.

This function is created automatically.

◆ le_wifiDefs_DisconnectService()

void le_wifiDefs_DisconnectService ( void  )

Disconnect the current client thread from the service providing this API.

Normally, this function doesn't need to be called. After this function is called, there's no longer a connection to the service, and the functions in this API can't be used. For details, see Client-specific Functions.

This function is created automatically.

◆ le_wifiDefs_SetServerDisconnectHandler()

void le_wifiDefs_SetServerDisconnectHandler ( le_wifiDefs_DisconnectHandler_t  disconnectHandler,
void *  contextPtr 
)

Set handler called when server disconnection is detected.

When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants to continue without exiting, it should call longjmp() from inside the handler.

◆ le_wifiDefs_TryConnectService()

le_result_t le_wifiDefs_TryConnectService ( void  )

Try to connect the current client thread to the service providing this API. Return with an error if the service is not available.

For each thread that wants to use this API, either ConnectService or TryConnectService must be called before any other functions in this API. Normally, ConnectService is automatically called for the main thread, but not for any other thread. For details, see Client-specific Functions.

This function is created automatically.

Returns
  • LE_OK if the client connected successfully to the service.
  • LE_UNAVAILABLE if the server is not currently offering the service to which the client is bound.
  • LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).
  • LE_COMM_ERROR if the Service Directory cannot be reached.