friendev EtherDune TCP/IP library
/home/jander/temp/etherdune/ARP.h
Go to the documentation of this file.
1 // EtherDune ARP Service
2 // Author: Javier Peletier <jm@friendev.com>
3 // Summary: Implements the ARP protocol as an EtherDune service
4 //
5 // Copyright (c) 2015 All Rights Reserved, http://friendev.com
6 //
7 // This source is subject to the GPLv2 license.
8 // Please see the License.txt file for more information.
9 // All other rights reserved.
10 //
11 // THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
12 // KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
13 // IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
14 // PARTICULAR PURPOSE.
15 
24 
25 
26 #ifndef __ARP_H_
27 #define __ARP_H_
28 
29 #include "NetworkService.h"
30 
32 {
33  static ARPEntry arpTable[ARP_TABLE_LENGTH];
34 
35  bool onPacketReceived();
36  bool processChunk(bool isHeader);
37  void tick();
38 
39  static void makeWhoHasARPRequest(IPAddress& ip);
40  static void makeARPReply();
41  static void processARPReply();
42 
43 public:
44 
46  ARPService();
47 
48 };
49 
50 
51 
52 
53 #endif
Stores a MAC address in memory.
Definition: inet.h:252
MACAddress * whoHas(IPAddress &ip)
Attempts to return the MAC address associated with the provided IP address.
Definition: ARP.cpp:95
Entry in the ARP table.
Definition: inet.h:542
represents an IP address in memory
Definition: inet.h:181
static const uint8_t ARP_TABLE_LENGTH
Maximum number of entries in the ARP table.
Definition: config.h:177
ARPService()
Definition: ARP.cpp:28
Implements the ARP protocol as an EtherDune service.
Definition: ARP.h:31
Abstract base class for any network service running in EtherDune.