Alex Kirk wrote:
Hello All,
Sorry to bother the list with something so basic, but I've got a quick question
on writing a new dissector. I've added my source file to
epan/dissectors/Makefile.common as suggested by README.developer (I was actually
able to get ./configure to do this for me by just adding my source file to a
fresh download of 0.10.9), and proto_register_wins() is all happily filled out,
including a call to proto_register_protocol. I've even filled in
proto_reg_handoff_wins(), complete with a call to dissector_add("tcp.port",
TCP_PORT_WINS, wins_handle) (yes, TCP_PORT_WINS is defined). However, register.c
has no entry for my registration, and there's no sign of the dissector within my
freshly built copy of Ethereal.
Have I missed something very obvious here? If so, what do I need to do? If not,
what the heck is going on?
That not sounds to bad for a first try, you've looked at the usual
suspects ;-)
So your question isn't too dumb at all...
If the register.c file doesn't contain your dissector, that's the place
to look at first. Unless you build a plugin, it has to appear in that file.
Did you place your dissector file in epan/dissectors? It won't be
searched somewhere else.
Does it get (re-)compiled when you change your packet-wins.c (or
whatever name you'd chosen) file? So your makefile is ok.
Did you tried simply deleting the register.c file, as it's possibly
(re-)generated?
Regards, ULFL