Wireshark-dev: [Wireshark-dev] (Help) simulating a packet
From: divya kothapally <[email protected]>
Date: Wed, 19 Aug 2009 13:21:51 -0700
I was trying to simulate a packet in packet-xxx.c. Iam trying to add a string of char representing hex decimal values (exactly as the packet contains) at the end of the packet in packet-xxx.c so that i can check my local enhancements.
Correct me if iam trying to something wrong:
       guchar data[]= "194857";
      guchar *buffer;
      buffer= (guchar *) g_malloc(org_size);
       next_tvb= tvb_new_real_data(buffer, org_size, org_size);
       tvb_set_child_real_data_tvbuff(tvb, next_tvb);
      add_new_data_source(info,next_tvb, " piggybacking");
         proto_add_tree_item(tree, hf_xxx, next_tvb,offset,1, FALSE);

Divya Kothapally