From: jkaeber Date: Tue, 11 Dec 2007 19:56:57 +0000 (+0000) Subject: First GRE pipe is running. X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=80c17af991e2f4690c7601e4408954322b176fe9;p=senf.git First GRE pipe is running. git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@555 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/Packets/MPEGDVBBundle/GREPacket.cc b/Packets/MPEGDVBBundle/GREPacket.cc index 48f70e5..4fc8aef 100644 --- a/Packets/MPEGDVBBundle/GREPacket.cc +++ b/Packets/MPEGDVBBundle/GREPacket.cc @@ -27,27 +27,24 @@ //#include "GREPacket.ih" // Custom includes +#include #include #define prefix_ ///////////////////////////////cc.p//////////////////////////////////////// +namespace { + senf::PacketRegistry::RegistrationProxy + registerTransparentEthernetBridging (0x6558); +} + prefix_ void senf::GREPacketType::dump(packet p, std::ostream & os) { - /* - os << "GREPacket:\n" - << std::hex - << " syncByte: 0x" << unsigned(p->sync_byte()) << "\n" - << " transport_error_indicator: 0x" << unsigned(p->transport_error_indicator()) << "\n" - << " payload_unit_start_indicator (pusi): 0x" << unsigned(p->pusi()) << "\n" - << " transport_priority: 0x" << unsigned(p->transport_priority()) << "\n" - << std::dec - << " pid: " << unsigned(p->pid()) << "\n" - << std::hex - << " transport_scrambling_control: 0x" << unsigned(p->transport_scrmbl_ctrl()) << "\n" - << " adaptation_field_control: 0x" << unsigned(p->adaptation_field_ctrl()) << "\n" - << " continuity_counter: 0x" << unsigned(p->continuity_counter()) << "\n"; - */ + boost::io::ios_all_saver ias(os); + os << "GRE Encapsulation:\n" + << " checksum_present : " << p->checksum_present() << "\n" + << " protocol_type : 0x" << std::hex << p->protocol_type() << "\n" + ; } ///////////////////////////////cc.e//////////////////////////////////////// diff --git a/Packets/MPEGDVBBundle/GREPacket.hh b/Packets/MPEGDVBBundle/GREPacket.hh index 6e29e82..f056b51 100644 --- a/Packets/MPEGDVBBundle/GREPacket.hh +++ b/Packets/MPEGDVBBundle/GREPacket.hh @@ -29,6 +29,7 @@ // Custom includes #include #include "../../Packets/Packets.hh" +#include "../DefaultBundle/EthernetPacket.hh" //#include "GREPacket.mpp" ///////////////////////////////hh.p//////////////////////////////////////// @@ -78,17 +79,20 @@ namespace senf { */ struct GREPacketType : public PacketTypeBase, - public PacketTypeMixin + public PacketTypeMixin { - typedef PacketTypeMixin mixin; + typedef PacketTypeMixin mixin; typedef ConcretePacket packet; typedef Parse_GREPacket parser; using mixin::nextPacketRange; + using mixin::nextPacketType; using mixin::init; using mixin::initSize; static void dump(packet p, std::ostream & os); + static EtherTypes::key_t nextPacketKey(packet p) { return p->protocol_type(); } + static void finalize(packet p) { p->protocol_type() << key(p.next()); } }; /** \brief GRE packet typedef */