This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

How can I use idl2wrs with a dissector?

1

I have installed wireshark, and I wanted to use idl2wrs. I have done everything a specified in the user guide:

idl2wrs echo.idl > packet-test-idl.c`
cp packet-test-idl.c /dir/where/wireshark/lives/epan/dissectors/

...changed Makefile.common, then ./configure and make wireshark again. Everything seemed okay. However, when I start Wireshark, I do not see it in the Edit->preferences menu, in the protocol list. What can I do differently to fix this?

asked 07 Feb '12, 04:23

ivana's gravatar image

ivana
15114
accept rate: 0%

edited 07 Feb '12, 07:53

multipleinterfaces's gravatar image

multipleinte...
1.3k152340


2 Answers:

2

You only see dissectors with registered preferences there. Since there aren't any it doesn't show up.

You could find it through Analyze|Enabled Protocols... and/or through Help|Supported Protocols

answered 07 Feb '12, 07:52

Jaap's gravatar image

Jaap ♦
11.7k16101
accept rate: 14%

It isn't there either :|

(07 Feb '12, 07:59) ivana

It's

./autogen.sh && ./configure && make

to process the changes in Makefile.common and make because a dissector is not part of Wireshark (gasp), it's part of EPAN, found in libwireshark.

(07 Feb '12, 23:16) Jaap ♦

1

I found solution! Maybe someone will find it helpful:

  1. Converting a CORBA idl file into a Wireshark dissector idl2wrs echo.idl > packet-giop_echo.c (it is important that name is in format: packet-xxxx.c, where xxxx is name of dissector and it should be same as in functions proto_register_handoff_giop_echo and proto_register_giop_echo)
  2. Copy the resulting C code to subdirectory epan/dissectors/ inside your Wireshark source directory.
    cp packet-test-idl.c /dir/where/wireshark/lives/epan/dissectors/
  3. Adding dissector in Makefile.common(epan/dissectors/)
    DISSECTOR_SRC = \
    packet-test-idl.c \
    packet-2dparityfec.c \
    packet-3com-njack.c \
    ...
  4. Adding dissector in Makefile.in (epan/dissectors/)
    • libdissectors_la-packet-giop_echo.lo \
    • packet-giop_echo.c
    • @[email protected]@[email protected] @[email protected]/$(DEPDIR)/libdissectors_la-packet- [email protected][email protected]_la-packet-echo.lo: packet-echo.c
    • @am[email protected]    if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdissectors_la_CFLAGS) $(CFLAGS) -MT libdissectors_la-packet-echo.lo -MD -MP -MF "$(DEPDIR)/libdissectors_la-packet-echo.Tpo" -c -o libdissectors_la-packet-echo.lo test -f 'packet-echo.c' || echo '$(srcdir)/'packet-echo.c; 
      @am[email protected]    then mv -f "$(DEPDIR)/libdissectors_la-packet-echo.Tpo" "$(DEPDIR)/libdissectors_la-packet-echo.Plo"; else rm -f "$(DEPDIR)/libdissectors_la-packet-echo.Tpo"; exit 1; fi
      @[email protected]@am[email protected]       source='packet-echo.c' object='libdissectors_la-packet-echo.lo' libtool=yes @[email protected]
      @[email protected]@am[email protected]       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @[email protected]
      @[email protected]   $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdissectors_la_CFLAGS) $(CFLAGS) -c -o libdissectors_la-packet-echo.lo test -f 'packet-echo.c' || echo '$(srcdir)/'packet-echo.c


  5. Adding dissector in CmakeLists.txt (epan/)
    dissectors/packet-giop_echo.c
  6. ./configure
  7. make
  8. make install
This answer is marked "community wiki".

answered 09 Feb '12, 06:17

ivana's gravatar image

ivana
15114
accept rate: 0%

edited 09 Feb '12, 07:42

multipleinterfaces's gravatar image

multipleinte...
1.3k152340