Content ns3 packet

diff --git a/model/ndn_contentpacket.cc b/model/ndn_contentpacket.cc
index 6d64497..bb9ff8d 100644
--- a/model/ndn_contentpacket.cc
+++ b/model/ndn_contentpacket.cc
@@ -6,3 +6,21 @@
 //
 
 #include "ndn_contentpacket.h"
+
+namespace ns3
+{
+namespace NDNabstraction
+{
+    ContentPacket::ContentPacket(const struct ccn_charbuf *Name,const void *data,size_t size):Packet()
+    {
+        ccn_charbuf *output = ccn_charbuf_create();
+        int result = ccn_encode_ContentObject(output,Name,data,size);
+        
+        if(result>=0)
+        {
+            Ptr<Packet> p = Create<Packet> (output->buf, (uint32_t)output->length);
+            this->AddAtEnd (p);
+        }
+    }
+}
+}
\ No newline at end of file