le_wifiDefs_interface.h

Go to the documentation of this file.
1 
2 
3 /*
4  * ====================== WARNING ======================
5  *
6  * THE CONTENTS OF THIS FILE HAVE BEEN AUTO-GENERATED.
7  * DO NOT MODIFY IN ANY WAY.
8  *
9  * ====================== WARNING ======================
10  */
11 
12 /**
13  * @file le_wifiDefs_interface.h
14  *
15  * Definition file common to multiple wifi related services.
16  *
17  * Copyright (C) Sierra Wireless Inc.
18  */
19 
20 #ifndef LE_WIFIDEFS_INTERFACE_H_INCLUDE_GUARD
21 #define LE_WIFIDEFS_INTERFACE_H_INCLUDE_GUARD
22 
23 
24 #include "legato.h"
25 
26 
27 //--------------------------------------------------------------------------------------------------
28 /**
29  * Type for handler called when a server disconnects.
30  */
31 //--------------------------------------------------------------------------------------------------
32 typedef void (*le_wifiDefs_DisconnectHandler_t)(void *);
33 
34 //--------------------------------------------------------------------------------------------------
35 /**
36  *
37  * Connect the current client thread to the service providing this API. Block until the service is
38  * available.
39  *
40  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
41  * called before any other functions in this API. Normally, ConnectService is automatically called
42  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
43  *
44  * This function is created automatically.
45  */
46 //--------------------------------------------------------------------------------------------------
48 (
49  void
50 );
51 
52 //--------------------------------------------------------------------------------------------------
53 /**
54  *
55  * Try to connect the current client thread to the service providing this API. Return with an error
56  * if the service is not available.
57  *
58  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
59  * called before any other functions in this API. Normally, ConnectService is automatically called
60  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
61  *
62  * This function is created automatically.
63  *
64  * @return
65  * - LE_OK if the client connected successfully to the service.
66  * - LE_UNAVAILABLE if the server is not currently offering the service to which the client is
67  * bound.
68  * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).
69  * - LE_COMM_ERROR if the Service Directory cannot be reached.
70  */
71 //--------------------------------------------------------------------------------------------------
73 (
74  void
75 );
76 
77 //--------------------------------------------------------------------------------------------------
78 /**
79  * Set handler called when server disconnection is detected.
80  *
81  * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants
82  * to continue without exiting, it should call longjmp() from inside the handler.
83  */
84 //--------------------------------------------------------------------------------------------------
86 (
87  le_wifiDefs_DisconnectHandler_t disconnectHandler,
88  void *contextPtr
89 );
90 
91 //--------------------------------------------------------------------------------------------------
92 /**
93  *
94  * Disconnect the current client thread from the service providing this API.
95  *
96  * Normally, this function doesn't need to be called. After this function is called, there's no
97  * longer a connection to the service, and the functions in this API can't be used. For details, see
98  * @ref apiFilesC_client.
99  *
100  * This function is created automatically.
101  */
102 //--------------------------------------------------------------------------------------------------
104 (
105  void
106 );
107 
108 
109 //--------------------------------------------------------------------------------------------------
110 /**
111  * The maximum length of the textual representation of an IP address.
112  */
113 //--------------------------------------------------------------------------------------------------
114 #define LE_WIFIDEFS_MAX_IP_LENGTH 15
115 
116 //--------------------------------------------------------------------------------------------------
117 /**
118  * The first WiFi channel.
119  * @note This is only valid for 2,4 GHz WiFi frequencies.
120  */
121 //--------------------------------------------------------------------------------------------------
122 #define LE_WIFIDEFS_MIN_CHANNEL_VALUE 1
123 
124 //--------------------------------------------------------------------------------------------------
125 /**
126  * The last WiFi channel.
127  * @note This is only valid for 2,4 GHz WiFi frequencies.
128  */
129 //--------------------------------------------------------------------------------------------------
130 #define LE_WIFIDEFS_MAX_CHANNEL_VALUE 14
131 
132 //--------------------------------------------------------------------------------------------------
133 /**
134  * The maximum length of the wep key.
135  */
136 //--------------------------------------------------------------------------------------------------
137 #define LE_WIFIDEFS_MAX_WEPKEY_LENGTH 63
138 
139 //--------------------------------------------------------------------------------------------------
140 /**
141  * The maximum number of bytes of the wep key
142  * One extra byte is added for the null character.
143  */
144 //--------------------------------------------------------------------------------------------------
145 #define LE_WIFIDEFS_MAX_WEPKEY_BYTES 64
146 
147 //--------------------------------------------------------------------------------------------------
148 /**
149  * The minimum length of the pass-phrase used to generate PSK is 8 bytes. See 802.11-2007: H4.2.
150  */
151 //--------------------------------------------------------------------------------------------------
152 #define LE_WIFIDEFS_MIN_PASSPHRASE_LENGTH 8
153 
154 //--------------------------------------------------------------------------------------------------
155 /**
156  * The maximum length of the pass-phrase used to generate PSK is 63 bytes. See 802.11-2007: H4.2.
157  */
158 //--------------------------------------------------------------------------------------------------
159 #define LE_WIFIDEFS_MAX_PASSPHRASE_LENGTH 63
160 
161 //--------------------------------------------------------------------------------------------------
162 /**
163  * Maximum length of PSK, Pre Shared Key.
164  * One extra byte is added for the null character.
165  */
166 //--------------------------------------------------------------------------------------------------
167 #define LE_WIFIDEFS_MAX_PASSPHRASE_BYTES 64
168 
169 //--------------------------------------------------------------------------------------------------
170 /**
171  * The length of the PSK, Pre Shared Key, is 64 bytes. See 802.11-2007: H4.2.
172  */
173 //--------------------------------------------------------------------------------------------------
174 #define LE_WIFIDEFS_MAX_PSK_LENGTH 64
175 
176 //--------------------------------------------------------------------------------------------------
177 /**
178  * Maximum length of PSK, Pre Shared Key.
179  * One extra byte is added for the null character.
180  */
181 //--------------------------------------------------------------------------------------------------
182 #define LE_WIFIDEFS_MAX_PSK_BYTES 65
183 
184 //--------------------------------------------------------------------------------------------------
185 /**
186  * Maximum length of the User-Name. RFC2865 recommends the ability to handle at least 63 octets.
187  */
188 //--------------------------------------------------------------------------------------------------
189 #define LE_WIFIDEFS_MAX_USERNAME_LENGTH 63
190 
191 //--------------------------------------------------------------------------------------------------
192 /**
193  * Maximum length of the User-Name.
194  * One extra byte is added for the null character.
195  */
196 //--------------------------------------------------------------------------------------------------
197 #define LE_WIFIDEFS_MAX_USERNAME_BYTES 64
198 
199 //--------------------------------------------------------------------------------------------------
200 /**
201  * Maximum length of the User-Name. RFC2865 recommends at least 130.
202  */
203 //--------------------------------------------------------------------------------------------------
204 #define LE_WIFIDEFS_MAX_PASSWORD_LENGTH 130
205 
206 //--------------------------------------------------------------------------------------------------
207 /**
208  * Maximum length of the User-Name.
209  * One extra byte is added for the null character.
210  */
211 //--------------------------------------------------------------------------------------------------
212 #define LE_WIFIDEFS_MAX_PASSWORD_BYTES 131
213 
214 //--------------------------------------------------------------------------------------------------
215 /**
216  * The minimum length of octets of the Service set identification (SSID).
217  * @note While the values are probably human readable, this is not a string.
218  */
219 //--------------------------------------------------------------------------------------------------
220 #define LE_WIFIDEFS_MIN_SSID_LENGTH 1
221 
222 //--------------------------------------------------------------------------------------------------
223 /**
224  * The maximum length of octets of the Service set identification (SSID).
225  * @note While the values are probably human readable, this is not a string.
226  */
227 //--------------------------------------------------------------------------------------------------
228 #define LE_WIFIDEFS_MAX_SSID_LENGTH 32
229 
230 //--------------------------------------------------------------------------------------------------
231 /**
232  * The maximum length of octets of the Service set identification (SSID).
233  * @note While the values are probably human readable, this is not a string.
234  */
235 //--------------------------------------------------------------------------------------------------
236 #define LE_WIFIDEFS_MAX_SSID_BYTES 33
237 
238 //--------------------------------------------------------------------------------------------------
239 /**
240  * The maximum length of octets of the Basic Service set identifier (BSSID). The length is derived
241  * from 6 bytes represented as hexadecimal character string with bytes separated by colons.
242  */
243 //--------------------------------------------------------------------------------------------------
244 #define LE_WIFIDEFS_MAX_BSSID_LENGTH 17
245 
246 //--------------------------------------------------------------------------------------------------
247 /**
248  * Maximum length of the Basic Service set identifier (BSSID).
249  * One extra byte is added for the null character.
250  */
251 //--------------------------------------------------------------------------------------------------
252 #define LE_WIFIDEFS_MAX_BSSID_BYTES 18
253 
254 #endif // LE_WIFIDEFS_INTERFACE_H_INCLUDE_GUARD
le_result_t
Definition: le_basics.h:35
void le_wifiDefs_SetServerDisconnectHandler(le_wifiDefs_DisconnectHandler_t disconnectHandler, void *contextPtr)
void le_wifiDefs_ConnectService(void)
void le_wifiDefs_DisconnectService(void)
void(* le_wifiDefs_DisconnectHandler_t)(void *)
Definition: le_wifiDefs_interface.h:32
le_result_t le_wifiDefs_TryConnectService(void)