Mistake on this page?
Report an issue in GitHub or email us
nsapi_types.h
1 
2 /** \addtogroup netsocket */
3 /** @{*/
4 /* nsapi.h - The network socket API
5  * Copyright (c) 2015 ARM Limited
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 
20 #ifndef NSAPI_TYPES_H
21 #define NSAPI_TYPES_H
22 
23 #include <stdint.h>
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 
30 /** Enum of standardized error codes
31  *
32  * Valid error codes have negative values and may
33  * be returned by any network operation.
34  *
35  * @enum nsapi_error
36  */
38  NSAPI_ERROR_OK = 0, /*!< no error */
39  NSAPI_ERROR_WOULD_BLOCK = -3001, /*!< no data is not available but call is non-blocking */
40  NSAPI_ERROR_UNSUPPORTED = -3002, /*!< unsupported functionality */
41  NSAPI_ERROR_PARAMETER = -3003, /*!< invalid configuration */
42  NSAPI_ERROR_NO_CONNECTION = -3004, /*!< not connected to a network */
43  NSAPI_ERROR_NO_SOCKET = -3005, /*!< socket not available for use */
44  NSAPI_ERROR_NO_ADDRESS = -3006, /*!< IP address is not known */
45  NSAPI_ERROR_NO_MEMORY = -3007, /*!< memory resource not available */
46  NSAPI_ERROR_NO_SSID = -3008, /*!< ssid not found */
47  NSAPI_ERROR_DNS_FAILURE = -3009, /*!< DNS failed to complete successfully */
48  NSAPI_ERROR_DHCP_FAILURE = -3010, /*!< DHCP failed to complete successfully */
49  NSAPI_ERROR_AUTH_FAILURE = -3011, /*!< connection to access point failed */
50  NSAPI_ERROR_DEVICE_ERROR = -3012, /*!< failure interfacing with the network processor */
51  NSAPI_ERROR_IN_PROGRESS = -3013, /*!< operation (eg connect) in progress */
52  NSAPI_ERROR_ALREADY = -3014, /*!< operation (eg connect) already in progress */
53  NSAPI_ERROR_IS_CONNECTED = -3015, /*!< socket is already connected */
54  NSAPI_ERROR_CONNECTION_LOST = -3016, /*!< connection lost */
55  NSAPI_ERROR_CONNECTION_TIMEOUT = -3017, /*!< connection timed out */
56  NSAPI_ERROR_ADDRESS_IN_USE = -3018, /*!< Address already in use */
57  NSAPI_ERROR_TIMEOUT = -3019, /*!< operation timed out */
58 };
59 
60 
61 /** Enum of connection status types
62  *
63  * Valid error codes have negative values.
64  *
65  * @enum nsapi_connection_status
66  */
67  typedef enum nsapi_connection_status {
68  NSAPI_STATUS_LOCAL_UP = 0, /*!< local IP address set */
69  NSAPI_STATUS_GLOBAL_UP = 1, /*!< global IP address set */
70  NSAPI_STATUS_DISCONNECTED = 2, /*!< no connection to network */
71  NSAPI_STATUS_CONNECTING = 3, /*!< connecting to network */
72  NSAPI_STATUS_ERROR_UNSUPPORTED = NSAPI_ERROR_UNSUPPORTED
73 } nsapi_connection_status_t;
74 
75 
76 /** Enum of event types
77  *
78  * Event callbacks are accompanied with an event-dependent parameter passed as an intptr_t.
79  *
80  * @enum nsapi_event
81  */
82  typedef enum nsapi_event {
83  NSAPI_EVENT_CONNECTION_STATUS_CHANGE = 0, /*!< network connection status has changed, the parameter = new status (nsapi_connection_status_t) */
84  NSAPI_EVENT_CELLULAR_STATUS_BASE = 0x1000, /*!< Cellular modem status has changed, See the enum values from enum cellular_connection_status_t in /features/cellular/framework/common/CellularCommon.h */
85  NSAPI_EVENT_CELLULAR_STATUS_END = 0x1FFF /*!< cellular modem status has changed, See the enum values from enum cellular_connection_status_t in /features/cellular/framework/common/CellularCommon.h */
86 } nsapi_event_t;
87 
88 
89 /** Type used to represent error codes
90  *
91  * This is a separate type from enum nsapi_error to avoid breaking
92  * compatibility in type-sensitive overloads
93  */
94 typedef signed int nsapi_error_t;
95 
96 /** Type used to represent the size of data passed through sockets
97  */
98 typedef unsigned int nsapi_size_t;
99 
100 /** Type used to represent either a size or error pased through sockets
101  *
102  * A valid nsapi_size_or_error_t is either a non-negative size or a
103  * negative error code from the nsapi_error_t
104  */
105 typedef signed int nsapi_size_or_error_t;
106 
107 /** Type used to represent either a value or error
108  *
109  * A valid nsapi_value_or_error_t is either a non-negative value or a
110  * negative error code from the nsapi_error_t
111  */
112 typedef signed int nsapi_value_or_error_t;
113 
114 /** Enum of encryption types
115  *
116  * The security type specifies a particular security to use when
117  * connected to a WiFi network
118  */
119 typedef enum nsapi_security {
120  NSAPI_SECURITY_NONE = 0x0, /*!< open access point */
121  NSAPI_SECURITY_WEP = 0x1, /*!< phrase conforms to WEP */
122  NSAPI_SECURITY_WPA = 0x2, /*!< phrase conforms to WPA */
123  NSAPI_SECURITY_WPA2 = 0x3, /*!< phrase conforms to WPA2 */
124  NSAPI_SECURITY_WPA_WPA2 = 0x4, /*!< phrase conforms to WPA/WPA2 */
125  NSAPI_SECURITY_PAP = 0x5, /*!< phrase conforms to PPP authentication context */
126  NSAPI_SECURITY_CHAP = 0x6, /*!< phrase conforms to PPP authentication context */
127  NSAPI_SECURITY_UNKNOWN = 0xFF, /*!< unknown/unsupported security in scan results */
129 
130 /** Maximum size of IP address representation
131  */
132 #define NSAPI_IP_SIZE NSAPI_IPv6_SIZE
133 
134 /** Maximum number of bytes for IP address
135  */
136 #define NSAPI_IP_BYTES NSAPI_IPv6_BYTES
137 
138 /** Maximum size of MAC address representation
139  */
140 #define NSAPI_MAC_SIZE 18
141 
142 /** Maximum number of bytes for MAC address
143  */
144 #define NSAPI_MAC_BYTES 6
145 
146 /** Size of IPv4 representation
147  */
148 #define NSAPI_IPv4_SIZE 16
149 
150 /** Number of bytes in IPv4 address
151  */
152 #define NSAPI_IPv4_BYTES 4
153 
154 /** Size of IPv6 representation
155  */
156 #define NSAPI_IPv6_SIZE 40
157 
158 /** Number of bytes in IPv6 address
159  */
160 #define NSAPI_IPv6_BYTES 16
161 
162 /** Enum of IP address versions
163  *
164  * The IP version specifies the type of an IP address.
165  *
166  * @enum nsapi_version
167  */
168 typedef enum nsapi_version {
169  NSAPI_UNSPEC, /*!< Address is unspecified */
170  NSAPI_IPv4, /*!< Address is IPv4 */
171  NSAPI_IPv6, /*!< Address is IPv6 */
172 } nsapi_version_t;
173 
174 /** IP address structure for passing IP addresses by value
175  */
176 typedef struct nsapi_addr {
177  /** IP version
178  * - NSAPI_IPv4
179  * - NSAPI_IPv6
180  * - NSAPI_UNSPEC
181  */
182  nsapi_version_t version;
183 
184  /** IP address
185  * The raw bytes of the IP address stored in big-endian format
186  */
188 } nsapi_addr_t;
189 
190 
191 /** Opaque handle for network sockets
192  */
193 typedef void *nsapi_socket_t;
194 
195 
196 /** Enum of socket protocols
197  *
198  * The socket protocol specifies a particular protocol to
199  * be used with a newly created socket.
200  *
201  * @enum nsapi_protocol
202  */
203 typedef enum nsapi_protocol {
204  NSAPI_TCP, /*!< Socket is of TCP type */
205  NSAPI_UDP, /*!< Socket is of UDP type */
206 } nsapi_protocol_t;
207 
208 /** Enum of standardized stack option levels
209  * for use with NetworkStack::setstackopt and getstackopt.
210  *
211  * @enum nsapi_stack_level
212  */
213 typedef enum nsapi_stack_level {
214  NSAPI_STACK = 5000, /*!< Stack option level - see nsapi_stack_option_t for options */
215 } nsapi_stack_level_t;
216 
217 /** Enum of standardized stack option names for level NSAPI_STACK
218  * of NetworkStack::setstackopt and getstackopt.
219  *
220  * These options may not be supported on all stacks, in which
221  * case NSAPI_ERROR_UNSUPPORTED may be returned.
222  *
223  * @enum nsapi_stack_option
224  */
225 typedef enum nsapi_stack_option {
226  NSAPI_IPV4_MRU, /*!< Sets/gets size of largest IPv4 fragmented datagram to reassemble */
227  NSAPI_IPV6_MRU, /*!< Sets/gets size of largest IPv6 fragmented datagram to reassemble */
228 } nsapi_stack_option_t;
229 
230 /** Enum of standardized socket option levels
231  * for use with Socket::setsockopt and getsockopt.
232  *
233  * @enum nsapi_socket_level
234  */
235 typedef enum nsapi_socket_level {
236  NSAPI_SOCKET = 7000, /*!< Socket option level - see nsapi_socket_option_t for options */
237 } nsapi_socket_level_t;
238 
239 /** Enum of standardized socket option names for level NSAPI_SOCKET
240  * of Socket::setsockopt and getsockopt.
241  *
242  * These options may not be supported on all stacks, in which
243  * case NSAPI_ERROR_UNSUPPORTED may be returned.
244  *
245  * @enum nsapi_socket_option
246  */
247 typedef enum nsapi_socket_option {
248  NSAPI_REUSEADDR, /*!< Allow bind to reuse local addresses */
249  NSAPI_KEEPALIVE, /*!< Enables sending of keepalive messages */
250  NSAPI_KEEPIDLE, /*!< Sets timeout value to initiate keepalive */
251  NSAPI_KEEPINTVL, /*!< Sets timeout value for keepalive */
252  NSAPI_LINGER, /*!< Keeps close from returning until queues empty */
253  NSAPI_SNDBUF, /*!< Sets send buffer size */
254  NSAPI_RCVBUF, /*!< Sets recv buffer size */
255  NSAPI_ADD_MEMBERSHIP, /*!< Add membership to multicast address */
256  NSAPI_DROP_MEMBERSHIP, /*!< Drop membership to multicast address */
257 } nsapi_socket_option_t;
258 
259 /** Supported IP protocol versions of IP stack
260  *
261  * @enum nsapi_ip_stack
262  */
263 typedef enum nsapi_ip_stack {
264  DEFAULT_STACK = 0,
265  IPV4_STACK,
266  IPV6_STACK,
267  IPV4V6_STACK
268 } nsapi_ip_stack_t;
269 
270 /* Backwards compatibility - previously didn't distinguish stack and socket options */
271 typedef nsapi_socket_level_t nsapi_level_t;
272 typedef nsapi_socket_option_t nsapi_option_t;
273 
274 /** nsapi_wifi_ap structure
275  *
276  * Structure representing a WiFi Access Point
277  */
278 typedef struct nsapi_wifi_ap {
279  char ssid[33]; /* 32 is what 802.11 defines as longest possible name; +1 for the \0 */
280  uint8_t bssid[6];
281  nsapi_security_t security;
282  int8_t rssi;
283  uint8_t channel;
285 
286 
287 /** nsapi_stack structure
288  *
289  * Stack structure representing a specific instance of a stack.
290  */
291 typedef struct nsapi_stack {
292  /** Network stack operation table
293  *
294  * Provides access to the underlying api of the stack. This is not
295  * flattened into the nsapi_stack to allow allocation in read-only
296  * memory.
297  */
298  const struct nsapi_stack_api *stack_api;
299 
300  /** Opaque handle for network stacks
301  */
302  void *stack;
303 
304  // Internal nsapi buffer
305  unsigned _stack_buffer[16];
306 } nsapi_stack_t;
307 
308 /** nsapi_ip_mreq structure
309  */
310 typedef struct nsapi_ip_mreq {
311  nsapi_addr_t imr_multiaddr; /* IP multicast address of group */
312  nsapi_addr_t imr_interface; /* local IP address of interface */
314 
315 /** nsapi_stack_api structure
316  *
317  * Common api structure for network stack operations. A network stack
318  * can provide a nsapi_stack_api structure filled out with the
319  * appropriate implementation.
320  *
321  * Unsupported operations can be left as null pointers.
322  */
323 typedef struct nsapi_stack_api
324 {
325  /** Get the local IP address
326  *
327  * @param stack Stack handle
328  * @return Local IP Address or null address if not connected
329  */
330  nsapi_addr_t (*get_ip_address)(nsapi_stack_t *stack);
331 
332  /** Translates a hostname to an IP address
333  *
334  * The hostname may be either a domain name or an IP address. If the
335  * hostname is an IP address, no network transactions will be performed.
336  *
337  * If no stack-specific DNS resolution is provided, the hostname
338  * will be resolve using a UDP socket on the stack.
339  *
340  * @param stack Stack handle
341  * @param addr Destination for the host IP address
342  * @param host Hostname to resolve
343  * @param version Address family
344  * @return 0 on success, negative error code on failure
345  */
346  nsapi_error_t (*gethostbyname)(nsapi_stack_t *stack, const char *host, nsapi_addr_t *addr, nsapi_version_t version);
347 
348  /** Add a domain name server to list of servers to query
349  *
350  * @param addr Destination for the host address
351  * @return 0 on success, negative error code on failure
352  */
353  nsapi_error_t (*add_dns_server)(nsapi_stack_t *stack, nsapi_addr_t addr);
354 
355  /* Set stack-specific stack options
356  *
357  * The setstackopt allow an application to pass stack-specific hints
358  * to the underlying stack. For unsupported options,
359  * NSAPI_ERROR_UNSUPPORTED is returned and the stack is unmodified.
360  *
361  * @param stack Stack handle
362  * @param level Stack-specific protocol level
363  * @param optname Stack-specific option identifier
364  * @param optval Option value
365  * @param optlen Length of the option value
366  * @return 0 on success, negative error code on failure
367  */
368  nsapi_error_t (*setstackopt)(nsapi_stack_t *stack, int level,
369  int optname, const void *optval, unsigned optlen);
370 
371  /* Get stack-specific stack options
372  *
373  * The getstackopt allow an application to retrieve stack-specific hints
374  * from the underlying stack. For unsupported options,
375  * NSAPI_ERROR_UNSUPPORTED is returned and optval is unmodified.
376  *
377  * @param stack Stack handle
378  * @param level Stack-specific protocol level
379  * @param optname Stack-specific option identifier
380  * @param optval Destination for option value
381  * @param optlen Length of the option value
382  * @return 0 on success, negative error code on failure
383  */
384  nsapi_error_t (*getstackopt)(nsapi_stack_t *stack, int level,
385  int optname, void *optval, unsigned *optlen);
386 
387  /** Opens a socket
388  *
389  * Creates a network socket and stores it in the specified handle.
390  * The handle must be passed to following calls on the socket.
391  *
392  * A stack may have a finite number of sockets, in this case
393  * NSAPI_ERROR_NO_SOCKET is returned if no socket is available.
394  *
395  * @param stack Stack context
396  * @param socket Destination for the handle to a newly created socket
397  * @param proto Protocol of socket to open, NSAPI_TCP or NSAPI_UDP
398  * @return 0 on success, negative error code on failure
399  */
400  nsapi_error_t (*socket_open)(nsapi_stack_t *stack, nsapi_socket_t *socket,
401  nsapi_protocol_t proto);
402 
403  /** Close the socket
404  *
405  * Closes any open connection and deallocates any memory associated
406  * with the socket.
407  *
408  * @param stack Stack handle
409  * @param socket Socket handle
410  * @return 0 on success, negative error code on failure
411  */
412  nsapi_error_t (*socket_close)(nsapi_stack_t *stack, nsapi_socket_t socket);
413 
414  /** Bind a specific address to a socket
415  *
416  * Binding a socket specifies the address and port on which to receive
417  * data. If the IP address is zeroed, only the port is bound.
418  *
419  * @param stack Stack handle
420  * @param socket Socket handle
421  * @param addr Local address to bind, may be null
422  * @param port Local port to bind
423  * @return 0 on success, negative error code on failure.
424  */
425  nsapi_error_t (*socket_bind)(nsapi_stack_t *stack, nsapi_socket_t socket,
426  nsapi_addr_t addr, uint16_t port);
427 
428  /** Listen for connections on a TCP socket
429  *
430  * Marks the socket as a passive socket that can be used to accept
431  * incoming connections.
432  *
433  * @param stack Stack handle
434  * @param socket Socket handle
435  * @param backlog Number of pending connections that can be queued
436  * simultaneously
437  * @return 0 on success, negative error code on failure
438  */
439  nsapi_error_t (*socket_listen)(nsapi_stack_t *stack, nsapi_socket_t socket, int backlog);
440 
441  /** Connects TCP socket to a remote host
442  *
443  * Initiates a connection to a remote server specified by the
444  * indicated address.
445  *
446  * @param stack Stack handle
447  * @param socket Socket handle
448  * @param addr The address of the remote host
449  * @param port The port of the remote host
450  * @return 0 on success, negative error code on failure
451  */
452  nsapi_error_t (*socket_connect)(nsapi_stack_t *stack, nsapi_socket_t socket,
453  nsapi_addr_t addr, uint16_t port);
454 
455  /** Accepts a connection on a TCP socket
456  *
457  * The server socket must be bound and set to listen for connections.
458  * On a new connection, creates a network socket and stores it in the
459  * specified handle. The handle must be passed to following calls on
460  * the socket.
461  *
462  * A stack may have a finite number of sockets, in this case
463  * NSAPI_ERROR_NO_SOCKET is returned if no socket is available.
464  *
465  * This call is non-blocking. If accept would block,
466  * NSAPI_ERROR_WOULD_BLOCK is returned immediately.
467  *
468  * @param stack Stack handle
469  * @param server Socket handle to server to accept from
470  * @param socket Destination for a handle to the newly created socket
471  * @param addr Destination for the address of the remote host
472  * @param port Destination for the port of the remote host
473  * @return 0 on success, negative error code on failure
474  */
475  nsapi_error_t (*socket_accept)(nsapi_stack_t *stack, nsapi_socket_t server,
476  nsapi_socket_t *socket, nsapi_addr_t *addr, uint16_t *port);
477 
478  /** Send data over a TCP socket
479  *
480  * The socket must be connected to a remote host. Returns the number of
481  * bytes sent from the buffer.
482  *
483  * This call is non-blocking. If send would block,
484  * NSAPI_ERROR_WOULD_BLOCK is returned immediately.
485  *
486  * @param stack Stack handle
487  * @param socket Socket handle
488  * @param data Buffer of data to send to the host
489  * @param size Size of the buffer in bytes
490  * @return Number of sent bytes on success, negative error
491  * code on failure
492  */
493  nsapi_size_or_error_t (*socket_send)(nsapi_stack_t *stack, nsapi_socket_t socket,
494  const void *data, nsapi_size_t size);
495 
496  /** Receive data over a TCP socket
497  *
498  * The socket must be connected to a remote host. Returns the number of
499  * bytes received into the buffer.
500  *
501  * This call is non-blocking. If recv would block,
502  * NSAPI_ERROR_WOULD_BLOCK is returned immediately.
503  *
504  * @param stack Stack handle
505  * @param socket Socket handle
506  * @param data Destination buffer for data received from the host
507  * @param size Size of the buffer in bytes
508  * @return Number of received bytes on success, negative error
509  * code on failure
510  */
511  nsapi_size_or_error_t (*socket_recv)(nsapi_stack_t *stack, nsapi_socket_t socket,
512  void *data, nsapi_size_t size);
513 
514  /** Send a packet over a UDP socket
515  *
516  * Sends data to the specified address. Returns the number of bytes
517  * sent from the buffer.
518  *
519  * This call is non-blocking. If sendto would block,
520  * NSAPI_ERROR_WOULD_BLOCK is returned immediately.
521  *
522  * @param stack Stack handle
523  * @param socket Socket handle
524  * @param addr The address of the remote host
525  * @param port The port of the remote host
526  * @param data Buffer of data to send to the host
527  * @param size Size of the buffer in bytes
528  * @return Number of sent bytes on success, negative error
529  * code on failure
530  */
531  nsapi_size_or_error_t (*socket_sendto)(nsapi_stack_t *stack, nsapi_socket_t socket,
532  nsapi_addr_t addr, uint16_t port, const void *data, nsapi_size_t size);
533 
534  /** Receive a packet over a UDP socket
535  *
536  * Receives data and stores the source address in address if address
537  * is not NULL. Returns the number of bytes received into the buffer.
538  *
539  * This call is non-blocking. If recvfrom would block,
540  * NSAPI_ERROR_WOULD_BLOCK is returned immediately.
541  *
542  * @param stack Stack handle
543  * @param socket Socket handle
544  * @param addr Destination for the address of the remote host
545  * @param port Destination for the port of the remote host
546  * @param data Destination buffer for data received from the host
547  * @param size Size of the buffer in bytes
548  * @return Number of received bytes on success, negative error
549  * code on failure
550  */
551  nsapi_size_or_error_t (*socket_recvfrom)(nsapi_stack_t *stack, nsapi_socket_t socket,
552  nsapi_addr_t *addr, uint16_t *port, void *buffer, nsapi_size_t size);
553 
554  /** Register a callback on state change of the socket
555  *
556  * The specified callback will be called on state changes such as when
557  * the socket can recv/send/accept successfully and on when an error
558  * occurs. The callback may also be called spuriously without reason.
559  *
560  * The callback may be called in an interrupt context and should not
561  * perform expensive operations such as recv/send calls.
562  *
563  * @param stack Stack handle
564  * @param socket Socket handle
565  * @param callback Function to call on state change
566  * @param data Argument to pass to callback
567  */
568  void (*socket_attach)(nsapi_stack_t *stack, nsapi_socket_t socket,
569  void (*callback)(void *), void *data);
570 
571  /* Set stack-specific socket options
572  *
573  * The setsockopt allow an application to pass stack-specific hints
574  * to the underlying stack. For unsupported options,
575  * NSAPI_ERROR_UNSUPPORTED is returned and the socket is unmodified.
576  *
577  * @param stack Stack handle
578  * @param socket Socket handle
579  * @param level Stack-specific protocol level
580  * @param optname Stack-specific option identifier
581  * @param optval Option value
582  * @param optlen Length of the option value
583  * @return 0 on success, negative error code on failure
584  */
585  nsapi_error_t (*setsockopt)(nsapi_stack_t *stack, nsapi_socket_t socket, int level,
586  int optname, const void *optval, unsigned optlen);
587 
588  /* Get stack-specific socket options
589  *
590  * The getstackopt allow an application to retrieve stack-specific hints
591  * from the underlying stack. For unsupported options,
592  * NSAPI_ERROR_UNSUPPORTED is returned and optval is unmodified.
593  *
594  * @param stack Stack handle
595  * @param socket Socket handle
596  * @param level Stack-specific protocol level
597  * @param optname Stack-specific option identifier
598  * @param optval Destination for option value
599  * @param optlen Length of the option value
600  * @return 0 on success, negative error code on failure
601  */
602  nsapi_error_t (*getsockopt)(nsapi_stack_t *stack, nsapi_socket_t socket, int level,
603  int optname, void *optval, unsigned *optlen);
605 
606 
607 #ifdef __cplusplus
608 }
609 #endif
610 
611 #endif
612 
613 /** @}*/
Definition: nsapi_types.h:121
Definition: nsapi_types.h:253
Definition: nsapi_types.h:291
nsapi_stack_option
Definition: nsapi_types.h:225
void * stack
Definition: nsapi_types.h:302
Definition: nsapi_types.h:127
Definition: nsapi_types.h:83
Definition: nsapi_types.h:38
Definition: nsapi_types.h:84
void * nsapi_socket_t
Definition: nsapi_types.h:193
nsapi_security
Definition: nsapi_types.h:119
nsapi_version_t version
Definition: nsapi_types.h:182
Definition: nsapi_types.h:125
Definition: nsapi_types.h:54
Definition: nsapi_types.h:43
Definition: nsapi_types.h:323
signed int nsapi_error_t
Definition: nsapi_types.h:94
Definition: nsapi_types.h:171
Definition: nsapi_types.h:256
Definition: nsapi_types.h:169
Definition: nsapi_types.h:249
struct nsapi_stack_api nsapi_stack_api_t
Definition: nsapi_types.h:123
nsapi_stack_level
Definition: nsapi_types.h:213
nsapi_ip_stack
Definition: nsapi_types.h:263
Definition: nsapi_types.h:255
Definition: nsapi_types.h:53
signed int nsapi_size_or_error_t
Definition: nsapi_types.h:105
Definition: nsapi_types.h:124
Definition: nsapi_types.h:254
Callback< R()> callback(R(*func)()=0)
Definition: Callback.h:3841
Definition: nsapi_types.h:70
#define NSAPI_IP_BYTES
Definition: nsapi_types.h:136
nsapi_socket_level
Definition: nsapi_types.h:235
Definition: nsapi_types.h:69
Definition: nsapi_types.h:170
Definition: nsapi_types.h:44
signed int nsapi_value_or_error_t
Definition: nsapi_types.h:112
uint8_t bytes[16]
Definition: nsapi_types.h:187
Definition: nsapi_types.h:50
Definition: nsapi_types.h:56
Definition: nsapi_types.h:250
Definition: nsapi_types.h:49
Definition: nsapi_types.h:68
struct nsapi_addr nsapi_addr_t
Definition: nsapi_types.h:57
Definition: nsapi_types.h:122
Definition: nsapi_types.h:278
nsapi_event
Definition: nsapi_types.h:82
struct nsapi_wifi_ap nsapi_wifi_ap_t
Definition: nsapi_types.h:47
Definition: nsapi_types.h:71
Definition: nsapi_types.h:51
Definition: nsapi_types.h:39
Definition: nsapi_types.h:252
Definition: nsapi_types.h:204
Definition: nsapi_types.h:226
Definition: nsapi_types.h:214
nsapi_connection_status
Definition: nsapi_types.h:67
Definition: nsapi_types.h:85
Definition: nsapi_types.h:40
Definition: nsapi_types.h:42
Definition: nsapi_types.h:46
unsigned int nsapi_size_t
Definition: nsapi_types.h:98
Definition: nsapi_types.h:48
Definition: nsapi_types.h:176
Definition: nsapi_types.h:227
Definition: nsapi_types.h:120
enum nsapi_security nsapi_security_t
struct nsapi_ip_mreq nsapi_ip_mreq_t
Definition: nsapi_types.h:248
Definition: nsapi_types.h:55
nsapi_error
Definition: nsapi_types.h:37
Definition: nsapi_types.h:126
Definition: nsapi_types.h:45
const struct nsapi_stack_api * stack_api
Definition: nsapi_types.h:298
Definition: nsapi_types.h:41
struct nsapi_stack nsapi_stack_t
Definition: nsapi_types.h:310
Definition: nsapi_types.h:236
Definition: nsapi_types.h:205
nsapi_protocol
Definition: nsapi_types.h:203
Definition: nsapi_types.h:251
nsapi_socket_option
Definition: nsapi_types.h:247
nsapi_version
Definition: nsapi_types.h:168
Definition: nsapi_types.h:52
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.