![]() |
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_COMPONENT_HPP 00029 #define IP_COMPONENT_HPP 00030 00031 #include <IP/VirtualDNS.hpp> 00032 #include <IP/container/DataLink.hpp> 00033 #include <IP/trace/TraceCollector.hpp> 00034 00035 #include <WNS/service/nl/Service.hpp> 00036 #include <WNS/service/dll/DataTransmission.hpp> 00037 #include <WNS/service/dll/Handler.hpp> 00038 #include <WNS/service/nl/Address.hpp> 00039 #include <WNS/node/component/Component.hpp> 00040 #include <WNS/ldk/fun/Main.hpp> 00041 #include <WNS/ldk/Layer.hpp> 00042 #include <WNS/logger/Logger.hpp> 00043 00044 namespace ip { 00045 00046 class UpperConvergence; 00047 class LowerConvergence; 00048 00049 namespace container { 00050 class NeighbourCache; 00051 } 00052 00058 class Component: 00059 virtual public wns::ldk::Layer, 00060 public wns::node::component::Component, 00061 public wns::service::nl::DNSService 00062 { 00063 typedef wns::service::nl::Address Address; 00064 typedef wns::service::dll::UnicastDataTransmission DLLDataTransmission; 00065 public: 00072 Component( 00073 wns::node::Interface* _node, 00074 const wns::pyconfig::View& _pyco); 00075 00079 virtual ~Component(); 00080 00084 virtual wns::service::nl::Address 00085 lookup(wns::service::nl::FQDN name); 00086 00091 virtual void 00092 onNodeCreated(); 00093 00097 virtual void 00098 onWorldCreated(); 00099 00100 virtual void 00101 onShutdown(); 00102 00103 private: 00107 virtual void 00108 doStartup(); 00109 00110 void 00111 leaseAddresses(); 00112 00113 void 00114 setupARP(); 00115 00116 void 00117 setupDNS(); 00118 00119 void 00120 setupForwarding(); 00121 00122 void 00123 setupRoutingTable(); 00124 00125 void 00126 setupLowerConvergence(); 00127 00128 trace::TraceCollector* 00129 getTraceCollector(); 00130 00134 wns::logger::Logger log; 00135 00139 wns::ldk::fun::Main* fun; 00140 00141 wns::service::dll::IRuleControl* iRuleControl; 00142 00143 wns::service::nl::Address sourceAddress; 00144 00145 ip::container::DataLinkContainer dlls; 00146 00147 wns::service::nl::FQDN domainName; 00148 00149 VirtualDNS* dns; 00150 00156 UpperConvergence* upperConvergence; 00157 00161 LowerConvergence* lowerConvergence; 00162 00164 std::list<resolver::ResolverInterface*> resolvers; 00165 }; 00166 00167 } // ip 00168 #endif //_IP_COMPONENT_HPP 00169 00170
1.5.5