c0698f9f3a55904445087043177c160fc1067188
[senf.git] / senf / Packets / 80211Bundle / WLANBeaconPacket.cc
1 // $Id$
2 //
3 // Copyright (C) 2009
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>
8 //
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.
13 //
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.
18 //
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.
23
24 // Definition of 802.11 WLAN Beacon Packet non-inline non-template functions
25
26 // Custom includes
27 #include "WLANBeaconPacket.hh"
28
29 #include <senf/Packets/Packets.hh>
30 #include <boost/io/ios_state.hpp>
31
32 #define prefix_
33 ///////////////////////////////cc.p////////////////////////////////////////
34
35 prefix_ void senf::WLANBeaconPacketType::dump(packet p, std::ostream &os)
36 {
37     boost::io::ios_all_saver ias(os);
38     os << "WLAN beacon frame:\n"
39        << senf::fieldName("timestamp")      << unsigned( p->timestamp())      << "\n"
40        << senf::fieldName("beaconInterval") << unsigned( p->beaconInterval()) << "\n";
41     p->ssidIE().dump( os);
42     p->supportedRatesIE().dump( os);
43     os << "  Optional Information Elements:\n";
44     typedef parser::ieList_t::container ieListContainer_t;
45     ieListContainer_t ieListContainer (p->ieList());
46     for (ieListContainer_t::const_iterator i = ieListContainer.begin(); i != ieListContainer.end(); ++i)
47         i->dump( os);
48 }
49
50 ///////////////////////////////cc.e////////////////////////////////////////
51 #undef prefix_
52
53 \f
54 // Local Variables:
55 // mode: c++
56 // fill-column: 100
57 // c-file-style: "senf"
58 // indent-tabs-mode: nil
59 // ispell-local-dictionary: "american"
60 // compile-command: "scons -u test"
61 // comment-column: 40
62 // End: