90 #ifndef __NETWORKSERVICE_H_
91 #define __NETWORKSERVICE_H_
107 static List activeServices;
109 static void processIncomingPacket();
110 static void notifyOnDNSResolve(uint8_t status, uint16_t identification,
const IPAddress& ip);
142 static bool begin(uint8_t cspin);
Stores a MAC address in memory.
Union of all the different protocol headers and layers to help EtherDune interpret or build packet...
static DNSClient & DNS()
Obtains access to the DNS service singleton instance.
static EthBuffer packet
in-memory packet buffer currently being processed.
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.
virtual void tick()
This is a timer function that is called every NETWORK_TIMER_RESOLUTION milliseconds on every service...
virtual bool onPacketReceived()=0
Called every time a packet is received.
Encapsulates access to the ENC28J60 hardware.
static IPAddress dnsIP
IP address of the DNS server to use.
static MACAddress localMAC
Ethernet MAC address.
Implements the ARP protocol as an EtherDune service.
static bool sendIPPacket(uint16_t length)
Puts the current in-memory packet in the network
static ARPService ARP
ARP singleton instance.
static void prepareIPPacket(const IPAddress &remoteIP)
Sets up common IP header values for all outgoing IP packets and calculates the IP header checksum ...
static void loop()
Gives processing time to EtherDune so that it can check for incoming packets or send queued packets...
static bool sameLAN(IPAddress &dst)
Determines whether the given IP is in the same subnet as localIP
static IPAddress localIP
IP address of this application.
Abstract base class for any network service running in EtherDune.