This is our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Hi, I want my dissector to get called when there is some specific pattern of dest mac , for that i am using eth heuristic dissector and my data which i want to dissect is last 12 bytes of IP payload.For this i am calling eth_dissector and then i am calculating exact location of my data and hence dissecting it. I need to know if this is right approach ?

guint16 length , offs;
length = tvb_get_guint16(tvb,16);
offs = 14 + length - 12;
call_dissector(eth_dissector, tvb, pinfo, tree);
            if (tree) {

                    ti = proto_tree_add_item(tree, proto_extl2, tvb, offs,-1, TRUE);
                    l2_tree = proto_item_add_subtree(ti, ett_extl2);
                    -----------------------
                    -------------------------
                    Dissection continues..

asked 06 Jun '12, 22:33

yogeshg's gravatar image

yogeshg
41222326
accept rate: 0%

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×1,620
×173
×8

question asked: 06 Jun '12, 22:33

question was seen: 1,746 times

last updated: 06 Jun '12, 22:33

p​o​w​e​r​e​d by O​S​Q​A