Ethereal-dev: RE: [ethereal-dev] FW: Question about Plugins

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

From: "Ihab Hedroj" <hedroj@xxxxxxxxxxxxxxxxxx>
Date: Tue, 30 May 2000 20:00:15 -0400
Title: RE: [ethereal-dev] FW: Question about Plugins

Thank you for your response. I chosen to write it as regular dissector and recompiling the application. It is working fine that way.

Regards;
Ihab

-----Original Message-----
From: Olivier Abad [mailto:abad@xxxxxxxxxxxxx]
Sent: Saturday, May 27, 2000 4:56 AM
To: Hedroj, Ihab [SKPK:KC53:EXCH]
Cc: ethereal-dev@xxxxxxxx
Subject: Re: [ethereal-dev] FW: Question about Plugins


On ven, mai 26, 2000 at 06:43:22 -0400, Ihab Hedroj wrote:
>
> I am new to ethereal and I been asked to write a plugin for LDP. I did
> the following as a starting point:
>
> 1- Copied the gryphon plugin to a new directory named ldp
> 2- Removed most of the code and left only what is written in the
> README.Developer document
> 3- Cleaned up the .h file
> 4- Changed the filter string to tcp.port == 6000
> 5- Changed all Makfiles*
> 6- Ran make. It compiled with no problems and generated .la, lo and .o
> files and the .libs dir.
> 7- Created the shared file by typing
>         ld -shared -o ldp packet-ldp.o.

It should be generated by make.

> 8- Copied the .so, .la and ldp files to
> /usr/local/lib/ethereal/plugins/0.8.8

make install should do it.

> 9- Started ethereal
> 10- Enabled the plugin and started the capture process.
>
> Ethereal didn't call my plugin at all in spite of the existence of TCP
> packets with source and destination ports equal to 6000.

Try to run ethereal with gdb. In packet-tcp.c, put a breakpoint in the
loop where plugins are applied : while(pt_plug) { ... }. Plugins are
stored in a linked list (which should be short if you only have the
gryphon and ldp plugins). If your plugin is enabled, and the filter
matches the current packet, it should be called here.

> I would really appreciate if you provide me with some help.

It would be easier to help you if you could send your code.

Olivier
--
To get something done, a committee should consist of no more than three
persons, two of them absent.