![]() |
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-2009 00006 * Chair of Communication Networks (ComNets) 00007 * Kopernikusstr. 5, D-52074 Aachen, Germany 00008 * email: info@openwns.org 00009 * www: http://www.openwns.org 00010 * _____________________________________________________________________________ 00011 * 00012 * openWNS is free software; you can redistribute it and/or modify it under the 00013 * terms of the GNU Lesser General Public License version 2 as published by the 00014 * Free Software Foundation; 00015 * 00016 * openWNS is distributed in the hope that it will be useful, but WITHOUT ANY 00017 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 00018 * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 00019 * details. 00020 * 00021 * You should have received a copy of the GNU Lesser General Public License 00022 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00023 * 00024 ******************************************************************************/ 00025 #include <WIMAC/ConnectionRule.hpp> 00026 00027 #include <WNS/ldk/Compound.hpp> 00028 00029 #include <WIMAC/UpperConvergence.hpp> 00030 00031 using namespace wimac; 00032 00033 DestinationIPRule::DestinationIPRule( wns::service::dll::UnicastAddress destination, 00034 UpperConvergence* upperC ): 00035 address_( destination ), 00036 upperConvergence_( upperC ) 00037 { 00038 } 00039 00040 bool 00041 DestinationIPRule::match( const wns::ldk::CompoundPtr& compound ) 00042 { 00043 UpperCommand* upperCommand = upperConvergence_->getCommand(compound->getCommandPool()); 00044 return address_ == upperCommand->peer.targetMACAddress; 00045 } 00046
1.5.5