Skip to content

Commit

Permalink
EthernetClass - add setDnsServerIP as in Arduino Ethernet library
Browse files Browse the repository at this point in the history
  • Loading branch information
JAndrassy authored and fpistm committed Jan 2, 2024
1 parent cd50f45 commit 7245be6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/STM32Ethernet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,4 +182,9 @@ IPAddress EthernetClass::dnsServerIP()
return _dnsServerAddress;
}

void EthernetClass::setDnsServerIP(const IPAddress dns_server)
{
_dnsServerAddress = dns_server;
}

EthernetClass Ethernet;
2 changes: 2 additions & 0 deletions src/STM32Ethernet.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ class EthernetClass {
IPAddress gatewayIP();
IPAddress dnsServerIP();

void setDnsServerIP(const IPAddress dns_server);

friend class EthernetClient;
friend class EthernetServer;
};
Expand Down

0 comments on commit 7245be6

Please sign in to comment.