// $Id$ // // Copyright (C) 2010 // Fraunhofer Institute for Open Communication Systems (FOKUS) // Competence Center NETwork research (NET), St. Augustin, GERMANY // Stefan Bund // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the // Free Software Foundation, Inc., // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /** \file \brief RadiotapPacket inline non-template implementation */ //#include "RadiotapPacket.ih" // Custom includes #define prefix_ inline //-///////////////////////////////////////////////////////////////////////////////////////////////// //-///////////////////////////////////////////////////////////////////////////////////////////////// // senf::RadiotapPacketParser prefix_ senf::RadiotapPacketParser::RadiotapPacketParser(data_iterator i, state_type s) : RadiotapPacketParser_Header(i,s) { OffsetTable & table (offsetTable(presentFlags())); if (! table[MAX_INDEX+1]) parseOffsetTable(&(*data().begin()), data().size(), table); currentTable_ = &table; } prefix_ senf::RadiotapPacketParser::size_type senf::RadiotapPacketParser::bytes() const { return calculateSize(); } prefix_ senf::UInt32Parser senf::RadiotapPacketParser::fcs() { validate(RadiotapPacketParser_Header::fixed_bytes+4); return parse(data().end()-4); } prefix_ bool senf::RadiotapPacketParser::has_fcs() { return flagsPresent() && flags().fcsAtEnd(); } prefix_ unsigned senf::RadiotapPacketParser::frameType() { return parse(length()).frameType(); } //-///////////////////////////////////////////////////////////////////////////////////////////////// // private members prefix_ void senf::RadiotapPacketParser::initField(unsigned index) { updatePresentFlags( presentFlags() | (1<