Microchip® Advanced Software Framework

m2m_socket_host_if.h File Reference

BSD compatible socket interface internal types.

Copyright (c) 2017-2021 Microchip Technology Inc. and its subsidiaries.

Data Structures

struct  tstrAcceptReply
 
struct  tstrBindCmd
 
struct  tstrBindReply
 
struct  tstrConnectAlpnReply
 Connect Reply, contains sock number, error value and index of negotiated application protocol. More...
 
struct  tstrConnectCmd
 
struct  tstrConnectReply
 Connect Reply, contains sock number and error value. More...
 
struct  tstrDnsReply
 DNS Reply, contains hostName and HostIP. More...
 
struct  tstrListenCmd
 
struct  tstrListenReply
 
struct  tstrPingCmd
 
struct  tstrPingReply
 
struct  tstrRecvCmd
 
struct  tstrRecvReply
 
struct  tstrSendCmd
 
struct  tstrSendReply
 Send Reply, contains socket number and number of sent bytes. More...
 
struct  tstrSetSocketOptCmd
 
struct  tstrSockAddr
 
struct  tstrSSLSetSockOptCmd
 
struct  tstrSSLSocketCreateCmd
 

Macros

#define ALPN_LIST_MAX_SIZE   32
 
#define ALPN_LIST_MIN_SIZE   4
 
#define PING_ERR_DEST_UNREACH   1
 
#define PING_ERR_SUCCESS   0
 
#define PING_ERR_TIMEOUT   2
 
#define SOCKET_CMD_ACCEPT   0x43
 
#define SOCKET_CMD_BIND   0x41
 
#define SOCKET_CMD_CLOSE   0x49
 
#define SOCKET_CMD_CONNECT   0x44
 
#define SOCKET_CMD_DNS_RESOLVE   0x4A
 
#define SOCKET_CMD_INVALID   0x00
 
#define SOCKET_CMD_LISTEN   0x42
 
#define SOCKET_CMD_PING   0x52
 
#define SOCKET_CMD_RAW_SET_SOCK_OPT   0x54
 
#define SOCKET_CMD_RECV   0x46
 
#define SOCKET_CMD_RECVFROM   0x48
 
#define SOCKET_CMD_SECURE   0x56
 
#define SOCKET_CMD_SEND   0x45
 
#define SOCKET_CMD_SENDTO   0x47
 
#define SOCKET_CMD_SET_SOCKET_OPTION   0x4F
 
#define SOCKET_CMD_SSL_CLOSE   0x4E
 
#define SOCKET_CMD_SSL_CONNECT   0x4B
 
#define SOCKET_CMD_SSL_CONNECT_ALPN   0x53
 
#define SOCKET_CMD_SSL_CREATE   0x50
 
#define SOCKET_CMD_SSL_RECV   0x4D
 
#define SOCKET_CMD_SSL_SEND   0x4C
 
#define SOCKET_CMD_SSL_SET_SOCK_OPT   0x51
 
#define SSL_MAX_OPT_LEN   HOSTNAME_MAX_SIZE
 

Typedefs

typedef sint8 SOCKET
 Definition for socket handler data type. Socket ID,used with all socket operations to uniquely identify the socket handler. The ID is uniquely assigned at socket creation when calling socket operation. More...
 
typedef tstrSockAddr tstrUIPSockAddr
 

#define ALPN_LIST_MAX_SIZE   32

Maximum length of ALPN list that can be specified by the application. The list is in the following format:

0       1       2       3 ... (bytes)
+-------+-------+-------+  ...        +-------+  ...        +-------+  ...
| Length L (BE) | len1  | name1...    | len2  | name2...    | len3  | name3...
+-------+-------+-------+  ...        +-------+  ...        +-------+  ...
Length fields do not include themselves.

Referenced by set_alpn_list(), and sslSetSockOpt().

#define ALPN_LIST_MIN_SIZE   4
#define PING_ERR_DEST_UNREACH   1
#define PING_ERR_SUCCESS   0
#define PING_ERR_TIMEOUT   2
#define SOCKET_CMD_ACCEPT   0x43

Socket Accepting command value.

Referenced by m2m_ip_cb().

#define SOCKET_CMD_BIND   0x41

Socket Binding command value.

Referenced by bind(), and m2m_ip_cb().

#define SOCKET_CMD_CLOSE   0x49

Socket Close command value.

Referenced by close().

#define SOCKET_CMD_CONNECT   0x44

Socket Connecting command value.

Referenced by connect(), and m2m_ip_cb().

#define SOCKET_CMD_DNS_RESOLVE   0x4A

Socket DNS Resolve command value.

Referenced by gethostbyname(), and m2m_ip_cb().

#define SOCKET_CMD_INVALID   0x00

Invalid Socket command value.

#define SOCKET_CMD_LISTEN   0x42

Socket Listening command value.

Referenced by listen(), and m2m_ip_cb().

#define SOCKET_CMD_PING   0x52

Referenced by m2m_ip_cb(), and m2m_ping_req().

#define SOCKET_CMD_RAW_SET_SOCK_OPT   0x54

Referenced by rawSetSockOpt().

#define SOCKET_CMD_RECV   0x46

Socket Receive command value.

Referenced by m2m_ip_cb(), and recv().

#define SOCKET_CMD_RECVFROM   0x48

Socket ReceiveFrom command value.

Referenced by m2m_ip_cb(), and recvfrom().

#define SOCKET_CMD_SECURE   0x56

Make secure a previously opened socket.

Referenced by secure().

#define SOCKET_CMD_SEND   0x45

Socket send command value.

Referenced by m2m_ip_cb(), and send().

#define SOCKET_CMD_SENDTO   0x47

Socket sendTo command value.

Referenced by m2m_ip_cb(), and sendto().

#define SOCKET_CMD_SET_SOCKET_OPTION   0x4F

Set Socket Option command value.

Referenced by setsockopt().

#define SOCKET_CMD_SSL_CLOSE   0x4E

SSL-Socket Close command value.

Referenced by close().

#define SOCKET_CMD_SSL_CONNECT   0x4B

SSL-Socket Connect command value.

Referenced by connect(), and m2m_ip_cb().

#define SOCKET_CMD_SSL_CONNECT_ALPN   0x53

SSL-Socket Connect with ALPN command value.

Referenced by m2m_ip_cb().

#define SOCKET_CMD_SSL_CREATE   0x50

Referenced by socket().

#define SOCKET_CMD_SSL_RECV   0x4D

SSL-Socket Receive command value.

Referenced by m2m_ip_cb(), and recv().

#define SOCKET_CMD_SSL_SEND   0x4C

SSL-Socket Send command value.

Referenced by m2m_ip_cb(), and send().

#define SOCKET_CMD_SSL_SET_SOCK_OPT   0x51

Referenced by sslSetSockOpt().

#define SSL_MAX_OPT_LEN   HOSTNAME_MAX_SIZE