Inheritance diagram for SimpleArp:
Public Member Functions
|virtual void||handleMessage (cMessage *)|
|should not be called, instead direct calls to the radio methods should be used. |
|int||getMacAddr (const int netwAddr)|
|returns a L2 address to a given L3 address |
|int||getNetwAddr (const int macAddr)|
|returns a L3 address to a given L2 address |
Private Member Functions
|Module_Class_Members (SimpleArp, BasicModule, 0)|
This class takes the network layer id as the network layer address and the mac layer id as the mac layer address
ARP implementations are divers, it does not make sense to start from a common class. Their main purpose is to translate layer 2 into layer 3 addresses. However, these addresses can be very different. Here, simple integers are sufficient, but for hardware-in-the-loop simulations more complex ones are appropriate.
In contrast to this ARP, others may want to cache entries. This adds another set of basic operations that may or may not make sense for ARPs.