From 7245be64d037f7dfe6595f1e479f86085315d385 Mon Sep 17 00:00:00 2001 From: Juraj Andrassy Date: Thu, 21 Dec 2023 19:21:37 +0100 Subject: [PATCH] EthernetClass - add setDnsServerIP as in Arduino Ethernet library --- src/STM32Ethernet.cpp | 5 +++++ src/STM32Ethernet.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/STM32Ethernet.cpp b/src/STM32Ethernet.cpp index a0753de..3925d0a 100644 --- a/src/STM32Ethernet.cpp +++ b/src/STM32Ethernet.cpp @@ -182,4 +182,9 @@ IPAddress EthernetClass::dnsServerIP() return _dnsServerAddress; } +void EthernetClass::setDnsServerIP(const IPAddress dns_server) +{ + _dnsServerAddress = dns_server; +} + EthernetClass Ethernet; diff --git a/src/STM32Ethernet.h b/src/STM32Ethernet.h index 502e256..c567ff6 100644 --- a/src/STM32Ethernet.h +++ b/src/STM32Ethernet.h @@ -50,6 +50,8 @@ class EthernetClass { IPAddress gatewayIP(); IPAddress dnsServerIP(); + void setDnsServerIP(const IPAddress dns_server); + friend class EthernetClient; friend class EthernetServer; };