4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
6 // The contents of this file are subject to the Fraunhofer FOKUS Public License
7 // Version 1.0 (the "License"); you may not use this file except in compliance
8 // with the License. You may obtain a copy of the License at
9 // http://senf.berlios.de/license.html
11 // The Fraunhofer FOKUS Public License Version 1.0 is based on,
12 // but modifies the Mozilla Public License Version 1.1.
13 // See the full license text for the amendments.
15 // Software distributed under the License is distributed on an "AS IS" basis,
16 // WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
17 // for the specific language governing rights and limitations under the License.
19 // The Original Code is Fraunhofer FOKUS code.
21 // The Initial Developer of the Original Code is Fraunhofer-Gesellschaft e.V.
22 // (registered association), Hansastraße 27 c, 80686 Munich, Germany.
23 // All Rights Reserved.
26 // Thorsten Horstmann <tho@berlios.de>
27 // Christian Niephaus <cni@berlios.de>
30 \brief 802.11 WLAN Beacon Packet public header */
32 #ifndef HH_SENF_Packets_80211Bundle_WLANBeaconPacket_
33 #define HH_SENF_Packets_80211Bundle_WLANBeaconPacket_ 1
36 #include "InformationElements.hh"
38 //-/////////////////////////////////////////////////////////////////////////////////////////////////
41 struct WLANBeaconPacketParser : public PacketParserBase
43 # include SENF_PARSER()
45 SENF_PARSER_FIELD( timestamp, UInt64LSBParser );
46 SENF_PARSER_FIELD( beaconInterval, UInt16LSBParser );
47 SENF_PARSER_SKIP ( 2,2); //capability flags
49 SENF_PARSER_FIELD( ssidIE, WLANSSIDInfoElementParser );
50 WLANSSIDInfoElementParser::value_t ssid() const { return ssidIE().value(); }
52 SENF_PARSER_FIELD( supportedRatesIE, WLANSupportedRatesInfoElementParser );
54 SENF_PARSER_LIST ( ieList, packetSize(), WLANGenericInfoElementParser );
56 SENF_PARSER_FINALIZE( WLANBeaconPacketParser );
60 /** \brief WLAN Beacon frame packet
62 \par Packet type (typedef):
67 \ingroup protocolbundle_80211
69 struct WLANBeaconPacketType
70 : public PacketTypeBase,
71 public PacketTypeMixin<WLANBeaconPacketType>
73 typedef PacketTypeMixin<WLANBeaconPacketType> mixin;
74 typedef ConcretePacket<WLANBeaconPacketType> packet;
75 typedef WLANBeaconPacketParser parser;
78 using mixin::initSize;
79 using PacketTypeBase::nextPacketRange;
81 static void dump(packet p, std::ostream & os);
84 /** \brief WLAN Beacon frame packet typedef
85 \ingroup protocolbundle_80211
87 typedef ConcretePacket<WLANBeaconPacketType> WLANBeaconPacket;
91 //-/////////////////////////////////////////////////////////////////////////////////////////////////
92 //#include "WLANBeaconPacket.cci"
93 //#include "WLANBeaconPacket.ct"
94 //#include "WLANBeaconPacket.cti"
101 // c-file-style: "senf"
102 // indent-tabs-mode: nil
103 // ispell-local-dictionary: "american"
104 // compile-command: "scons -u test"
105 // comment-column: 40