[docsis->type35ucd] Fix TLV 15 & 16 bugs
authorAdrian Simionov <daniel.simionov@gmail.com>
Wed, 1 Jun 2016 11:06:44 +0000 (21:06 +1000)
committerMichael Mann <mmann78@netscape.net>
Wed, 1 Jun 2016 14:05:58 +0000 (14:05 +0000)
+ TLV 15 has value decoded as on off
+ TLV 16 shows text parameters instead of decimal value

Change-Id: I6f0baa410f12e20825379a3ff0cd6174aa2bc576
Reviewed-on: https://code.wireshark.org/review/15678
Reviewed-by: Michael Mann <mmann78@netscape.net>
plugins/docsis/packet-type35ucd.c

index db1715b102c444163dc75e5a836968f32d5384bf..3094283195405c53a4f6368f2c02b1383a56e0f7 100644 (file)
@@ -270,8 +270,12 @@ static const value_string max_scheduled_codes_vals[] = {
   {0, NULL}
 };
 
-/* Windows does not allow data copy between dlls */
-const true_false_string type35_tfs_on_off = { "On", "Off" };
+static const value_string ranging_required[] = {
+  {0, "No ranging required."},
+  {1, "Unicast initial ranging required."},
+  {2, "Broadcast initial ranging required."},
+  {0, NULL}
+};
 
 /* Dissection */
 static int
@@ -959,7 +963,7 @@ proto_register_docsis_type35ucd (void)
     },
     {&hf_docsis_type35ucd_scdma_mode_enable,
      {"SCDMA Mode Enable", "docsis_type35ucd.scdmaenable",
-      FT_BOOLEAN, BASE_NONE, TFS(&type35_tfs_on_off), 0x0,
+      FT_UINT8, BASE_DEC, VALS (on_off_vals), 0x0,
       NULL, HFILL}
     },
     {&hf_docsis_type35ucd_scdma_spreading_interval,
@@ -999,12 +1003,12 @@ proto_register_docsis_type35ucd (void)
     },
     {&hf_docsis_type35ucd_maintain_power_spectral_density,
      {"Maintain power spectral density", "docsis_type35ucd.maintainpowerspectraldensity",
-      FT_BYTES, BASE_NONE, NULL, 0x0,
+      FT_UINT8, BASE_DEC, VALS (on_off_vals), 0x0,
       NULL, HFILL}
     },
     {&hf_docsis_type35ucd_ranging_required,
      {"Ranging Required", "docsis_type35ucd.rangingrequired",
-      FT_BYTES, BASE_NONE, NULL, 0x0,
+      FT_UINT8, BASE_DEC, VALS (ranging_required), 0x0,
       NULL, HFILL}
     },
     {&hf_docsis_type35ucd_rnghoff_cm,