21 #include <boost/io/ios_state.hpp> 31 boost::io::ios_all_saver ias(os);
33 << std::hex << std::setfill(
'0') << std::right
37 <<
senf::fieldName(
" control id") <<
"0x" << unsigned(p->ctrl()) <<
"\n" 39 <<
senf::fieldName(
" protocol id") <<
"0x" << std::setw(6) << unsigned(p->protocolId()) <<
"\n" 40 <<
senf::fieldName(
" type/length") <<
"0x" << std::setw(4) << unsigned(p->type_length()) <<
"\n";
45 if (p->type_length() >= 1536) {
50 if (p->type_length() <= 1500)
EthernetPacket public header.
static optional_key_t key(Packet const &p)
Find key of packet from registry.
std::string fieldName(std::string const &s)
SENF_PACKET_INSTANTIATE_TEMPLATE(senf::LlcSnapPacket)
Protocol specific packet handle.
Packet next() const
Get next packet in chain.
static factory_t nextPacketType(packet p)
detail::PacketRegistryImpl< typename Tag::key_t >::Entry Entry
static void dump(packet p, std::ostream &os)
Dump given LlcSnapPacket in readable form to given output stream.
static factory_t no_factory()
static factory_t factory()
Return factory for packets of specific type.
Packet registration facility
static void finalize(packet p)
Factory const * factory_t