22 #include <boost/io/ios_state.hpp> 42 boost::io::ios_all_saver ias(os);
43 os << senf::fieldName(
"interfaceId") << p->
type().value() << std::endl;
44 os << senf::fieldName(
"timestampMAC") <<
format::dumpint(p->timestampMAC().value()) << std::endl;
45 os << senf::fieldName(
"timestamp") <<
format::dumpint(p->timestamp().value()) << std::endl;
46 os << senf::fieldName(
"modulationId") <<
format::dumpint(p->modulationId().value()) << std::endl;
47 os << senf::fieldName(
"snr") <<
format::dumpint(p->snr().value()) << std::endl;
48 os << senf::fieldName(
"rssi") <<
format::dumpint(p->rssi().value()) << std::endl;
49 os << senf::fieldName(
"airTime") <<
format::dumpint(p->airTime().value()) << std::endl;
52 os << senf::fieldName(
"flags.corrupt") <<
format::dumpint(p->corrupt().value()) << std::endl;
53 os << senf::fieldName(
"flags.retransmitted") <<
format::dumpint(p->retransmitted().value()) << std::endl;
54 os << senf::fieldName(
"flags.duplicated") <<
format::dumpint(p->duplicated().value()) << std::endl;
55 os << senf::fieldName(
"flags.reordered") <<
format::dumpint(p->reordered().value()) << std::endl;
56 os << senf::fieldName(
"flags.aggregated") <<
format::dumpint(p->aggregated().value()) << std::endl;
57 os << senf::fieldName(
"flags.gap") <<
format::dumpint(p->gap().value()) << std::endl;
58 os << senf::fieldName(
"flags.length") <<
format::dumpint(p->length().value()) << std::endl;
63 static factory_t typeFactory[] = { WLANPacket_MgtFrame::factory(),
64 WLANPacket_CtrlFrame::factory(),
65 WLANPacket_DataFrame::factory(),
66 EthernetPacket::factory(),
67 DataPacket::factory(),
70 return typeFactory[p->
type()];
115 else if (pkt.
is<senf::DataPacket>()) {
120 eth->source() << src;
static MACAddress const None
static ConcretePacket createBefore(Packet const &packet)
Incoming or outgoing interface.
static const std::uint16_t extType
static const std::uint32_t OUI_Fraunhofer_FIT
Annotations public header.
WLANPacket_DataFrameType::packet WLANPacket_DataFrame
EthernetPacket prependAnnotationsPacket(Packet const &pkt, MACAddress const &src_=senf::MACAddress::None, MACAddress const &dst_=senf::MACAddress::Broadcast)
WLANPacket_MgtFrameType::packet WLANPacket_MgtFrame
static SENF_CLOCKSERVICE_CONSTEXPR int64_type in_nanoseconds(clock_type const &v)
Incoming packet timestamp.
OtherPacket const & as() const
senf::ClockService::clock_type as_clock_type() const
Annotation & annotation()
WLANPacket_CtrlFrameType::packet WLANPacket_CtrlFrame
ConcretePacket< EthOUIExtensionPacketType > EthOUIExtensionPacket
static void finalize(packet p)
static factory_t no_factory()
SENF_PACKET_REGISTRY_REGISTER(senf::EtherOUIExtTypes, senf::EtherOUIExtTypes::type(senf::EthOUIExtensionPacketType::OUI_Fraunhofer_FIT, senf::AnnotationsPacketType::extType), senf::AnnotationsPacket)
PacketInterpreterBase::factory_t factory_t
ConcretePacket< EthernetPacketType > EthernetPacket
SENF_PACKET_INSTANTIATE_TEMPLATE(senf::AnnotationsPacket)
ConcretePacket< DataPacketType > DataPacket
AnnotationsPacket public header.
static MACAddress const Broadcast
static key_t type(boost::uint32_t oui, boost::uint16_t extType)
static factory_t nextPacketType(packet p)
static void dump(packet p, std::ostream &os)
Dump given AnnotationsPacket in readable form to given output stream.
Factory const * factory_t