23 #include <FlowScanner.h>
32 static const uint8_t
CS_PIN = 10;
45 if (identification ==
id)
50 Serial.print(F(
"Resolved hostname to: "));
56 Serial.println(
"Could not resolve hostname");
62 void resolve(
const char* hostName)
65 Serial.print(F(
"Resolving "));
66 Serial.print(hostName);
67 Serial.println(F(
" ..."));
81 Serial.println(F(
"EtherDune DNS sample"));
82 Serial.print(F(
"Free RAM: ")); Serial.println(ACross::getFreeRam());
83 Serial.println(F(
"Press any key to start..."));
85 while (!Serial.available());
94 ACERROR(
"failed to start EtherDune");
96 ACINFO(
"waiting for link...");
100 ACINFO(
"link is up");
103 resolver.resolve(
"www.friendev.com");
#define IPAddress_P
helper macro to store an IP address in PROGMEM
static DNSClient & DNS()
Obtains access to the DNS service singleton instance.
static IPAddress_P gatewayIP
virtual void onDNSResolve(uint8_t status, uint16_t identification, const IPAddress &ip)
Called on each network service every time a DNS response is received.
static bool begin(uint8_t cspin)
Initializes EtherDune and the underlying hardware
represents an IP address in memory
static IPAddress netmask
Subnet mask.
static IPAddress gatewayIP
IP address of the gateway in this network.
static const uint8_t CS_PIN
static MACAddress_P mymac
static bool isLinkUp()
Determines whether the network link is ready
virtual bool onPacketReceived()=0
Called every time a packet is received.
char * toString() const
Converts the IP address to a string for display.
static IPAddress dnsIP
IP address of the DNS server to use.
static MACAddress localMAC
Ethernet MAC address.
uint16_t resolve(const char *name)
Resolves a host name to an IP address
static void loop()
Gives processing time to EtherDune so that it can check for incoming packets or send queued packets...
static IPAddress localIP
IP address of this application.
Abstract base class for any network service running in EtherDune.
static IPAddress_P netmask