4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
5 // Competence Center NETwork research (NET), St. Augustin, GERMANY
6 // Christian Niephaus <cni@berlios.de>
8 // This program is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 2 of the License, or
11 // (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the
20 // Free Software Foundation, Inc.,
21 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 \brief 802.11 WLANPacket public header */
26 #ifndef HH_SENF_Packets_80211Bundle_WLANBeaconPacket_
27 #define HH_SENF_Packets_80211Bundle_WLANBeaconPacket_ 1
29 #include <senf/Packets/Packets.hh>
35 /** \brief 802.11 Beacon Frame parser
36 (see IEEE 802.11-2007 standard - Chapter 7.2.3.1 Frame formats)
37 <b>Re-ordering of bits due to host byte order</b>
42 // struct WLANBeaconPacketParser : public senf::PacketParserBase
44 // #include SENF_PARSER();
45 // SENF_PARSER_FIELD( elementId, UInt8Parser);
46 // SENF_PARSER_FIELD( length, UInt8Parser);
51 struct WLANBeaconPacketParser : public senf::PacketParserBase
53 # include SENF_PARSER()
55 SENF_PARSER_FIELD(timestamp, UInt64LSBParser);
56 SENF_PARSER_FIELD(beaconInterval, UInt16LSBParser);
57 SENF_PARSER_SKIP(2,2); //capability flags
60 // SENF_PARSER_FIELD()
62 SENF_PARSER_FINALIZE(WLANBeaconPacketParser);
67 /** \brief WLAN Beacon frame packet
69 \par Packet type (typedef):
73 \ref WLANBeaconPacket_MgtFrameParser
74 \image html WLANBeaconPacket.png
76 \ingroup protocolbundle_80211
78 struct WLANBeaconPacketType
79 : public senf::PacketTypeBase,
80 public senf::PacketTypeMixin<WLANBeaconPacketType>
82 typedef senf::PacketTypeMixin<WLANBeaconPacketType> mixin;
83 typedef senf::ConcretePacket<WLANBeaconPacketType> packet;
84 typedef WLANBeaconPacketParser parser;
87 using mixin::initSize;
88 using senf::PacketTypeBase::nextPacketRange;
90 static void dump(packet p, std::ostream &os);
93 typedef ConcretePacket<WLANBeaconPacketType> WLANBeaconPacket;
98 #endif /* HH_SENF_Packets_80211Bundle_WLANBeaconPacket_ */
104 // c-file-style: "senf"
105 // indent-tabs-mode: nil
106 // ispell-local-dictionary: "american"
107 // compile-command: "scons -u test"
108 // comment-column: 40