04eee2f2991ff081a2f12411430ff3b0bfd7c6b5
[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 #include "WLANBeaconPacket.hh"
27
28 // Custom includes
29 #include <boost/io/ios_state.hpp>
30
31 #define prefix_
32 //-/////////////////////////////////////////////////////////////////////////////////////////////////
33
34 prefix_ void senf::WLANBeaconPacketType::dump(packet p, std::ostream & os)
35 {
36     boost::io::ios_all_saver ias(os);
37     os << "WLAN beacon frame:\n"
38        << senf::fieldName("timestamp")      << unsigned( p->timestamp())      << "\n"
39        << senf::fieldName("beaconInterval") << unsigned( p->beaconInterval()) << "\n";
40     p->ssidIE().dump( os);
41     p->supportedRatesIE().dump( os);
42     os << "  Optional Information Elements:\n";
43     typedef parser::ieList_t::container ieListContainer_t;
44     ieListContainer_t ieListContainer (p->ieList());
45     for (ieListContainer_t::const_iterator i = ieListContainer.begin(); i != ieListContainer.end(); ++i)
46         i->dump( os);
47 }
48
49 //-/////////////////////////////////////////////////////////////////////////////////////////////////
50 #undef prefix_
51
52 \f
53 // Local Variables:
54 // mode: c++
55 // fill-column: 100
56 // c-file-style: "senf"
57 // indent-tabs-mode: nil
58 // ispell-local-dictionary: "american"
59 // compile-command: "scons -u test"
60 // comment-column: 40
61 // End: