senfscons: Fix 'Object' build helper to work with empty source list in SCons 0.96.1
[senf.git] / Packets / DefaultBundle / EthernetPacket.cc
index 937f219..907d4bf 100644 (file)
@@ -53,10 +53,15 @@ prefix_ void senf::EthernetPacketType::dump(packet p, std::ostream & os)
     os << ": \n"
        << "  destination   : " << p->destination() << "\n"
        << "  source        : " << p->source() << "\n"
-       << "  ethertype     : " 
+       << "  ethertype     : 0x" 
        << std::hex << std::setw(4) << std::setfill('0') << p->type() << "\n";
 }
 
+prefix_ void senf::EthernetPacketType::finalize(packet p)
+{
+    p->type() << key(p.next());
+}
+
 prefix_ void senf::EthVLanPacketType::dump(packet p, std::ostream & os)
 {
     boost::io::ios_all_saver ias(os);
@@ -64,10 +69,15 @@ prefix_ void senf::EthVLanPacketType::dump(packet p, std::ostream & os)
        << "  priority      : " << p->priority() << "\n"
        << "  cfi           : " << p->cfi() << "\n"
        << "  vlan-ID       : " << p->vlanId() << "\n"
-       << "  ethertype     : " 
+       << "  ethertype     : 0x" 
        << std::hex << std::setw(4) << std::setfill('0') << p->type() << "\n";
 }
 
+prefix_ void senf::EthVLanPacketType::finalize(packet p)
+{
+    p->type() << key(p.next());
+}
+
 ///////////////////////////////cc.e////////////////////////////////////////
 #undef prefix_