User Manual, Developers Guide and API Documentation

TunnelEntryComponent.hpp

Go to the documentation of this file.
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_TUNNEL_TUNNELENTRYCOMPONENT_HPP
00029 #define IP_TUNNEL_TUNNELENTRYCOMPONENT_HPP
00030 
00031 #include <WNS/service/nl/Service.hpp>
00032 #include <WNS/service/dll/DataTransmission.hpp>
00033 #include <WNS/service/dll/Handler.hpp>
00034 #include <WNS/node/component/Component.hpp>
00035 
00036 namespace ip { namespace tunnel {
00037 
00043     class TunnelEntryComponent:
00044         public wns::node::component::Component,
00045         public wns::service::dll::UnicastDataTransmission
00046     {
00047     public:
00048         TunnelEntryComponent(
00049             wns::node::Interface* _node,
00050             const wns::pyconfig::View& _pyco);
00051 
00052         virtual ~TunnelEntryComponent();
00053 
00054         virtual void
00055         onNodeCreated();
00056 
00057         virtual void
00058         onWorldCreated();
00059 
00060         virtual void
00061         onShutdown();
00062 
00063         virtual void
00064         sendData(const wns::service::dll::UnicastAddress& macAddress,
00065                  const wns::osi::PDUPtr& data,
00066                  wns::service::dll::protocolNumber protocol,
00067                  int _dllFlowID);
00068 
00069         virtual wns::service::dll::UnicastAddress
00070         getMACAddress() const;
00071 
00072     private:
00073 
00074         virtual void
00075         doStartup();
00076 
00077         wns::service::nl::Service*
00078         ipService;
00079 
00080         wns::service::nl::Address
00081         tunnelEntryAddress;
00082 
00083         wns::service::nl::Address
00084         tunnelExitAddress;
00085 
00089         wns::logger::Logger log;
00090 
00091     };
00092 } // tunnel
00093 } // ip
00094 
00095 #endif // IP_TUNNEL_TUNNELENTRYCOMPONENT_HPP

Generated on Sat May 26 03:32:16 2012 for openWNS by  doxygen 1.5.5