aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ssl.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-ssl.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-ssl.c')
-rw-r--r--epan/dissectors/packet-ssl.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/epan/dissectors/packet-ssl.c b/epan/dissectors/packet-ssl.c
index f1ac01db2e..e8b70ec3c1 100644
--- a/epan/dissectors/packet-ssl.c
+++ b/epan/dissectors/packet-ssl.c
@@ -1842,10 +1842,10 @@ dissect_ssl3_alert(tvbuff_t *tvb, packet_info *pinfo,
/* first lookup the names for the alert level and description */
byte = tvb_get_guint8(tvb, offset); /* grab the level byte */
- level = match_strval(byte, ssl_31_alert_level);
+ level = try_val_to_str(byte, ssl_31_alert_level);
byte = tvb_get_guint8(tvb, offset+1); /* grab the desc byte */
- desc = match_strval(byte, ssl_31_alert_description);
+ desc = try_val_to_str(byte, ssl_31_alert_description);
/* now set the text in the record layer line */
if (level && desc)
@@ -1939,7 +1939,7 @@ dissect_ssl3_handshake(tvbuff_t *tvb, packet_info *pinfo,
* message is actually a known handshake message type.
*/
if (offset + length <= record_length)
- msg_type_str = match_strval(msg_type, ssl_31_handshake_type);
+ msg_type_str = try_val_to_str(msg_type, ssl_31_handshake_type);
else
msg_type_str = NULL;
@@ -2260,7 +2260,7 @@ dissect_ssl3_heartbeat(tvbuff_t *tvb, packet_info *pinfo,
/* first lookup the names for the message type and the payload length */
byte = tvb_get_guint8(tvb, offset);
- type = match_strval(byte, tls_heartbeat_type);
+ type = try_val_to_str(byte, tls_heartbeat_type);
payload_length = tvb_get_ntohs(tvb, offset + 1);
padding_length = record_length - 3 - payload_length;
@@ -3677,7 +3677,7 @@ dissect_ssl2_record(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* see if the msg_type is valid; if not the payload is
* probably encrypted, so note that fact and bail
*/
- msg_type_str = match_strval(msg_type,
+ msg_type_str = try_val_to_str(msg_type,
(*conv_version == SSL_VER_PCT)
? pct_msg_types : ssl_20_msg_types);
if (!msg_type_str
@@ -4709,7 +4709,7 @@ ssl_is_valid_ssl_version(const guint16 version)
{
const gchar *version_str;
- version_str = match_strval(version, ssl_versions);
+ version_str = try_val_to_str(version, ssl_versions);
return version_str != NULL;
}