4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
5 // Competence Center NETwork research (NET), St. Augustin, GERMANY
6 // Christian Niephaus <cni@berlios.de>
7 // Thorsten Horstmann <tho@berlios.de>
9 // This program is free software; you can redistribute it and/or modify
10 // it under the terms of the GNU General Public License as published by
11 // the Free Software Foundation; either version 2 of the License, or
12 // (at your option) any later version.
14 // This program is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 // GNU General Public License for more details.
19 // You should have received a copy of the GNU General Public License
20 // along with this program; if not, write to the
21 // Free Software Foundation, Inc.,
22 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 \brief 802.11 WLAN Beacon Packet public header */
27 #ifndef HH_SENF_Packets_80211Bundle_WLANBeaconPacket_
28 #define HH_SENF_Packets_80211Bundle_WLANBeaconPacket_ 1
31 #include <senf/Packets/Packets.hh>
32 #include "InformationElements.hh"
34 ///////////////////////////////hh.p////////////////////////////////////////
37 struct WLANBeaconPacketParser : public PacketParserBase
39 # include SENF_PARSER()
41 SENF_PARSER_FIELD( timestamp, UInt64LSBParser );
42 SENF_PARSER_FIELD( beaconInterval, UInt16LSBParser );
43 SENF_PARSER_SKIP ( 2,2); //capability flags
45 SENF_PARSER_FIELD( ssidIE, WLANSSIDInfoElementParser );
46 WLANSSIDInfoElementParser::value_t ssid() const { return ssidIE().value(); }
48 SENF_PARSER_FINALIZE( WLANBeaconPacketParser );
53 /** \brief WLAN Beacon frame packet
55 \par Packet type (typedef):
60 \ingroup protocolbundle_80211
62 struct WLANBeaconPacketType
63 : public PacketTypeBase,
64 public PacketTypeMixin<WLANBeaconPacketType>
66 typedef PacketTypeMixin<WLANBeaconPacketType> mixin;
67 typedef ConcretePacket<WLANBeaconPacketType> packet;
68 typedef WLANBeaconPacketParser parser;
71 using mixin::initSize;
72 using PacketTypeBase::nextPacketRange;
74 static void dump(packet p, std::ostream &os);
77 typedef ConcretePacket<WLANBeaconPacketType> WLANBeaconPacket;
81 ///////////////////////////////hh.e////////////////////////////////////////
82 //#include "WLANBeaconPacket.cci"
83 //#include "WLANBeaconPacket.ct"
84 //#include "WLANBeaconPacket.cti"
91 // c-file-style: "senf"
92 // indent-tabs-mode: nil
93 // ispell-local-dictionary: "american"
94 // compile-command: "scons -u test"