Given that Ethereal is supplied in source form, yes, you could do that.
You'd put the source in >the "epan/dissectors" directory, and update
"epan/dissectors/Makefile.common" to include its ".c" >file in the list of
protocol dissectors. The "register" and "register handoff" routines are
done a bit >differently for built-in dissectors; see the dissector files in
"epan/dissector" to see how that's done.
I have tried the above suggestion. ALso, I added :
{extern void proto_register_xxx (void); proto_register_xxx ();} and
{extern void proto_reg_handoff_xxx (void); proto_reg_handoff_xxx ();}
routines to "register.c" in epan/dissectors folder. But when I give the
following commands in DOS prompt:
nmake -f Makefile.nmake distclean or
nmake -f Makefile.nmake all
I get the following errors:
____________________________
nmake -f Makefile.nmake distclean:
____________________________
/usr/bin/rm: cannot remove `\\': Is a directory
NMAKE : fatal error U1077: 'c:\cygwin\bin\rm.exe' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual
Studio\VC98\bin\N
MAKE.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual
Studio\VC98\bin\N
MAKE.EXE"' : return code '0x2'
Stop.
_____________________________
and for nmake -f Makefile.nmake all:
_____________________________
ascend-grammar.c(1615) : warning C4102: 'yyerrorlab' : unreferenced label
ascend-scanner.c
ascend-scanner.c(30) : fatal error C1083: Cannot open include file:
'unistd.h':
No such file or directory
Generating Code...
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual
Studio\VC98\bin\N
MAKE.EXE"' : return code '0x2'
Stop.
=====================================================
And I'm stuck again.