47 #define NSAPI_IPTOS_TOS_MASK 0x1E 48 #define NSAPI_IPTOS_TOS(tos) ((tos) & IPTOS_TOS_MASK) 49 #define NSAPI_IPTOS_LOWDELAY 0x10 50 #define NSAPI_IPTOS_THROUGHPUT 0x08 51 #define NSAPI_IPTOS_RELIABILITY 0x04 52 #define NSAPI_IPTOS_LOWCOST 0x02 53 #define NSAPI_IPTOS_MINCOST IPTOS_LOWCOST 64 #define NSAPI_IPTOS_PREC_MASK 0xe0 65 #define NSAPI_IPTOS_PREC(tos) ((tos) & IPTOS_PREC_MASK) 66 #define NSAPI_IPTOS_PREC_NETCONTROL 0xe0 67 #define NSAPI_IPTOS_PREC_INTERNETCONTROL 0xc0 68 #define NSAPI_IPTOS_PREC_CRITIC_ECP 0xa0 69 #define NSAPI_IPTOS_PREC_FLASHOVERRIDE 0x80 70 #define NSAPI_IPTOS_PREC_FLASH 0x60 71 #define NSAPI_IPTOS_PREC_IMMEDIATE 0x40 72 #define NSAPI_IPTOS_PREC_PRIORITY 0x20 73 #define NSAPI_IPTOS_PREC_ROUTINE 0x00 119 } nsapi_connection_status_t;
183 #define NSAPI_INTERFACE_PREFIX_SIZE 2 187 #define NSAPI_INTERFACE_NAME_MAX_SIZE 6 191 #define NSAPI_IP_SIZE NSAPI_IPv6_SIZE 195 #define NSAPI_IP_BYTES NSAPI_IPv6_BYTES 199 #define NSAPI_MAC_SIZE 18 203 #define NSAPI_MAC_BYTES 6 207 #define NSAPI_IPv4_SIZE 16 211 #define NSAPI_IPv4_BYTES 4 215 #define NSAPI_IPv6_SIZE 40 219 #define NSAPI_IPv6_BYTES 16 275 } nsapi_stack_level_t;
288 } nsapi_stack_option_t;
297 } nsapi_socket_level_t;
322 } nsapi_socket_option_t;
326 } nsapi_tlssocket_level_t;
334 } nsapi_tlssocket_option_t;
348 typedef nsapi_socket_level_t nsapi_level_t;
349 typedef nsapi_socket_option_t nsapi_option_t;
382 unsigned _stack_buffer[16];
403 uint16_t data_amount;
404 uint16_t stagger_min;
405 uint16_t stagger_max;
406 uint16_t stagger_rand;
462 int optname,
const void *optval,
unsigned optlen);
478 int optname,
void *optval,
unsigned *optlen);
494 nsapi_protocol_t proto);
569 nsapi_socket_t *socket,
nsapi_addr_t *addr, uint16_t *port);
587 const void *data, nsapi_size_t size);
605 void *data, nsapi_size_t size);
625 nsapi_addr_t addr, uint16_t port,
const void *data, nsapi_size_t size);
645 nsapi_addr_t *addr, uint16_t *port,
void *buffer, nsapi_size_t size);
662 void (*
callback)(
void *),
void *data);
679 int optname,
const void *optval,
unsigned optlen);
696 int optname,
void *optval,
unsigned *optlen);
nsapi_stack_option
Enum of standardized stack option names for level NSAPI_STACK of NetworkStack::setstackopt and getsta...
nsapi_latency_req structure
const struct nsapi_stack_api * stack_api
Network stack operation table.
void * nsapi_socket_t
Opaque handle for network sockets.
void * stack
Opaque handle for network stacks.
nsapi_security
Enum of encryption types.
nsapi_stack_api structure
signed int nsapi_error_t
Type used to represent error codes.
struct nsapi_stack_api nsapi_stack_api_t
nsapi_stack_api structure
nsapi_stack_level
Enum of standardized stack option levels for use with NetworkStack::setstackopt and getstackopt...
nsapi_ip_stack
Supported IP protocol versions of IP stack.
signed int nsapi_size_or_error_t
Type used to represent either a size or error passed through sockets.
#define NSAPI_IP_BYTES
Maximum number of bytes for IP address.
nsapi_socket_level
Enum of standardized socket option levels for use with Socket::setsockopt and getsockopt.
struct nsapi_stagger_req nsapi_stagger_req_t
nsapi_stagger_req structure
signed int nsapi_value_or_error_t
Type used to represent either a value or error.
struct nsapi_addr nsapi_addr_t
IP address structure for passing IP addresses by value.
nsapi_event
Enum of event types.
struct nsapi_wifi_ap nsapi_wifi_ap_t
nsapi_wifi_ap structure
uint8_t bytes[16]
IP address The raw bytes of the IP address stored in big-endian format.
nsapi_version_t version
IP version.
nsapi_connection_status
Enum of connection status types.
unsigned int nsapi_size_t
Type used to represent the size of data passed through sockets.
nsapi_stagger_req structure
IP address structure for passing IP addresses by value.
struct nsapi_latency_req nsapi_latency_req_t
nsapi_latency_req structure
enum nsapi_security nsapi_security_t
Enum of encryption types.
struct nsapi_ip_mreq nsapi_ip_mreq_t
nsapi_ip_mreq structure
nsapi_error
Enum of standardized error codes.
struct nsapi_stack nsapi_stack_t
nsapi_stack structure
nsapi_protocol
Enum of socket protocols.
nsapi_socket_option
Enum of standardized socket option names for level NSAPI_SOCKET of Socket::setsockopt and getsockopt...
nsapi_version
Enum of IP address versions.