File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,12 @@ EthernetHardwareStatus UIPEthernetClass::hardwareStatus()
145
145
return EthernetENC28J60;
146
146
}
147
147
148
+ uint8_t * UIPEthernetClass::macAddress (uint8_t * mac)
149
+ {
150
+ memcpy (mac, uip_ethaddr.addr , 6 );
151
+ return mac;
152
+ }
153
+
148
154
IPAddress UIPEthernetClass::localIP ()
149
155
{
150
156
IPAddress ret;
@@ -174,6 +180,10 @@ IPAddress UIPEthernetClass::dnsServerIP()
174
180
return _dnsServerAddress;
175
181
}
176
182
183
+ IPAddress UIPEthernetClass::dnsIP (int n) {
184
+ return (n == 0 ) ? _dnsServerAddress : IPAddress ();
185
+ }
186
+
177
187
void
178
188
UIPEthernetClass::tick ()
179
189
{
Original file line number Diff line number Diff line change @@ -92,13 +92,17 @@ class UIPEthernetClass
92
92
93
93
EthernetLinkStatus linkStatus ();
94
94
EthernetHardwareStatus hardwareStatus ();
95
+
96
+ uint8_t * macAddress (uint8_t * mac);
95
97
96
98
IPAddress localIP ();
97
99
IPAddress subnetMask ();
98
100
IPAddress gatewayIP ();
99
101
IPAddress dnsServerIP ();
102
+ IPAddress dnsIP (int n = 0 );
100
103
101
104
void setDnsServerIP (const IPAddress dns_server) { _dnsServerAddress = dns_server; }
105
+ void setDNS (IPAddress dns_server) { _dnsServerAddress = dns_server; }
102
106
103
107
private:
104
108
static bool initialized;
You can’t perform that action at this time.
0 commit comments