Move include files in debian packge into 'senf' subdirectory
[senf.git] / Packets / DefaultBundle / UDPPacket.cc
index d74e080..5cf1f43 100644 (file)
 // Free Software Foundation, Inc.,
 // 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
-// Definition of non-inline non-template functions
+/** \file 
+    \brief UDPPacket non-inline non-template implementation */
 
 #include "UDPPacket.hh"
 //#include "UDPPacket.ih"
 #include "IpV4Packet.hh"
 
 // Custom includes
-#include "Packets/DataPacket.hh"
+#include "../../Packets/Packets.hh"
 
 #define prefix_
 ///////////////////////////////cc.p////////////////////////////////////////
@@ -37,23 +38,13 @@ namespace {
         registerUDPPacket (17);
 }
 
-prefix_ void senf::UDPPacket::v_nextInterpreter()
-    const
-{
-    registerInterpreter<DataPacket>(begin()+bytes(),end());
-}
-
-prefix_ void senf::UDPPacket::v_finalize()
-{}
-
-prefix_ void senf::UDPPacket::v_dump(std::ostream & os)
-    const
+prefix_ void senf::UDPPacketType::dump(packet p, std::ostream & os)
 {
     os << "UDP:\n"
-       << "  source port   : " << source() << "\n"
-       << "  dest port     : " << destination() << "\n"
-       << "  length        : " << length() << "\n"
-       << "  crc           : " << std::hex << crc() << std::dec << "\n";
+       << "  source port   : " << p->source() << "\n"
+       << "  dest port     : " << p->destination() << "\n"
+       << "  length        : " << p->length() << "\n"
+       << "  crc           : " << std::hex << p->crc() << std::dec << "\n";
 }
 
 ///////////////////////////////cc.e////////////////////////////////////////
@@ -66,4 +57,6 @@ prefix_ void senf::UDPPacket::v_dump(std::ostream & os)
 // c-file-style: "senf"
 // indent-tabs-mode: nil
 // ispell-local-dictionary: "american"
+// compile-command: "scons -u test"
+// comment-column: 40
 // End: