Wireshark mailing list archives
dissector_add_uint() usage
From: Raghavan R <raghavanr68 () gmail com>
Date: Sun, 27 Mar 2011 19:42:02 -0700
Hi all, I am writing a dissector for a Fibre Channel related protocol and want my dissector to get called based on value of fcct.gstype. So here my handoff function- void proto_reg_handoff_fdmi(void) { dissector_handle_t fdmi_handle; fdmi_handle = create_dissector_handle (dissect_fdmi, proto_fdmi); dissector_add_uint("fcct.gstype", FCCT_GSTYPE_MGMTSVC, fdmi_handle); data_handle = find_dissector("data"); } Wireshark fails to load with a call to dissector_add_uint() like above. However it works if like another existing FC dissector (for a different FC protocol) I use- dissector_add_uint("fcct.server", FCCT_GSTYPE_MGMTSVC, fdmi_handle);. So I know that my usage of dissector_add_uint() is wrong. Looking at the usage from other dissectors I could not understand what I'm missing. So can someone please tell me what the expected usage for dissector_add_uint() ? I also noticed that in fcct.c, fcct.gstype comes from proto_tree_add_item() and fcct.server comes from proto_tree_add_uint(). So I changed fcct.gstype to be extracted like fcct.server using proto_tree_add_uint(). But I still couldn't get my dissector to get called based on value of fcct.gstype. So clearly I'm missing something. I also googled around and the only useful information I could extract was that this API was renamed recently. Any pointers would be very much appreciated. Many thanks, Raghavan ___________________________________________________________________________ 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:
- dissector_add_uint() usage Raghavan R (Mar 27)
- Re: dissector_add_uint() usage Guy Harris (Mar 27)
- Re: dissector_add_uint() usage Raghavan R (Mar 27)
- Re: dissector_add_uint() usage Raghavan R (Mar 27)
- Re: dissector_add_uint() usage Raghavan R (Mar 27)
- Re: dissector_add_uint() usage Guy Harris (Mar 27)