Hi,
Better use SET_ADDRESS macro:
target = ep_new(guint32);
address adr1;
*target = 0xa9fe0008; /* 169.254.0.8 */
SET_ADDRESS(&adr1, AT_IPV4, 4, target);
and no C++ style comment.
Besides that I'm not too sure if you can pass 0 as pointer to address B
(even though it's not used to determine a conversation match). Better put
&adr1 there as well.
Thanx,
Jaap
On Wed, 18 Oct 2006, Joerg Anders wrote:
> On Tue, 17 Oct 2006, Jaap Keuter wrote:
>
> > Hi,
> >
> > And how does that work with random access to the packets?
> >
>
> You mean the tree view? It doesn't work :-(( I was wrong! Sorry!
>
> But what is the reason for the crash in control channel plugin?
>
> According to "2.4 Dynamic server port dissector registration"
> I filled an adress struct:
>
> address adr1;
> adr1.address_type = AT_IPv4;
> adr1.len = 4; // or should it be siteof(adr1) ?
> adt1.data = 0xa9fe0008; // 169.254.0.8
>
> Then in dissector of the control channel:
>
> if (/** data channel is announced on port X **/ ) {
>
> conversation = find_conversation(pinfo->fd->num,
> &adr1, 0, PT_UDP, X, 0, NO_ADDR2 | NO_PORT_B);
> }
>
>
> But the "find_conversation" call crashes. The "conversation_new" and
> "conversation_set_dissector" also crashes.
>