Skip to content

Commit 1f3b9a5

Browse files
committed
Rename parameter and internal variables from subnet to netmask
1 parent 1026b98 commit 1f3b9a5

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Diff for: src/Arduino_EthernetConnectionHandler.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@ EthernetConnectionHandler::EthernetConnectionHandler(bool const keep_alive)
2929
,_ip{INADDR_NONE}
3030
,_dns{INADDR_NONE}
3131
,_gateway{INADDR_NONE}
32-
,_subnet{INADDR_NONE}
32+
,_netmask{INADDR_NONE}
3333
{
3434

3535
}
3636

37-
EthernetConnectionHandler::EthernetConnectionHandler(IPAddress ip, IPAddress dns, IPAddress gateway, IPAddress subnet, bool const keep_alive)
37+
EthernetConnectionHandler::EthernetConnectionHandler(IPAddress ip, IPAddress dns, IPAddress gateway, IPAddress netmask, bool const keep_alive)
3838
: ConnectionHandler{keep_alive, NetworkAdapter::ETHERNET}
3939
,_ip{ip}
4040
,_dns{dns}
4141
,_gateway{gateway}
42-
,_subnet{subnet}
42+
,_netmask{netmask}
4343
{
4444

4545
}
@@ -60,7 +60,7 @@ NetworkConnectionState EthernetConnectionHandler::update_handleInit()
6060
NetworkConnectionState EthernetConnectionHandler::update_handleConnecting()
6161
{
6262
if (_ip != INADDR_NONE) {
63-
if (Ethernet.begin(nullptr, _ip, _dns, _gateway, _subnet, 15000, 4000) == 0) {
63+
if (Ethernet.begin(nullptr, _ip, _dns, _gateway, _netmask, 15000, 4000) == 0) {
6464
Debug.print(DBG_ERROR, F("Failed to configure Ethernet, check cable connection"));
6565
return NetworkConnectionState::CONNECTING;
6666
}

Diff for: src/Arduino_EthernetConnectionHandler.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class EthernetConnectionHandler : public ConnectionHandler
3232
public:
3333

3434
EthernetConnectionHandler(bool const keep_alive = true);
35-
EthernetConnectionHandler(IPAddress ip, IPAddress dns, IPAddress gateway, IPAddress subnet, bool const keep_alive = true);
35+
EthernetConnectionHandler(IPAddress ip, IPAddress dns, IPAddress gateway, IPAddress netmask, bool const keep_alive = true);
3636

3737

3838
virtual unsigned long getTime() override { return 0; }
@@ -53,7 +53,7 @@ class EthernetConnectionHandler : public ConnectionHandler
5353
IPAddress _ip;
5454
IPAddress _dns;
5555
IPAddress _gateway;
56-
IPAddress _subnet;
56+
IPAddress _netmask;
5757

5858
EthernetUDP _eth_udp;
5959
EthernetClient _eth_client;

0 commit comments

Comments
 (0)