Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
5fc1bb3
examples: add component for protocol examples network functionality
igrr Nov 20, 2018
4d50424
Rename Kconfig options (components/esp32)
dobairoland Apr 30, 2019
5861cfd
Rename Kconfig options (examples)
dobairoland May 9, 2019
57ca1fa
examples: use new component registration api
renzbagaporo Apr 28, 2019
bc38253
add esp_eth component
suda-morris Apr 10, 2019
89855fe
run WiFi on ESP32SBETA
TimXia Jun 17, 2019
7b54195
ethernet: support dm9051
suda-morris Jun 25, 2019
a8fc4b8
tools: Mass fixing of empty prototypes (for -Wstrict-prototypes)
antmak Jul 16, 2019
97bd06d
Merge branch 'master' into feature/esp32s2beta_update
projectgus Aug 8, 2019
2b7db31
Merge branch 'master' into feature/esp32s2beta_update
projectgus Aug 8, 2019
0a9a25a
ethernet: update spi-ethernet api
suda-morris Sep 18, 2019
f60f78f
Merge branch 'master' into feature/esp32s2beta_merge
igrr Oct 2, 2019
77eb7d3
examples: gracefully shut down Wi-Fi before restart
igrr Oct 7, 2019
729d6bd
ethernet: support OpenCores ethernet MAC
igrr Oct 1, 2019
3d61f02
Merge branch 'master' into feature/esp32s2beta_merge
projectgus Oct 15, 2019
353d814
Merge branch 'master' into feature/esp32s2beta_merge
projectgus Oct 17, 2019
0f6e648
examples: common component initialization code to use new esp_netif
david-cermak Aug 31, 2019
9c6fdc8
esp_netif and examples: using wifi driver handle, update examples and…
david-cermak Sep 4, 2019
e673e3b
esp_netif: extract wifi_netif module as an abstraction to wifi univer…
david-cermak Sep 15, 2019
c7bbe7d
ethernet: add gpio number into config structure
suda-morris Nov 14, 2019
4895f46
ethernet: move netif glue && add ref counter
suda-morris Nov 26, 2019
e55a8a7
ethernet: warning when double start/stop
suda-morris Dec 3, 2019
6f4bac0
ethernet: work with cache disabled
suda-morris Jan 13, 2020
e496a83
examples: enable IPv6 in example common connect for esp32s2
david-cermak Mar 5, 2020
fd31481
examples: common connect code to ignore GOT_IP6_EVENT if comes from u…
david-cermak Mar 3, 2020
06c509d
Merge branch 'bugfix/example_esp32s2_ipv6_on' into 'master'
david-cermak Mar 5, 2020
2dc962b
esp-netif: support for ipv6 addr types and indices
david-cermak Feb 6, 2020
70f3353
common_connect: add support for getting multiple IPv6 addresses
david-cermak Feb 7, 2020
fefa299
examples: add socket stdin utils to common connect component
david-cermak Mar 19, 2020
f121168
examples: common connect component to use both interfaces at once
david-cermak Apr 23, 2020
41b21d9
protocol_examples_common: keep buffering enabled on stdout
mahavirj May 18, 2020
ef760df
Merge branch 'bugfix/allow_buffering_on_stdout' into 'master'
mahavirj May 20, 2020
3ccb739
examples: common connect: fix build error if ipv6 disabled
david-cermak May 22, 2020
491394f
vfs: support vfs uart set line endings with specified uart number
Jun 9, 2020
3a2931c
examples: common connect to also support no connection flow if no int…
david-cermak Jun 5, 2020
80ebc85
examples: Common connect component: Unregister shutdown handler on di…
david-cermak Jul 29, 2020
3fb3d67
lwip: Added description to Kconfig option on IPv6 SLAAC
nx518 Nov 6, 2020
5fdb386
Whitespace: Automated whitespace fixes (large commit)
projectgus Nov 10, 2020
02a71ff
eth: support W5500 in network examples
suda-morris Nov 6, 2020
ea46775
eth: hide spi configuration when using internal emac
suda-morris Nov 27, 2020
d5445a4
example: We should not check the return value of esp_wifi_connect() i…
espxiehang Jan 11, 2021
65120e4
esp_wifi: Modify ESP_IF_WIFI_STA to WIFI_IF_STA
espxiehang Jan 19, 2021
17d4e18
examples: Strip IPv6 function in example and use sockaddr_storage to …
ESP-YJM Jan 18, 2021
2870284
Bugfix: Connect example to add scan mode config
HarveyRong-Esp Feb 25, 2021
0c4737e
example: set example wifi scan method to all channel:
heyinling Jun 9, 2021
3febe80
examples: Update Ethernet examples to use new PHY LAN87xx init function
kostaond Jun 24, 2021
e20c5d7
examples/protocols: fix compilation when CONFIG_EXAMPLE_USE_OPENETH=y
igrr Aug 15, 2021
ad6f55d
esp_eth: add support for multiple Ethernets modules at a time
kostaond Aug 3, 2021
49ac47f
Merge branch 'feature/dual_eth' into 'master'
kostaond Aug 27, 2021
6f48454
Eth_examples: added support of ESP32-S3 chip
kostaond Aug 13, 2021
ab704f4
Build & config: Remove leftover files from the unsupported "make" bui…
dobairoland Nov 5, 2021
2beb7cc
esp_eth: rework KSZ80xx implementation and add more KSZ80xx PHYs
dabbinavo Nov 16, 2021
90018b3
freertos: Remove legacy data types
Dazza0 Feb 8, 2022
e446696
esp_eth: Make EMAC DMA burst size configurable
david-cermak Dec 15, 2021
c39a743
esp_eth: Update esp32's EMAC API to decouple driver and vendor config
david-cermak Jan 24, 2022
0a628f4
G0: target component (components/esp32*) doesn't depend on driver any…
o-marshmallow Jan 28, 2022
9ddf692
examples: added ESP-NETIF L2 TAP example
kostaond Mar 31, 2022
fda74d6
Examples: common source for GPIO range in Kconfigs defined
kostaond Apr 20, 2022
cd9f12c
esp-netif: Make dependency on esp-eth optional
david-cermak May 2, 2022
8d8228f
Add config option to set stack size for emac_rx task
hmalpani Jun 14, 2022
e83639f
esp_eth: SPI Ethernet modules initialization simplification
kostaond Jun 23, 2022
1c4b6f7
common_components: add wifi connect console commands
ydhub Jul 3, 2022
392bc21
example: use example common componments in esp_local_ctrl
ydhub Jul 4, 2022
6a53b1c
CI: Improve common test methods
ydhub Jul 6, 2022
08beaff
esp_netif/lwip: Fix deps cycles to "lwip -> esp_netif -> phy-drivers"
david-cermak May 11, 2022
b721c62
example_common: fix netif ips may be printed before got ipv4
ydhub Aug 31, 2022
ac929c3
examples/protocols: Added URI encoding/decoding feature
laukik-hase Jan 25, 2023
cfd89db
examples: Add common linux component tapif_io
david-cermak Jan 31, 2023
9cb3afd
lwip: Support IPv6 only mode
david-cermak Oct 3, 2022
b4c01c0
fix esp_http_client_example to build for Linux target. Made `protocol…
hmalpani Feb 13, 2023
cdf6379
Merge branch 'feature/lwip_ipv6_only' into 'master'
david-cermak Mar 1, 2023
5349391
comm_components: eth_start initializes spi bus with SPI_DMA_CH_AUTO
xieqinan Apr 3, 2023
afb4907
protocols/examples: Disable Wifi connection if not supported
euripedesrocha May 29, 2023
5846a13
fix(esp_netif): Mark esp_netif_next deprecated and fix usages
david-cermak Oct 3, 2023
fb102ff
feat(examples): Add PPP to common connection component
david-cermak Oct 4, 2023
1c3ff83
refactor(uart_vfs): Move uart implementation of vfs to esp_driver_uart
songruo Nov 24, 2023
f9a5c76
refactor(parlio): make parlio driver as component
L-KAYA Dec 31, 2023
fd50379
fix(examples): fixed common_connect example to support ESP32P4 intern…
kostaond Jan 19, 2024
f3b02bb
fix(examples): Make esp_eth public dependency of protocol_examples_comon
tore-espressif Jan 22, 2024
fe33022
Merge branch 'fix/common_examples_cmake' into 'master'
tore-espressif Jan 23, 2024
bda57cc
feat(esp_eth): a new folder structure of the driver and other improve…
kostaond Apr 26, 2024
4bc1a8f
feat(eth) configure eth mac using esp_read_mac
zwx1995esp May 23, 2024
d7efe21
fix(examples): Add wifi_remote option to common connect example
david-cermak Sep 26, 2023
e20546b
fix(common_components): unregister event handler if wifi disconnect a…
gytxxsy Jun 26, 2024
76a0db7
fix(esp_eth): fixed default GPIO to match new ver. of P4 devboard
kostaond Aug 8, 2024
61607b8
fix(examples) : Common component's wifi disconnect handler should ign…
Jul 1, 2024
9af5f6f
feat(esp_eth): added new generic PHY driver
kostaond Sep 19, 2024
c735d73
fix(build): clean up dependencies on driver component
igrr Sep 15, 2024
3a5ad7b
fix(common_connect): Fix example's stdin/out to setup UART interrupt …
david-cermak Oct 1, 2024
c632fe7
Merge branch 'bugfix/protocols_examples_common_driver_dep' into 'master'
igrr Nov 14, 2024
c1dddd8
feat(wifi): avoid compiling components related to wifi when wifi is n…
QingzhaoYin Nov 6, 2024
b399cc1
fix(protocol_examples_common): don't override MAC address for openeth
igrr Dec 9, 2024
d24391e
feat(protocol_examples_common): Add Thread connect to support Thread …
wqx6 Nov 12, 2024
9ff889f
Merge branch 'example_connect/thread' into 'master'
chshu Dec 16, 2024
79e823f
fix(openthread): Fix CI failure of ot_trel example build
wqx6 Dec 17, 2024
18b1a07
fix(connect): Fix wifi_connect to delete semaphores after waiting on …
david-cermak Feb 20, 2025
fbf2291
docs: Fix some typos
Shen7436 Apr 30, 2025
7de66c1
feat(examples): improved example for Ethernet SPI polling mode withou…
zinkett Jul 14, 2025
14dbcb5
feat(esp_eth): removed SPI Ethernet and PHY drivers from IDF
kostaond Sep 15, 2025
86c2be1
fix(protocol_examples_common): Temporal fix of backwards compatibility
kostaond Oct 7, 2025
edf7c67
feat(common): Merge protocol_examples_common history from esp-idf
abhik-roy85 Nov 11, 2025
bd37fc5
feat(common): Move protocol_examples_common to components/net_connect
abhik-roy85 Nov 11, 2025
5a64f51
feat(common): Refactor API and config from example_* to net_connect_*
abhik-roy85 Nov 11, 2025
24d6b84
fix(common): Added formatting fixes
abhik-roy85 Nov 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ typedef void *EventGroupHandle_t;
typedef uint32_t TickType_t;
typedef TickType_t EventBits_t;

typedef void (*TaskFunction_t)( void * );
typedef void (*TaskFunction_t)(void *);
typedef unsigned int UBaseType_t;
typedef int BaseType_t;

Expand Down
6 changes: 3 additions & 3 deletions components/eppp_link/examples/host/main/register_iperf.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ static int ppp_cmd_iperf(int argc, char **argv)
cfg.flag & IPERF_FLAG_TCP ? "tcp" : "udp",
cfg.flag & IPERF_FLAG_SERVER ? "server" : "client",
(uint16_t) cfg.source_ip4 & 0xFF,
(uint16_t) (cfg.source_ip4 >> 8) & 0xFF,
(uint16_t) (cfg.source_ip4 >> 16) & 0xFF,
(uint16_t) (cfg.source_ip4 >> 24) & 0xFF,
(uint16_t)(cfg.source_ip4 >> 8) & 0xFF,
(uint16_t)(cfg.source_ip4 >> 16) & 0xFF,
(uint16_t)(cfg.source_ip4 >> 24) & 0xFF,
cfg.sport,
cfg.destination_ip4 & 0xFF, (cfg.destination_ip4 >> 8) & 0xFF,
(cfg.destination_ip4 >> 16) & 0xFF, (cfg.destination_ip4 >> 24) & 0xFF, cfg.dport,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class ConsoleCommand {
* @param f Function callback for the command
*/
template<typename T> explicit ConsoleCommand(const char *command, const char *help, const T *arg_struct, size_t srg_struct_size,
std::function<bool(ConsoleCommand *)> f): func(std::move(f))
std::function<bool(ConsoleCommand *)> f): func(std::move(f))
{
size_t args_plain_size = srg_struct_size / sizeof(CommandArgs);
auto first_arg = reinterpret_cast<const CommandArgs *>(arg_struct);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ static int do_ping_cmd(int argc, char **argv)
return 1;
}
if (res->ai_family == AF_INET) {
struct in_addr addr4 = ((struct sockaddr_in *) (res->ai_addr))->sin_addr;
struct in_addr addr4 = ((struct sockaddr_in *)(res->ai_addr))->sin_addr;
inet_addr_to_ip4addr(ip_2_ip4(&target_addr), &addr4);
} else {
struct in6_addr addr6 = ((struct sockaddr_in6 *) (res->ai_addr))->sin6_addr;
struct in6_addr addr6 = ((struct sockaddr_in6 *)(res->ai_addr))->sin6_addr;
inet6_addr_to_ip6addr(ip_2_ip6(&target_addr), &addr6);
}
freeaddrinfo(res);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ using namespace esp_modem;

command_result net_open(CommandableIf *term)
{
ESP_LOGV(TAG, "%s", __func__ );
ESP_LOGV(TAG, "%s", __func__);
std::string response;
auto ret = dce_commands::generic_get_string(term, "AT+NETOPEN?\r", response, 1000);
if (ret != command_result::OK) {
return ret;
}
ESP_LOGV(TAG, "%s", response.data() );
ESP_LOGV(TAG, "%s", response.data());
if (response.find("+NETOPEN: 1") != std::string::npos) {
ESP_LOGD(TAG, "Already there");
ret = command_result::OK;
Expand All @@ -42,37 +42,37 @@ command_result net_open(CommandableIf *term)

command_result net_close(CommandableIf *term)
{
ESP_LOGV(TAG, "%s", __func__ );
ESP_LOGV(TAG, "%s", __func__);
return dce_commands::generic_command(term, "AT+NETCLOSE\r", "+NETCLOSE:", "ERROR", 30000);
}

command_result tcp_open(CommandableIf *term, const std::string &host, int port, int timeout)
{
ESP_LOGV(TAG, "%s", __func__ );
ESP_LOGV(TAG, "%s", __func__);
auto ret = dce_commands::generic_command(term, "AT+CIPRXGET=1\r", "OK", "ERROR", 50000);
if (ret != command_result::OK) {
ESP_LOGE(TAG, "Setting Rx mode failed!");
return ret;
}
ESP_LOGV(TAG, "%s", __func__ );
ESP_LOGV(TAG, "%s", __func__);
std::string ip_open = R"(AT+CIPOPEN=0,"TCP",")" + host + "\"," + std::to_string(port) + "\r";
ret = dce_commands::generic_command(term, ip_open, "+CIPOPEN: 0,0", "ERROR", timeout);
if (ret != command_result::OK) {
ESP_LOGE(TAG, "%s Failed", __func__ );
ESP_LOGE(TAG, "%s Failed", __func__);
return ret;
}
return command_result::OK;
}

command_result tcp_close(CommandableIf *term)
{
ESP_LOGV(TAG, "%s", __func__ );
ESP_LOGV(TAG, "%s", __func__);
return dce_commands::generic_command(term, "AT+CIPCLOSE=0\r", "+CIPCLOSE:", "ERROR", 10000);
}

command_result tcp_send(CommandableIf *term, uint8_t *data, size_t len)
{
ESP_LOGV(TAG, "%s", __func__ );
ESP_LOGV(TAG, "%s", __func__);
std::string send = "AT+CIPSEND=0," + std::to_string(len) + "\r";
auto ret = term->command(send, [&](uint8_t *data, size_t len) {
std::string_view response((char *)data, len);
Expand Down Expand Up @@ -107,7 +107,7 @@ command_result tcp_send(CommandableIf *term, uint8_t *data, size_t len)
uint8_t ctrl_z = '\x1A';
term->write(&ctrl_z, 1);
int count = 0;
while (ret == command_result::TIMEOUT && count++ < 1000 ) {
while (ret == command_result::TIMEOUT && count++ < 1000) {
vTaskDelay(pdMS_TO_TICKS(1000));
}
term->on_read(nullptr);
Expand All @@ -116,7 +116,7 @@ command_result tcp_send(CommandableIf *term, uint8_t *data, size_t len)

command_result tcp_recv(CommandableIf *term, uint8_t *data, size_t len, size_t &out_len)
{
ESP_LOGV(TAG, "%s", __func__ );
ESP_LOGV(TAG, "%s", __func__);
std::string out;
auto ret = dce_commands::generic_get_string(term, "AT+CIPRXGET=4,0\r", out);
if (ret != command_result::OK) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@ class LocalFactory: public Factory {
* @return unique pointer of the resultant DCE
*/
std::unique_ptr<DCE_gnss> create_SIM7070_GNSS_dce(const esp_modem::dce_config *config,
std::shared_ptr<esp_modem::DTE> dte,
esp_netif_t *netif)
std::shared_ptr<esp_modem::DTE> dte,
esp_netif_t *netif)
{
return gnss_factory::LocalFactory::create(config, std::move(dte), netif);
}

esp_modem::command_result get_gnss_information_sim70xx_lib(esp_modem::CommandableIf *t, sim70xx_gps_t &gps)
{

ESP_LOGV(TAG, "%s", __func__ );
ESP_LOGV(TAG, "%s", __func__);
std::string str_out;
auto ret = esp_modem::dce_commands::generic_get_string(t, "AT+CGNSINF\r", str_out);
if (ret != esp_modem::command_result::OK) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace esp_modem {
*/
struct unique_buffer {
explicit unique_buffer(size_t size);
unique_buffer (unique_buffer const &) = delete;
unique_buffer(unique_buffer const &) = delete;
unique_buffer &operator=(unique_buffer const &) = delete;
unique_buffer(unique_buffer &&other) noexcept
{
Expand Down
2 changes: 1 addition & 1 deletion components/esp_modem/src/esp_modem_uart_linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ constexpr const char *TAG = "uart_resource";

uart_resource::uart_resource(const esp_modem_uart_term_config *config, QueueHandle_t *event_queue, int fd): port(-1)
{
ESP_LOGD(TAG, "Creating uart resource" );
ESP_LOGD(TAG, "Creating uart resource");
struct termios tty = {};
ESP_MODEM_THROW_IF_FALSE(tcgetattr(fd, &tty) == 0, "Failed to tcgetattr()");

Expand Down
2 changes: 1 addition & 1 deletion components/esp_modem/src/esp_modem_vfs_socket_creator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ static esp_err_t hostname_to_fd(const char *host, int port, int *fd)
auto *p = reinterpret_cast<struct sockaddr_in *>(address_info->ai_addr);
p->sin_port = htons(port);
ESP_LOGI(TAG, "[sock=%d] Resolved IPv4 address: %s", *fd, inet_ntoa(p->sin_addr));
memcpy(&address, p, sizeof(struct sockaddr ));
memcpy(&address, p, sizeof(struct sockaddr));
} else {
ESP_LOGE(TAG, "Unsupported protocol family %d", address_info->ai_family);
close(*fd);
Expand Down
2 changes: 1 addition & 1 deletion components/esp_modem/test/host_test/main/LoopbackTerm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ int LoopbackTerm::write(uint8_t *data, size_t len)
async_results.push_back(std::move(ret));
return len;
}
if (len > 2 && (data[len - 1] == '\r' || data[len - 1] == '+') ) { // Simple AT responder
if (len > 2 && (data[len - 1] == '\r' || data[len - 1] == '+')) { // Simple AT responder
std::string command((char *)data, len);
std::string response;
if (command == "+++") {
Expand Down
2 changes: 1 addition & 1 deletion components/esp_modem/test/target/main/pppd_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ extern "C" {
ESP_LOGE(TAG, "Signal handler %d", nr);
}

_sig_func_ptr signal (int nr, _sig_func_ptr)
_sig_func_ptr signal(int nr, _sig_func_ptr)
{
return handle;
}
Expand Down
6 changes: 3 additions & 3 deletions components/esp_modem/test/target_iperf/main/cmd_pppclient.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,9 @@ static int ppp_cmd_iperf(int argc, char **argv)
cfg.flag & IPERF_FLAG_TCP ? "tcp" : "udp",
cfg.flag & IPERF_FLAG_SERVER ? "server" : "client",
(uint16_t) cfg.source_ip4 & 0xFF,
(uint16_t) (cfg.source_ip4 >> 8) & 0xFF,
(uint16_t) (cfg.source_ip4 >> 16) & 0xFF,
(uint16_t) (cfg.source_ip4 >> 24) & 0xFF,
(uint16_t)(cfg.source_ip4 >> 8) & 0xFF,
(uint16_t)(cfg.source_ip4 >> 16) & 0xFF,
(uint16_t)(cfg.source_ip4 >> 24) & 0xFF,
cfg.sport,
cfg.destination_ip4 & 0xFF, (cfg.destination_ip4 >> 8) & 0xFF,
(cfg.destination_ip4 >> 16) & 0xFF, (cfg.destination_ip4 >> 24) & 0xFF, cfg.dport,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ int TlsTransport::preread(size_t len, int timeout_ms)
while (len != read_len) {
int l = esp_transport_read(transport_, buf.data() + read_len, len - read_len, timeout_ms);
ESP_LOGD(TAG, "need %d read %d already %d", len, l, read_len);
if ((l == ERR_TCP_TRANSPORT_CONNECTION_CLOSED_BY_FIN || l == ERR_TCP_TRANSPORT_CONNECTION_TIMEOUT ) && read_len > 0) {
if ((l == ERR_TCP_TRANSPORT_CONNECTION_CLOSED_BY_FIN || l == ERR_TCP_TRANSPORT_CONNECTION_TIMEOUT) && read_len > 0) {
return read_len;
}
if (l <= 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,6 @@ extern "C" void app_main(void)
MyClient client{broker, credentials, config};
while (true) {
constexpr TickType_t xDelay = 500 / portTICK_PERIOD_MS;
vTaskDelay( xDelay );
vTaskDelay(xDelay);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ class SecureLink: public Tls {
int recv_timeout(unsigned char *buf, size_t len, int timeout) override
{
struct timeval tv {
timeout / 1000, (timeout % 1000 ) * 1000
timeout / 1000, (timeout % 1000) * 1000
};
fd_set read_fds;
FD_ZERO( &read_fds );
FD_SET( sock, &read_fds );
FD_ZERO(&read_fds);
FD_SET(sock, &read_fds);

int ret = select(sock + 1, &read_fds, nullptr, nullptr, timeout == 0 ? nullptr : &tv);
if (ret == 0) {
Expand Down
10 changes: 5 additions & 5 deletions components/mbedtls_cxx/mbedtls_wrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ int Tls::handshake()
int ret = 0;
mbedtls_ssl_set_bio(&ssl_, this, bio_write, bio_read, is_dtls_ ? bio_read_tout : nullptr);

while ( ( ret = mbedtls_ssl_handshake( &ssl_ ) ) != 0 ) {
if ( ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE ) {
while ((ret = mbedtls_ssl_handshake(&ssl_)) != 0) {
if (ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE) {
#if CONFIG_MBEDTLS_SSL_PROTO_DTLS
if (is_server_ && is_dtls_ && ret == MBEDTLS_ERR_SSL_HELLO_VERIFY_REQUIRED) {
// hello verification requested -> restart the session with this client_id
Expand All @@ -104,7 +104,7 @@ int Tls::handshake()
continue;
}
#endif // MBEDTLS_SSL_PROTO_DTLS
print_error( "mbedtls_ssl_handshake returned", ret );
print_error("mbedtls_ssl_handshake returned", ret);
return -1;
}
delay();
Expand Down Expand Up @@ -132,12 +132,12 @@ int Tls::bio_read_tout(void *ctx, unsigned char *buf, size_t len, uint32_t timeo

int Tls::write(const unsigned char *buf, size_t len)
{
return mbedtls_ssl_write( &ssl_, buf, len );
return mbedtls_ssl_write(&ssl_, buf, len);
}

int Tls::read(unsigned char *buf, size_t len)
{
return mbedtls_ssl_read( &ssl_, buf, len );
return mbedtls_ssl_read(&ssl_, buf, len);
}

bool Tls::set_own_cert(const_buf crt, const_buf key)
Expand Down
12 changes: 6 additions & 6 deletions components/mdns/tests/test_afl_fuzz_host/mdns_di.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@
#include "mdns.h"
#include "mdns_private.h"

void (*mdns_test_static_execute_action)(mdns_action_t *) = NULL;
void (*mdns_test_static_execute_action)(mdns_action_t *) = NULL;
mdns_srv_item_t *(*mdns_test_static_mdns_get_service_item)(const char *service, const char *proto, const char *hostname) = NULL;
mdns_search_once_t *(*mdns_test_static_search_init)(const char *name, const char *service, const char *proto, uint16_t type, bool unicast,
uint32_t timeout, uint8_t max_results,
mdns_query_notify_t notifier) = NULL;
esp_err_t (*mdns_test_static_send_search_action)(mdns_action_type_t type, mdns_search_once_t *search) = NULL;
void (*mdns_test_static_search_free)(mdns_search_once_t *search) = NULL;
uint32_t timeout, uint8_t max_results,
mdns_query_notify_t notifier) = NULL;
esp_err_t (*mdns_test_static_send_search_action)(mdns_action_type_t type, mdns_search_once_t *search) = NULL;
void (*mdns_test_static_search_free)(mdns_search_once_t *search) = NULL;

static void _mdns_execute_action(mdns_action_t *action);
static mdns_srv_item_t *_mdns_get_service_item(const char *service, const char *proto, const char *hostname);
static mdns_search_once_t *_mdns_search_init(const char *name, const char *service, const char *proto, uint16_t type, bool unicast,
uint32_t timeout, uint8_t max_results, mdns_query_notify_t notifier);
uint32_t timeout, uint8_t max_results, mdns_query_notify_t notifier);
static esp_err_t _mdns_send_search_action(mdns_action_type_t type, mdns_search_once_t *search);
static void _mdns_search_free(mdns_search_once_t *search);

Expand Down
2 changes: 1 addition & 1 deletion components/mosquitto/port/signals.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
#include "signal.h"

int sigprocmask (int, const sigset_t *, sigset_t *)
int sigprocmask(int, const sigset_t *, sigset_t *)
{
return 0;
}
52 changes: 52 additions & 0 deletions components/net_connect/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
idf_build_get_property(target IDF_TARGET)

if(${target} STREQUAL "linux")
# Header only library for linux

idf_component_register(INCLUDE_DIRS include
SRCS protocol_examples_utils.c)
return()
endif()

set(srcs "stdin_out.c"
"addr_from_stdin.c"
"connect.c"
"wifi_connect.c"
"protocol_examples_utils.c")

if(CONFIG_NET_CONNECT_PROVIDE_WIFI_CONSOLE_CMD)
list(APPEND srcs "console_cmd.c")
endif()

if(CONFIG_NET_CONNECT_CONNECT_ETHERNET)
list(APPEND srcs "eth_connect.c")
endif()

if(CONFIG_NET_CONNECT_CONNECT_THREAD)
list(APPEND srcs "thread_connect.c")
endif()

if(CONFIG_NET_CONNECT_CONNECT_PPP)
list(APPEND srcs "ppp_connect.c")
endif()


idf_component_register(SRCS "${srcs}"
INCLUDE_DIRS "include"
PRIV_REQUIRES esp_netif esp_driver_gpio esp_driver_uart esp_wifi vfs console esp_eth openthread)

if(CONFIG_NET_CONNECT_PROVIDE_WIFI_CONSOLE_CMD)
idf_component_optional_requires(PRIVATE console)
endif()

if(CONFIG_NET_CONNECT_CONNECT_ETHERNET)
idf_component_optional_requires(PUBLIC esp_eth)
endif()

if(CONFIG_NET_CONNECT_CONNECT_THREAD)
idf_component_optional_requires(PRIVATE openthread)
endif()

if(CONFIG_NET_CONNECT_CONNECT_PPP)
idf_component_optional_requires(PRIVATE esp_tinyusb espressif__esp_tinyusb)
endif()
Loading
Loading