I added the line
register_dissector("tftp", tftp_handle, proto_tftp);
at the end of proto_register_tftp(). Now I get the tftp dissector handle im
my plugin_reg_handoff() function. In my dissector function I call
dissector_add("udp.port", m_pinfo->srcport, tftp_handle);
Now I get an access violation somewhere below decode_udp_ports(). It looks
like the code address that is invoked is invalid. The call stack:
0182abed()
call_dissector_work(dissector_handle * 0x0182ac08, tvbuff * 0x019a0f88,
_packet_info * 0x019a0d38, _proto_node * 0x00000000) line 559 + 21 bytes
dissector_try_port(dissector_table * 0x0182e3a0, unsigned int 0x000004a7,
tvbuff * 0x019a0f88, _packet_info * 0x019a0d38, _proto_node * 0x00000000)
line 834 + 21 bytes
decode_udp_ports(tvbuff * 0x019a0f54, int 0x00000008, _packet_info *
0x019a0d38, _proto_node * 0x00000000, int 0x00000400, int 0x000004a7, int
0x0000000c) line 137 + 34 bytes
....
Is there a problem with my approach to with dissector_add()? Is there a
problem with this approach from a plugin?
Regards, Helge
-----Ursprüngliche Nachricht-----
Von: ethereal-dev-bounces@xxxxxxxxxxxx
[mailto:ethereal-dev-bounces@xxxxxxxxxxxx] Im Auftrag von Tomas Kukosa
Gesendet: Mittwoch, 27. April 2005 07:39
An: Ethereal development
Betreff: Re: [Ethereal-dev] cannot find_dissector
The dissector is not registered automatically.
The register_dissector("tftp", ...) shoul be added into packet-tftp.c.
I will do it.
Regards, Tom
Helge Kruse wrote:
> I have a protocol that support TFTP transfer. But the TFTP server does
> not listen at the TFTP standard port. Therefor I detect the TFTP request
> at the protocol specific UDP port and want to activate the TFTP
> dissector for corresponding conversation.
>
>
>
> I read in the archive that I need to get the TFTP dissector handle in
> the reg_off function of my plugin. But find_dissector(tftp) returns
> always NULL. Do I need any magic to find the dissector?
>
>
>
> Regards, Helge
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Ethereal-dev mailing list
> Ethereal-dev@xxxxxxxxxxxx
> http://www.ethereal.com/mailman/listinfo/ethereal-dev
_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev