aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2014-03-03 16:10:35 -0500
committerBill Meier <wmeier@newsguy.com>2014-03-03 21:15:13 +0000
commit4ddd7a637e8715f099ef804d08b169e0df0f0b7a (patch)
treefeebf6a65a2d0c93d112666cc8dc62ae8bff792c
parent1795b4021c43c3a8bfc90a4303fb9ce17f5f26bd (diff)
Create/use extended value_strings; add editor modelines as needed.
Change-Id: I36ebee937ddd1c5ccbfa36f284a4794bc63631dc Reviewed-on: https://code.wireshark.org/review/482 Reviewed-by: Bill Meier <wmeier@newsguy.com> Tested-by: Bill Meier <wmeier@newsguy.com>
-rw-r--r--epan/dissectors/packet-etsi_card_app_toolkit.c74
-rw-r--r--epan/dissectors/packet-nfs.c7
-rw-r--r--epan/dissectors/packet-selfm.c370
-rw-r--r--epan/dissectors/packet-sigcomp.c36
-rw-r--r--epan/dissectors/packet-sysex.c104
5 files changed, 336 insertions, 255 deletions
diff --git a/epan/dissectors/packet-etsi_card_app_toolkit.c b/epan/dissectors/packet-etsi_card_app_toolkit.c
index 57a9cb9924..ab72f5a8bf 100644
--- a/epan/dissectors/packet-etsi_card_app_toolkit.c
+++ b/epan/dissectors/packet-etsi_card_app_toolkit.c
@@ -272,6 +272,7 @@ static const value_string comp_tlv_tag_vals[] = {
{ 0xbb, "Surrounding macrocells" },
{ 0, NULL }
};
+static value_string_ext comp_tlv_tag_vals_ext = VALUE_STRING_EXT_INIT(comp_tlv_tag_vals);
/* TS 102 223 Chapter 8.6 */
static const value_string cmd_qual_refresh_vals[] = {
@@ -286,10 +287,12 @@ static const value_string cmd_qual_refresh_vals[] = {
{ 0x08, "Steering of Roaming for I-WLAN" },
{ 0, NULL }
};
+
static const true_false_string cmd_qual_send_short_msg_value = {
"SMS packing by the terminal required",
"Packing not required"
};
+
static const value_string cmd_qual_loci_vals[] = {
{ 0x00, "Location Information (MCC, MNC, LAC/TAC, Cell Identity and Extended Cell Identity)" },
{ 0x01, "IMEI of the terminal" },
@@ -313,12 +316,15 @@ static const value_string cmd_qual_loci_vals[] = {
{ 0x13, "H(e)NB surrounding macrocells" },
{ 0, NULL }
};
+static value_string_ext cmd_qual_loci_vals_ext = VALUE_STRING_EXT_INIT(cmd_qual_loci_vals);
+
static const value_string cmd_qual_timer_mgmt_vals[] = {
{ 0x00, "Start" },
{ 0x01, "Deactivate" },
{ 0x02, "Get current value" },
{ 0, NULL }
};
+
static const true_false_string cmd_qual_send_data_value = {
"Send data immediately",
"Store data in Tx buffer"
@@ -349,6 +355,7 @@ static const value_string dev_id_vals[] = {
{ 0x83, "Network" },
{ 0, NULL }
};
+static value_string_ext dev_id_vals_ext = VALUE_STRING_EXT_INIT(dev_id_vals);
/* TS 102 223 Chapter 9.4 */
static const value_string cmd_type_vals[] = {
@@ -397,6 +404,7 @@ static const value_string cmd_type_vals[] = {
{ 0x81, "End of the proactive session" },
{ 0, NULL }
};
+static value_string_ext cmd_type_vals_ext = VALUE_STRING_EXT_INIT(cmd_type_vals);
/* TS 102 223 Chapter 8.8 */
static const value_string time_unit_vals[] = {
@@ -447,6 +455,8 @@ static const value_string result_vals[] = {
{ 0x3d, "MMS error" },
{ 0, NULL }
};
+static value_string_ext result_vals_ext = VALUE_STRING_EXT_INIT(result_vals);
+
static const value_string result_term_vals[] = {
{ 0x00, "No specific cause can be given" },
{ 0x01, "Screen is busy" },
@@ -461,6 +471,8 @@ static const value_string result_term_vals[] = {
{ 0x0a, "No NAA active" },
{ 0, NULL }
};
+static value_string_ext result_term_vals_ext = VALUE_STRING_EXT_INIT(result_term_vals);
+
static const value_string result_launch_browser_vals[] = {
{ 0x00, "No specific cause can be given" },
{ 0x01, "Bearer unavailable" },
@@ -468,6 +480,7 @@ static const value_string result_launch_browser_vals[] = {
{ 0x03, "Terminal unable to read the provisioning data" },
{ 0, NULL }
};
+
static const value_string result_multiplecard_vals[] = {
{ 0x00, "No specific cause can be given" },
{ 0x01, "Card reader removed or not present" },
@@ -481,12 +494,15 @@ static const value_string result_multiplecard_vals[] = {
{ 0x09, "Specified reader not valid" },
{ 0, NULL }
};
+static value_string_ext result_multiplecard_vals_ext = VALUE_STRING_EXT_INIT(result_multiplecard_vals);
+
static const value_string result_cc_ctrl_mo_sm_ctrl_vals[] = {
{ 0x00, "No specific cause can be given" },
{ 0x01, "Action not allowed" },
{ 0x02, "The type of request has changed" },
{ 0, NULL }
};
+
static const value_string result_bip_vals[] = {
{ 0x00, "No specific cause can be given" },
{ 0x01, "No channel available" },
@@ -503,6 +519,8 @@ static const value_string result_bip_vals[] = {
{ 0x12, "Application launch failed" },
{ 0, NULL }
};
+static value_string_ext result_bip_vals_ext = VALUE_STRING_EXT_INIT(result_bip_vals);
+
static const value_string result_frames_cmd_vals[] = {
{ 0x00, "No specific cause can be given" },
{ 0x01, "Frame identifier is not valid" },
@@ -559,6 +577,7 @@ static const value_string tone_vals[] = {
{ 0x47, "Melody 8" },
{ 0, NULL }
};
+static value_string_ext tone_vals_ext = VALUE_STRING_EXT_INIT(tone_vals);
/* TS 102 223 - Chapter 8.25 */
static const value_string event_list_vals[] = {
@@ -591,6 +610,7 @@ static const value_string event_list_vals[] = {
{ 0x1a, "Void" },
{ 0, NULL }
};
+static value_string_ext event_list_vals_ext = VALUE_STRING_EXT_INIT(event_list_vals);
/* TS 102 223 - Chapter 8.27 */
static const value_string loc_status_vals[] = {
@@ -632,6 +652,7 @@ static const value_string bearer_descr_vals[] = {
{ 0x10, "USB" },
{ 0, NULL }
};
+static value_string_ext bearer_descr_vals_ext = VALUE_STRING_EXT_INIT(bearer_descr_vals);
/* 3GPP 31.111 - Chapter 8.52 */
static const value_string csd_data_rate_vals[] = {
@@ -681,6 +702,8 @@ static const value_string csd_data_rate_vals[] = {
{ 134, "64000 bps (multimedia)" },
{ 0, NULL }
};
+static value_string_ext csd_data_rate_vals_ext = VALUE_STRING_EXT_INIT(csd_data_rate_vals);
+
static const value_string csd_bearer_serv_vals[] = {
{ 0, "Data circuit asynchronous (UDI or 3.1 kHz modem)" },
{ 1, "Data circuit synchronous (UDI or 3.1 kHz modem)" },
@@ -798,6 +821,7 @@ static const value_string upd_attach_type_vals[] = {
{ 0x0E, "\"Periodic updating\" in the case of an EMM TRACKING AREA UPDATE REQUEST message" },
{ 0, NULL }
};
+static value_string_ext upd_attach_type_vals_ext = VALUE_STRING_EXT_INIT(upd_attach_type_vals);
/* 3GPP 31.111 - Chapter 8.112 */
static const string_string ims_status_code[] = {
@@ -943,12 +967,12 @@ dissect_cat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
#if 1
ti = proto_tree_add_bytes_format(cat_tree, hf_cat_tlv, tvb, pos,
len, ptr, "%s: %s",
- val_to_str(tag, comp_tlv_tag_vals, "%02x"),
+ val_to_str_ext(tag, &comp_tlv_tag_vals_ext, "%02x"),
(const guint8 *)tvb_bytes_to_ep_str(tvb, pos, len));
#else
ti = proto_tree_add_bytes_format(cat_tree, hf_cat_tlv, tvb, pos,
len, ptr, "%s: ",
- val_to_str(tag, comp_tlv_tag_vals, "%02x"));
+ val_to_str_ext(tag, &comp_tlv_tag_vals_ext, "%02x"));
#endif
elem_tree = proto_item_add_subtree(ti, ett_elem);
@@ -961,7 +985,7 @@ dissect_cat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
/* append command type to INFO column */
g8 = tvb_get_guint8(tvb, pos+1);
col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",
- val_to_str(g8, cmd_type_vals, "%02x "));
+ val_to_str_ext(g8, &cmd_type_vals_ext, "%02x "));
switch (g8) {
case 0x01:
proto_tree_add_item(elem_tree, hf_ctlv_cmd_qual_refresh, tvb, pos+2, 1, ENC_NA);
@@ -1035,7 +1059,7 @@ dissect_cat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
new_tvb = tvb_new_subset(tvb, pos, len, len);
if (new_tvb) {
int p2p_dir_save = pinfo->p2p_dir;
- if (data) {
+ if (data) {
if (GPOINTER_TO_INT(data) == 0xd0) {
/* Proactive command */
pinfo->p2p_dir = P2P_DIR_RECV;
@@ -1106,7 +1130,7 @@ dissect_cat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
}
proto_tree_add_uint(elem_tree, hf_ctlv_event, tvb, pos+i, 1, event);
col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",
- val_to_str(event, event_list_vals, "%02x "));
+ val_to_str_ext(event, &event_list_vals_ext, "%02x "));
}
break;
case 0x1b: /* location status */
@@ -1327,12 +1351,12 @@ proto_register_card_app_toolkit(void)
},
{ &hf_ctlv_devid_src,
{ "Source Device ID", "etsi_cat.comp_tlv.src_dev",
- FT_UINT8, BASE_HEX, VALS(dev_id_vals), 0,
+ FT_UINT8, BASE_HEX | BASE_EXT_STRING, &dev_id_vals_ext, 0,
NULL, HFILL },
},
{ &hf_ctlv_devid_dst,
{ "Destination Device ID", "etsi_cat.comp_tlv.dst_dev",
- FT_UINT8, BASE_HEX, VALS(dev_id_vals), 0,
+ FT_UINT8, BASE_HEX | BASE_EXT_STRING, &dev_id_vals_ext, 0,
NULL, HFILL },
},
{ &hf_ctlv_cmd_nr,
@@ -1342,7 +1366,7 @@ proto_register_card_app_toolkit(void)
},
{ &hf_ctlv_cmd_type,
{ "Command Type", "etsi_cat.comp_tlv.cmd_type",
- FT_UINT8, BASE_HEX, VALS(cmd_type_vals), 0,
+ FT_UINT8, BASE_HEX | BASE_EXT_STRING, &cmd_type_vals_ext, 0,
NULL, HFILL },
},
{ &hf_ctlv_cmd_qual_refresh,
@@ -1357,7 +1381,7 @@ proto_register_card_app_toolkit(void)
},
{ &hf_ctlv_cmd_qual_loci,
{ "Command Qualifier", "etsi_cat.comp_tlv.cmd_qual.loci",
- FT_UINT8, BASE_HEX, VALS(cmd_qual_loci_vals), 0,
+ FT_UINT8, BASE_HEX | BASE_EXT_STRING, &cmd_qual_loci_vals_ext, 0,
NULL, HFILL },
},
{ &hf_ctlv_cmd_qual_timer_mgmt,
@@ -1387,12 +1411,12 @@ proto_register_card_app_toolkit(void)
},
{ &hf_ctlv_result_gen,
{ "Result", "etsi_cat.comp_tlv.result",
- FT_UINT8, BASE_HEX, VALS(result_vals), 0,
+ FT_UINT8, BASE_HEX | BASE_EXT_STRING, &result_vals_ext, 0,
NULL, HFILL },
},
{ &hf_ctlv_result_term,
{ "Additional information", "etsi_cat.comp_tlv.result.term",
- FT_UINT8, BASE_HEX, VALS(result_term_vals), 0,
+ FT_UINT8, BASE_HEX | BASE_EXT_STRING, &result_term_vals_ext, 0,
NULL, HFILL },
},
{ &hf_ctlv_result_launch_browser,
@@ -1402,7 +1426,7 @@ proto_register_card_app_toolkit(void)
},
{ &hf_ctlv_result_multiplecard,
{ "Additional information", "etsi_cat.comp_tlv.result.multiplecard",
- FT_UINT8, BASE_HEX, VALS(result_multiplecard_vals), 0,
+ FT_UINT8, BASE_HEX | BASE_EXT_STRING, &result_multiplecard_vals_ext, 0,
NULL, HFILL },
},
{ &hf_ctlv_result_cc_ctrl_mo_sm_ctrl,
@@ -1412,7 +1436,7 @@ proto_register_card_app_toolkit(void)
},
{ &hf_ctlv_result_bip,
{ "Additional information", "etsi_cat.comp_tlv.result.bip",
- FT_UINT8, BASE_HEX, VALS(result_bip_vals), 0,
+ FT_UINT8, BASE_HEX | BASE_EXT_STRING, &result_bip_vals_ext, 0,
NULL, HFILL },
},
{ &hf_ctlv_result_frames_cmd,
@@ -1432,12 +1456,12 @@ proto_register_card_app_toolkit(void)
},
{ &hf_ctlv_event,
{ "Event", "etsi_cat.comp_tlv.event",
- FT_UINT8, BASE_HEX, VALS(event_list_vals), 0,
+ FT_UINT8, BASE_HEX | BASE_EXT_STRING, &event_list_vals_ext, 0,
NULL, HFILL },
},
{ &hf_ctlv_tone,
{ "Tone", "etsi_cat.comp_tlv.tone",
- FT_UINT8, BASE_HEX, VALS(tone_vals), 0,
+ FT_UINT8, BASE_HEX | BASE_EXT_STRING, &tone_vals_ext, 0,
NULL, HFILL },
},
{ &hf_ctlv_loc_status,
@@ -1567,12 +1591,12 @@ proto_register_card_app_toolkit(void)
},
{ &hf_ctlv_bearer_descr,
{ "Bearer Description", "etsi_cat.comp_tlv.bearer.descr",
- FT_UINT8, BASE_HEX, VALS(bearer_descr_vals), 0,
+ FT_UINT8, BASE_HEX | BASE_EXT_STRING, &bearer_descr_vals_ext, 0,
NULL, HFILL },
},
{ &hf_ctlv_bearer_csd_data_rate,
{ "Data Rate", "etsi_cat.comp_tlv.bearer.csd.data_rate",
- FT_UINT8, BASE_DEC, VALS(csd_data_rate_vals), 0,
+ FT_UINT8, BASE_DEC | BASE_EXT_STRING, &csd_data_rate_vals_ext, 0,
NULL, HFILL },
},
{ &hf_ctlv_bearer_csd_bearer_serv,
@@ -1727,7 +1751,7 @@ proto_register_card_app_toolkit(void)
},
{ &hf_ctlv_upd_attach_type,
{ "UTRAN/E-UTRAN Measurement Qualifier", "etsi_cat.comp_tlv.upd_attach_type",
- FT_UINT8, BASE_HEX, VALS(upd_attach_type_vals), 0,
+ FT_UINT8, BASE_HEX | BASE_EXT_STRING, &upd_attach_type_vals_ext, 0,
NULL, HFILL },
},
{ &hf_ctlv_loci_lac,
@@ -1783,3 +1807,17 @@ proto_reg_handoff_card_app_toolkit(void)
{
gsm_sms_handle = find_dissector("gsm_sms");
}
+
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-nfs.c b/epan/dissectors/packet-nfs.c
index b2a29ee724..dd444bd2fc 100644
--- a/epan/dissectors/packet-nfs.c
+++ b/epan/dissectors/packet-nfs.c
@@ -6569,6 +6569,8 @@ static const value_string acemask4_perms_8_and_above[] = {
{ ACE4_SYNCHRONIZE, "Synchronize" },
{ 0, NULL }
};
+static value_string_ext acemask4_perms_8_and_above_ext = VALUE_STRING_EXT_INIT(acemask4_perms_8_and_above);
+
/* Abbreviated ACE4 permissions for object types 0x8 and above */
static const value_string acemask4_abbrev_perms_8_and_above[] = {
{ ACE4_READ_NAMED_ATTRS, "RdNamAt" },
@@ -6586,6 +6588,7 @@ static const value_string acemask4_abbrev_perms_8_and_above[] = {
{ ACE4_SYNCHRONIZE, "Sync" },
{ 0, NULL }
};
+static value_string_ext acemask4_abbrev_perms_8_and_above_ext = VALUE_STRING_EXT_INIT(acemask4_abbrev_perms_8_and_above);
static int
dissect_nfs4_acemask(tvbuff_t *tvb, int offset, proto_tree *ace_tree, guint32 acetype4, guint32 obj_type)
@@ -6619,8 +6622,8 @@ dissect_nfs4_acemask(tvbuff_t *tvb, int offset, proto_tree *ace_tree, guint32 ac
atype = val_to_str(acemask_bit, acemask4_abbrev_perms_unkwn, "Unknown: %u");
}
} else {
- type = val_to_str(acemask_bit, acemask4_perms_8_and_above, "Unknown: %u");
- atype = val_to_str(acemask_bit, acemask4_abbrev_perms_8_and_above, "Unknown: %u");
+ type = val_to_str_ext(acemask_bit, &acemask4_perms_8_and_above_ext, "Unknown: %u");
+ atype = val_to_str_ext(acemask_bit, &acemask4_abbrev_perms_8_and_above_ext, "Unknown: %u");
}
proto_tree_add_uint_format(acemask_tree, hf_nfs4_ace_permission, tvb, offset, 4,
acemask_bit, "%s: %s (0x%08x)", val_to_str(acetype4, names_acetype4, "Unknown: %u"), type, acemask_bit);
diff --git a/epan/dissectors/packet-selfm.c b/epan/dissectors/packet-selfm.c
index cf853af7ae..d9a6959ae8 100644
--- a/epan/dissectors/packet-selfm.c
+++ b/epan/dissectors/packet-selfm.c
@@ -530,144 +530,146 @@ static const value_string selfm_ser_status_vals[] = {
/* Fast Operate Remote Bit Lookup */
static const value_string selfm_fo_rb_vals[] = {
{ 0x00, "RB01 Clear" },
- { 0x20, "RB01 Set" },
- { 0x40, "RB01 Pulse" },
{ 0x01, "RB02 Clear" },
- { 0x21, "RB02 Set" },
- { 0x41, "RB02 Pulse" },
{ 0x02, "RB03 Clear" },
- { 0x22, "RB03 Set" },
- { 0x42, "RB03 Pulse" },
{ 0x03, "RB04 Clear" },
- { 0x23, "RB04 Set" },
- { 0x43, "RB04 Pulse" },
{ 0x04, "RB05 Clear" },
- { 0x24, "RB05 Set" },
- { 0x44, "RB05 Pulse" },
{ 0x05, "RB06 Clear" },
- { 0x25, "RB06 Set" },
- { 0x45, "RB06 Pulse" },
{ 0x06, "RB07 Clear" },
- { 0x26, "RB07 Set" },
- { 0x46, "RB07 Pulse" },
{ 0x07, "RB08 Clear" },
- { 0x27, "RB08 Set" },
- { 0x47, "RB08 Pulse" },
{ 0x08, "RB09 Clear" },
- { 0x28, "RB09 Set" },
- { 0x48, "RB09 Pulse" },
{ 0x09, "RB10 Clear" },
- { 0x29, "RB10 Set" },
- { 0x49, "RB10 Pulse" },
{ 0x0A, "RB11 Clear" },
- { 0x2A, "RB11 Set" },
- { 0x4A, "RB11 Pulse" },
{ 0x0B, "RB12 Clear" },
- { 0x2B, "RB12 Set" },
- { 0x4B, "RB12 Pulse" },
{ 0x0C, "RB13 Clear" },
- { 0x2C, "RB13 Set" },
- { 0x4C, "RB13 Pulse" },
{ 0x0D, "RB14 Clear" },
- { 0x2D, "RB14 Set" },
- { 0x4D, "RB14 Pulse" },
{ 0x0E, "RB15 Clear" },
- { 0x2E, "RB15 Set" },
- { 0x4E, "RB15 Pulse" },
{ 0x0F, "RB16 Clear" },
- { 0x2F, "RB16 Set" },
- { 0x4F, "RB16 Pulse" },
{ 0x10, "RB17 Clear" },
- { 0x30, "RB17 Set" },
- { 0x50, "RB17 Pulse" },
{ 0x11, "RB18 Clear" },
- { 0x31, "RB18 Set" },
- { 0x51, "RB18 Pulse" },
{ 0x12, "RB19 Clear" },
- { 0x32, "RB19 Set" },
- { 0x52, "RB19 Pulse" },
{ 0x13, "RB20 Clear" },
- { 0x33, "RB20 Set" },
- { 0x53, "RB20 Pulse" },
{ 0x14, "RB21 Clear" },
- { 0x34, "RB21 Set" },
- { 0x54, "RB21 Pulse" },
{ 0x15, "RB22 Clear" },
- { 0x35, "RB22 Set" },
- { 0x55, "RB22 Pulse" },
{ 0x16, "RB23 Clear" },
- { 0x36, "RB23 Set" },
- { 0x56, "RB23 Pulse" },
{ 0x17, "RB24 Clear" },
- { 0x37, "RB24 Set" },
- { 0x57, "RB24 Pulse" },
{ 0x18, "RB25 Clear" },
- { 0x38, "RB25 Set" },
- { 0x58, "RB25 Pulse" },
{ 0x19, "RB26 Clear" },
- { 0x39, "RB26 Set" },
- { 0x59, "RB26 Pulse" },
{ 0x1A, "RB27 Clear" },
- { 0x3A, "RB27 Set" },
- { 0x5A, "RB27 Pulse" },
{ 0x1B, "RB28 Clear" },
- { 0x3B, "RB28 Set" },
- { 0x5B, "RB28 Pulse" },
{ 0x1C, "RB29 Clear" },
- { 0x3C, "RB29 Set" },
- { 0x5C, "RB29 Pulse" },
{ 0x1D, "RB30 Clear" },
- { 0x3D, "RB30 Set" },
- { 0x5D, "RB30 Pulse" },
{ 0x1E, "RB31 Clear" },
- { 0x3E, "RB31 Set" },
- { 0x5E, "RB31 Pulse" },
{ 0x1F, "RB32 Clear" },
+ { 0x20, "RB01 Set" },
+ { 0x21, "RB02 Set" },
+ { 0x22, "RB03 Set" },
+ { 0x23, "RB04 Set" },
+ { 0x24, "RB05 Set" },
+ { 0x25, "RB06 Set" },
+ { 0x26, "RB07 Set" },
+ { 0x27, "RB08 Set" },
+ { 0x28, "RB09 Set" },
+ { 0x29, "RB10 Set" },
+ { 0x2A, "RB11 Set" },
+ { 0x2B, "RB12 Set" },
+ { 0x2C, "RB13 Set" },
+ { 0x2D, "RB14 Set" },
+ { 0x2E, "RB15 Set" },
+ { 0x2F, "RB16 Set" },
+ { 0x30, "RB17 Set" },
+ { 0x31, "RB18 Set" },
+ { 0x32, "RB19 Set" },
+ { 0x33, "RB20 Set" },
+ { 0x34, "RB21 Set" },
+ { 0x35, "RB22 Set" },
+ { 0x36, "RB23 Set" },
+ { 0x37, "RB24 Set" },
+ { 0x38, "RB25 Set" },
+ { 0x39, "RB26 Set" },
+ { 0x3A, "RB27 Set" },
+ { 0x3B, "RB28 Set" },
+ { 0x3C, "RB29 Set" },
+ { 0x3D, "RB30 Set" },
+ { 0x3E, "RB31 Set" },
{ 0x3F, "RB32 Set" },
+ { 0x40, "RB01 Pulse" },
+ { 0x41, "RB02 Pulse" },
+ { 0x42, "RB03 Pulse" },
+ { 0x43, "RB04 Pulse" },
+ { 0x44, "RB05 Pulse" },
+ { 0x45, "RB06 Pulse" },
+ { 0x46, "RB07 Pulse" },
+ { 0x47, "RB08 Pulse" },
+ { 0x48, "RB09 Pulse" },
+ { 0x49, "RB10 Pulse" },
+ { 0x4A, "RB11 Pulse" },
+ { 0x4B, "RB12 Pulse" },
+ { 0x4C, "RB13 Pulse" },
+ { 0x4D, "RB14 Pulse" },
+ { 0x4E, "RB15 Pulse" },
+ { 0x4F, "RB16 Pulse" },
+ { 0x50, "RB17 Pulse" },
+ { 0x51, "RB18 Pulse" },
+ { 0x52, "RB19 Pulse" },
+ { 0x53, "RB20 Pulse" },
+ { 0x54, "RB21 Pulse" },
+ { 0x55, "RB22 Pulse" },
+ { 0x56, "RB23 Pulse" },
+ { 0x57, "RB24 Pulse" },
+ { 0x58, "RB25 Pulse" },
+ { 0x59, "RB26 Pulse" },
+ { 0x5A, "RB27 Pulse" },
+ { 0x5B, "RB28 Pulse" },
+ { 0x5C, "RB29 Pulse" },
+ { 0x5D, "RB30 Pulse" },
+ { 0x5E, "RB31 Pulse" },
{ 0x5F, "RB32 Pulse" },
{ 0, NULL }
};
+static value_string_ext selfm_fo_rb_vals_ext = VALUE_STRING_EXT_INIT(selfm_fo_rb_vals);
/* Fast Operate Breaker Bit Lookup */
static const value_string selfm_fo_br_vals[] = {
- { 0x31, "Breaker Bit 1 Open (OC/OC1)" },
{ 0x11, "Breaker Bit 1 Close (CC/CC1)" },
- { 0x32, "Breaker Bit 2 Open (OC2)" },
{ 0x12, "Breaker Bit 2 Close (CC2)" },
- { 0x33, "Breaker Bit 3 Open (OC3)" },
{ 0x13, "Breaker Bit 3 Close (CC3)" },
- { 0x34, "Breaker Bit 4 Open (OC4)" },
{ 0x14, "Breaker Bit 4 Close (CC4)" },
- { 0x35, "Breaker Bit 5 Open (OC5)" },
{ 0x15, "Breaker Bit 5 Close (CC5)" },
- { 0x36, "Breaker Bit 6 Open (OC6)" },
{ 0x16, "Breaker Bit 6 Close (CC6)" },
- { 0x37, "Breaker Bit 7 Open (OC7)" },
{ 0x17, "Breaker Bit 7 Close (CC7)" },
- { 0x38, "Breaker Bit 8 Open (OC8)" },
{ 0x18, "Breaker Bit 8 Close (CC8)" },
- { 0x39, "Breaker Bit 9 Open (OC9)" },
{ 0x19, "Breaker Bit 9 Close (CC9)" },
- { 0x3A, "Breaker Bit 10 Open (OC10)" },
{ 0x1A, "Breaker Bit 10 Close (CC10)" },
- { 0x3B, "Breaker Bit 11 Open (OC11)" },
{ 0x1B, "Breaker Bit 11 Close (CC11)" },
- { 0x3C, "Breaker Bit 12 Open (OC12)" },
{ 0x1C, "Breaker Bit 12 Close (CC12)" },
- { 0x3D, "Breaker Bit 13 Open (OC13)" },
{ 0x1D, "Breaker Bit 13 Close (CC13)" },
- { 0x3E, "Breaker Bit 14 Open (OC14)" },
{ 0x1E, "Breaker Bit 14 Close (CC14)" },
- { 0x3F, "Breaker Bit 15 Open (OC15)" },
{ 0x1F, "Breaker Bit 15 Close (CC15)" },
- { 0x40, "Breaker Bit 16 Open (OC16)" },
{ 0x20, "Breaker Bit 16 Close (CC16)" },
- { 0x41, "Breaker Bit 17 Open (OC17)" },
{ 0x21, "Breaker Bit 17 Close (CC17)" },
- { 0x42, "Breaker Bit 18 Open (OC18)" },
{ 0x22, "Breaker Bit 18 Close (CC18)" },
+ { 0x31, "Breaker Bit 1 Open (OC/OC1)" },
+ { 0x32, "Breaker Bit 2 Open (OC2)" },
+ { 0x33, "Breaker Bit 3 Open (OC3)" },
+ { 0x34, "Breaker Bit 4 Open (OC4)" },
+ { 0x35, "Breaker Bit 5 Open (OC5)" },
+ { 0x36, "Breaker Bit 6 Open (OC6)" },
+ { 0x37, "Breaker Bit 7 Open (OC7)" },
+ { 0x38, "Breaker Bit 8 Open (OC8)" },
+ { 0x39, "Breaker Bit 9 Open (OC9)" },
+ { 0x3A, "Breaker Bit 10 Open (OC10)" },
+ { 0x3B, "Breaker Bit 11 Open (OC11)" },
+ { 0x3C, "Breaker Bit 12 Open (OC12)" },
+ { 0x3D, "Breaker Bit 13 Open (OC13)" },
+ { 0x3E, "Breaker Bit 14 Open (OC14)" },
+ { 0x3F, "Breaker Bit 15 Open (OC15)" },
+ { 0x40, "Breaker Bit 16 Open (OC16)" },
+ { 0x41, "Breaker Bit 17 Open (OC17)" },
+ { 0x42, "Breaker Bit 18 Open (OC18)" },
{ 0, NULL }
};
+static value_string_ext selfm_fo_br_vals_ext = VALUE_STRING_EXT_INIT(selfm_fo_br_vals);
/* Alternate Fast Operate Function Code Lookup */
static const value_string selfm_foconfig_alt_funccode_vals[] = {
@@ -683,68 +685,72 @@ static const value_string selfm_foconfig_alt_funccode_vals[] = {
/* Fast SER Message Function Codes */
static const value_string selfm_fastser_func_code_vals[] = {
{ FAST_SER_MESSAGE_DEF, "Fast SER Message Definition Block" },
- { FAST_SER_MESSAGE_DEF_ACK, "Fast SER Message Definition Block ACK" },
{ FAST_SER_EN_UNS_DATA, "Enable Unsolicited Data" },
- { FAST_SER_EN_UNS_DATA_ACK, "Enable Unsolicited Data ACK" },
{ FAST_SER_DIS_UNS_DATA, "Disable Unsolicited Data" },
- { FAST_SER_DIS_UNS_DATA_ACK, "Disable Unsolicited Data ACK" },
{ FAST_SER_PING, "Ping Message" },
- { FAST_SER_PING_ACK, "Ping Message ACK" },
{ FAST_SER_READ_REQ, "Read Request" },
- { FAST_SER_READ_RESP, "Read Response" },
{ FAST_SER_GEN_UNS_DATA, "Generic Unsolicited Data" },
{ FAST_SER_SOE_STATE_REQ, "SOE Present State Request" },
- { FAST_SER_SOE_STATE_RESP, "SOE Present State Response" },
{ FAST_SER_UNS_RESP, "Unsolicited Fast SER Data Response" },
- { FAST_SER_UNS_RESP_ACK, "Unsolicited Fast SER Data Response ACK" },
{ FAST_SER_UNS_WRITE, "Unsolicited Write" },
{ FAST_SER_UNS_WRITE_REQ, "Unsolicited Write Request" },
{ FAST_SER_DEVDESC_REQ, "Device Description Request" },
- { FAST_SER_DEVDESC_RESP, "Device Description Response" },
{ FAST_SER_DATAFMT_REQ, "Data Format Request" },
- { FAST_SER_DATAFMT_RESP, "Data Format Response" },
{ FAST_SER_UNS_DATAFMT_RESP, "Unsolicited Data Format Response" },
{ FAST_SER_BITLABEL_REQ, "Bit Label Request" },
- { FAST_SER_BITLABEL_RESP, "Bit Label Response" },
{ FAST_SER_MGMT_REQ, "Management Request" },
+ { FAST_SER_MESSAGE_DEF_ACK, "Fast SER Message Definition Block ACK" },
+ { FAST_SER_EN_UNS_DATA_ACK, "Enable Unsolicited Data ACK" },
+ { FAST_SER_DIS_UNS_DATA_ACK, "Disable Unsolicited Data ACK" },
+ { FAST_SER_PING_ACK, "Ping Message ACK" },
+ { FAST_SER_READ_RESP, "Read Response" },
+ { FAST_SER_SOE_STATE_RESP, "SOE Present State Response" },
+ { FAST_SER_UNS_RESP_ACK, "Unsolicited Fast SER Data Response ACK" },
+ { FAST_SER_DEVDESC_RESP, "Device Description Response" },
+ { FAST_SER_DATAFMT_RESP, "Data Format Response" },
+ { FAST_SER_BITLABEL_RESP, "Bit Label Response" },
{ 0, NULL }
};
+static value_string_ext selfm_fastser_func_code_vals_ext =
+ VALUE_STRING_EXT_INIT(selfm_fastser_func_code_vals);
static const value_string selfm_fastser_tagtype_vals[] = {
- { FAST_SER_TAGTYPE_CHAR8, "1 x 8-bit character per item" },
- { FAST_SER_TAGTYPE_CHAR16, "2 x 8-bit characters per item" },
- { FAST_SER_TAGTYPE_DIGWORD8_BL, "8-bit binary item, with labels" },
- { FAST_SER_TAGTYPE_DIGWORD8, "8-bit binary item, without labels" },
- { FAST_SER_TAGTYPE_DIGWORD16_BL, "16-bit binary item, with labels" },
- { FAST_SER_TAGTYPE_DIGWORD16, "16-bit binary item, without labels" },
- { FAST_SER_TAGTYPE_INT16, "16-bit Signed Integer" },
- { FAST_SER_TAGTYPE_UINT16, "16-bit Unsigned Integer" },
- { FAST_SER_TAGTYPE_INT32, "32-bit Signed Integer" },
- { FAST_SER_TAGTYPE_UINT32, "32-bit Unsigned Integer" },
- { FAST_SER_TAGTYPE_FLOAT, "IEEE Floating Point" },
- { 0, NULL }
+ { FAST_SER_TAGTYPE_CHAR8, "1 x 8-bit character per item" },
+ { FAST_SER_TAGTYPE_CHAR16, "2 x 8-bit characters per item" },
+ { FAST_SER_TAGTYPE_DIGWORD8_BL, "8-bit binary item, with labels" },
+ { FAST_SER_TAGTYPE_DIGWORD8, "8-bit binary item, without labels" },
+ { FAST_SER_TAGTYPE_DIGWORD16_BL, "16-bit binary item, with labels" },
+ { FAST_SER_TAGTYPE_DIGWORD16, "16-bit binary item, without labels" },
+ { FAST_SER_TAGTYPE_INT16, "16-bit Signed Integer" },
+ { FAST_SER_TAGTYPE_UINT16, "16-bit Unsigned Integer" },
+ { FAST_SER_TAGTYPE_INT32, "32-bit Signed Integer" },
+ { FAST_SER_TAGTYPE_UINT32, "32-bit Unsigned Integer" },
+ { FAST_SER_TAGTYPE_FLOAT, "IEEE Floating Point" },
+ { 0, NULL }
};
/* Fast Message Unsolicited Write COM Port Codes */
static const value_string selfm_fastser_unswrite_com_vals[] = {
- { 0x0100, "COM01" },
- { 0x0200, "COM02" },
- { 0x0300, "COM03" },
- { 0x0400, "COM04" },
- { 0x0500, "COM05" },
- { 0x0600, "COM06" },
- { 0x0700, "COM07" },
- { 0x0800, "COM08" },
- { 0x0900, "COM09" },
- { 0x0A00, "COM10" },
- { 0x0B00, "COM11" },
- { 0x0C00, "COM12" },
- { 0x0D00, "COM13" },
- { 0x0E00, "COM14" },
- { 0x0F00, "COM15" },
- { 0, NULL }
+ { 0x0100, "COM01" },
+ { 0x0200, "COM02" },
+ { 0x0300, "COM03" },
+ { 0x0400, "COM04" },
+ { 0x0500, "COM05" },
+ { 0x0600, "COM06" },
+ { 0x0700, "COM07" },
+ { 0x0800, "COM08" },
+ { 0x0900, "COM09" },
+ { 0x0A00, "COM10" },
+ { 0x0B00, "COM11" },
+ { 0x0C00, "COM12" },
+ { 0x0D00, "COM13" },
+ { 0x0E00, "COM14" },
+ { 0x0F00, "COM15" },
+ { 0, NULL }
};
+static value_string_ext selfm_fastser_unswrite_com_vals_ext =
+ VALUE_STRING_EXT_INIT(selfm_fastser_unswrite_com_vals);
/* Tables for reassembly of fragments. */
static reassembly_table selfm_reassembly_table;
@@ -766,21 +772,21 @@ static gint ett_selfm_fragment = -1;
static gint ett_selfm_fragments = -1;
static const fragment_items selfm_frag_items = {
- &ett_selfm_fragment,
- &ett_selfm_fragments,
- &hf_selfm_fragments,
- &hf_selfm_fragment,
- &hf_selfm_fragment_overlap,
- &hf_selfm_fragment_overlap_conflict,
- &hf_selfm_fragment_multiple_tails,
- &hf_selfm_fragment_too_long_fragment,
- &hf_selfm_fragment_error,
- &hf_selfm_fragment_count,
- &hf_selfm_fragment_reassembled_in,
- &hf_selfm_fragment_reassembled_length,
- /* Reassembled data field */
- NULL,
- "SEL Fast Message fragments"
+ &ett_selfm_fragment,
+ &ett_selfm_fragments,
+ &hf_selfm_fragments,
+ &hf_selfm_fragment,
+ &hf_selfm_fragment_overlap,
+ &hf_selfm_fragment_overlap_conflict,
+ &hf_selfm_fragment_multiple_tails,
+ &hf_selfm_fragment_too_long_fragment,
+ &hf_selfm_fragment_error,
+ &hf_selfm_fragment_count,
+ &hf_selfm_fragment_reassembled_in,
+ &hf_selfm_fragment_reassembled_length,
+ /* Reassembled data field */
+ NULL,
+ "SEL Fast Message fragments"
};
/**********************************************************************************************************/
@@ -790,40 +796,40 @@ static const fragment_items selfm_frag_items = {
static tvbuff_t *
clean_telnet_iac(packet_info *pinfo, tvbuff_t *tvb, int offset, int len)
{
- tvbuff_t *telnet_tvb;
- guint8 *buf;
- const guint8 *spos;
- guint8 *dpos;
- int skip_byte, len_remaining;
-
- spos=tvb_get_ptr(tvb, offset, len);
- buf=(guint8 *)g_malloc(len);
- dpos=buf;
- skip_byte = 0;
- len_remaining = len;
- while(len_remaining > 0){
-
- /* Only analyze two sequential bytes of source tvb if we have at least two bytes left */
- if (len_remaining > 1) {
- /* If two sequential 0xFF's exist, increment skip_byte counter, decrement */
- /* len_remaining by 2 and copy a single 0xFF to dest tvb. */
- if((spos[0]==0xff) && (spos[1]==0xff)){
- skip_byte++;
- len_remaining -= 2;
- *(dpos++)=0xff;
- spos+=2;
- continue;
+ tvbuff_t *telnet_tvb;
+ guint8 *buf;
+ const guint8 *spos;
+ guint8 *dpos;
+ int skip_byte, len_remaining;
+
+ spos=tvb_get_ptr(tvb, offset, len);
+ buf=(guint8 *)g_malloc(len);
+ dpos=buf;
+ skip_byte = 0;
+ len_remaining = len;
+ while(len_remaining > 0){
+
+ /* Only analyze two sequential bytes of source tvb if we have at least two bytes left */
+ if (len_remaining > 1) {
+ /* If two sequential 0xFF's exist, increment skip_byte counter, decrement */
+ /* len_remaining by 2 and copy a single 0xFF to dest tvb. */
+ if((spos[0]==0xff) && (spos[1]==0xff)){
+ skip_byte++;
+ len_remaining -= 2;
+ *(dpos++)=0xff;
+ spos+=2;
+ continue;
+ }
}
+ /* If we only have a single byte left, or there were no sequential 0xFF's, copy byte from src tvb to dest tvb */
+ *(dpos++)=*(spos++);
+ len_remaining--;
}
- /* If we only have a single byte left, or there were no sequential 0xFF's, copy byte from src tvb to dest tvb */
- *(dpos++)=*(spos++);
- len_remaining--;
- }
- telnet_tvb = tvb_new_child_real_data(tvb, buf, len-skip_byte, len-skip_byte);
- tvb_set_free_cb(telnet_tvb, g_free);
- add_new_data_source(pinfo, telnet_tvb, "Processed Telnet Data");
-
- return telnet_tvb;
+ telnet_tvb = tvb_new_child_real_data(tvb, buf, len-skip_byte, len-skip_byte);
+ tvb_set_free_cb(telnet_tvb, g_free);
+ add_new_data_source(pinfo, telnet_tvb, "Processed Telnet Data");
+
+ return telnet_tvb;
}
/******************************************************************************************************/
@@ -1520,13 +1526,13 @@ dissect_fastop_frame(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int of
proto_tree_add_item(fastop_tree, hf_selfm_fastop_rb_code, tvb, offset, 1, ENC_BIG_ENDIAN);
/* Append Column Info w/ Control Code Code */
- col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "%s", val_to_str_const(opcode, selfm_fo_rb_vals, "Unknown Control Code"));
+ col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "%s", val_to_str_ext_const(opcode, &selfm_fo_rb_vals_ext, "Unknown Control Code"));
}
else if (msg_type == CMD_FASTOP_BR_CTRL) {
proto_tree_add_item(fastop_tree, hf_selfm_fastop_br_code, tvb, offset, 1, ENC_BIG_ENDIAN);
/* Append Column Info w/ Control Code Code */
- col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "%s", val_to_str_const(opcode, selfm_fo_br_vals, "Unknown Control Code"));
+ col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "%s", val_to_str_ext_const(opcode, &selfm_fo_br_vals_ext, "Unknown Control Code"));
}
offset += 1;
@@ -1862,7 +1868,7 @@ dissect_fastser_frame(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int o
proto_tree_add_item(fastser_tree, hf_selfm_fastser_funccode, tvb, offset, 1, ENC_BIG_ENDIAN);
/* Append Column Info w/ Function Code */
- col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "%s", val_to_str_const(funccode, selfm_fastser_func_code_vals, "Unknown Function Code"));
+ col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "%s", val_to_str_ext_const(funccode, &selfm_fastser_func_code_vals_ext, "Unknown Function Code"));
offset += 1;
@@ -2435,7 +2441,7 @@ dissect_selfm(tvbuff_t *selfm_tvb, packet_info *pinfo, proto_tree *tree, void* d
selfm_tree = proto_item_add_subtree(selfm_item, ett_selfm);
/* Set INFO column with SEL Protocol Message Type */
- col_add_fstr(pinfo->cinfo, COL_INFO, "%s", val_to_str_const(msg_type, selfm_msgtype_vals, "Unknown Message Type"));
+ col_add_fstr(pinfo->cinfo, COL_INFO, "%s", val_to_str_ext_const(msg_type, &selfm_msgtype_vals_ext, "Unknown Message Type"));
/* Add Message Type to Protocol Tree */
proto_tree_add_item(selfm_tree, hf_selfm_msgtype, selfm_tvb, offset, 2, ENC_BIG_ENDIAN);
@@ -2570,8 +2576,8 @@ static void
selfm_init(void)
{
- reassembly_table_init(&selfm_reassembly_table,
- &addresses_reassembly_table_functions);
+ reassembly_table_init(&selfm_reassembly_table,
+ &addresses_reassembly_table_functions);
}
/******************************************************************************************************/
@@ -2701,11 +2707,11 @@ proto_register_selfm(void)
{ &hf_selfm_foconfig_reserved,
{ "Reserved Bit (Future)", "selfm.foconfig.reserved", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_selfm_foconfig_brkr_open,
- { "Breaker Bit Open Command", "selfm.foconfig.brkr_open", FT_UINT8, BASE_HEX, VALS(selfm_fo_br_vals), 0x0, NULL, HFILL }},
+ { "Breaker Bit Open Command", "selfm.foconfig.brkr_open", FT_UINT8, BASE_HEX | BASE_EXT_STRING, &selfm_fo_br_vals_ext, 0x0, NULL, HFILL }},
{ &hf_selfm_foconfig_brkr_close,
- { "Breaker Bit Close Command", "selfm.foconfig.brkr_close", FT_UINT8, BASE_HEX, VALS(selfm_fo_br_vals), 0x0, NULL, HFILL }},
+ { "Breaker Bit Close Command", "selfm.foconfig.brkr_close", FT_UINT8, BASE_HEX | BASE_EXT_STRING, &selfm_fo_br_vals_ext, 0x0, NULL, HFILL }},
{ &hf_selfm_foconfig_rb_cmd,
- { "Remote Bit Command", "selfm.foconfig.rb_cmd", FT_UINT8, BASE_HEX, VALS(selfm_fo_rb_vals), 0x0, NULL, HFILL }},
+ { "Remote Bit Command", "selfm.foconfig.rb_cmd", FT_UINT8, BASE_HEX | BASE_EXT_STRING, &selfm_fo_rb_vals_ext, 0x0, NULL, HFILL }},
/* "Alternate Fast Operate Configuration" specific fields */
{ &hf_selfm_alt_foconfig_len,
{ "Length", "selfm.alt_foconfig.len", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
@@ -2721,9 +2727,9 @@ proto_register_selfm(void)
{ &hf_selfm_fastop_len,
{ "Length", "selfm.fastop.len", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_selfm_fastop_rb_code,
- { "Remote Bit Operate Code", "selfm.fastop.rb_code", FT_UINT8, BASE_HEX, VALS(selfm_fo_rb_vals), 0x0, NULL, HFILL }},
+ { "Remote Bit Operate Code", "selfm.fastop.rb_code", FT_UINT8, BASE_HEX | BASE_EXT_STRING, &selfm_fo_rb_vals_ext, 0x0, NULL, HFILL }},
{ &hf_selfm_fastop_br_code,
- { "Breaker Bit Operate Code", "selfm.fastop.br_code", FT_UINT8, BASE_HEX, VALS(selfm_fo_br_vals), 0x0, NULL, HFILL }},
+ { "Breaker Bit Operate Code", "selfm.fastop.br_code", FT_UINT8, BASE_HEX | BASE_EXT_STRING, &selfm_fo_br_vals_ext, 0x0, NULL, HFILL }},
{ &hf_selfm_fastop_valid,
{ "Operate Code Validation", "selfm.fastop.valid", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
/* "Alternate Fast Operate Command" specific fields */
@@ -2741,7 +2747,7 @@ proto_register_selfm(void)
{ &hf_selfm_fastser_status,
{ "Status Byte", "selfm.fastser.status", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_selfm_fastser_funccode,
- { "Function Code", "selfm.fastser.funccode", FT_UINT8, BASE_HEX, VALS(selfm_fastser_func_code_vals), 0x0, NULL, HFILL }},
+ { "Function Code", "selfm.fastser.funccode", FT_UINT8, BASE_HEX | BASE_EXT_STRING, &selfm_fastser_func_code_vals_ext, 0x0, NULL, HFILL }},
{ &hf_selfm_fastser_seq,
{ "Sequence Byte", "selfm.fastser.seq", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
{ &hf_selfm_fastser_seq_fir,
@@ -2767,17 +2773,17 @@ proto_register_selfm(void)
{ &hf_selfm_fastser_def_rx_num_fc,
{ "Number of Supported RX Function Codes", "selfm.fastser.def_rx_num_fc", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_selfm_fastser_def_rx_fc,
- { "Receive Function Code", "selfm.fastser.def_rx_fc", FT_UINT8, BASE_HEX, VALS(selfm_fastser_func_code_vals), 0x0, NULL, HFILL }},
+ { "Receive Function Code", "selfm.fastser.def_rx_fc", FT_UINT8, BASE_HEX | BASE_EXT_STRING, &selfm_fastser_func_code_vals_ext, 0x0, NULL, HFILL }},
{ &hf_selfm_fastser_def_tx_num_fc,
{ "Number of Supported TX Function Codes", "selfm.fastser.def_tx_num_fc", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_selfm_fastser_def_tx_fc,
- { "Transmit Function Code", "selfm.fastser.def_tx_fc", FT_UINT8, BASE_HEX, VALS(selfm_fastser_func_code_vals), 0x0, NULL, HFILL }},
+ { "Transmit Function Code", "selfm.fastser.def_tx_fc", FT_UINT8, BASE_HEX | BASE_EXT_STRING, &selfm_fastser_func_code_vals_ext, 0x0, NULL, HFILL }},
{ &hf_selfm_fastser_uns_en_fc,
- { "Function Code to Enable", "selfm.fastser.uns_en_fc", FT_UINT8, BASE_HEX, VALS(selfm_fastser_func_code_vals), 0x0, NULL, HFILL }},
+ { "Function Code to Enable", "selfm.fastser.uns_en_fc", FT_UINT8, BASE_HEX | BASE_EXT_STRING, &selfm_fastser_func_code_vals_ext, 0x0, NULL, HFILL }},
{ &hf_selfm_fastser_uns_en_fc_data,
{ "Function Code Data", "selfm.fastser.uns_en_fc_data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_selfm_fastser_uns_dis_fc,
- { "Function Code to Disable", "selfm.fastser.uns_dis_fc", FT_UINT8, BASE_HEX, VALS(selfm_fastser_func_code_vals), 0x0, NULL, HFILL }},
+ { "Function Code to Disable", "selfm.fastser.uns_dis_fc", FT_UINT8, BASE_HEX | BASE_EXT_STRING, &selfm_fastser_func_code_vals_ext, 0x0, NULL, HFILL }},
{ &hf_selfm_fastser_uns_dis_fc_data,
{ "Function Code Data", "selfm.fastser.uns_dis_fc_data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_selfm_fastser_unsresp_orig,
@@ -2801,7 +2807,7 @@ proto_register_selfm(void)
{ &hf_selfm_fastser_unsresp_elmt_statword,
{ "SER Element Status Word", "selfm.fastser.unsresp_elmt_statword", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
{ &hf_selfm_fastser_unswrite_addr1,
- { "Write Address Region #1", "selfm.fastser.unswrite_addr1", FT_UINT16, BASE_HEX, VALS(selfm_fastser_unswrite_com_vals), 0x0, NULL, HFILL }},
+ { "Write Address Region #1", "selfm.fastser.unswrite_addr1", FT_UINT16, BASE_HEX | BASE_EXT_STRING, &selfm_fastser_unswrite_com_vals_ext, 0x0, NULL, HFILL }},
{ &hf_selfm_fastser_unswrite_addr2,
{ "Write Address Region #2", "selfm.fastser.unswrite_addr2", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
{ &hf_selfm_fastser_unswrite_num_reg,
diff --git a/epan/dissectors/packet-sigcomp.c b/epan/dissectors/packet-sigcomp.c
index 0b5ee69fd8..6f04f2eef3 100644
--- a/epan/dissectors/packet-sigcomp.c
+++ b/epan/dissectors/packet-sigcomp.c
@@ -176,6 +176,8 @@ static const value_string destination_address_encoding_vals[] = {
{ 0x0F, "1024" },
{ 0, NULL }
};
+static value_string_ext destination_address_encoding_vals_ext =
+ VALUE_STRING_EXT_INIT(destination_address_encoding_vals);
static const value_string udvm_instruction_code_vals[] = {
{ 0, "DECOMPRESSION-FAILURE" },
@@ -216,6 +218,9 @@ static const value_string udvm_instruction_code_vals[] = {
{ 35, "END-MESSAGE" },
{ 0, NULL }
};
+static value_string_ext udvm_instruction_code_vals_ext =
+ VALUE_STRING_EXT_INIT(udvm_instruction_code_vals);
+
/* RFC3320
* Figure 10: Bytecode for a multitype (%) operand
* Bytecode: Operand value: Range: HEX val
@@ -308,6 +313,8 @@ static const value_string sigcomp_nack_reason_code_vals[] = {
{ 25, "FRAMING_ERROR" },
{ 0, NULL }
};
+static value_string_ext sigcomp_nack_reason_code_vals_ext =
+ VALUE_STRING_EXT_INIT(sigcomp_nack_reason_code_vals);
static void dissect_udvm_bytecode(tvbuff_t *udvm_tvb, proto_tree *sigcomp_udvm_tree, guint destination);
@@ -828,8 +835,8 @@ dissect_sigcomp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sigcomp_tr
/* Add expert item for NACK */
expert_add_info_format(pinfo, reason_ti, &ei_sigcomp_nack_failed_op_code,
"SigComp NACK (reason=%s, opcode=%s)",
- val_to_str_const(octet, sigcomp_nack_reason_code_vals, "Unknown"),
- val_to_str_const(opcode, udvm_instruction_code_vals, "Unknown"));
+ val_to_str_ext_const(octet, &sigcomp_nack_reason_code_vals_ext, "Unknown"),
+ val_to_str_ext_const(opcode, &udvm_instruction_code_vals_ext, "Unknown"));
proto_tree_add_item(sigcomp_tree,hf_sigcomp_nack_pc, tvb, offset, 2, ENC_BIG_ENDIAN);
offset = offset +2;
@@ -838,8 +845,8 @@ dissect_sigcomp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sigcomp_tr
/* Add NACK info to info column */
col_append_fstr(pinfo->cinfo, COL_INFO, " NACK reason=%s, opcode=%s",
- val_to_str_const(octet, sigcomp_nack_reason_code_vals, "Unknown"),
- val_to_str_const(opcode, udvm_instruction_code_vals, "Unknown"));
+ val_to_str_ext_const(octet, &sigcomp_nack_reason_code_vals_ext, "Unknown"),
+ val_to_str_ext_const(opcode, &udvm_instruction_code_vals_ext, "Unknown"));
switch ( octet){
case SIGCOMP_NACK_STATE_NOT_FOUND:
@@ -2289,7 +2296,7 @@ proto_register_sigcomp(void)
},
{ &hf_sigcomp_destination,
{ "Destination","sigcomp.destination",
- FT_UINT8, BASE_HEX, VALS(destination_address_encoding_vals), 0xf,
+ FT_UINT8, BASE_HEX | BASE_EXT_STRING, &destination_address_encoding_vals_ext, 0xf,
NULL, HFILL }
},
{ &hf_sigcomp_udvm_bytecode,
@@ -2299,7 +2306,7 @@ proto_register_sigcomp(void)
},
{ &hf_sigcomp_udvm_instr,
{ "UDVM instruction code","sigcomp.udvm.instr",
- FT_UINT8, BASE_DEC, VALS(udvm_instruction_code_vals), 0x0,
+ FT_UINT8, BASE_DEC | BASE_EXT_STRING, &udvm_instruction_code_vals_ext, 0x0,
NULL, HFILL }
},
{ &hf_udvm_execution_trace,
@@ -2532,12 +2539,12 @@ proto_register_sigcomp(void)
},
{ &hf_sigcomp_nack_reason_code,
{ "Reason Code", "sigcomp.nack.reason",
- FT_UINT8, BASE_DEC, VALS(sigcomp_nack_reason_code_vals), 0x0,
+ FT_UINT8, BASE_DEC | BASE_EXT_STRING, &sigcomp_nack_reason_code_vals_ext, 0x0,
"NACK Reason Code", HFILL }
},
{ &hf_sigcomp_nack_failed_op_code,
{ "OPCODE of failed instruction", "sigcomp.nack.failed_op_code",
- FT_UINT8, BASE_DEC, VALS(udvm_instruction_code_vals), 0x0,
+ FT_UINT8, BASE_DEC | BASE_EXT_STRING, &udvm_instruction_code_vals_ext, 0x0,
"NACK OPCODE of failed instruction", HFILL }
},
{ &hf_sigcomp_nack_pc,
@@ -2701,3 +2708,16 @@ proto_reg_handoff_sigcomp(void)
dissector_add_uint("tcp.port", SigCompTCPPort2, sigcomp_tcp_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */
diff --git a/epan/dissectors/packet-sysex.c b/epan/dissectors/packet-sysex.c
index 6f8565c927..b75ad589b4 100644
--- a/epan/dissectors/packet-sysex.c
+++ b/epan/dissectors/packet-sysex.c
@@ -249,6 +249,8 @@ static const value_string digitech_procedures[] = {
{DIGITECH_PROCEDURE_NACK, "NACK"},
{0, NULL}
};
+static value_string_ext digitech_procedures_ext =
+ VALUE_STRING_EXT_INIT(digitech_procedures);
static const value_string digitech_os_modes[] = {
{0, "Normal"},
@@ -315,6 +317,8 @@ static const value_string digitech_parameter_ids_gnx3k_whammy[] = {
{2818, "Whammy/IPS Talker Mic Level"},
{0, NULL}
};
+static value_string_ext digitech_parameter_ids_gnx3k_whammy_ext =
+ VALUE_STRING_EXT_INIT(digitech_parameter_ids_gnx3k_whammy);
static const value_string digitech_parameter_ids_distortion[] = {
{2433, "Distortion On/Off"},
@@ -393,6 +397,8 @@ static const value_string digitech_parameter_ids_distortion[] = {
{2572, "Distortion Amp Driver Level"},
{0, NULL}
};
+static value_string_ext digitech_parameter_ids_distortion_ext =
+ VALUE_STRING_EXT_INIT(digitech_parameter_ids_distortion);
static const value_string digitech_parameter_ids_amp_channel[] = {
{260, "Amp Channel Amp Channel"},
@@ -419,6 +425,8 @@ static const value_string digitech_parameter_ids_amp[] = {
{2509, "Amplifier Treble"},
{0, NULL}
};
+static value_string_ext digitech_parameter_ids_amp_ext =
+ VALUE_STRING_EXT_INIT(digitech_parameter_ids_amp);
static const value_string digitech_parameter_ids_amp_cabinet[] = {
{2561, "Channel 1 Tuning"},
@@ -574,6 +582,8 @@ static const value_string digitech_parameter_ids_chorusfx[] = {
{3013, "Chorus/FX Sample/Hold Intensity"},
{0, NULL}
};
+static value_string_ext digitech_parameter_ids_chorusfx_ext =
+ VALUE_STRING_EXT_INIT(digitech_parameter_ids_chorusfx);
static const value_string digitech_parameter_ids_delay[] = {
{1857, "Delay On/Off"},
@@ -605,6 +615,8 @@ static const value_string digitech_parameter_ids_delay[] = {
{1905, "Delay 2-tap Ratio"},
{0, NULL}
};
+static value_string_ext digitech_parameter_ids_delay_ext =
+ VALUE_STRING_EXT_INIT(digitech_parameter_ids_delay);
static const value_string digitech_parameter_ids_reverb[] = {
{1921, "Reverb On/Off"},
@@ -695,36 +707,38 @@ static const value_string digitech_parameter_ids_amp_loop[] = {
#define DIGITECH_POSITION_WAH_PEDAL 132
static const value_string digitech_parameter_positions[] = {
- {DIGITECH_POSITION_GLOBAL, "Global"},
- {DIGITECH_POSITION_PICKUP, "Pickup"},
- {DIGITECH_POSITION_WAH, "Wah"},
- {DIGITECH_POSITION_COMPRESSOR, "Compressor"},
- {DIGITECH_POSITION_GNX3K_WHAMMY, "GNX3K Whammy"},
- {DIGITECH_POSITION_DISTORTION, "Distortion"},
- {DIGITECH_POSITION_AMP_CHANNEL, "Amp Channel"},
- {DIGITECH_POSITION_AMP, "Amp"},
- {DIGITECH_POSITION_AMP_CABINET, "Amp Cabinet"},
- {DIGITECH_POSITION_AMP_B, "Amp B"},
- {DIGITECH_POSITION_AMP_CABINET_B, "Amp Cabinet B"},
- {DIGITECH_POSITION_NOISEGATE, "Noisegate"},
- {DIGITECH_POSITION_VOLUME_PRE_FX, "Volume Pre Fx"},
- {DIGITECH_POSITION_CHORUS_FX, "Chorus/FX"},
- {DIGITECH_POSITION_DELAY, "Delay"},
- {DIGITECH_POSITION_REVERB, "Reverb"},
- {DIGITECH_POSITION_VOLUME_POST_FX, "Volume Post Fx"},
- {DIGITECH_POSITION_PRESET, "Preset"},
- {DIGITECH_POSITION_EXPRESSION, "Expression"},
- {DIGITECH_POSITION_WAH_MIN_MAX, "Wah Min-Max"},
+ {DIGITECH_POSITION_GLOBAL, "Global"},
+ {DIGITECH_POSITION_PICKUP, "Pickup"},
+ {DIGITECH_POSITION_WAH, "Wah"},
+ {DIGITECH_POSITION_COMPRESSOR, "Compressor"},
+ {DIGITECH_POSITION_GNX3K_WHAMMY, "GNX3K Whammy"},
+ {DIGITECH_POSITION_DISTORTION, "Distortion"},
+ {DIGITECH_POSITION_AMP_CHANNEL, "Amp Channel"},
+ {DIGITECH_POSITION_AMP, "Amp"},
+ {DIGITECH_POSITION_AMP_CABINET, "Amp Cabinet"},
+ {DIGITECH_POSITION_AMP_B, "Amp B"},
+ {DIGITECH_POSITION_AMP_CABINET_B, "Amp Cabinet B"},
+ {DIGITECH_POSITION_NOISEGATE, "Noisegate"},
+ {DIGITECH_POSITION_VOLUME_PRE_FX, "Volume Pre Fx"},
+ {DIGITECH_POSITION_CHORUS_FX, "Chorus/FX"},
+ {DIGITECH_POSITION_DELAY, "Delay"},
+ {DIGITECH_POSITION_REVERB, "Reverb"},
+ {DIGITECH_POSITION_VOLUME_POST_FX, "Volume Post Fx"},
+ {DIGITECH_POSITION_PRESET, "Preset"},
+ {DIGITECH_POSITION_EXPRESSION, "Expression"},
+ {DIGITECH_POSITION_WAH_MIN_MAX, "Wah Min-Max"},
{DIGITECH_POSITION_V_SWITCH_ASSIGN, "V-Switch Assign"},
- {DIGITECH_POSITION_LFO_1, "LFO 1"},
- {DIGITECH_POSITION_LFO_2, "LFO 2"},
- {DIGITECH_POSITION_EQUALIZER, "Equalizer"},
- {DIGITECH_POSITION_EQUALIZER_B, "Equalizer B"},
- {DIGITECH_POSITION_LIBRARY, "Library"},
- {DIGITECH_POSITION_AMP_LOOP, "Amp Loop"},
- {DIGITECH_POSITION_WAH_PEDAL, "Wah Pedal"},
+ {DIGITECH_POSITION_LFO_1, "LFO 1"},
+ {DIGITECH_POSITION_LFO_2, "LFO 2"},
+ {DIGITECH_POSITION_EQUALIZER, "Equalizer"},
+ {DIGITECH_POSITION_EQUALIZER_B, "Equalizer B"},
+ {DIGITECH_POSITION_LIBRARY, "Library"},
+ {DIGITECH_POSITION_AMP_LOOP, "Amp Loop"},
+ {DIGITECH_POSITION_WAH_PEDAL, "Wah Pedal"},
{0, NULL}
};
+static value_string_ext digitech_parameter_positions_ext =
+ VALUE_STRING_EXT_INIT(digitech_parameter_positions);
static tvbuff_t *
unpack_digitech_message(tvbuff_t *tvb, gint offset)
@@ -1247,8 +1261,8 @@ proto_register_sysex(void)
{ "Product ID", "sysex.digitech.product_id", FT_UINT8, BASE_HEX,
VALS(digitech_rp_product_id), 0, NULL, HFILL }},
{ &hf_digitech_procedure_id,
- { "Procedure ID", "sysex.digitech.procedure_id", FT_UINT8, BASE_HEX,
- VALS(digitech_procedures), 0, NULL, HFILL }},
+ { "Procedure ID", "sysex.digitech.procedure_id", FT_UINT8, BASE_HEX | BASE_EXT_STRING,
+ &digitech_procedures_ext, 0, NULL, HFILL }},
{ &hf_digitech_desired_device_id,
{ "Desired Device ID", "sysex.digitech.desired_device_id", FT_UINT8, BASE_HEX,
@@ -1306,17 +1320,17 @@ proto_register_sysex(void)
{ "Parameter ID", "sysex.digitech.parameter_id", FT_UINT16, BASE_DEC,
VALS(digitech_parameter_ids_compressor), 0, NULL, HFILL }},
{ &hf_digitech_parameter_id_gnx3k_whammy,
- { "Parameter ID", "sysex.digitech.parameter_id", FT_UINT16, BASE_DEC,
- VALS(digitech_parameter_ids_gnx3k_whammy), 0, NULL, HFILL }},
+ { "Parameter ID", "sysex.digitech.parameter_id", FT_UINT16, BASE_DEC | BASE_EXT_STRING,
+ &digitech_parameter_ids_gnx3k_whammy_ext, 0, NULL, HFILL }},
{ &hf_digitech_parameter_id_distortion,
- { "Parameter ID", "sysex.digitech.parameter_id", FT_UINT16, BASE_DEC,
- VALS(digitech_parameter_ids_distortion), 0, NULL, HFILL }},
+ { "Parameter ID", "sysex.digitech.parameter_id", FT_UINT16, BASE_DEC | BASE_EXT_STRING,
+ &digitech_parameter_ids_distortion_ext, 0, NULL, HFILL }},
{ &hf_digitech_parameter_id_amp_channel,
{ "Parameter ID", "sysex.digitech.parameter_id", FT_UINT16, BASE_DEC,
VALS(digitech_parameter_ids_amp_channel), 0, NULL, HFILL }},
{ &hf_digitech_parameter_id_amp,
- { "Parameter ID", "sysex.digitech.parameter_id", FT_UINT16, BASE_DEC,
- VALS(digitech_parameter_ids_amp), 0, NULL, HFILL }},
+ { "Parameter ID", "sysex.digitech.parameter_id", FT_UINT16, BASE_DEC | BASE_EXT_STRING,
+ &digitech_parameter_ids_amp_ext, 0, NULL, HFILL }},
{ &hf_digitech_parameter_id_amp_cabinet,
{ "Parameter ID", "sysex.digitech.parameter_id", FT_UINT16, BASE_DEC,
VALS(digitech_parameter_ids_amp_cabinet), 0, NULL, HFILL }},
@@ -1333,11 +1347,11 @@ proto_register_sysex(void)
{ "Parameter ID", "sysex.digitech.parameter_id", FT_UINT16, BASE_DEC,
VALS(digitech_parameter_ids_volume_pre_fx), 0, NULL, HFILL }},
{ &hf_digitech_parameter_id_chorusfx,
- { "Parameter ID", "sysex.digitech.parameter_id", FT_UINT16, BASE_DEC,
- VALS(digitech_parameter_ids_chorusfx), 0, NULL, HFILL }},
+ { "Parameter ID", "sysex.digitech.parameter_id", FT_UINT16, BASE_DEC | BASE_EXT_STRING,
+ &digitech_parameter_ids_chorusfx_ext, 0, NULL, HFILL }},
{ &hf_digitech_parameter_id_delay,
- { "Parameter ID", "sysex.digitech.parameter_id", FT_UINT16, BASE_DEC,
- VALS(digitech_parameter_ids_delay), 0, NULL, HFILL }},
+ { "Parameter ID", "sysex.digitech.parameter_id", FT_UINT16, BASE_DEC | BASE_EXT_STRING,
+ &digitech_parameter_ids_delay_ext, 0, NULL, HFILL }},
{ &hf_digitech_parameter_id_reverb,
{ "Parameter ID", "sysex.digitech.parameter_id", FT_UINT16, BASE_DEC,
VALS(digitech_parameter_ids_reverb), 0, NULL, HFILL }},
@@ -1362,8 +1376,8 @@ proto_register_sysex(void)
{ &hf_digitech_parameter_position,
- { "Parameter position", "sysex.digitech.parameter_position", FT_UINT8, BASE_DEC,
- VALS(digitech_parameter_positions), 0, NULL, HFILL }},
+ { "Parameter position", "sysex.digitech.parameter_position", FT_UINT8, BASE_DEC | BASE_EXT_STRING,
+ &digitech_parameter_positions_ext, 0, NULL, HFILL }},
{ &hf_digitech_parameter_data,
{ "Parameter data", "sysex.digitech.parameter_data", FT_UINT8, BASE_DEC,
NULL, 0, NULL, HFILL }},
@@ -1378,11 +1392,11 @@ proto_register_sysex(void)
NULL, 0, NULL, HFILL }},
{ &hf_digitech_ack_request_proc_id,
- { "Requesting Procedure ID", "sysex.digitech.ack.procedure_id", FT_UINT8, BASE_HEX,
- VALS(digitech_procedures), 0, "Procedure ID of the request being ACKed", HFILL }},
+ { "Requesting Procedure ID", "sysex.digitech.ack.procedure_id", FT_UINT8, BASE_HEX | BASE_EXT_STRING,
+ &digitech_procedures_ext, 0, "Procedure ID of the request being ACKed", HFILL }},
{ &hf_digitech_nack_request_proc_id,
- { "Requesting Procedure ID", "sysex.digitech.ack.procedure_id", FT_UINT8, BASE_HEX,
- VALS(digitech_procedures), 0, "Procedure ID of the request being NACKed", HFILL }},
+ { "Requesting Procedure ID", "sysex.digitech.ack.procedure_id", FT_UINT8, BASE_HEX | BASE_EXT_STRING,
+ &digitech_procedures_ext, 0, "Procedure ID of the request being NACKed", HFILL }},
{ &hf_digitech_checksum,
{ "Checksum", "sysex.digitech.checksum", FT_UINT8, BASE_HEX,