aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-sccp.c
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2013-03-29 00:26:23 +0000
committerEvan Huus <eapache@gmail.com>2013-03-29 00:26:23 +0000
commit37600a157ba2036a79a5ebf466b31b8eee19244e (patch)
tree05b5db07655ce39ffe0c9c42c62d30a0c389b8df /epan/dissectors/packet-sccp.c
parent6f19d87f4e3aaa5872bdec1d9f4e50d85eee193d (diff)
Rename value string (and similar) functions to use a consistent pattern. This
was done using textual search+replace, not anything syntax-aware, so presumably it got most comments as well (except where there were typos). Use a consistent coding style, and make proper use of the WS_DLL_* defines. Group the functions appropriately in the header. I ended up getting rid of most of the explanatory comments since many of them duplicated what was in the value_string.c file (and were out of sync with the recent updates I made to those in r48633). Presumably most of the comments should be in the .h file not the .c file, but there's enough churn ahead that it's not worth fixing yet. Part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8467 svn path=/trunk/; revision=48634
Diffstat (limited to 'epan/dissectors/packet-sccp.c')
-rw-r--r--epan/dissectors/packet-sccp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/epan/dissectors/packet-sccp.c b/epan/dissectors/packet-sccp.c
index 1ec7aeed5b..7d4cb73d20 100644
--- a/epan/dissectors/packet-sccp.c
+++ b/epan/dissectors/packet-sccp.c
@@ -909,7 +909,7 @@ looks_like_valid_sccp(guint32 frame_num _U_, tvbuff_t *tvb, guint8 my_mtp3_stand
RETURN_FALSE;
msgtype = tvb_get_guint8(tvb, SCCP_MSG_TYPE_OFFSET);
- if (!match_strval(msgtype, sccp_message_type_acro_values)) {
+ if (!try_val_to_str(msgtype, sccp_message_type_acro_values)) {
RETURN_FALSE;
}
offset = SCCP_MSG_TYPE_LENGTH;
@@ -963,7 +963,7 @@ looks_like_valid_sccp(guint32 frame_num _U_, tvbuff_t *tvb, guint8 my_mtp3_stand
msgtype == SCCP_MSG_TYPE_LUDTS) {
cause = tvb_get_guint8(tvb, offset);
- if (!match_strval(cause, sccp_return_cause_values))
+ if (!try_val_to_str(cause, sccp_return_cause_values))
RETURN_FALSE;
offset += RETURN_CAUSE_LENGTH;
}
@@ -1088,7 +1088,7 @@ looks_like_valid_sccp(guint32 frame_num _U_, tvbuff_t *tvb, guint8 my_mtp3_stand
offset += DESTINATION_LOCAL_REFERENCE_LENGTH;
cause = tvb_get_guint8(tvb, offset);
- if (!match_strval(cause, sccp_refusal_cause_values))
+ if (!try_val_to_str(cause, sccp_refusal_cause_values))
RETURN_FALSE;
offset += REFUSAL_CAUSE_LENGTH;
@@ -1122,7 +1122,7 @@ looks_like_valid_sccp(guint32 frame_num _U_, tvbuff_t *tvb, guint8 my_mtp3_stand
offset += SOURCE_LOCAL_REFERENCE_LENGTH;
cause = tvb_get_guint8(tvb, offset);
- if (!match_strval(cause, sccp_release_cause_values))
+ if (!try_val_to_str(cause, sccp_release_cause_values))
RETURN_FALSE;
offset += RELEASE_CAUSE_LENGTH;
@@ -1161,7 +1161,7 @@ looks_like_valid_sccp(guint32 frame_num _U_, tvbuff_t *tvb, guint8 my_mtp3_stand
offset += DESTINATION_LOCAL_REFERENCE_LENGTH;
cause = tvb_get_guint8(tvb, offset);
- if (!match_strval(cause, sccp_error_cause_values))
+ if (!try_val_to_str(cause, sccp_error_cause_values))
RETURN_FALSE;
}
break;
@@ -1264,7 +1264,7 @@ looks_like_valid_sccp(guint32 frame_num _U_, tvbuff_t *tvb, guint8 my_mtp3_stand
opt_param = tvb_get_guint8(tvb, opt_ptr);
/* Check if the (1st) optional parameter tag is valid */
- if (!match_strval(opt_param, sccp_parameter_values))
+ if (!try_val_to_str(opt_param, sccp_parameter_values))
RETURN_FALSE;
/* Check that the (1st) parameter length is within bounds */
@@ -2069,7 +2069,7 @@ dissect_sccp_class_param(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gu
pi = proto_tree_add_item(tree, hf_sccp_handling, tvb, 0, length, ENC_NA);
handling >>= CLASS_SPARE_HANDLING_SHIFT;
- if (match_strval(handling, sccp_class_handling_values) == NULL) {
+ if (try_val_to_str(handling, sccp_class_handling_values) == NULL) {
expert_add_info_format(pinfo, pi, PI_MALFORMED, PI_ERROR, "Invalid message handling");
}
}