mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-25 08:17:28 +02:00
Compare commits
8 Commits
modem-v1.0
...
mdns-v1.2.
Author | SHA1 | Date | |
---|---|---|---|
7c5a832821 | |||
0bb72f29be | |||
ebdac9cc01 | |||
df04b14e2b | |||
b6a4d94ab0 | |||
418791cf79 | |||
ce9337d332 | |||
0b783c01dd |
@ -25,6 +25,7 @@ The control of lifetime of the class, done by `std::shared_ptr` usage, guarantee
|
||||
async operations until it's not needed any more. This makes necessary that all of the async operation class must start
|
||||
its lifetime as a `std::shared_ptr` due to the usage of `std::enable_shared_from_this`.
|
||||
|
||||
```
|
||||
|
||||
User creates a shared_ptr──┐
|
||||
of AddressResolution and │
|
||||
@ -47,6 +48,7 @@ its lifetime as a `std::shared_ptr` due to the usage of `std::enable_shared_from
|
||||
is called. │
|
||||
└────►Completion Handler()
|
||||
|
||||
```
|
||||
|
||||
The previous diagram shows the process and the life span of each of the tasks in this examples. At each stage the
|
||||
object responsible for the last action inject itself to the completion handler of the next stage for reuse.
|
||||
|
@ -3,6 +3,6 @@ commitizen:
|
||||
bump_message: 'bump(mdns): $current_version -> $new_version'
|
||||
pre_bump_hooks: python ../../ci/changelog.py mdns
|
||||
tag_format: mdns-v$version
|
||||
version: 1.2.1
|
||||
version: 1.2.2
|
||||
version_files:
|
||||
- idf_component.yml
|
||||
|
@ -1,5 +1,15 @@
|
||||
# Changelog
|
||||
|
||||
## [1.2.2](https://github.com/espressif/esp-protocols/commits/mdns-v1.2.2)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- add terminator for the getting host name ([b6a4d94](https://github.com/espressif/esp-protocols/commit/b6a4d94))
|
||||
- Enable ESP_WIFI_CONFIG when ESP-IDF <= 5.1 ([0b783c0](https://github.com/espressif/esp-protocols/commit/0b783c0))
|
||||
- set host list NULL on destroy ([ea54eef](https://github.com/espressif/esp-protocols/commit/ea54eef))
|
||||
- removed Wno-format flag and fixed formatting warnings ([c48e442](https://github.com/espressif/esp-protocols/commit/c48e442))
|
||||
- remove the the range of MDNS_MAX_SERVICES and fix issues of string functions ([3dadce2](https://github.com/espressif/esp-protocols/commit/3dadce2))
|
||||
|
||||
## [1.2.1](https://github.com/espressif/esp-protocols/commits/mdns-v1.2.1)
|
||||
|
||||
### Features
|
||||
|
@ -1,4 +1,4 @@
|
||||
version: "1.2.1"
|
||||
version: "1.2.2"
|
||||
description: mDNS
|
||||
url: https://github.com/espressif/esp-protocols/tree/master/components/mdns
|
||||
dependencies:
|
||||
|
@ -25,6 +25,12 @@
|
||||
#include "esp_wifi.h"
|
||||
#endif
|
||||
|
||||
#if ESP_IDF_VERSION <= ESP_IDF_VERSION_VAL(5, 1, 0)
|
||||
// IDF <= v5.1 does not support enabling/disabling esp-wifi
|
||||
#define MDNS_ESP_WIFI_ENABLED 1
|
||||
#else
|
||||
#define MDNS_ESP_WIFI_ENABLED CONFIG_ESP_WIFI_ENABLED
|
||||
#endif
|
||||
|
||||
#ifdef MDNS_ENABLE_DEBUG
|
||||
void mdns_debug_packet(const uint8_t *data, size_t len);
|
||||
@ -4158,7 +4164,7 @@ void mdns_preset_if_handle_system_event(void *arg, esp_event_base_t event_base,
|
||||
}
|
||||
|
||||
esp_netif_dhcp_status_t dcst;
|
||||
#if CONFIG_ESP_WIFI_ENABLED
|
||||
#if MDNS_ESP_WIFI_ENABLED
|
||||
if (event_base == WIFI_EVENT) {
|
||||
switch (event_id) {
|
||||
case WIFI_EVENT_STA_CONNECTED:
|
||||
@ -5360,7 +5366,7 @@ static inline void set_default_duplicated_interfaces(void)
|
||||
|
||||
static inline void unregister_predefined_handlers(void)
|
||||
{
|
||||
#if defined(CONFIG_ESP_WIFI_ENABLED) && (CONFIG_MDNS_PREDEF_NETIF_STA || CONFIG_MDNS_PREDEF_NETIF_AP)
|
||||
#if defined(MDNS_ESP_WIFI_ENABLED) && (CONFIG_MDNS_PREDEF_NETIF_STA || CONFIG_MDNS_PREDEF_NETIF_AP)
|
||||
esp_event_handler_unregister(WIFI_EVENT, ESP_EVENT_ANY_ID, mdns_preset_if_handle_system_event);
|
||||
#endif
|
||||
#if CONFIG_MDNS_PREDEF_NETIF_STA || CONFIG_MDNS_PREDEF_NETIF_AP || CONFIG_MDNS_PREDEF_NETIF_ETH
|
||||
@ -5457,7 +5463,7 @@ esp_err_t mdns_init(void)
|
||||
goto free_queue;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_ESP_WIFI_ENABLED) && (CONFIG_MDNS_PREDEF_NETIF_STA || CONFIG_MDNS_PREDEF_NETIF_AP)
|
||||
#if defined(MDNS_ESP_WIFI_ENABLED) && (CONFIG_MDNS_PREDEF_NETIF_STA || CONFIG_MDNS_PREDEF_NETIF_AP)
|
||||
if ((err = esp_event_handler_register(WIFI_EVENT, ESP_EVENT_ANY_ID, mdns_preset_if_handle_system_event, NULL)) != ESP_OK) {
|
||||
goto free_event_handlers;
|
||||
}
|
||||
@ -5607,7 +5613,9 @@ esp_err_t mdns_hostname_get(char *hostname)
|
||||
}
|
||||
|
||||
MDNS_SERVICE_LOCK();
|
||||
strncpy(hostname, _mdns_server->hostname, strnlen(_mdns_server->hostname, MDNS_NAME_BUF_LEN));
|
||||
size_t len = strnlen(_mdns_server->hostname, MDNS_NAME_BUF_LEN - 1);
|
||||
strncpy(hostname, _mdns_server->hostname, len);
|
||||
hostname[len] = 0;
|
||||
MDNS_SERVICE_UNLOCK();
|
||||
return ESP_OK;
|
||||
}
|
||||
|
@ -17,7 +17,6 @@ ESP platform port currently supports only network asynchronous socket operations
|
||||
SSL/TLS support is disabled by default and could be enabled in component configuration menu by choosing TLS library from
|
||||
|
||||
- mbedTLS with OpenSSL translation layer (default option)
|
||||
- wolfSSL
|
||||
|
||||
SSL support is very basic at this stage and it does include following features:
|
||||
|
||||
@ -32,11 +31,13 @@ Internal asio settings for ESP include
|
||||
|
||||
Application Example
|
||||
-------------------
|
||||
ESP examples are based on standard asio :example:`examples <../examples>`:
|
||||
ESP examples are based on standard asio :example:`examples <../../../components/asio/examples>`:
|
||||
|
||||
- :example:`udp_echo_server <../examples/udp_echo_server>`
|
||||
- :example:`tcp_echo_server <../examples/tcp_echo_server>`
|
||||
- :example:`asio_chat <../examples/asio_chat>`
|
||||
- :example:`ssl_client_server <../examples/ssl_client_server>`
|
||||
- :example:`asio_chat <../../../components/asio/examples/asio_chat>`
|
||||
- :example:`async_request <../../../components/asio/examples/async_request>`
|
||||
- :example:`socks4 <../../../components/asio/examples/socks4>`
|
||||
- :example:`ssl_client_server <../../../components/asio/examples/ssl_client_server>`
|
||||
- :example:`tcp_echo_server <../../../components/asio/examples/tcp_echo_server>`
|
||||
- :example:`udp_echo_server <../../../components/asio/examples/udp_echo_server>`
|
||||
|
||||
Please refer to the specific example README.md for details
|
||||
|
Reference in New Issue
Block a user