21 #include <boost/io/ios_state.hpp> 31 boost::io::ios_all_saver ias(os);
32 os <<
"GRE Encapsulation:\n" 34 <<
senf::fieldName(
"protocol_type") <<
"0x" << std::hex << p->protocol_type() <<
"\n";
40 p->version_number() = 0;
41 if (p->checksum_present()) {
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::IPTypes, senf::GREPacketType::ipType, senf::GREPacket)
static void finalize(packet p)
static void dump(packet p, std::ostream &os)
Protocol specific packet handle.
Packet next() const
Get next packet in chain.
static const IPTypes::key_t ipType
IP protocol number registry.