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 "InformationElements.hh"
33 ///////////////////////////////hh.p////////////////////////////////////////
36 struct WLANBeaconPacketParser : public PacketParserBase
38 # include SENF_PARSER()
40 SENF_PARSER_FIELD( timestamp, UInt64LSBParser );
41 SENF_PARSER_FIELD( beaconInterval, UInt16LSBParser );
42 SENF_PARSER_SKIP ( 2,2); //capability flags
44 SENF_PARSER_FIELD( ssidIE, WLANSSIDInfoElementParser );
45 WLANSSIDInfoElementParser::value_t ssid() const { return ssidIE().value(); }
47 SENF_PARSER_FIELD( supportedRatesIE, WLANSupportedRatesInfoElementParser );
49 SENF_PARSER_LIST ( ieList, packetSize(), WLANGenericInfoElementParser );
51 SENF_PARSER_FINALIZE( WLANBeaconPacketParser );
55 /** \brief WLAN Beacon frame packet
57 \par Packet type (typedef):
62 \ingroup protocolbundle_80211
64 struct WLANBeaconPacketType
65 : public PacketTypeBase,
66 public PacketTypeMixin<WLANBeaconPacketType>
68 typedef PacketTypeMixin<WLANBeaconPacketType> mixin;
69 typedef ConcretePacket<WLANBeaconPacketType> packet;
70 typedef WLANBeaconPacketParser parser;
73 using mixin::initSize;
74 using PacketTypeBase::nextPacketRange;
76 static void dump(packet p, std::ostream &os);
79 /** \brief WLAN Beacon frame packet typedef
80 \ingroup protocolbundle_80211
82 typedef ConcretePacket<WLANBeaconPacketType> WLANBeaconPacket;
86 ///////////////////////////////hh.e////////////////////////////////////////
87 //#include "WLANBeaconPacket.cci"
88 //#include "WLANBeaconPacket.ct"
89 //#include "WLANBeaconPacket.cti"
96 // c-file-style: "senf"
97 // indent-tabs-mode: nil
98 // ispell-local-dictionary: "american"
99 // compile-command: "scons -u test"
100 // comment-column: 40