#include <boost/io/ios_state.hpp>
#define prefix_
-///////////////////////////////cc.p////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
prefix_ void senf::LlcSnapPacketType::dump(packet p, std::ostream & os)
{
boost::io::ios_all_saver ias(os);
os << "LLC/SNAP:\n"
- << std::hex << std::setfill('0')
- << " LLC\n"
- << " dsap : 0x" << unsigned(p->dsap()) << "\n"
- << " ssap : 0x" << unsigned(p->ssap()) << "\n"
- << " control id : 0x" << unsigned(p->ctrl()) << "\n"
- << " SNAP\n"
- << " protocol id : 0x" << std::setw(6) << unsigned(p->protocolId()) << "\n"
- << " type/length : 0x" << std::setw(4) << unsigned(p->type_length()) << "\n";
+ << std::hex << std::setfill('0') << std::right
+ << " LLC\n"
+ << senf::fieldName(" dsap") << "0x" << unsigned(p->dsap()) << "\n"
+ << senf::fieldName(" ssap") << "0x" << unsigned(p->ssap()) << "\n"
+ << senf::fieldName(" control id") << "0x" << unsigned(p->ctrl()) << "\n"
+ << " SNAP\n"
+ << senf::fieldName(" protocol id") << "0x" << std::setw(6) << unsigned(p->protocolId()) << "\n"
+ << senf::fieldName(" type/length") << "0x" << std::setw(4) << unsigned(p->type_length()) << "\n";
}
prefix_ senf::PacketInterpreterBase::factory_t senf::LlcSnapPacketType::nextPacketType(packet p)
{
if (p->type_length() >= 1536) {
- PkReg_Entry const * e;
- e = PacketRegistry<senf::EtherTypes>::lookup( p->type_length(), nothrow );
+ PacketRegistry<senf::EtherTypes>::Entry const * e (
+ PacketRegistry<senf::EtherTypes>::lookup( p->type_length(), nothrow ));
return e ? e->factory() : no_factory();
}
if (p->type_length() <= 1500)
}
-///////////////////////////////cc.e////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
#undef prefix_
\f