NEW FILE HEADER / COPYRIGHT FORMAT
[senf.git] / Packets / MPEGDVBBundle / GREPacket.cc
index 29ec65e..a9cdda7 100644 (file)
@@ -1,9 +1,9 @@
-// $Id:DatagramSection.cc 327 2007-07-20 10:03:44Z tho $
+// $Id$
 //
 // Copyright (C) 2007
-// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
-// Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
-//     Joachim Kaeber <joachim.kaeber@fokus.fraunhofer.de>
+// Fraunhofer Institute for Open Communication Systems (FOKUS) 
+// Competence Center NETwork research (NET), St. Augustin, GERMANY 
+//     Joachim Kaeber <jkaeber@berlios.de>
 //
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
 //#include "GREPacket.ih"
 
 // Custom includes
+#include <boost/io/ios_state.hpp>
 #include <iomanip>
 
 #define prefix_
 ///////////////////////////////cc.p////////////////////////////////////////
 
+namespace {
+    senf::PacketRegistry<senf::EtherTypes>::RegistrationProxy<senf::EthernetPacket>
+        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////////////////////////////////////////