ArpHost.h

00001 /* -*- mode:c++ -*- ********************************************************
00002  * file:        ArpHost.h
00003  *
00004  * author:      Jerome Rousselot
00005  *
00006  * copyright:   (C) 2010 CSEM SA, Neuchatel, Switzerland.
00007  *        (C) 2005 Telecommunication Networks Group (TKN) at
00008  *              Technische Universitaet Berlin, Germany.
00009  *
00010  *              This program is free software; you can redistribute it
00011  *              and/or modify it under the terms of the GNU General Public
00012  *              License as published by the Free Software Foundation; either
00013  *              version 2 of the License, or (at your option) any later
00014  *              version.
00015  *              For further information see file COPYING
00016  *              in the top level directory
00017  ***************************************************************************
00018  * part of:     framework implementation developed by tkn
00019  ***************************************************************************/
00020 
00021 #ifndef ARP_HOST_H
00022 #define ARP_HOST_H
00023 
00024 #include <ArpInterface.h>
00025 #include <AddressingInterface.h>
00026 #include <BaseModule.h>
00027 #include <FindModule.h>
00028 
00041 class ArpHost : public ArpInterface,
00042         public AddressingInterface,
00043         public BaseModule
00044 {
00045   int offset;
00046 public:
00047   virtual void initialize(int stage);
00048 
00052     virtual void handleMessage( cMessage* ){
00053         error("ARP module cannot receive messages!");
00054     };
00055 
00057     virtual int getMacAddr(const int netwAddr);
00058 
00060     virtual int getNetwAddr(const int macAddr);
00061 
00063     virtual int myMacAddr(cModule* mac);
00064 
00066     virtual int myNetwAddr(cModule* netw);
00067 };
00068 
00069 #endif