diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2005-09-02 09:28:30 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2005-09-02 09:28:30 +0000 |
commit | 63b909db6a30f6b009b3f7c5e23311476e510096 (patch) | |
tree | a969544e4f697f7fece69fa97b86b6becc0d34ef | |
parent | 4256decaf29c39cfdbe701f1d5c004e1143d5118 (diff) | |
download | wireshark-63b909db6a30f6b009b3f7c5e23311476e510096.tar.gz |
another switch that should be a value_string
svn path=/trunk/; revision=15669
-rw-r--r-- | epan/dissectors/packet-ansi_637.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/epan/dissectors/packet-ansi_637.c b/epan/dissectors/packet-ansi_637.c index a3249f85c8..172e5749df 100644 --- a/epan/dissectors/packet-ansi_637.c +++ b/epan/dissectors/packet-ansi_637.c @@ -550,6 +550,14 @@ tele_param_rel_timestamp(tvbuff_t *tvb, proto_tree *tree, guint len, guint32 off } } +static const value_string tele_param_pri_ind_strings[] = { + { 0, "Normal" }, + { 1, "Interactive" }, + { 2, "Urgent" }, + { 3, "Emergency" }, + { 0, NULL } +}; + static void tele_param_pri_ind(tvbuff_t *tvb, proto_tree *tree, guint len, guint32 offset) { @@ -560,13 +568,7 @@ tele_param_pri_ind(tvbuff_t *tvb, proto_tree *tree, guint len, guint32 offset) oct = tvb_get_guint8(tvb, offset); - switch ((oct & 0xc0) >> 6) - { - case 0: str = "Normal"; break; - case 1: str = "Interactive"; break; - case 2: str = "Urgent"; break; - case 3: str = "Emergency"; break; - } + str=val_to_str((oct&0xc0)>>6, tele_param_pri_ind_strings, "Unknown"); other_decode_bitfield_value(ansi_637_bigbuf, oct, 0xc0, 8); proto_tree_add_text(tree, tvb, offset, 1, |