aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/dissectors/asn1/ldap/packet-ldap-template.c2
-rw-r--r--epan/dissectors/packet-bootp.c2
-rw-r--r--epan/dissectors/packet-btatt.c12
-rw-r--r--epan/dissectors/packet-bthci_vendor.c2
-rw-r--r--epan/dissectors/packet-fpp.c8
-rw-r--r--epan/dissectors/packet-gtpv2.c4
-rw-r--r--epan/dissectors/packet-idrp.c4
-rw-r--r--epan/dissectors/packet-ldap.c2
-rw-r--r--epan/dissectors/packet-nfapi.c6
-rw-r--r--epan/dissectors/packet-obex.c2
-rw-r--r--epan/dissectors/packet-reload.c4
-rw-r--r--epan/dissectors/packet-ses.c2
-rw-r--r--epan/dissectors/packet-srvloc.c2
-rw-r--r--epan/dissectors/packet-umts_fp.c4
-rw-r--r--epan/dissectors/packet-zbee-zcl-general.c28
-rw-r--r--epan/proto.c94
-rw-r--r--plugins/epan/wimaxmacphy/packet-wimaxmacphy.c2
17 files changed, 91 insertions, 89 deletions
diff --git a/epan/dissectors/asn1/ldap/packet-ldap-template.c b/epan/dissectors/asn1/ldap/packet-ldap-template.c
index 7cd98bd68f..b0976a71d6 100644
--- a/epan/dissectors/asn1/ldap/packet-ldap-template.c
+++ b/epan/dissectors/asn1/ldap/packet-ldap-template.c
@@ -2070,7 +2070,7 @@ void proto_register_ldap(void) {
TFS(&tfs_ads_rodc), 0x00000800, "Is this an read only dc?", HFILL }},
{ &hf_mscldap_netlogon_flags_wdc,
- { "WDC", "mscldap.netlogon.flags.writabledc.", FT_BOOLEAN, 32,
+ { "WDC", "mscldap.netlogon.flags.writabledc", FT_BOOLEAN, 32,
TFS(&tfs_ads_wdc), 0x00001000, "Is this an writable dc (Windows 2008)?", HFILL }},
{ &hf_mscldap_netlogon_flags_dns,
diff --git a/epan/dissectors/packet-bootp.c b/epan/dissectors/packet-bootp.c
index 616df09ad0..b60bb663ad 100644
--- a/epan/dissectors/packet-bootp.c
+++ b/epan/dissectors/packet-bootp.c
@@ -8589,7 +8589,7 @@ proto_register_bootp(void)
"Option 120: SIP Server Address", HFILL }},
{ &hf_bootp_option_classless_static_route,
- { "Subnet/MaskWidth-Router", "bootp.option.classless_static_route.",
+ { "Subnet/MaskWidth-Router", "bootp.option.classless_static_route",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Option 121: Subnet/MaskWidth-Router", HFILL }},
diff --git a/epan/dissectors/packet-btatt.c b/epan/dissectors/packet-btatt.c
index cc1c51c96d..4fe8cbe921 100644
--- a/epan/dissectors/packet-btatt.c
+++ b/epan/dissectors/packet-btatt.c
@@ -12941,27 +12941,27 @@ proto_register_btatt(void)
NULL, HFILL}
},
{&hf_btatt_glucose_measurement_context_flags_medication_id_and_medication,
- {"Medication ID And Medication", "btatt.glucose_measurement_context.flags.",
+ {"Medication ID And Medication", "btatt.glucose_measurement_context.flags.medication_id_and_medication",
FT_BOOLEAN, 8, NULL, 0x10,
NULL, HFILL}
},
{&hf_btatt_glucose_measurement_context_flags_exercise_duration_and_exercise_intensity,
- {"Exercise Duration And Exercise Intensity", "btatt.glucose_measurement_context.flags.",
+ {"Exercise Duration And Exercise Intensity", "btatt.glucose_measurement_context.flags.exercise_duration_and_exercise_intensity",
FT_BOOLEAN, 8, NULL, 0x08,
NULL, HFILL}
},
{&hf_btatt_glucose_measurement_context_flags_tester_health,
- {"Tester Health", "btatt.glucose_measurement_context.flags.",
+ {"Tester Health", "btatt.glucose_measurement_context.flags.tester_health",
FT_BOOLEAN, 8, NULL, 0x04,
NULL, HFILL}
},
{&hf_btatt_glucose_measurement_context_flags_meal,
- {"Meal", "btatt.glucose_measurement_context.flags.",
+ {"Meal", "btatt.glucose_measurement_context.flags.meal",
FT_BOOLEAN, 8, NULL, 0x02,
NULL, HFILL}
},
{&hf_btatt_glucose_measurement_context_flags_carbohydrate_id_and_carbohydrate,
- {"Carbohydrate ID And Carbohydrate", "btatt.glucose_measurement_context.flags.",
+ {"Carbohydrate ID And Carbohydrate", "btatt.glucose_measurement_context.flags.carbohydrate_id_and_carbohydrate",
FT_BOOLEAN, 8, NULL, 0x01,
NULL, HFILL}
},
@@ -14658,7 +14658,7 @@ proto_register_btatt(void)
NULL, HFILL}
},
{&hf_btatt_cgm_e2e_crc,
- {"E2E-CRC", "btatt.cgm.e2e_crc.",
+ {"E2E-CRC", "btatt.cgm.e2e_crc",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL}
},
diff --git a/epan/dissectors/packet-bthci_vendor.c b/epan/dissectors/packet-bthci_vendor.c
index d3ef78f931..a77d6223fd 100644
--- a/epan/dissectors/packet-bthci_vendor.c
+++ b/epan/dissectors/packet-bthci_vendor.c
@@ -1255,7 +1255,7 @@ proto_register_bthci_vendor_broadcom(void)
NULL, HFILL }
},
{ &hf_broadcom_sco_pcm_interface_clock_mode,
- { "SCO PCM Interface Clock Mode", "bthci_vendor.broadcom.sco.interface.",
+ { "SCO PCM Interface Clock Mode", "bthci_vendor.broadcom.sco.interface.clock_mode",
FT_UINT8, BASE_HEX, VALS(broadcom_mode_slave_master_vals), 0x0,
NULL, HFILL }
},
diff --git a/epan/dissectors/packet-fpp.c b/epan/dissectors/packet-fpp.c
index 342f69433e..1b0c2e0a12 100644
--- a/epan/dissectors/packet-fpp.c
+++ b/epan/dissectors/packet-fpp.c
@@ -641,7 +641,7 @@ proto_register_fpp(void)
"Bad mCRC checksum", EXPFILL }
},
{ &ei_fpp_crc32,
- { "fpp..crc32_bad", PI_CHECKSUM, PI_ERROR,
+ { "fpp.crc32_bad", PI_CHECKSUM, PI_ERROR,
"Bad CRC checksum", EXPFILL }
},
};
@@ -678,9 +678,9 @@ proto_reg_handoff_fpp(void)
* Local variables:
* c-basic-offset: 4
* tab-width: 8
- * indent-tabs-mode: nil
+ * indent-tabs-mode: t
* End:
*
- * vi: set shiftwidth=4 tabstop=8 expandtab:
- * :indentSize=4:tabSize=8:noTabs=true:
+ * vi: set shiftwidth=4 tabstop=8 noexpandtab:
+ * :indentSize=4:tabSize=8:noTabs=false:
*/
diff --git a/epan/dissectors/packet-gtpv2.c b/epan/dissectors/packet-gtpv2.c
index e8d4a2eb2a..449310b3f6 100644
--- a/epan/dissectors/packet-gtpv2.c
+++ b/epan/dissectors/packet-gtpv2.c
@@ -7933,12 +7933,12 @@ void proto_register_gtpv2(void)
"SGSN", HFILL}
},
{ &hf_gtpv2_tra_info_sgsn_mbms,
- {"MBMS Context", "gtpv2.tra_into_sgsn_mbms",
+ {"MBMS Context", "gtpv2.tra_info_sgsn_mbms",
FT_UINT8, BASE_DEC, NULL, 0x08,
"SGSN", HFILL}
},
{ &hf_gtpv2_tra_info_sgsn_reserved,
- {"Reserved", "gtpv2.",
+ {"Reserved", "gtpv2.tra_info_sgsn_reserved",
FT_UINT8, BASE_DEC, NULL, 0x0,
"SGSN", HFILL}
},
diff --git a/epan/dissectors/packet-idrp.c b/epan/dissectors/packet-idrp.c
index af827b7fb9..105bf9a977 100644
--- a/epan/dissectors/packet-idrp.c
+++ b/epan/dissectors/packet-idrp.c
@@ -1494,12 +1494,12 @@ void proto_register_idrp(void)
HFILL}},
{&hf_idrp_update_nlri_addr_length,
{"NLRI Address Length",
- "idrp.update.nlri.addr-length.", FT_UINT16, BASE_DEC,
+ "idrp.update.nlri.addr-length", FT_UINT16, BASE_DEC,
NULL, 0, NULL ,
HFILL}},
{&hf_idrp_update_nlri_addr_info_nb_bits,
{"NLRI Address Info Bits",
- "idrp.update.nlri.addr-info-bits.", FT_UINT8, BASE_DEC,
+ "idrp.update.nlri.addr-info-bits", FT_UINT8, BASE_DEC,
NULL, 0, NULL ,
HFILL}},
{&hf_idrp_update_nlri_addr_info,
diff --git a/epan/dissectors/packet-ldap.c b/epan/dissectors/packet-ldap.c
index a4eaad5568..d3b2fa2c76 100644
--- a/epan/dissectors/packet-ldap.c
+++ b/epan/dissectors/packet-ldap.c
@@ -4988,7 +4988,7 @@ void proto_register_ldap(void) {
TFS(&tfs_ads_rodc), 0x00000800, "Is this an read only dc?", HFILL }},
{ &hf_mscldap_netlogon_flags_wdc,
- { "WDC", "mscldap.netlogon.flags.writabledc.", FT_BOOLEAN, 32,
+ { "WDC", "mscldap.netlogon.flags.writabledc", FT_BOOLEAN, 32,
TFS(&tfs_ads_wdc), 0x00001000, "Is this an writable dc (Windows 2008)?", HFILL }},
{ &hf_mscldap_netlogon_flags_dns,
diff --git a/epan/dissectors/packet-nfapi.c b/epan/dissectors/packet-nfapi.c
index cf60491885..31f6aac88c 100644
--- a/epan/dissectors/packet-nfapi.c
+++ b/epan/dissectors/packet-nfapi.c
@@ -9111,7 +9111,7 @@ void proto_register_nfapi(void)
"The number of cell specific transmit antenna ports within the DRS occasions", HFILL }
},
{ &hf_nfapi_transmission_power_for_drs,
- { "Transmission power for DRS", "nfapi.transmission.power.for.drs.",
+ { "Transmission power for DRS", "nfapi.transmission.power.for.drs",
FT_UINT16, BASE_CUSTOM, CF_FUNC(power_offset_conversion_fn), 0x0,
"Offset of cell specific Reference signals power within DRS occasions to the reference signal power", HFILL }
},
@@ -10205,7 +10205,7 @@ void proto_register_nfapi(void)
"Valid for DCI format 6-2", HFILL }
},
{ &hf_nfapi_number_of_tx_antenna_ports,
- { "Number of TX Antenna ports", "nfapi.num.of.tx.antenna.ports.",
+ { "Number of TX Antenna ports", "nfapi.num.of.tx.antenna.ports",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Number of TX physical antenna ports", HFILL }
},
@@ -11135,7 +11135,7 @@ void proto_register_nfapi(void)
"Indicates HARQ results", HFILL }
},
{ &hf_nfapi_harq_tb_1,
- { "HARQ TB1", "nfapi.harq.tb.",
+ { "HARQ TB1", "nfapi.harq.tb.1",
FT_UINT8, BASE_DEC, VALS(harq_value_vals), 0x0,
"HARQ feedback of 1st TB.", HFILL }
},
diff --git a/epan/dissectors/packet-obex.c b/epan/dissectors/packet-obex.c
index 021e5f3354..9dd56681c3 100644
--- a/epan/dissectors/packet-obex.c
+++ b/epan/dissectors/packet-obex.c
@@ -3580,7 +3580,7 @@ proto_register_obex(void)
NULL, HFILL}
},
{ &hf_ctn_application_parameter_data_parameter_mask_alarm_status,
- { "Alarm Status", "obex.parameter.ctn.parameter_mask.",
+ { "Alarm Status", "obex.parameter.ctn.parameter_mask.alarm_status",
FT_UINT32, BASE_HEX, NULL, 0x00000080,
NULL, HFILL}
},
diff --git a/epan/dissectors/packet-reload.c b/epan/dissectors/packet-reload.c
index 0ad6853286..8145411a8a 100644
--- a/epan/dissectors/packet-reload.c
+++ b/epan/dissectors/packet-reload.c
@@ -4761,7 +4761,7 @@ proto_register_reload(void)
}
},
{ &hf_reload_signature_value,
- { "signature_value", "reload.signature.value.", FT_NONE,
+ { "signature_value", "reload.signature.value", FT_NONE,
BASE_NONE, NULL, 0x0, NULL, HFILL
}
},
@@ -5171,7 +5171,7 @@ proto_register_reload(void)
},
{ &hf_reload_configupdatereq,
- { "ConfigUpdateReq", "reload.configupdatereq.", FT_NONE,
+ { "ConfigUpdateReq", "reload.configupdatereq", FT_NONE,
BASE_NONE, NULL, 0x0, NULL, HFILL
}
},
diff --git a/epan/dissectors/packet-ses.c b/epan/dissectors/packet-ses.c
index a6c7211126..8f474df0fe 100644
--- a/epan/dissectors/packet-ses.c
+++ b/epan/dissectors/packet-ses.c
@@ -1332,7 +1332,7 @@ proto_register_ses(void)
&hf_session_exception_report,
{
"Session exception report",
- "ses.exception_report.",
+ "ses.exception_report",
FT_BOOLEAN, 16,
NULL,
SES_EXCEPTION_REPORT,
diff --git a/epan/dissectors/packet-srvloc.c b/epan/dissectors/packet-srvloc.c
index d7d437433e..629ca78607 100644
--- a/epan/dissectors/packet-srvloc.c
+++ b/epan/dissectors/packet-srvloc.c
@@ -1473,7 +1473,7 @@ proto_register_srvloc(void)
},
{ &hf_srvloc_flags_v1_overflow,
- { "Overflow", "srvloc.flags_v1.overflow.", FT_BOOLEAN, 8,
+ { "Overflow", "srvloc.flags_v1.overflow", FT_BOOLEAN, 8,
TFS(&tfs_srvloc_flags_overflow), FLAG_O, "Can whole packet fit into a datagram?", HFILL }},
{ &hf_srvloc_flags_v1_monolingual,
diff --git a/epan/dissectors/packet-umts_fp.c b/epan/dissectors/packet-umts_fp.c
index 796e109a6d..3d12354d96 100644
--- a/epan/dissectors/packet-umts_fp.c
+++ b/epan/dissectors/packet-umts_fp.c
@@ -6751,11 +6751,11 @@ void proto_register_fp(void)
};
static ei_register_info ei[] = {
- { &ei_fp_bad_header_checksum, { "fp.header.bad_checksum.", PI_CHECKSUM, PI_WARN, "Bad header checksum.", EXPFILL }},
+ { &ei_fp_bad_header_checksum, { "fp.header.bad_checksum", PI_CHECKSUM, PI_WARN, "Bad header checksum.", EXPFILL }},
{ &ei_fp_crci_no_subdissector, { "fp.crci.no_subdissector", PI_UNDECODED, PI_NOTE, "Not sent to subdissectors as CRCI is set", EXPFILL }},
{ &ei_fp_crci_error_bit_set_for_tb, { "fp.crci.error_bit_set_for_tb", PI_CHECKSUM, PI_WARN, "CRCI error bit set for TB", EXPFILL }},
{ &ei_fp_spare_extension, { "fp.spare-extension.expert", PI_UNDECODED, PI_WARN, "Spare Extension present (%u bytes)", EXPFILL }},
- { &ei_fp_bad_payload_checksum, { "fp.payload-crc.bad.", PI_CHECKSUM, PI_WARN, "Bad payload checksum.", EXPFILL }},
+ { &ei_fp_bad_payload_checksum, { "fp.payload-crc.bad", PI_CHECKSUM, PI_WARN, "Bad payload checksum.", EXPFILL }},
{ &ei_fp_stop_hsdpa_transmission, { "fp.stop_hsdpa_transmission", PI_RESPONSE_CODE, PI_NOTE, "Stop HSDPA transmission", EXPFILL }},
{ &ei_fp_timing_adjustmentment_reported, { "fp.timing_adjustmentment_reported", PI_SEQUENCE, PI_WARN, "Timing adjustmentment reported (%f ms)", EXPFILL }},
{ &ei_fp_expecting_tdd, { "fp.expecting_tdd", PI_MALFORMED, PI_NOTE, "Error: expecting TDD-384 or TDD-768", EXPFILL }},
diff --git a/epan/dissectors/packet-zbee-zcl-general.c b/epan/dissectors/packet-zbee-zcl-general.c
index 28dda3d904..6d673f177f 100644
--- a/epan/dissectors/packet-zbee-zcl-general.c
+++ b/epan/dissectors/packet-zbee-zcl-general.c
@@ -6506,11 +6506,11 @@ proto_register_zbee_zcl_analog_output_basic(void)
0x00, NULL, HFILL } },
{ &hf_zbee_zcl_analog_output_basic_priority_array,
- { "Priority Array", "zbee_zcl_general.analog_output_basic.priority_array.", FT_NONE, BASE_NONE, NULL,
+ { "Priority Array", "zbee_zcl_general.analog_output_basic.priority_array", FT_NONE, BASE_NONE, NULL,
0x00, NULL, HFILL } },
{ &hf_zbee_zcl_analog_output_basic_structure,
- { "Structure", "zbee_zcl_general.analog_output_basic.structure.", FT_NONE, BASE_NONE, NULL,
+ { "Structure", "zbee_zcl_general.analog_output_basic.structure", FT_NONE, BASE_NONE, NULL,
0x00, NULL, HFILL } }
};
@@ -6789,11 +6789,11 @@ proto_register_zbee_zcl_analog_value_basic(void)
0x00, NULL, HFILL } },
{ &hf_zbee_zcl_analog_value_basic_priority_array,
- { "Priority Array", "zbee_zcl_general.analog_value_basic.priority_array.", FT_NONE, BASE_NONE, NULL,
+ { "Priority Array", "zbee_zcl_general.analog_value_basic.priority_array", FT_NONE, BASE_NONE, NULL,
0x00, NULL, HFILL } },
{ &hf_zbee_zcl_analog_value_basic_structure,
- { "Structure", "zbee_zcl_general.analog_value_basic.structure.", FT_NONE, BASE_NONE, NULL,
+ { "Structure", "zbee_zcl_general.analog_value_basic.structure", FT_NONE, BASE_NONE, NULL,
0x00, NULL, HFILL } }
};
@@ -7350,11 +7350,11 @@ proto_register_zbee_zcl_binary_output_basic(void)
0x00, NULL, HFILL } },
{ &hf_zbee_zcl_binary_output_basic_priority_array,
- { "Priority Array", "zbee_zcl_general.binary_output_basic.priority_array.", FT_NONE, BASE_NONE, NULL,
+ { "Priority Array", "zbee_zcl_general.binary_output_basic.priority_array", FT_NONE, BASE_NONE, NULL,
0x00, NULL, HFILL } },
{ &hf_zbee_zcl_binary_output_basic_structure,
- { "Structure", "zbee_zcl_general.binary_output_basic.structure.", FT_NONE, BASE_NONE, NULL,
+ { "Structure", "zbee_zcl_general.binary_output_basic.structure", FT_NONE, BASE_NONE, NULL,
0x00, NULL, HFILL } }
};
@@ -7639,11 +7639,11 @@ proto_register_zbee_zcl_binary_value_basic(void)
0x00, NULL, HFILL } },
{ &hf_zbee_zcl_binary_value_basic_priority_array,
- { "Priority Array", "zbee_zcl_general.binary_value_basic.priority_array.", FT_NONE, BASE_NONE, NULL,
+ { "Priority Array", "zbee_zcl_general.binary_value_basic.priority_array", FT_NONE, BASE_NONE, NULL,
0x00, NULL, HFILL } },
{ &hf_zbee_zcl_binary_value_basic_structure,
- { "Structure", "zbee_zcl_general.binary_value_basic.structure.", FT_NONE, BASE_NONE, NULL,
+ { "Structure", "zbee_zcl_general.binary_value_basic.structure", FT_NONE, BASE_NONE, NULL,
0x00, NULL, HFILL } }
};
@@ -8162,11 +8162,11 @@ proto_register_zbee_zcl_multistate_output_basic(void)
0x00, NULL, HFILL } } ,
{ &hf_zbee_zcl_multistate_output_basic_priority_array,
- { "Priority Array", "zbee_zcl_general.multistate_output_basic.priority_array.", FT_NONE, BASE_NONE, NULL,
+ { "Priority Array", "zbee_zcl_general.multistate_output_basic.priority_array", FT_NONE, BASE_NONE, NULL,
0x00, NULL, HFILL } },
{ &hf_zbee_zcl_multistate_output_basic_structure,
- { "Structure", "zbee_zcl_general.multistate_output_basic.structure.", FT_NONE, BASE_NONE, NULL,
+ { "Structure", "zbee_zcl_general.multistate_output_basic.structure", FT_NONE, BASE_NONE, NULL,
0x00, NULL, HFILL } }
};
@@ -8452,11 +8452,11 @@ proto_register_zbee_zcl_multistate_value_basic(void)
0x00, NULL, HFILL } },
{ &hf_zbee_zcl_multistate_value_basic_priority_array,
- { "Priority Array", "zbee_zcl_general.multistate_value_basic.priority_array.", FT_NONE, BASE_NONE, NULL,
+ { "Priority Array", "zbee_zcl_general.multistate_value_basic.priority_array", FT_NONE, BASE_NONE, NULL,
0x00, NULL, HFILL } },
{ &hf_zbee_zcl_multistate_value_basic_structure,
- { "Structure", "zbee_zcl_general.multistate_value_basic.structure.", FT_NONE, BASE_NONE, NULL,
+ { "Structure", "zbee_zcl_general.multistate_value_basic.structure", FT_NONE, BASE_NONE, NULL,
0x00, NULL, HFILL } }
};
@@ -15317,7 +15317,7 @@ proto_register_zbee_zcl_gp(void)
/* GP Sink Commissioning Mode command */
{ &hf_zbee_zcl_gp_cmd_sink_comm_mode_options,
- { "Options", "zbee_zcl_general.gp.sink_comm_mode.", FT_UINT8, BASE_HEX,
+ { "Options", "zbee_zcl_general.gp.sink_comm_mode.options", FT_UINT8, BASE_HEX,
NULL, 0, NULL, HFILL }},
{ &hf_zbee_zcl_gp_cmd_sink_comm_mode_options_fld_action,
@@ -15575,7 +15575,7 @@ proto_register_zbee_zcl_gp(void)
{ "Translation Table", "zbee_zcl_general.gp.attr.gps_func.translation_table", FT_BOOLEAN, 24,
NULL, ZBEE_ZCL_GP_ATTR_GPS_FUNC_FLD_TRANSLATION_TABLE, NULL, HFILL }},
{ &hf_zbee_zcl_gp_attr_gps_func_fld_gpd_ieee_address,
- { "GPD IEEE address", "zbee_zcl_general.gp.attr.gps_func.", FT_BOOLEAN, 24,
+ { "GPD IEEE address", "zbee_zcl_general.gp.attr.gps_func.gpd_ieee_address", FT_BOOLEAN, 24,
NULL, ZBEE_ZCL_GP_ATTR_GPS_FUNC_FLD_GPD_IEEE_ADDRESS, NULL, HFILL }},
/* gpsActiveFunctionality attribute */
diff --git a/epan/proto.c b/epan/proto.c
index ebfa903b81..fc9d6e0798 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -409,18 +409,6 @@ proto_compare_name(gconstpointer p1_arg, gconstpointer p2_arg)
return g_ascii_strcasecmp(p1->short_name, p2->short_name);
}
-static inline guchar
-check_charset(const guint8 table[256], const char *str)
-{
- const char *p = str;
- guchar c;
-
- do {
- c = *(p++);
- } while (table[c]);
- return c;
-}
-
#ifdef HAVE_PLUGINS
static GSList *dissector_plugins = NULL;
@@ -6442,15 +6430,34 @@ proto_tree_set_appendix(proto_tree *tree, tvbuff_t *tvb, gint start,
fi->appendix_length = length;
}
+static void
+check_valid_filter_name_or_fail(const char *filter_name)
+{
+ gboolean found_invalid = proto_check_field_name(filter_name);
+
+ /* Additionally forbid upper case characters. */
+ if (!found_invalid) {
+ for (guint i = 0; filter_name[i]; i++) {
+ if (g_ascii_isupper(filter_name[i])) {
+ found_invalid = TRUE;
+ break;
+ }
+ }
+ }
+
+ if (found_invalid) {
+ g_error("Protocol filter name \"%s\" has one or more invalid characters."
+ " Allowed are lower characters, digits, '-', '_' and non-repeating '.'."
+ " This might be caused by an inappropriate plugin or a development error.", filter_name);
+ }
+}
+
int
proto_register_protocol(const char *name, const char *short_name,
const char *filter_name)
{
protocol_t *protocol;
header_field_info *hfinfo;
- guint i;
- gchar c;
- gboolean found_invalid;
/*
* Make sure there's not already a protocol with any of those
@@ -6471,18 +6478,7 @@ proto_register_protocol(const char *name, const char *short_name,
" This might be caused by an inappropriate plugin or a development error.", short_name);
}
- found_invalid = FALSE;
- for (i = 0; filter_name[i]; i++) {
- c = filter_name[i];
- if (!(g_ascii_islower(c) || g_ascii_isdigit(c) || c == '-' || c == '_' || c == '.')) {
- found_invalid = TRUE;
- }
- }
- if (found_invalid) {
- g_error("Protocol filter name \"%s\" has one or more invalid characters."
- " Allowed are lower characters, digits, '-', '_' and '.'."
- " This might be caused by an inappropriate plugin or a development error.", filter_name);
- }
+ check_valid_filter_name_or_fail(filter_name);
if (g_hash_table_lookup(proto_filter_names, filter_name)) {
g_error("Duplicate protocol filter_name \"%s\"!"
@@ -6531,9 +6527,6 @@ proto_register_protocol_in_name_only(const char *name, const char *short_name, c
{
protocol_t *protocol;
header_field_info *hfinfo;
- guint i;
- gchar c;
- gboolean found_invalid = FALSE;
/*
* Helper protocols don't need the strict rules as a "regular" protocol
@@ -6548,17 +6541,7 @@ proto_register_protocol_in_name_only(const char *name, const char *short_name, c
" This might be caused by an inappropriate plugin or a development error.", name);
}
- for (i = 0; filter_name[i]; i++) {
- c = filter_name[i];
- if (!(g_ascii_islower(c) || g_ascii_isdigit(c) || c == '-' || c == '_' || c == '.')) {
- found_invalid = TRUE;
- }
- }
- if (found_invalid) {
- g_error("Protocol filter name \"%s\" has one or more invalid characters."
- " Allowed are lower characters, digits, '-', '_' and '.'."
- " This might be caused by an inappropriate plugin or a development error.", filter_name);
- }
+ check_valid_filter_name_or_fail(filter_name);
/* Add this protocol to the list of helper protocols (just so it can be properly freed) */
protocol = g_new(protocol_t, 1);
@@ -7242,7 +7225,7 @@ proto_free_deregistered_fields (void)
deregistered_data = g_ptr_array_new();
}
-/* chars allowed in field abbrev */
+/* chars allowed in field abbrev: alphanumerics, '-', "_", and ".". */
static
const guint8 fld_abbrev_chars[256] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00-0x0F */
@@ -7883,12 +7866,15 @@ proto_register_field_init(header_field_info *hfinfo, const int parent)
/* Check that the filter name (abbreviation) is legal;
* it must contain only alphanumerics, '-', "_", and ".". */
- c = check_charset(fld_abbrev_chars, hfinfo->abbrev);
+ c = proto_check_field_name(hfinfo->abbrev);
if (c) {
- if (g_ascii_isprint(c))
+ if (c == '.') {
+ fprintf(stderr, "Invalid leading, duplicated or trailing '.' found in filter name '%s'\n", hfinfo->abbrev);
+ } else if (g_ascii_isprint(c)) {
fprintf(stderr, "Invalid character '%c' in filter name '%s'\n", c, hfinfo->abbrev);
- else
+ } else {
fprintf(stderr, "Invalid byte \\%03o in filter name '%s'\n", c, hfinfo->abbrev);
+ }
DISSECTOR_ASSERT_NOT_REACHED();
}
@@ -11834,7 +11820,23 @@ proto_tree_add_checksum(proto_tree *tree, tvbuff_t *tvb, const guint offset,
guchar
proto_check_field_name(const gchar *field_name)
{
- return check_charset(fld_abbrev_chars, field_name);
+ const char *p = field_name;
+ guchar c = '.', lastc;
+
+ do {
+ lastc = c;
+ c = *(p++);
+ /* Leading '.' or substring ".." are disallowed. */
+ if (c == '.' && lastc == '.') {
+ break;
+ }
+ } while (fld_abbrev_chars[c]);
+
+ /* Trailing '.' is disallowed. */
+ if (lastc == '.') {
+ return '.';
+ }
+ return c;
}
gboolean
diff --git a/plugins/epan/wimaxmacphy/packet-wimaxmacphy.c b/plugins/epan/wimaxmacphy/packet-wimaxmacphy.c
index fac9648bcb..202fd30546 100644
--- a/plugins/epan/wimaxmacphy/packet-wimaxmacphy.c
+++ b/plugins/epan/wimaxmacphy/packet-wimaxmacphy.c
@@ -5243,7 +5243,7 @@ proto_register_wimaxmacphy(void)
&hf_wimaxmacphy_ul_sub_burst_sounding_power_boost,
{
"Power boost",
- "wimaxmacphy.",
+ "wimaxmacphy.sub_burst_sounding_power_boost",
FT_UINT8,
BASE_DEC,
VALS(wimaxmacphy_ul_sub_burst_sounding_power_boost_vals),