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

Simple question about conversation interface.

I'm trying to pass data between 2 packets which are using 2 different dissector. Packets are not using same src/dst addresses so I'm "cheating" a little bit by setting a random src address which is the same for both dissector (dst address is discard). Then I'm using conversation_add_proto_data() and conversation_get_proto_data() to add/get the data I want to the conversation but the data I get does not correspond to the data stored. My guess is that conversation interface works only in the same dissector, is that right ? If yes is there any other way to pass data beetween 2 different dissector ?

Thanks

asked 26 Jun '14, 06:22

Afrim's gravatar image

Afrim
160101116
accept rate: 22%

I'm trying to pass data between 2 packets which are using 2 different dissector.

So you want to pass data between packet 1 proto x and say packet 5 proto y? How would the application using these protocols know they are related?

If you have some identifier you could have a hastable in say proto x and do a lookup.

(26 Jun '14, 07:09) Anders ♦

Yes that's what I want to do. I also have identifier, in fact i have identifier but I can't use them because I don't know about a feature that allow me to do what I want.

Now if I create my hastable lets say in proto x, how do proto y know about this hashtable ?

(26 Jun '14, 07:35) Afrim

Define a function to look up the data in proto x, export it and add a x.h file import that in proto y and call the lookup function.

(26 Jun '14, 08:03) Anders ♦

Thanks you for your answer but it doesn't work. Exporting variable in proto x doesn't share the value of the variable in proto y.

(27 Jun '14, 05:32) Afrim

Calling proto x from y with a,function dies not require the data to be exported...

(27 Jun '14, 07:13) Anders ♦

I'm not trying to call proto x from proto y, i think we misunderstood.

I'm trying to share a variable from one plugin to another.

1 : I'm waiting, in both plugins, for a flag to be set. 2 : Once the flag is set, lets say in plugin 1, a value is stored to a variable which I use to compute something. The thing that I want to compute the same thing in plugin 2 so I need the value of this variable. 3 : So once I get the variable in plugin 1 I want to share this one to plugin 2.

That's it. Sorry if it's not clear enough yet.

(27 Jun '14, 07:59) Afrim
showing 5 of 6 show 1 more comments
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:

×637
×122
×34

question asked: 26 Jun '14, 06:22

question was seen: 1,406 times

last updated: 27 Jun '14, 08:00

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