I created two items (
Here's the decoding with the items added:
But asked 04 Oct '11, 05:26 Sam edited 05 Oct '11, 07:13 helloworld |
2 Answers:
If I understand you correctly, you can accomplish what you want with something like this:
Note the different ftype and display base; these allow you to have the Wireshark back end do most of the heavy lifting. Then, in your
Note here that the endianness and time encoding are specified; currently, these will evaluate to 0 ( answered 04 Oct '11, 09:21 multipleinte... It works follow your code, thank you very much, Multipleinterfaces. Sam (04 Oct '11, 09:54) Sam If it works, then the thing to do now is to accept the answer so this question is no longer listed as unanswered. (04 Oct '11, 17:31) cmaynard ♦♦ Ok, but how to take out it from the unansered list? I check the FAQ but no any related instructions described. (05 Oct '11, 03:42) Sam Mark the answer as accepted by clicking the icon next to it (I think it's a check mark. (05 Oct '11, 03:59) grahamb ♦ Okay, thanks. (05 Oct '11, 05:17) Sam |
Read up on FT_BYTES and companions in doc/README.developer. answered 04 Oct '11, 07:50 Jaap ♦ |
How have you added your
stamp1
andstamp2
fields? Can you post the code changes?Sure, please see below key code:
*proto_tree_add_item(fh_tree, stamp1_id, trailer_tvb, (trailer_length - 9), 8, FALSE);
proto_tree_add_item(fh_tree, stamp2_id, trailer_tvb, (trailer_length - 1), 1, FALSE);*
In addtion, the below elements need be added:
*{ &hf_eth_stamp1,
{ "stamp1", "eth.stamp1", FT_BYTES, BASE_NONE, NULL, 0x0, "Ethernet stamp1", HFILL }},
{ &hf_eth_stamp2,
{ "stamp2", "eth.stamp2", FT_BYTES, BASE_NONE, NULL, 0x0, "Ethernet stamp2", HFILL }}*
Btw, Which files include the Epoch time convert function, it maybe useful, I can try it.