Ethereal-dev: Re: [Ethereal-dev] conversation.c patch

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Peter Johansson <Peter.Johansson@xxxxxxxxxxxx>
Date: Sun, 28 Nov 2004 20:23:08 +0100
Guy Harris wrote:

Peter Johansson wrote:

Yes, in this case all future connections made to 192.168.169.2/2441 should be handled by the same protocol dissector. Do you (or anyone else for that matter) have an idea of how to accomplish the "template" conversation you had in mind? I got the idea that one could add another option value which could be used in conjunction with either NO_ADDR_B, NO_PORT_B or both, say PERSISTENT (value should be 0x08 or perhaps 0xF0).


I'm not sure "persistent" is the right adjective, but I'm not sure I have any better ideas.... "Prototype"? "Template"? The idea is that it's not creating a regular conversation, it's creating a prototype or template from which one or more templates

I agree, Template seems the better one from these suggestions.

c = conversation_new(addr1, addr1, PTYPE, port1, 0, NO_ADDR_B | NO_PORT_B | PERSISTENT). When find_conversation completes the conversation for a newly made connection for c, it should instead of g_hash_table_remove do g_hash_table_insert for the established connection when options specify PERSISTENT in conjunction with either of (or both) NO_ADDR_B and NO_PORT_B..

The dissector could then do:

I.e., when it completes the conversation, it should add a new non-persistent, non-wildcard conversation?

Exactly!

That sounds like the right thing to do.

OK, I am on it then unless you want to do this yourself.

/ Peter