![]() |
User Manual, Developers Guide and API Documentation |
![]() |
00001 /******************************************************************************* 00002 * This file is part of openWNS (open Wireless Network Simulator) 00003 * _____________________________________________________________________________ 00004 * 00005 * Copyright (C) 2004-2007 00006 * Chair of Communication Networks (ComNets) 00007 * Kopernikusstr. 5, D-52074 Aachen, Germany 00008 * phone: ++49-241-80-27910, 00009 * fax: ++49-241-80-22242 00010 * email: info@openwns.org 00011 * www: http://www.openwns.org 00012 * _____________________________________________________________________________ 00013 * 00014 * openWNS is free software; you can redistribute it and/or modify it under the 00015 * terms of the GNU Lesser General Public License version 2 as published by the 00016 * Free Software Foundation; 00017 * 00018 * openWNS is distributed in the hope that it will be useful, but WITHOUT ANY 00019 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 00020 * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 00021 * details. 00022 * 00023 * You should have received a copy of the GNU Lesser General Public License 00024 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00025 * 00026 ******************************************************************************/ 00027 00028 #ifndef IP_ARPRESOLVER_HPP 00029 #define IP_ARPRESOLVER_HPP 00030 00031 #include <IP/IPHeader.hpp> 00032 #include <IP/VirtualARP.hpp> 00033 00034 #include <WNS/ldk/CommandTypeSpecifier.hpp> 00035 #include <WNS/ldk/HasReceptor.hpp> 00036 #include <WNS/ldk/HasConnector.hpp> 00037 #include <WNS/ldk/HasDeliverer.hpp> 00038 00039 #include <WNS/pyconfig/View.hpp> 00040 #include <WNS/logger/Logger.hpp> 00041 00042 #include <WNS/service/dll/Address.hpp> 00043 #include <WNS/Observer.hpp> 00044 00045 namespace ip { 00054 class ARPResolver : 00055 public virtual wns::ldk::FunctionalUnit, 00056 public wns::ldk::CommandTypeSpecifier<>, 00057 public wns::ldk::HasReceptor<>, 00058 public wns::ldk::HasConnector<>, 00059 public wns::ldk::HasDeliverer<>, 00060 public wns::Cloneable<ARPResolver>, 00061 public ResolveCallback 00062 { 00063 public: 00064 ARPResolver(wns::ldk::fun::FUN* fuNet, const wns::pyconfig::View& config); 00065 00066 virtual void 00067 onFUNCreated(); 00068 00069 virtual void 00070 doSendData(const wns::ldk::CompoundPtr& compound); 00071 00072 virtual void 00073 doOnData(const wns::ldk::CompoundPtr& compound); 00074 00075 virtual bool 00076 doIsAccepting(const wns::ldk::CompoundPtr& compound) const; 00077 00078 virtual void 00079 doWakeup(); 00080 00081 virtual void 00082 onAddressResolved(wns::service::dll::UnicastAddress dest); 00083 00084 private: 00085 wns::logger::Logger log; 00086 00087 wns::ldk::CommandReaderInterface* ipHeaderReader; 00088 00089 wns::service::dll::UnicastAddress macID; 00090 00091 wns::ldk::CompoundPtr buffer; 00092 }; 00093 } // ip 00094 00095 #endif // IP_ARPRESOLVER_HPP
1.5.5