Wireshark-bugs: [Wireshark-bugs] [Bug 8691] Adding support of BGP flow spec RFC 5575
Date: Sun, 19 May 2013 22:48:23 +0000

Comment # 10 on bug 8691 from
Hi Alexis,

I did most of the changes you asked me to do.

removing all proto_add_text with proto_add_item, I also change the
implementation of bgp flowspec filter type with a value_string table.

Something still unclear for me on your comment:
+        if (value_len == 1) {
+        proto_tree_add_text(op_value_tree, tvb, offset+cursor_op_val,
+                            value_len, "%s : %u",tag,tvb_get_guint8(tvb,
offset+cursor_op_val));
+        }
+        else {
+        proto_tree_add_text(op_value_tree, tvb, offset+cursor_op_val,
+                                value_len, "%s : %u",tag,tvb_get_ntohs(tvb,
offset+cursor_op_val));
+        }
you should use hf with FT_UINTXX and specify the length in proto_tree_add_item
function (4eme arg) 

=> Matt : which FT-UINTXX format should I declare ? According to RFC 5575,
value lenght is coded as 1 << (len) len being on 3 bits. lenght could be either
8, 16 or 32 bits. Should I declare a FT_UINT32 then and adapt with the 4eme arg
of the proto_tree_add_item ?

Thanks,
Matt.
(Once done, I will re-run a diff and attach it with this bug).


You are receiving this mail because:
  • You are watching all bug changes.