X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2F80211Bundle%2FWLANPacket.hh;h=046bed9d1a0f943c3f9e3f0e03bfa2ef5cd904c1;hb=92f8630b75f3ef50e73c48cde58645dcd1534e27;hp=47f4930ace53e05b6d2e0f3f91330b3bcb7590c6;hpb=3449642e5fd7b1c83c866b98f2462c2323edddf0;p=senf.git diff --git a/Packets/80211Bundle/WLANPacket.hh b/Packets/80211Bundle/WLANPacket.hh index 47f4930..046bed9 100644 --- a/Packets/80211Bundle/WLANPacket.hh +++ b/Packets/80211Bundle/WLANPacket.hh @@ -1,9 +1,9 @@ -// $Id:$ +// $Id$ // -// Copyright (C) 2006 +// Copyright (C) 2008 // Fraunhofer Institute for Open Communication Systems (FOKUS) // Competence Center NETwork research (NET), St. Augustin, GERMANY -// Christian Niephaus +// Christian Niephaus // // 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 @@ -21,17 +21,13 @@ // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /** \file - \brief 802.11 WLan MAC frame \n + \brief 802.11 WLANPacket public header */ - - */ - -#ifndef WLANPACKET_HH_ -#define WLANPACKET_HH_ +#ifndef HH_SENF_Packets_80211Bundle_WLANPacket_ +#define HH_SENF_Packets_80211Bundle_WLANPacket_ 1 #include "../../Packets/Packets.hh" #include "../DefaultBundle/EthernetPacket.hh" -#include namespace senf { @@ -40,29 +36,32 @@ namespace senf * Re-ordering of bits due to LSB byte order */ - struct WLANPacketParser_MgtFrameParser : public senf::PacketParserBase + struct WLANPacket_MgtFrameParser : public senf::PacketParserBase { # include SENF_FIXED_PARSER() - SENF_PARSER_PRIVATE_BITFIELD ( subtype, 4, unsigned); - SENF_PARSER_SKIP_BITS ( 4 ); //skip type and version + + SENF_PARSER_PRIVATE_BITFIELD ( subtype, 4, unsigned ); //Re-ordering of bits due to LSB byte order */ - struct WLANPacketParser_DataFrameParser : public senf::PacketParserBase + struct WLANPacket_DataFrameParser : public senf::PacketParserBase { # include SENF_PARSER() - SENF_PARSER_PRIVATE_BITFIELD ( subtype, 4, unsigned); + SENF_PARSER_PRIVATE_BITFIELD ( subtype, 4, unsigned ); //( data().size()-4 ); } SENF_PARSER_FINALIZE(WLANPacketParser); SENF_PARSER_INIT() { version() = 0; - - } //Problems can occur with old madwifi and ath5k. Some frames only @@ -202,11 +201,21 @@ namespace senf }; + /** \brief WLAN packet + + \par Packet type (typedef): + \ref WLANPacket + + \par Fields: + \ref WLANPacketParser + \image html WLANPacket.png + + \ingroup protocolbundle_80211 + */ struct WLANPacketType : public senf::PacketTypeBase, - public senf::PacketTypeMixin + public senf::PacketTypeMixin { - typedef senf::PacketTypeMixin mixin; typedef senf::ConcretePacket packet; typedef WLANPacketParser parser; @@ -216,15 +225,12 @@ namespace senf using mixin::initSize; using senf::PacketTypeBase::nextPacketRange;; - static void dump(packet p, std::ostream &os); // static PacketParserBase::size_type initSize(); }; - typedef WLANPacketType::packet WLANPacket; - + typedef senf::ConcretePacket WLANPacket; } - -#endif /* WLANPACKET_HH_ */ +#endif /* HH_SENF_Packets_80211Bundle_WLANPacket_ */