22 #include <boost/io/ios_state.hpp> 35 boost::io::ios_all_saver ias(os);
36 os <<
"Internet protocol Version 6:\n" 39 <<
"0x" << std::hex << std::setw(2) << std::setfill(
'0') << std::right << unsigned(p->trafficClass()) <<
"\n" 41 <<
"0x" << std::hex << std::setw(5) << std::setfill(
'0') << std::right << unsigned(p->flowLabel()) <<
"\n" 42 <<
senf::fieldName(
"payload length") << std::dec << unsigned(p->length()) <<
"\n" 51 p->length() << (p.
size() - IPv6PacketParser::fixed_bytes);
53 p->nextHeader() <<
key(p.
next());
56 p->nextHeader() << 59;
IPv6Packet public header.
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_REGISTRY_REGISTER(senf::EtherTypes, senf::IPv6PacketType::etherType, senf::IPv6Packet)
Protocol specific packet handle.
Invalid packet chain operation.
Packet next() const
Get next packet in chain.
static const EtherTypes::key_t etherType
static void finalize(packet p)
Finalize packet.
size_type size() const
Return size of packet in bytes.
static void dump(packet p, std::ostream &os)
Dump given IPv6Packet in readable form to given output stream.
IP protocol number registry.
SENF_PACKET_INSTANTIATE_TEMPLATE(senf::IPv6Packet)