WIZNet W5500 with additional enhancements
Fork of WIZnetInterface by
Diff: EthernetInterface.cpp
- Revision:
- 33:879cfe51e66e
- Parent:
- 31:a3fbfa5c8351
- Child:
- 34:7d44648ec5f2
--- a/EthernetInterface.cpp Sat Oct 07 16:26:55 2017 +0200 +++ b/EthernetInterface.cpp Sat Oct 07 22:10:01 2017 +0200 @@ -127,6 +127,18 @@ return gw_string; } + +char* EthernetInterface::getDNSServer() +{ + uint32_t ip = getDNSAddr(); + snprintf(gw_string, sizeof(gw_string), "%d.%d.%d.%d", + (uint8_t)((ip>>24)&0xff), + (uint8_t)((ip>>16)&0xff), + (uint8_t)((ip>>8)&0xff), + (uint8_t)(ip&0xff)); + return gw_string; +} + char* EthernetInterface::getMACAddress() { uint8_t mac[6];