Komut
subnetMask()
Açıklama
Aygıtın alt ağ maskesini döndürür.
Sözdizimi
Ethernet.subnetMask ()
Parametreler
Yok
İadeler
cihazın alt ağ maskesi ( IPAdresi )
Misal
#include <SPI.h>
#include <Ethernet.h>
byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
IPAddress ip(10, 0, 0, 177);
void setup() {
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
Ethernet.begin(mac, ip);
Serial.print("The subnet mask is: ");
Serial.println(Ethernet.subnetMask());
}
void loop () {}
#include <Ethernet.h>
byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
IPAddress ip(10, 0, 0, 177);
void setup() {
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
Ethernet.begin(mac, ip);
Serial.print("The subnet mask is: ");
Serial.println(Ethernet.subnetMask());
}
void loop () {}
Ayrıca bakınız
- Ethernet.MACAddress()
- Ethernet.localIP()
- Ethernet.dnsServerIP()
- Ethernet.gatewayIP()
- Ethernet.begin()