WLANBeaconPacket.cc
Go to the documentation of this file.
1 //
2 // Copyright (c) 2020 Fraunhofer Institute for Applied Information Technology (FIT)
3 // Network Research Group (NET)
4 // Schloss Birlinghoven, 53754 Sankt Augustin, GERMANY
5 // Contact: support@wiback.org
6 //
7 // This file is part of the SENF code tree.
8 // It is licensed under the 3-clause BSD License (aka New BSD License).
9 // See LICENSE.txt in the top level directory for details or visit
10 // https://opensource.org/licenses/BSD-3-Clause
11 //
12 
13 
14 #include "WLANBeaconPacket.hh"
15 
16 // Custom includes
17 #include <boost/io/ios_state.hpp>
18 #include "Registries.hh"
19 
20 #define prefix_
21 //-/////////////////////////////////////////////////////////////////////////////////////////////////
22 
25 
27 {
28  boost::io::ios_all_saver ias(os);
29  os << "WLAN beacon frame:\n"
30  << senf::fieldName("timestamp") << unsigned( p->timestamp()) << "\n"
31  << senf::fieldName("beaconInterval") << unsigned( p->beaconInterval()) << "\n";
32  p->ssidIE().dump( os);
33  p->supportedRatesIE().dump( os);
34  os << " Optional Information Elements:\n";
35  typedef parser::ieList_t::container_type ieListContainer_t;
36  ieListContainer_t ieListContainer (p->ieList());
37  for (ieListContainer_t::const_iterator i = ieListContainer.begin(); i != ieListContainer.end(); ++i)
38  i->dump( os);
39 }
40 
41 
43 
45 {
46  boost::io::ios_all_saver ias(os);
47  os << "Information Elements:\n";
48  typedef parser::ieList_t::container_type ieListContainer_t;
49  ieListContainer_t ieListContainer (p->ieList());
50  for (ieListContainer_t::const_iterator i = ieListContainer.begin(); i != ieListContainer.end(); ++i)
51  i->dump( os);
52 }
53 
54 
55 //-/////////////////////////////////////////////////////////////////////////////////////////////////
56 #undef prefix_
57 
58 
59 // Local Variables:
60 // mode: c++
61 // fill-column: 100
62 // c-file-style: "senf"
63 // indent-tabs-mode: nil
64 // ispell-local-dictionary: "american"
65 // compile-command: "scons -u test"
66 // comment-column: 40
67 // End:
std::string fieldName(std::string const &s)
Definition: DumpFormat.cc:28
static void dump(packet p, std::ostream &os)
802.11 WLAN Beacon Packet public header
raw_container::const_iterator const_iterator
Definition: PacketTypes.hh:70
Protocol specific packet handle.
Definition: Packet.hh:87
#define prefix_
SENF_PACKET_REGISTRY_REGISTER(senf::WLANManagementSubtypes, 8u, senf::WLANBeaconPacket)
SENF_PACKET_INSTANTIATE_TEMPLATE(senf::WLANBeaconPacket)
static void dump(packet p, std::ostream &os)
80211Bundle packet registries public header