Wireshark-bugs: [Wireshark-bugs] [Bug 2074] new protocol dissector for the protocol FF-HSE

Date: Tue, 8 Jan 2008 12:16:18 +0000 (GMT)
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2074





------- Comment #6 from jaap.keuter@xxxxxxxxx  2008-01-08 12:16 GMT -------
You are getting close. :)
The next step is these parts:
+       NMAConfigurationUse = tvb_get_guint8(tvb, offset);
+       nma_conf_use = val_to_str(NMAConfigurationUse,
+               names_nma_conf_use, "Unknown");
+       proto_tree_add_uint_format(sub_tree,
+               hf_ff_fda_open_sess_req_nma_conf_use,
+               tvb, offset, 1, NMAConfigurationUse, "NMA Configuration Use: %s
(%u)",
+               nma_conf_use, NMAConfigurationUse);

This can be replaced by adding 'names_nma_conf_use' to the header field, like
so:

+               { &hf_ff_fda_open_sess_req_nma_conf_use,
+                       { "NMA Configuration Use",
"ff.fda.open_sess.req.nma_conf_use",
+                               FT_UINT8, BASE_DEC, VALS(names_nma_conf_use),
0x0,
+                               "", HFILL } },

That will do the lookup for you, so now all you have to write is:

+       proto_tree_add_item(sub_tree,
+               hf_ff_fda_open_sess_req_nma_conf_use,
+               tvb, offset, 1, FALSE);


Another item:
+       if(pinfo->destport == UDP_PORT_FF_FMS) {
This will trigger also when pinfo->destport == TCP_PORT_FF_FMS, since
UDP_PORT_FF_FMS == TCP_PORT_FF_FMS. Test for protocol as well.


Are you going to add a preference setting for ff_desegment?


Furthermore: maybe you want to rename the files to packet-ff-hse.[ch] to avoid
namespace collision.


-- 
Configure bugmail: http://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.