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>
29 \brief WLAN Information Elements public header */
31 #ifndef HH_SENF_Packets_80211Bundle_InformationElements_
32 #define HH_SENF_Packets_80211Bundle_InformationElements_ 1
35 #include <senf/Packets/Packets.hh>
37 //#include "InformationElements.mpp"
38 //-/////////////////////////////////////////////////////////////////////////////////////////////////
42 class WLANInfoElementParser : public PacketParserBase
45 # include SENF_PARSER()
46 SENF_PARSER_FIELD ( type, UInt8Parser );
47 SENF_PARSER_FIELD ( length, UInt8Parser );
48 SENF_PARSER_FINALIZE ( WLANInfoElementParser );
50 typedef GenericTLVParserRegistry<WLANInfoElementParser> Registry;
53 typedef GenericTLVParserBase<WLANInfoElementParser> WLANGenericInfoElementParser;
55 struct WLANSSIDInfoElementParser
56 : public WLANInfoElementParser
58 # include SENF_PARSER()
59 SENF_PARSER_INHERIT ( WLANInfoElementParser );
60 // the StringParser includes the length field so we have to go back
61 SENF_PARSER_GOTO ( length );
62 SENF_PARSER_FIELD ( value, StringParser<UInt8Parser> );
63 SENF_PARSER_FINALIZE ( WLANSSIDInfoElementParser );
68 static const type_t::value_type typeId = 0x00u;
70 void dump(std::ostream & os) const;
73 struct WLANSupportedRatesInfoElementParser
74 : public WLANInfoElementParser
76 # include SENF_PARSER()
77 SENF_PARSER_INHERIT ( WLANInfoElementParser );
78 // we just skip the value here. If somebody needs the information he has to implement
79 // this strange information element himself.
80 SENF_PARSER_SKIP ( length(), 0 );
81 SENF_PARSER_FINALIZE ( WLANSupportedRatesInfoElementParser );
86 static const type_t::value_type typeId = 0x01u;
88 void dump(std::ostream & os) const;
91 struct WLANPowerConstraintInfoElementParser
92 : public WLANInfoElementParser
94 # include SENF_PARSER()
95 SENF_PARSER_INHERIT ( WLANInfoElementParser );
96 SENF_PARSER_FIELD ( value, UInt8Parser );
97 SENF_PARSER_FINALIZE ( WLANPowerConstraintInfoElementParser );
103 static const type_t::value_type typeId = 0x20u;
105 void dump(std::ostream & os) const;
109 //-/////////////////////////////////////////////////////////////////////////////////////////////////
110 //#include "InformationElements.cci"
111 //#include "InformationElements.ct"
112 //#include "InformationElements.cti"
119 // comment-column: 40
120 // c-file-style: "senf"
121 // indent-tabs-mode: nil
122 // ispell-local-dictionary: "american"
123 // compile-command: "scons -u test"