Two new API:
err_t mdns_search_service(const char *name, const char *service, enum mdns_sd_proto proto,
struct netif *netif, search_result_fn_t result_fn, void *arg,
s8_t *request_id);
void mdns_search_stop(s8_t request_id);
One compilation flags:
LWIP_MDNS_SEARCH
One options flags:
MDNS_MAX_REQUESTS
Some structure declarations moved to allow use by callback result function.
Result domain names are early uncompress before calling application callback
because it cannot be made by application itself.
Allow search services with multiples labels included, like '_services._dns-sd'.
Search for `_services._dns-sd._udp.local.` is handled in a special way.
Only `PTR` answers are send back to the application.
The `mdns_search_service()` function won't assert if no more space in `mdns_request`
table, just return an error if too many simultanous requests.
Apparently the TFTP server now also invokes the error() function in the
tftp_context struct.
Some tftp clients (for example Windows 10 TFTP client) will open the
remote file before checking the local file can be opened - and will then
send an error indication to the server to indicate there was an error
opening the local file. When the happens, the LWIP tftp server will
invoke the error() member of the tftp_context.
This adds support for RFC4075 SNTP server configuration via DHCPv6.
The DHCPv6 options transmitted are now conditional on how LwIP is
configured.
A new SNTP application option SNTP_GET_SERVERS_FROM_DHCPV6 is used
to enable. For simplicity this is configured to use the global
LWIP_DHCP6_GET_NTP_SRV configuration setting.
Tests:
- Check the global options now control the DHCPv6 request sent
in Wireshark
- Check against 0, 1 and 3 SNTP servers configured on an odhcpd
server configured to support RFC 4075 SNTP server lists.
Verify that the SNTP server list is updated on connection
establishment on an ESP8266 WeMOS D1.
- Verify that SNTP packets are sent and recieved from a
configured server and that system time is updated.
Signed-off-by: David J. Fiddes <D.J@fiddes.net>
Use only one entropy/ctr_drbg context for all altcp_tls_config structure allocated.
(Small adjustments before committing: fix coding style, adapt to changes in master)
- client->msg_idx can be > MQTT_VAR_HEADER_BUFFER_LEN in long message splitted in multiple pbufs
- renamed fixed_hdr_idx to fixed_hdr_len because it is length of fixed header in rx_buffer, not an index to it
- removed the cpy_start as data always copied right after the fixed header
Fix building unit tests via contrib/ports/unix/check on Debian 9, gcc 6.3.0.
Fixes:
<snip>/ip_addr.h:105:58: error: the comparison will always evaluate as ‘true’ for the address of ‘ip1’ will never be NULL [-Werror=address]
#define IP_SET_TYPE(ipaddr, iptype) do { if((ipaddr) != NULL) { IP_SET_TYPE_VAL(*(ipaddr),iptype); }}while(0)
Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com>
Make pppoe_create() actually store the passed service name and
concentrator name, so that they are passed in the PADI/PADR/PADS
packets.
Assume that the user application won't be freeing the strings and just
copy the string pointers, therefore remove the mem_free() in
pppoe_destroy().
Since only the pointers are copied now, make them 'const' in
pppoe_softc.
Signed-off-by: Sylvain Rochet <gradator@gradator.net>
lwip/src/netif/ppp/pppoe.c:768:24: error: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Werror=poin$
l1 = (int)strlen(sc->sc_service_name);
lwip/src/netif/ppp/pppoe.c:772:24: error: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Werror=poin$
l2 = (int)strlen(sc->sc_concentrator_name);
sc->sc_service_name and sc->sc_concentrator_name are best defined as
char* because there are passed to libc strings functions which expect
a char*.
Signed-off-by: Sylvain Rochet <gradator@gradator.net>
Rename PPPOE_TODO to PPPOE_SCNAME_SUPPORT because this is the only
feature enclosed by them. Prepare for proper service name and
concentrator name support by moving PPPOE_SCNAME_SUPPORT define to
ppp_opts.h.
Signed-off-by: Sylvain Rochet <gradator@gradator.net>
src/apps/mdns/mdns.c: In function 'mdns_debug_print_answer':
src/apps/mdns/mdns.c:796:24: warning: ', rdata = ' directive output may be truncated writing 10 bytes into a region of size between 8 and 15 [-Wformat-truncation=]
snprintf(string, 35, "Type = %2d, class = %1d, rdata = ", a->info.type, a->info.klass);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/apps/mdns/mdns.c:796:3: note: 'snprintf' output between 31 and 38 bytes into a destination of size 35
snprintf(string, 35, "Type = %2d, class = %1d, rdata = ", a->info.type, a->info.klass);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~