Wireshark mailing list archives

How to connect dissector to wiretap plugin


From: Giedrius Zavadskis <giedrzav () gmail com>
Date: Thu, 5 Nov 2009 13:32:33 -0600

Hello everyone,

I have tried to create Wiretap plugin as outlined in wireshark wiki (
http://wiki.wireshark.org/wiretap%20plugin<http://wiki.wireshark.org/wiretap>).
The plugin seems to load file into Wireshark properly, however i cannot
figure out how to forward data further to dissector.

Wireshark wiki give example as how to handoff wtap to dissector:

void proto_reg_handoff_myDissector(void)
{
    gboolean init = FALSE;

    if (init == FALSE)
    {
      dissector_handle_t myDissector_handle;

      myDissector_handle = find_dissector("myDissector");

      dissector_add("wtap_encap", encap_myFileType, myDissector_handle);

      init = TRUE;
    }
}

It is unclear to me on how to get *encap_myFileType* value within dissector
that has been registered in wiretap plugin with a function *
wtap_register_encap_type*() ?

Thanks for the help,
Giedrius Zavadskis
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: