Function esp_idf_svc::sys::esp_wifi_internal_tx_by_ref
source · pub unsafe extern "C" fn esp_wifi_internal_tx_by_ref(
ifx: u32,
buffer: *mut c_void,
len: usize,
netstack_buf: *mut c_void,
) -> i32
Expand description
@brief transmit the buffer by reference via wifi driver
This API firstly increases the reference counter of the input buffer and then forwards the buffer to WiFi driver. The WiFi driver will free the buffer after processing it. Use esp_wifi_internal_tx() if the uplayer buffer doesn’t supports reference counter.
@param wifi_if : wifi interface id @param buffer : the buffer to be transmit @param len : the length of buffer @param netstack_buf : the netstack buffer related to buffer
@return
- ESP_OK : Successfully transmit the buffer to wifi driver
- ESP_ERR_NO_MEM: out of memory
- ESP_ERR_INVALID_ARG: invalid argument
- ESP_ERR_WIFI_IF : WiFi interface is invalid
- ESP_ERR_WIFI_CONN : WiFi interface is not created, e.g. send the data to STA while WiFi mode is AP mode
- ESP_ERR_WIFI_NOT_STARTED : WiFi is not started
- ESP_ERR_WIFI_STATE : WiFi internal state is not ready, e.g. WiFi is not started
- ESP_ERR_WIFI_NOT_ASSOC : WiFi is not associated
- ESP_ERR_WIFI_TX_DISALLOW : WiFi TX is disallowed, e.g. WiFi hasn’t pass the authentication
- ESP_ERR_WIFI_POST : caller fails to post event to WiFi task