include/wipal/wifi/frame/filter/merge.hh

00001 /*
00002  * WiPal - A library and a set of tools to manipulate wireless traces.
00003  * Copyright (C) 2007  Universite Pierre et Marie Curie - Paris 6
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation; either version 2 of the License, or
00008  * (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
00018  * MA  02110-1301  USA
00019  *
00020  * Author: Thomas Claveirole <thomas.claveirole@lip6.fr>
00021  */
00022 #ifndef WIFI_FRAME_FILTER_MERGE_HH_
00023 # define WIFI_FRAME_FILTER_MERGE_HH_
00024 
00025 # include <wipal/phy/prism_header.hh>
00026 # include <wipal/wifi/addr_mapping.hh>
00027 # include <wipal/pcap/frame_descriptor.hh>
00028 # include <wipal/tool/endianness.hh>
00029 
00030 namespace wifi
00031 {
00032   namespace frame
00033   {
00034     namespace filter
00035     {
00036 
00037       namespace internals
00038       {
00039 
00040         template <class HT>
00041         struct equal;
00042 
00043         template <>
00044         struct equal<prism::header>
00045         {
00046           equal(const pcapxx::frame_descriptor& lhs,
00047                 const tool::endian::endianness& phy_end);
00048 
00049           bool  operator == (const pcapxx::frame_descriptor& rhs) const;
00050 
00051         private:
00052           const pcapxx::frame_descriptor&       lhs_;
00053           const tool::endian::endianness&       phy_end_;
00054         };
00055 
00056         template <class HT>
00057         bool
00058         operator == (const pcapxx::frame_descriptor& lhs, const equal<HT>& rhs);
00059 
00060       } // End of namespace internals.
00061 
00072       template <class UniqueId,
00073                 class HeaderType,
00074                 template <class, class, class> class Intersector,
00075                 template <class, class, class, class> class Merger,
00076                 class I1, class I2, class F, class BL>
00077       void
00078       provide_merge(const I1& first1, const I1& last1,
00079                     const I2& first2, const I2& last2,
00080                     addr_mapping&               mapping,
00081                     F&                          func,
00082                     bool                        filter_prism,
00083                     tool::endian::endianness    phy_end,
00084                     const BL&                   blist);
00085 
00086     } // End of namespace wifi::frame::filter.
00087 
00088   } // End of namespace wifi::frame.
00089 
00090 } // End of namespace wifi.
00091 
00092 # include "merge.hxx"
00093 
00094 #endif // ! WIFI_FRAME_FILTER_MERGE_HH_

Generated on Tue Jan 15 19:32:31 2008 for wipal by  doxygen 1.5.4