BSD Sockets#
Variables#
Functions#
Create a web socket client. This is a blocking API.
Send data from the web socket client. This is a non-blocking API.
Close the web socket client. This is a non-blocking API.
Check for the bit for the file descriptor FD in the file descriptor set rsi_fd_set. This is a non-blocking API.
Set the bit for the file descriptor FD in the file descriptor set rsi_fd_set. This is a non-blocking API.
Clear the bit for the file descriptor FD in the file descriptor set rsi_fd_set. This is a non-blocking API.
Create a socket and register a callback that will be used by the driver to forward the received packets asynchronously to the application (on packet reception) without waiting for rsi_recv() API call. This is a non-blocking API.
Create and return a socket instance. This is a non-blocking API.
Assign an address to a socket. This is a non-blocking API for TCP and a blocking API for UDP.
Connect the socket to the specified remote address. This is a non-blocking API, if socket_connect_response handler() is registered through rsi_wlan_register_callbacks(), otherwise it is a blocking API.
Enable socket to listen for a remote connection request in passive mode. This is a blocking API.
Accept the connection request from the remote peer. This API extracts the connection request from the queue of pending connections on listening socket and accepts it.
Accept the connection request from the remote peer. This API extracts the connection request from the queue of pending connections on listening socket and accepts it. This is a blocking API.
Receive large data on a given socket synchronously.
Retrieve the received data from the remote peer on a given socket descriptor. This is a blocking API.
Retrieve the data from the remote peer on a specified socket. This is a blocking API.
Send data to the specified remote IP Address on the given socket. This is non-blocking API.
Send the data to the specified remote IP Address on the given socket and receive the acknowledgement through the registered call back. This is non-blocking API.
Sends the data to the remote peer on the given socket. This is a non-blocking API.
Reset all the socket related information.
Send large data on a given socket synchronously.
network task to send large data to send_async API
Send one chunk of data at a time.
Send large data on a given socket. This is a blocking API.
Find on which socket the data is pending, according to the event that is set from the event map.
Retrieve the packet from TX data pending queue and forward to the module.
Send data on a given socket asynchronously.
Closes all the sockets associate with a vap_Id. This is a blocking API.
Closes the socket specified in a socket descriptor. This is a blocking API.
Get the application socket descriptor from module socket descriptor.
Clear socket information.
Configure TLS extensions.
Set the socket options. This is a non-blocking API.
Get the socket options. This is a non-blocking API.
Monitor multiple socket (file descriptors), waiting until one or more of the sockets become ready to perform receive or send operation. If callback is NULL or not provided, it is a blocking API.
Otherwise, it is a non-blocking API.
Calculate the buffers required.
Accept the connection request from the remote peer and register a callback that will be used by the driver to forward the received connection request asynchronously to the application. This is a non-blocking API.
Get the application socket descriptor from source port.
Get the socket ID from port number.
Get the primary socket ID from port number.
Validate the server certificate received from the module. This is a non-blocking API.
Send socket create request to the module and receive the response asynchronously. This is a non-blocking API if socket_connect_response_handler is registered.
Otherwise it is a blocking API.
Get the socket descriptor based on source port number, destination port number, destination IP address, and the IP version. This is a non-blocking API.
Create a socket and register a callback that will be used by the driver to forward the received packets asynchronously to the application (on packet reception)
without waiting for recv API (Add proper API here). This is a non-blocking API.
Connect the socket to specific remote address. This is a non-blocking API, if socket_connect_response_handler() is registered through rsi_wlan_register_callbacks(). Otherwise it is a blocking API.
Retrieve the received data from the remote peer on a given socket descriptor. This is a blocking API.
Enable socket to listen for remote connection request in passive mode. This is a blocking API.
Close all the sockets associated with a VAP Id. This is a blocking API.
Close the socket specified in a socket descriptor. This is a blocking API.
Assign address to the socket. This is a non-blocking API for TCP and a blocking API for UDP.
Wait for network semaphore.
Get the application socket descriptor from module’s socket descriptor. This is a non-blocking API.
Get WLAN socket status. This is a non-blocking API.
Set WLAN status. This is a non-blocking API.
Get the status of the socket specified in the select ID.
Set the status of the socket specified in the select ID.
Send data on a given socket asynchronously.
Send data to specific remote peer on a given socket.
Clear socket information.
Set the network application protocols configuration. This is a non-blocking API.
Get the application socket descriptor from module’s socket descriptor. This is a non-blocking API.
Get socket descriptor from port_number.
This is a non-blocking API.
Calculate number of buffers required for the data packet.
This is a non-blocking API.
Calculate the length available in the buffers for the message. This is a non-blocking API.
Set the socket configuration parameters. The configurations can be done using the Socket configuration in the rsi_wlan_config.h file.
Using this API is highly recommended. Based on the socket configuration, module will use available buffers effectively.
This is a blocking API.
Variable Documentation#
Function Documentation#
rsi_web_socket_create#
int32_t rsi_web_socket_create (int8_t flags, uint8_t * server_ip_addr, uint16_t server_port, uint16_t device_port, uint8_t * webs_resource_name, uint8_t * webs_host_name, int32_t * socket_id, void(*)(uint32_t sock_no, uint8_t *buffer, uint32_t length) web_socket_data_receive_notify_callback, sock_no, buffer, length)
Create a web socket client. This is a blocking API.
[in] | flags | - Select IP version and security |
[in] | server_ip_addr | - Web server IP address |
[in] | server_port | - Web server socket port |
[in] | device_port | - Local port |
[in] | webs_resource_name | - Web resource name |
[in] | webs_host_name | - Web host name |
[in] | socket_id | - Socket ID |
[in] | web_socket_data_receive_notify_callback | - Callback when data packet is received on the created socket |
[out] | sock_no | - Application socket ID |
[out] | buffer | - Buffer pointer |
[out] | length | - Length of data |
Returns
0 - Success
Negative Value - Failure (Possible Error Codes - 0xfffffffe, 0xfffffffc)
Note
Precondition - rsi_config_ipaddress() API needs to be called before this API.
Refer to Error Codes for the description of above error codes.
49
of file network/protocols/rsi_web_socket.c
rsi_web_socket_send_async#
int32_t rsi_web_socket_send_async (int32_t sockID, uint8_t opcode, int8_t * msg, int32_t msg_length)
Send data from the web socket client. This is a non-blocking API.
[in] | sockID | - Application socket ID |
[in] | opcode | - Type of the packet to be included in web socket header |
[in] | msg | - Data |
[in] | msg_length | - Data length |
Returns
0 - Success
Negative Value - Failure
Note
Precondition - rsi_config_ipaddress() API needs to be called before this API.
347
of file network/protocols/rsi_web_socket.c
rsi_web_socket_close#
int32_t rsi_web_socket_close (int32_t sockID)
Close the web socket client. This is a non-blocking API.
[in] | sockID | - Socket ID of particular socket |
Returns
0 - Success
Negative Value - Failure
Note
Precondition - rsi_config_ipaddress() API needs to be called before this API
368
of file network/protocols/rsi_web_socket.c
rsi_fd_isset#
int rsi_fd_isset (uint32_t fd, struct rsi_fd_set_s * fds_p)
Check for the bit for the file descriptor FD in the file descriptor set rsi_fd_set. This is a non-blocking API.
[in] | fd | - Socket ID |
[in] | fds_p | - Pointer to the rsi_fd_set_s structure |
Returns
Positive Value - Success
0 - Failure
69
of file network/socket/rsi_socket.c
rsi_set_fd#
void rsi_set_fd (uint32_t fd, struct rsi_fd_set_s * fds_p)
Set the bit for the file descriptor FD in the file descriptor set rsi_fd_set. This is a non-blocking API.
[in] | fd | - Socket id |
[in] | fds_p | - Pointer to the rsi_fd_set_structure |
Returns
Void
88
of file network/socket/rsi_socket.c
rsi_fd_clr#
void rsi_fd_clr (uint32_t fd, struct rsi_fd_set_s * fds_p)
Clear the bit for the file descriptor FD in the file descriptor set rsi_fd_set. This is a non-blocking API.
[in] | fd | - Socket ID |
[in] | fds_p | - Pointer to the rsi_fd_set_s structure |
Returns
Void
107
of file network/socket/rsi_socket.c
rsi_socket_async#
int32_t rsi_socket_async (int32_t protocolFamily, int32_t type, int32_t protocol, void(*)(uint32_t sock_no, uint8_t *buffer, uint32_t length) callback, sock_no, buffer, length)
Create a socket and register a callback that will be used by the driver to forward the received packets asynchronously to the application (on packet reception) without waiting for rsi_recv() API call. This is a non-blocking API.
[in] | protocolFamily | - Protocol family to select IPv4 or IPv6. |
[in] | type | - Select socket type UDP or TCP. |
[in] | protocol | - 0: Non SSL sockets |
[in] | callback | - Callback function to read data asynchronously from socket |
[out] | sock_no | - Application socket number |
[out] | buffer | - Pointer to buffer that holds data |
[out] | length | - Length of the buffer |
Returns
0 - Success
Non-Zero Value - Failure (Possible Error Codes - 0xFFF8, 0xFF80, 0xFF6D, 0xFF85, 0xBB33, 0xBB22)
Note
Precondition - rsi_config_ipaddress() API needs to be called before this API.
Refer to Error Codes for the description of above error codes.
145
of file network/socket/rsi_socket.c
rsi_socket#
int32_t rsi_socket (int32_t protocolFamily, int32_t type, int32_t protocol)
Create and return a socket instance. This is a non-blocking API.
[in] | protocolFamily | - Protocol family to select IPv4 or IPv6. |
[in] | type | - Select socket type UDP or TCP. |
[in] | protocol | - 0: Non SSL sockets |
Returns
SOCK_ID - Socket ID of the created socket
Negative value - Failure (Possible Error Codes - 0xfffffffd)
Note
Precondition - rsi_config_ipaddress() API needs to be called before this API.
A maximum of 10 sockets can be opened. Range of socket handles are between 1 to 10.
If 3 TLS sockets are opened then the remaining 7 could be any combinations of UDP and TCP sockets.
Module supports a maximum of 3 TLS sockets. These can be a combination of client and server sockets. If the HTTPS client is enabled then the user can open only 2 more TLS socket.
185
of file network/socket/rsi_socket.c
rsi_bind#
int32_t rsi_bind (int32_t sockID, struct rsi_sockaddr * localAddress, int32_t addressLength)
Assign an address to a socket. This is a non-blocking API for TCP and a blocking API for UDP.
[in] | sockID | - Socket descriptor ID |
[in] | localAddress | - Address assigned to the socket. The format is compatible with BSD socket |
[in] | addressLength | - Length of the address measured in bytes |
Returns
0 - Success
Non-Zero Value - Failure
Note
Precondition - rsi_socket() API needs to be called before this API.
224
of file network/socket/rsi_socket.c
rsi_connect#
int32_t rsi_connect (int32_t sockID, struct rsi_sockaddr * remoteAddress, int32_t addressLength)
Connect the socket to the specified remote address. This is a non-blocking API, if socket_connect_response handler() is registered through rsi_wlan_register_callbacks(), otherwise it is a blocking API.
[in] | sockID | - Socket descriptor ID |
[in] | remoteAddress | - Remote peer address. The format is compatible with BSD socket. |
[in] | addressLength | - Length of the address in bytes |
Returns
0 - Success
Non-Zero Value - Failure
Note
Precondition - rsi_socket()/ rsi_bind() API needs to be called before this API.
For asynchronous behaviour, user need to register RSI_WLAN_SOCKET_CONNECT_NOTIFY_CB callback ID.
247
of file network/socket/rsi_socket.c
rsi_listen#
int32_t rsi_listen (int32_t sockID, int32_t backlog)
Enable socket to listen for a remote connection request in passive mode. This is a blocking API.
[in] | sockID | - Socket descriptor ID |
[in] | backlog | - Maximum length to which the queue of pending connections can be held. This argument is used when multiple client connections over the same server socket are required. |
Returns
0 - Success
Non-Zero Value - Failure
Note
Precondition - rsi_bind() API needs to be called before this API.
When using multiple client/server sockets, the following macros have to be updated in the wlan_config.h file, in TCP_IP_FEATURE_BIT_MAP - If TCP_IP_TOTAL_SOCKETS_x flag is used, then firmware allocates memory for x sockets. If TCP_IP_TOTAL_SOCKETS_x flag is not passed, then a default value of 10 sockets is used.
When using multiple client/server sockets, the following macros have to be updated in the rsi_user.h file, RSI_NUMBER_OF_LTCP_SOCKETS -> Number of server sockets and RSI_NUMBER_OF_SOCKETS -> Number of client sockets + Number of server sockets.
If multiple server sockets are created then the memory allocated for client sockets is to be shared across the multiple server sockets. If RSI_NUMBER_OF_LTCP_SOCKETS is 0 and RSI_NUMBER_OF_SOCKETS is x, y is server sockets and x-y client sockets can be created
271
of file network/socket/rsi_socket.c
rsi_accept_non_rom#
int32_t rsi_accept_non_rom (int32_t sockID, struct rsi_sockaddr * ClientAddress, int32_t * addressLength)
Accept the connection request from the remote peer. This API extracts the connection request from the queue of pending connections on listening socket and accepts it.
[in] | sockID | - Socket descriptor ID |
[in] | ClientAddress | - Remote peer address |
[in] | addressLength | - Length of the address measured in bytes |
Returns
> 0 - Client socket ID
<= 0 - Failure
Note
Precondition - rsi_socket()/ rsi_socket_async() API needs to be called before this API.
289
of file network/socket/rsi_socket.c
rsi_accept#
int32_t rsi_accept (int32_t sockID, struct rsi_sockaddr * ClientAddress, int32_t * addressLength)
Accept the connection request from the remote peer. This API extracts the connection request from the queue of pending connections on listening socket and accepts it. This is a blocking API.
[in] | sockID | - Socket descriptor |
[in] | ClientAddress | - Remote peer address |
[in] | addressLength | - Length of the address measured in bytes |
Returns
> 0 - Client socket ID
<= 0 - Failure
Note
Precondition - rsi_listen() API needs to be called before this API.
531
of file network/socket/rsi_socket.c
rsi_recv_large_data_sync#
int32_t rsi_recv_large_data_sync (int32_t sockID, int8_t * buffer, int32_t requested_length, int32_t flags, struct rsi_sockaddr * fromAddr, int32_t * fromAddrLen)
Receive large data on a given socket synchronously.
[in] | sockID | - Socket descriptor |
[in] | buffer | - Pointer to buffer to hold receive data |
[in] | requested_length | - Requested buffer length |
[in] | flags | - Reserved |
[in] | fromAddr | - Address of remote peer, from where current packet was received |
[in] | fromAddrLen | - Pointer that contains remote peer address (fromAddr) length |
Returns
Number of bytes received successfully – Success
Negative value – Failure
0 – Socket close error
552
of file network/socket/rsi_socket.c
rsi_recvfrom#
int32_t rsi_recvfrom (int32_t sockID, int8_t * buffer, int32_t buffersize, int32_t flags, struct rsi_sockaddr * fromAddr, int32_t * fromAddrLen)
Retrieve the received data from the remote peer on a given socket descriptor. This is a blocking API.
[in] | sockID | - Socket descriptor |
[in] | buffer | - Pointer to buffer to hold receive data |
[in] | buffersize | - Size of the buffer supplied |
[in] | flags | - Reserved |
[in] | fromAddr | - Address of remote peer, from where current packet was received |
[in] | fromAddrLen | - Pointer that contains remote peer address (fromAddr) length |
Returns
Number of bytes received successfully – Success
Negative value – Failure
0 – Socket close error
Note
Precondition - rsi_socket()/ rsi_socket_async() API needs to be called before this API.
636
of file network/socket/rsi_socket.c
rsi_recv#
int32_t rsi_recv (int32_t sockID, void * rcvBuffer, int32_t bufferLength, int32_t flags)
Retrieve the data from the remote peer on a specified socket. This is a blocking API.
[in] | sockID | - Socket descriptor ID |
[in] | rcvBuffer | - Pointer to the buffer to hold the data received from the remote peer |
[in] | bufferLength | - Length of the buffer |
[in] | flags | - Reserved |
Returns
Number of bytes received successfully – Success
Negative value – Failure
0 – Socket close error
Note
Precondition (TCP client) - rsi_connect() API needs to be called before this API.
Precondition (TCP server) - rsi_listen() and rsi_accept() API needs to be called before this API.
Precondition (UDP server) - rsi_bind() API needs to be called before this API.
Precondition (UDP client) - rsi_socket() or rsi_bind() API needs to be called before this API
687
of file network/socket/rsi_socket.c
rsi_sendto#
int32_t rsi_sendto (int32_t sockID, int8_t * msg, int32_t msgLength, int32_t flags, struct rsi_sockaddr * destAddr, int32_t destAddrLen)
Send data to the specified remote IP Address on the given socket. This is non-blocking API.
[in] | sockID | - Socket descriptor ID |
[in] | msg | - Pointer to data buffer containing data to send to remote peer |
[in] | msgLength | - Length of the buffer |
[in] | flags | - Reserved |
[in] | destAddr | - Address of the remote peer to send data |
[in] | destAddrLen | - Length of the address in bytes |
Returns
Number of bytes received successfully – Success
Negative value – Failure
0 – Socket close error
Note
Precondition (TCP client) - rsi_connect() API needs to be called before this API.
Precondition (TCP server) - rsi_listen() and rsi_accept() API needs to be called before this API.
Precondition (UDP server) - rsi_bind() API needs to be called before this API.
Precondition (UDP client) - rsi_socket() or rsi_bind() API needs to be called before this API
The following table lists the maximum individual chunk of data that can be sent over each supported protocol.
Protocol | Maximum data chunk (bytes) |
---|---|
TCP/LTCP socket | 1460 |
LUDP socket | 1472 |
Web socket | 1450 |
TCP-SSL/LTCP-SSL | 1370 |
Web socket over SSL | 1362 |
746
of file network/socket/rsi_socket.c
rsi_sendto_async#
int32_t rsi_sendto_async (int32_t sockID, int8_t * msg, int32_t msgLength, int32_t flags, struct rsi_sockaddr * destAddr, int32_t destAddrLen, void(*)(int32_t sockID, uint16_t length) data_transfer_complete_handler, length)
Send the data to the specified remote IP Address on the given socket and receive the acknowledgement through the registered call back. This is non-blocking API.
[in] | sockID | - Socket descriptor ID |
[in] | msg | - Pointer to data buffer containing data to send to remote peer |
[in] | msgLength | - Length of data to send |
[in] | flags | - Reserved |
[in] | destAddr | - Address of the remote peer to send data |
[in] | destAddrLen | - Length of the address in bytes |
[in] | data_transfer_complete_handler | - Pointer to callback function called after complete data transfer |
[out] | length | - Number of bytes transfered |
Returns
Number of bytes received successfully – Success
Negative value – Failure
0 – Socket close error
Note
The following table lists the maximum individual chunk of data that can be sent over each supported protocol.
Protocol | Maximum data chunk (bytes) |
---|---|
TCP/LTCP socket | 1460 |
LUDP socket | 1472 |
Web socket | 1450 |
TCP-SSL/LTCP-SSL | 1370 |
Web socket over SSL | 1362 |
Note
The data_transfer_complete_handler callback handler is supported only for TCP data transfer. This handler is supported only when RSI_WLAN_RSP_TCP_ACK_INDICATION feature is enabled in socket_feature_bitmap.
789
of file network/socket/rsi_socket.c
rsi_send#
int32_t rsi_send (int32_t sockID, const int8_t * msg, int32_t msgLength, int32_t flags)
Sends the data to the remote peer on the given socket. This is a non-blocking API.
[in] | sockID | - Socket descriptor ID |
[in] | msg | - Pointer to the buffer containing data to send to the remote peer |
[in] | msgLength | - Length of the buffer |
[in] | flags | - Reserved |
Returns
Number of bytes received successfully – Success
Negative value – Failure
0 – Socket close error
Note
Precondition - rsi_connect()/ rsi_accept() API needs to be called before this API.
The following table lists the maximum individual chunk of data that can be sent over each supported protocol.
Protocol | Maximum data chunk (bytes) |
---|---|
TCP/LTCP socket | 1460 |
LUDP socket | 1472 |
Web socket | 1450 |
TCP-SSL/LTCP-SSL | 1370 |
Web socket over SSL | 1362 |
829
of file network/socket/rsi_socket.c
rsi_reset_per_socket_info#
void rsi_reset_per_socket_info (int32_t sockID)
Reset all the socket related information.
[in] | sockID | - Socket descriptor ID |
Returns
Void
855
of file network/socket/rsi_socket.c
rsi_send_large_data_sync#
int32_t rsi_send_large_data_sync (int32_t sockID, const int8_t * msg, int32_t msgLength, int32_t flags)
Send large data on a given socket synchronously.
[in] | sockID | - Socket descriptor ID |
[in] | msg | - Pointer to data that needs to be sent to remote peer |
[in] | msgLength | - Length of data to send |
[in] | flags | - Reserved |
Returns
Positive Value - Success, returns the number of bytes sent successfully
Negative Value - Failure
Zero - Socket Close Error
882
of file network/socket/rsi_socket.c
rsi_network_driver_task#
void rsi_network_driver_task (void , Void)
network task to send large data to send_async API
[in] | ||
[in] | Void |
Returns
Void
949
of file network/socket/rsi_socket.c
rsi_chunk_data_tx_done_cb#
void rsi_chunk_data_tx_done_cb (int32_t sockID, const uint16_t length)
Send one chunk of data at a time.
[in] | sockID | - Socket descriptor ID |
[in] | length | - Length of data to send |
Returns
Void
971
of file network/socket/rsi_socket.c
rsi_send_large_data_async#
int32_t rsi_send_large_data_async (int32_t sockID, const int8_t * msg, int32_t msgLength, int32_t flags, void(*)(int32_t sockID, uint16_t total_data_sent) rsi_sock_data_tx_done_cb, sockID, status, total_data_sent)
Send large data on a given socket. This is a blocking API.
[in] | sockID | - Socket descriptor ID |
[in] | msg | - Pointer to data that needs to be sent to remote peer |
[in] | msgLength | - Length of data to send |
[in] | flags | - Reserved |
[in] | rsi_sock_data_tx_done_cb | - Pointer to the callback function that will be called after one chunk of data transfer completion |
[out] | sockID | - Application socket ID |
[out] | status | - Status of the data transfer |
[out] | total_data_sent | - Total length of data sent |
Returns
0 - Success
Non-Zero Value - Failure
Note
Need to register application callback using The rsi_wlan_nwk_register_send_large_data_event_cb() API to get the complete notify.
1077
of file network/socket/rsi_socket.c
rsi_task_create#
rsi_task_create ((rsi_task_function_t) rsi_network_driver_task, (uint8_t *)"network" , RSI_NETWORK_TASK_STACK_SIZE , NULL , RSI_NETWORK_TASK_PRIORITY , & network_task_handle)
N/A | rsi_network_driver_task | |
N/A | ||
N/A | ||
N/A | ||
N/A | ||
N/A | network_task_handle |
1150
of file network/socket/rsi_socket.c
SL_PRINTF#
SL_PRINTF (SL_SEND_LARGE_DATA_ASYNC_EXIT_2 , NETWORK , LOG_INFO )
N/A | ||
N/A | ||
N/A |
1157
of file network/socket/rsi_socket.c
rsi_find_socket_data_pending#
uint32_t rsi_find_socket_data_pending (uint32_t event_map)
Find on which socket the data is pending, according to the event that is set from the event map.
[in] | event_map | - Event map |
Returns
Socket ID from the event map
1170
of file network/socket/rsi_socket.c
rsi_socket_event_handler#
void rsi_socket_event_handler (void )
Retrieve the packet from TX data pending queue and forward to the module.
[in] |
Returns
Void
1193
of file network/socket/rsi_socket.c
rsi_send_async#
int32_t rsi_send_async (int32_t sockID, const int8_t * msg, int32_t msgLength, int32_t flags, void(*)(int32_t sockID, uint16_t length) data_transfer_complete_handler, sockID, length)
Send data on a given socket asynchronously.
[in] | sockID | - Socket descriptor ID |
[in] | msg | - Pointer to the buffer containing data to send to the remote peer |
[in] | msgLength | - Length of the buffer |
[in] | flags | - Reserved |
[in] | data_transfer_complete_handler | - Pointer to callback function called after complete data transfer |
[out] | sockID | - Socket Descriptor ID |
[out] | length | - Number of bytes transfered |
Returns
Number of bytes received successfully – Success
Negative value – Failure
0 – Socket close error
Note
Precondition - rsi_socket()/ rsi_socket_async() API needs to be called before this API.
The following table lists the maximum individual chunk of data that can be sent over each supported protocol.
Protocol | Maximum data chunk (bytes) |
---|---|
TCP/LTCP socket | 1460 |
LUDP socket | 1472 |
Web socket | 1450 |
TCP-SSL/LTCP-SSL | 1370 |
Web socket over SSL | 1362 |
Note
The data_transfer_complete_handler callback handler is supported only for TCP data transfer. This handler is supported only when RSI_WLAN_RSP_TCP_ACK_INDICATION feature is enabled in socket_feature_bitmap.
1238
of file network/socket/rsi_socket.c
rsi_vap_shutdown#
int32_t rsi_vap_shutdown (uint8_t vapID)
Closes all the sockets associate with a vap_Id. This is a blocking API.
[in] | vapID | - Virtual access point ID |
rsi_socket()/ rsi_socket_async() API needs to be called before this API.
Returns
0 - Success
Negative Value - Failure
1262
of file network/socket/rsi_socket.c
rsi_shutdown#
int32_t rsi_shutdown (int32_t sockID, int32_t how)
Closes the socket specified in a socket descriptor. This is a blocking API.
[in] | sockID | - Socket descriptor ID |
[in] | how | - 0: Close the specified socket |
rsi_socket()/ rsi_socket_async() API needs to be called before this API.
Returns
0 - Success
Non-Zero Value - Failure
Note
Precondition - rsi_socket()/ rsi_socket_async() API needs to be called before this API.
1285
of file network/socket/rsi_socket.c
rsi_get_application_socket_descriptor#
int32_t rsi_get_application_socket_descriptor (int32_t sock_id)
Get the application socket descriptor from module socket descriptor.
[in] | sock_id | - Module's socket descriptor ID |
Returns
Positive Value - Success (Application socket descriptor)
Negative Value - Failure (If module’s socket descriptor is not found)
1339
of file network/socket/rsi_socket.c
rsi_clear_sockets#
void rsi_clear_sockets (int32_t sockID)
Clear socket information.
[in] | sockID | - Socket descriptor ID |
Returns
Void
1353
of file network/socket/rsi_socket.c
rsi_fill_tls_extension#
int rsi_fill_tls_extension (int32_t sockID, int extension_type, const void * option_value, rsi_socklen_t extension_len)
Configure TLS extensions.
[in] | sockID | - Socket descriptor ID |
[in] | extension_type | - Type of TLS extension |
[in] | option_value | - TLS extension data |
[in] | extension_len | - TLS extension data length |
Returns
0 - Success
Non-Zero Value - Failure
1372
of file network/socket/rsi_socket.c
rsi_setsockopt#
int rsi_setsockopt (int32_t sockID, int level, int option_name, const void * option_value, rsi_socklen_t option_len)
Set the socket options. This is a non-blocking API.
[in] | sockID | - Socket descriptor ID | ||||||||||||||||||
[in] | level | - Set the socket option, take the socket level | ||||||||||||||||||
[in] | option_name | - Provide the name of the ID.
SO_TLS_SNI for configuring the SNI feature | ||||||||||||||||||
[in] | option_value | - Value of the parameter | ||||||||||||||||||
[in] | option_len | - Length of the parameter |
rsi_setsockopt() API needs to be called after rsi_socket command only.
Returns
0 - Success
Non-Zero Value - Failure (Possible Error Codes - 0xfffffffe, 0xfffffffd, 0xfffffffc)
Note
Precondition - rsi_socket() API needs to be called before this API.
Default window size is 2920 bytes. To modify window size, user need to configure HIGH_PERFORMANCE socket as option_name in rsi_setsockopt() API
1444
of file network/socket/rsi_socket.c
rsi_getsockopt#
int rsi_getsockopt (int32_t sockID, int level, int option_name, const void * option_value, rsi_socklen_t option_len)
Get the socket options. This is a non-blocking API.
[in] | sockID | - Socket descriptor ID |
[in] | level | - Set the socket option, take the socket level |
[in] | option_name | - Provide the name of the ID |
[in] | option_value | - Value of the parameter |
[in] | option_len | - Length of the parameter |
Returns
0 - Success
Non-Zero Value - Failure
Note
Precondition - rsi_socket() API needs to be called before this API.
1717
of file network/socket/rsi_socket.c
rsi_select#
int32_t rsi_select (int32_t nfds, rsi_fd_set * readfds, rsi_fd_set * writefds, rsi_fd_set * exceptfds, struct rsi_timeval * timeout, void(*)(rsi_fd_set *fd_read, rsi_fd_set *fd_write, rsi_fd_set *fd_except, int32_t status) callback, fd_read, fd_write, fd_except, status)
Monitor multiple socket (file descriptors), waiting until one or more of the sockets become ready to perform receive or send operation. If callback is NULL or not provided, it is a blocking API.
Otherwise, it is a non-blocking API.
[in] | nfds | - The highest-numbered file descriptor in any of the three sets, plus 1 |
[in] | readfds | - Socket descriptors to watch to see if data become available for receive |
[in] | writefds | - Socket descriptors to watch to see if space is available in socket to send data. |
[in] | exceptfds | - Socket descriptors to watch for exception |
[in] | timeout | - Timeout value to break the wait for select. If both fields of the timeval structure are zero, then select() returns immediately. |
[in] | callback | - Callback called when asynchronous response reach the select request. |
[out] | fd_read | - Pointer that holds bitmap for the select on read operation |
[out] | fd_write | - Pointer that holds bitmap for the select on write operation |
[out] | fd_except | - Pointer that holds bitmap for the select on exceptional operation |
[out] | status | - Status code |
Returns
Positive Value - Indicate total number of bits ready across all the descriptor sets
0 - Time out
Negative Value - Failure
Note
Precondition - rsi_accept()/ rsi_connect() API's needs to be called before this API.
Precondition - This API needs to be called before rsi_recv()/ rsi_recvfrom()/ rsi_send() API's.
Refer to Error Codes for the description of above error codes.
1805
of file network/socket/rsi_socket.c
calculate_buffers_required#
uint8_t calculate_buffers_required (uint8_t type, uint16_t length)
Calculate the buffers required.
[in] | type | - Type |
[in] | length | - Length |
Returns
0 - Success
Non-Zero Value - Failure
2045
of file network/socket/rsi_socket.c
rsi_accept_async#
int32_t rsi_accept_async (int32_t sockID, void(*)(int32_t sock_id, int16_t dest_port, uint8_t *ip_addr, int16_t ip_version) callback, sock_id, dest_port, ip_addr, ip_version)
Accept the connection request from the remote peer and register a callback that will be used by the driver to forward the received connection request asynchronously to the application. This is a non-blocking API.
[in] | sockID | - Socket descriptor ID |
[in] | callback | - Callback function to indicate the socket parameters connected |
[out] | sock_id | - Socket descriptor ID |
[out] | dest_port | - Port number of remote peer |
[out] | ip_addr | - Remote peer address |
[out] | ip_version | - 4 - IPV4. |
Returns
> 0 - Client socket ID
<= 0 - Failure
Note
When attempting to connect multiple clients to the server socket opened on module, i.e., when the backlog parameter is used in rsi_listen() API. rsi_accept_async() has to be called again for each of the client connections.
The API calling has to be repeated for the next client connection, only after the connection process of the previous client is complete.When using multiple client/server sockets, the following macros have to be updated in the wlan_config.h file, in TCP_IP_FEATURE_BIT_MAP - If TCP_IP_TOTAL_SOCKETS_x flag is used, then firmware allocates memory for x sockets. If TCP_IP_TOTAL_SOCKETS_x flag is not passed, then a default value of 10 sockets is used.
When using multiple client/server sockets, the following macros have to be updated in the rsi_user.h file, RSI_NUMBER_OF_LTCP_SOCKETS -> Number of server sockets and RSI_NUMBER_OF_SOCKETS -> Number of client sockets + Number of server sockets.
If multiple server sockets are created then the memory allocated for client sockets is to be shared across the multiple server sockets. If RSI_NUMBER_OF_LTCP_SOCKETS is 0 and RSI_NUMBER_OF_SOCKETS is x, y is server sockets and x-y client sockets can be created
2077
of file network/socket/rsi_socket.c
rsi_get_app_socket_descriptor#
int32_t rsi_get_app_socket_descriptor (uint8_t * src_port)
Get the application socket descriptor from source port.
[in] | src_port | - Pointer to the socket source port |
Returns
Positive Value - Application socket descriptor
Negative Value - If socket is not found
2243
of file network/socket/rsi_socket.c
rsi_get_socket_id#
int32_t rsi_get_socket_id (uint32_t src_port, uint32_t dst_port)
Get the socket ID from port number.
[in] | src_port | - Socket source port number |
[in] | dst_port | - Socket destination port number |
Returns
Positive Value - Socket descriptor
Negative Value - If socket is not found
2276
of file network/socket/rsi_socket.c
rsi_get_primary_socket_id#
int32_t rsi_get_primary_socket_id (uint8_t * port_num)
Get the primary socket ID from port number.
[in] | port_num | - Pointer to port number |
Returns
Positive Value - Socket descriptor
Negative Value - If socket is not found
2306
of file network/socket/rsi_socket.c
rsi_certificate_valid#
int32_t rsi_certificate_valid (uint16_t valid, uint16_t socket_id)
Validate the server certificate received from the module. This is a non-blocking API.
[in] | valid | - Indicate whether the server certificate is valid or not. |
[in] | socket_id | - Socket identifier |
Returns
0 - Success
Negative Value - Failure
2347
of file network/socket/rsi_socket.c
rsi_socket_create_async#
int32_t rsi_socket_create_async (int32_t sockID, int32_t type, int32_t backlog, backlog)
Send socket create request to the module and receive the response asynchronously. This is a non-blocking API if socket_connect_response_handler is registered.
Otherwise it is a blocking API.
[in] | sockID | - Pointer to the global control block |
[in] | type | - Socket descriptor ID |
[in] | backlog | - Type of socket to create |
[in] | backlog | - Number of backlogs for LTCP socket |
Returns
0 - Success
Negative Value - Failure
Note
Precondition - rsi_connect() API needs to be called before this API.
2411
of file network/socket/rsi_socket.c
rsi_get_socket_descriptor#
int32_t rsi_get_socket_descriptor (uint8_t * src_port, uint8_t * dst_port, uint8_t * ip_addr, uint16_t ip_version, uint16_t sockid)
Get the socket descriptor based on source port number, destination port number, destination IP address, and the IP version. This is a non-blocking API.
[in] | src_port | - Pointer to source port number |
[in] | dst_port | - Pointer to destination port number |
[in] | ip_addr | - Pointer to destinaion IP address |
[in] | ip_version | - IP version either IPv4/IPv6 |
[in] | sockid | - Socket descriptor ID from firmware |
Returns
0 - Socket descriptor
Negative Value - If socket is not found
2742
of file network/socket/rsi_socket.c
rsi_socket_async_non_rom#
int32_t rsi_socket_async_non_rom (int32_t protocolFamily, int32_t type, int32_t protocol, void(*)(uint32_t sock_no, uint8_t *buffer, uint32_t length) callback, sock_no, buffer, length)
Create a socket and register a callback that will be used by the driver to forward the received packets asynchronously to the application (on packet reception)
without waiting for recv API (Add proper API here). This is a non-blocking API.
[in] | protocolFamily | - Protocol family to select IPv4 or IPv6. |
[in] | type | - Select socket type UDP or TCP. |
[in] | protocol | - 0: Non-SSL sockets, 1: SSL sockets. |
[in] | callback | - Callback function to read data asynchronously from socket |
[out] | sock_no | - Application socket number |
[out] | buffer | - Pointer to buffer holding the data |
[out] | length | - Length of the response buffer |
Returns
0 - Success
Negative Value - Failure
Note
Precondition - rsi_config_ipaddress() API needs to be called before this API.
2850
of file network/socket/rsi_socket.c
rsi_socket_connect#
int32_t rsi_socket_connect (int32_t sockID, struct rsi_sockaddr * remoteAddress, int32_t addressLength)
Connect the socket to specific remote address. This is a non-blocking API, if socket_connect_response_handler() is registered through rsi_wlan_register_callbacks(). Otherwise it is a blocking API.
[in] | sockID | - Socket descriptor ID |
[in] | remoteAddress | - Remote peer address structure |
[in] | addressLength | - Remote peer address structrue length |
Returns
0 - Success
Negative Value - Failure
3035
of file network/socket/rsi_socket.c
rsi_socket_recvfrom#
int32_t rsi_socket_recvfrom (int32_t sockID, int8_t * buffer, int32_t buffersize, int32_t flags, struct rsi_sockaddr * fromAddr, int32_t * fromAddrLen)
Retrieve the received data from the remote peer on a given socket descriptor. This is a blocking API.
[in] | sockID | - Socket descriptor ID |
[out] | buffer | - Pointer to buffer to hold receive data |
[in] | buffersize | - Size of the buffer supplied |
[in] | flags | - Reserved |
[out] | fromAddr | - Sddress of remote peer, from where current packet was received |
[in] | fromAddrLen | - Pointer that contains remote peer address (fromAddr) length |
Returns
Positive Value - Number of bytes received successfully
0 - Socket close error
Negative Value - Failure
Note
Precondition - rsi_socket()/ rsi_socket_async() API needs to be called before this API.
3169
of file network/socket/rsi_socket.c
rsi_socket_listen#
int32_t rsi_socket_listen (int32_t sockID, int32_t backlog)
Enable socket to listen for remote connection request in passive mode. This is a blocking API.
[in] | sockID | - Socket descriptor ID |
[in] | backlog | - Maximum number of pending connections requests |
Returns
0 - Success
Negative Value - Failure
3450
of file network/socket/rsi_socket.c
rsi_vap_sockets_shutdown#
int32_t rsi_vap_sockets_shutdown (uint8_t vapID)
Close all the sockets associated with a VAP Id. This is a blocking API.
[in] | vapID | : Virtual Access Point ID |
rsi_socket()/ rsi_socket_async() API needs to be called before this API.
Note
If EXT_TCP_IP_WAIT_FOR_SOCKET_CLOSE (BIT(16)) in RSI_EXT_TCPIP_FEATURE_BITMAP is enabled, though remote socket has terminated connection, socket is disconnected and deleted only if host issues rsi_shutdown().
Returns
0 - Success
Negative Value - Failure
3547
of file network/socket/rsi_socket.c
rsi_socket_shutdown#
int32_t rsi_socket_shutdown (int32_t sockID, int32_t how)
Close the socket specified in a socket descriptor. This is a blocking API.
[in] | sockID | : Socket descriptor ID |
[in] | how | 0: Close the specified socket, |
rsi_socket()/ rsi_socket_async() API needs to be called before this API.
Returns
0 - Success
Negative Value - Failure
Note
Precondition - rsi_socket()/ rsi_socket_async() API needs to be called before this API.
how = 1 is valid for passively open sockets (listen) with more than one backlogs specified.
If EXT_TCP_IP_WAIT_FOR_SOCKET_CLOSE (BIT(16)) in RSI_EXT_TCPIP_FEATURE_BITMAP is enabled, then to close LTCP socket, argument "how" should be 1.
If EXT_TCP_IP_WAIT_FOR_SOCKET_CLOSE (BIT(16)) in RSI_EXT_TCPIP_FEATURE_BITMAP is enabled, though remote socket has terminated connection, socket is disconnected and deleted only, if host issues rsi_shutdown().
3580
of file network/socket/rsi_socket.c
rsi_socket_bind#
int32_t rsi_socket_bind (int32_t sockID, struct rsi_sockaddr * localAddress, int32_t addressLength)
Assign address to the socket. This is a non-blocking API for TCP and a blocking API for UDP.
[in] | sockID | - Socket descriptor ID |
[in] | localAddress | - Address that needs to be assigned |
[in] | addressLength | - Length of the socket address |
Returns
0 - Success
Negative Value - Failure
3725
of file network/socket/rsi_socket.c
rsi_wait_on_socket_semaphore#
rsi_error_t rsi_wait_on_socket_semaphore (rsi_semaphore_handle_t * semaphore, uint32_t timeout_ms)
Wait for network semaphore.
[in] | semaphore | - Semaphore handle pointer |
[in] | timeout_ms | - Maximum time to wait to acquire semaphore. If timeout_ms is 0, then wait till semaphore is acquired. |
Returns
0 - Success
Negative Value - Failure
3880
of file network/socket/rsi_socket.c
rsi_application_socket_descriptor#
int32_t rsi_application_socket_descriptor (int32_t sock_id)
Get the application socket descriptor from module’s socket descriptor. This is a non-blocking API.
[in] | sock_id | - Module's socket descriptor ID |
Returns
Positive Value - Application socket descriptor
Negative Value - If socket is not found
3909
of file network/socket/rsi_socket.c
rsi_wlan_socket_get_status#
int32_t rsi_wlan_socket_get_status (int32_t sockID)
Get WLAN socket status. This is a non-blocking API.
[in] | sockID | - Application socket ID |
Returns
WLAN socket status
3944
of file network/socket/rsi_socket.c
rsi_wlan_socket_set_status#
void rsi_wlan_socket_set_status (int32_t status, int32_t sockID)
Set WLAN status. This is a non-blocking API.
[in] | status | - Status value to be set |
[in] | sockID | - Application socket ID |
Returns
Void
3958
of file network/socket/rsi_socket.c
rsi_select_get_status#
int32_t rsi_select_get_status (int32_t selectid)
Get the status of the socket specified in the select ID.
[in] | selectid | - Socket ID to get the status |
Returns
0 - Success
Negative Value - Failure
3974
of file network/socket/rsi_socket.c
rsi_select_set_status#
void rsi_select_set_status (int32_t status, int32_t selectid)
Set the status of the socket specified in the select ID.
[in] | status | - Status value to be set |
[in] | selectid | - Socket ID on which the status is set |
Returns
Void
Note
Precondition - rsi_socket()/ rsi_socket_async() API needs to be called before this API.
3994
of file network/socket/rsi_socket.c
rsi_send_async_non_rom#
int32_t rsi_send_async_non_rom (int32_t sockID, const int8_t * msg, int32_t msgLength, int32_t flags, void(*)(int32_t sockID, uint16_t length) data_transfer_complete_handler, sockID, length)
Send data on a given socket asynchronously.
[in] | sockID | - Socket descriptor ID |
[in] | msg | - Pointer to data that needs to be sent to remote peer |
[in] | msgLength | - Length of data to send |
[in] | flags | - Reserved |
[in] | data_transfer_complete_handler | - Pointer to callback function called after complete data transfer |
[out] | sockID | - Socket Descriptor ID |
[out] | length | - Number of bytes transfered |
Returns
0 - Success
Negative Value - Failure
Note
The following table lists the maximum individual chunk of data that can be sent over each supported protocol.
Protocol | Maximum data chunk (bytes) |
---|---|
TCP/LTCP socket | 1460 |
LUDP socket | 1472 |
Web socket | 1450 |
TCP-SSL/LTCP-SSL | 1370 |
Web socket over SSL | 1362 |
4026
of file network/socket/rsi_socket.c
rsi_sendto_async_non_rom#
int32_t rsi_sendto_async_non_rom (int32_t sockID, int8_t * msg, int32_t msgLength, int32_t flags, struct rsi_sockaddr * destAddr, int32_t destAddrLen, void(*)(int32_t sockID, uint16_t length) data_transfer_complete_handler, sockID, length)
Send data to specific remote peer on a given socket.
[in] | sockID | - Socket descriptor ID |
[in] | msg | - Pointer to data that needs to be sent to remote peer |
[in] | msgLength | - Length of data to send |
[in] | flags | - Reserved |
[in] | destAddr | - Remote peer address to send data |
[in] | destAddrLen | - Remote peer address length |
[in] | data_transfer_complete_handler | - Pointer to callback function called after complete data transfer |
[out] | sockID | - Socket Descriptor ID |
[out] | length | - Number of bytes transfered |
Returns
Positive Value - Success, Number of bytes sent successfully
Negative Value - Failure
0 - Socket close error
4110
of file network/socket/rsi_socket.c
rsi_clear_sockets_non_rom#
void rsi_clear_sockets_non_rom (int32_t sockID)
Clear socket information.
[in] | sockID | - Socket descriptor ID |
Returns
Void
4329
of file network/socket/rsi_socket.c
rsi_network_app_protocol_config#
uint32_t rsi_network_app_protocol_config (nw_app_protocol protocol, nw_app_config config_type, void * config, uint16_t config_length)
Set the network application protocols configuration. This is a non-blocking API.
[in] | protocol | - The following table lists in below
| ||||||
[in] | config_type | - The following table lists in below
| ||||||
[in] | config | - The following table lists in below
| ||||||
[in] | config_length | - Length of the config parameter |
rsi_network_app_protocol_config() API needs to be called after only.
Returns
0 - Success
Non-Zero Value - Failure (Possible Error Codes - 0xffffff82)
Note
Precondition - rsi_config_ipaddress() API needs to be called before this API.
Examples : rsi_network_app_protocol_config(RSI_HTTP, RSI_CIPHER_SELECTION, &cipher_value, 4);
cipher_value : (SSL_NEW_CIPHERS | BIT_DHE_RSA_GCM | BIT_ECDHE_RSA_GCM )
4535
of file network/socket/rsi_socket.c
ROM_WL_rsi_get_application_socket_descriptor#
int32_t ROM_WL_rsi_get_application_socket_descriptor (global_cb_t * global_cb_p, int32_t sock_id)
Get the application socket descriptor from module’s socket descriptor. This is a non-blocking API.
[in] | global_cb_p | - Pointer to the global control block |
[in] | sock_id | - Module's socket descriptor |
Returns
Positive value - Application socket descriptor
Negative value - If socket is not found
33
of file network/socket/rsi_socket_rom.c
ROM_WL_rsi_get_primary_socket_id#
int32_t ROM_WL_rsi_get_primary_socket_id (global_cb_t * global_cb_p, uint16_t port_number)
Get socket descriptor from port_number.
This is a non-blocking API.
[in] | global_cb_p | - Pointer to the global control block |
[in] | port_number | - Port number |
Returns
Positive value - Socket descriptor
Negative value - If socket is not found
63
of file network/socket/rsi_socket_rom.c
ROM_WL_calculate_buffers_required#
uint8_t ROM_WL_calculate_buffers_required (global_cb_t * global_cb_p, uint8_t type, uint16_t length)
Calculate number of buffers required for the data packet.
This is a non-blocking API.
[in] | global_cb_p | - Pointer to the global control block |
[in] | type | - Type of socket to create |
[in] | length | - Length of the message |
Returns
Number of buffers required for the data packet
92
of file network/socket/rsi_socket_rom.c
ROM_WL_calculate_length_to_send#
uint16_t ROM_WL_calculate_length_to_send (global_cb_t * global_cb_p, uint8_t type, uint8_t buffers)
Calculate the length available in the buffers for the message. This is a non-blocking API.
[in] | global_cb_p | - Pointer to the global control block |
[in] | type | - Type of the socket stream |
[in] | buffers | - Available buffers |
Returns
Length available in the buffers for message
143
of file network/socket/rsi_socket_rom.c
rsi_socket_config#
int32_t rsi_socket_config (void )
Set the socket configuration parameters. The configurations can be done using the Socket configuration in the rsi_wlan_config.h file.
Using this API is highly recommended. Based on the socket configuration, module will use available buffers effectively.
This is a blocking API.
N/A |
Returns
0 - Success
Non-Zero Value - Failure (Possible Error Codes - 0x0021, 0x0025, 0x002C, 0xFF6D)
Note
Precondition - rsi_config_ipaddress() API and socket creation should be done before this API is called.
The following parameters are provided by user,
Parameters
Description
total socket
Desired total number of sockets to open
total_tcp_sockets
Desired total number of TCP sockets to open
total_udp_sockets
Desired total number of UDP sockets to open
tcp_tx_only_sockets
Desired total number of TCP sockets to open which are used only for data transmission
tcp_rx_only_sockets
Desired total number of TCP sockets to open which are used only for data reception
udp_tx_only_sockets
Desired total number of UDP sockets to open which are used only for data transmission
udp_rx_only_sockets
Desired total number of UDP sockets to open which are used only for data reception
tcp_rx_high_performance_sockets
Desired total number of high performance TCP sockets to open. High performance sockets can be
^ allocated with more buffers based on the buffers availability. This option is valid only for TCP
^ data receive sockets. Socket can be opened as high performance by setting high performance bit in
^ socket create command. tcp_rx_window_size_cap | Desired total to increase the TCP RX window size tcp_ack_window_div_factor | In case of high latency networks to configure the TCP ACK division factor with respective to the
^ window size; Increases the ACK frequency for asynchronous sockets
^ Note:
^ Default value is tcp_rx_window_size_cap.The following conditions must be met:
total_sockets <= Maximum allowed sockets(10)
(total_tcp_sockets + total_udp_sockets) <= total_sockets
(total_tcp_tx_only_sockets + total_tcp_rx_only_sockets) <= total_tcp_sockets
(total_udp_tx_only_sockets + total_udp_rx_only_sockets) <= total_udp_sockets
total_tcp_rx_high_performance_sockets <= total_tcp_rx_only_sockets
Refer to Error Codes for the description of above error codes.
7734
of file wlan/rsi_wlan_apis.c