aboutsummaryrefslogtreecommitdiffstats
path: root/packet-q931.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-11-09 08:09:18 +0000
committerGuy Harris <guy@alum.mit.edu>2002-11-09 08:09:18 +0000
commitc9e5b47d217330c4ced01cb27fb1f5dad4616afa (patch)
treebd60a34e7f0c8110ccd6fde874267c589ada7820 /packet-q931.c
parentcc293e051dc13fdb9a3f3b38f22a2a2ac67149af (diff)
downloadwireshark-c9e5b47d217330c4ced01cb27fb1f5dad4616afa.tar.gz
wireshark-c9e5b47d217330c4ced01cb27fb1f5dad4616afa.tar.bz2
wireshark-c9e5b47d217330c4ced01cb27fb1f5dad4616afa.zip
Display the call reference flag, and don't include that bit in the call
reference value. svn path=/trunk/; revision=6593
Diffstat (limited to 'packet-q931.c')
-rw-r--r--packet-q931.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/packet-q931.c b/packet-q931.c
index a9edf0acf8..e18ca0f5a5 100644
--- a/packet-q931.c
+++ b/packet-q931.c
@@ -2,7 +2,7 @@
* Routines for Q.931 frame disassembly
* Guy Harris <guy@alum.mit.edu>
*
- * $Id: packet-q931.c,v 1.48 2002/09/28 23:31:39 gerald Exp $
+ * $Id: packet-q931.c,v 1.49 2002/11/09 08:09:18 guy Exp $
*
* Modified by Andreas Sikkema for possible use with H.323
*
@@ -55,6 +55,7 @@
static int proto_q931 = -1;
static int hf_q931_discriminator = -1;
static int hf_q931_call_ref_len = -1;
+static int hf_q931_call_ref_flag = -1;
static int hf_q931_call_ref = -1;
static int hf_q931_message_type = -1;
@@ -143,6 +144,11 @@ static const value_string q931_message_type_vals[] = {
{ 0, NULL }
};
+static const true_false_string tfs_call_ref_flag = {
+ "Message sent to originating side",
+ "Message sent from originating side"
+};
+
/*
* Information elements.
*/
@@ -2132,10 +2138,14 @@ dissect_q931_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_tree_add_uint(q931_tree, hf_q931_call_ref_len, tvb, offset, 1, call_ref_len);
offset += 1;
if (call_ref_len != 0) {
- /* XXX - split this into flag and value */
tvb_memcpy(tvb, call_ref, offset, call_ref_len);
- if (q931_tree != NULL)
- proto_tree_add_bytes(q931_tree, hf_q931_call_ref, tvb, offset, call_ref_len, call_ref);
+ if (q931_tree != NULL) {
+ proto_tree_add_boolean(q931_tree, hf_q931_call_ref_flag,
+ tvb, offset, 1, (call_ref[0] & 0x80) != 0);
+ call_ref[0] &= 0x7F;
+ proto_tree_add_bytes(q931_tree, hf_q931_call_ref,
+ tvb, offset, call_ref_len, call_ref);
+ }
offset += call_ref_len;
}
message_type = tvb_get_guint8(tvb, offset);
@@ -2590,6 +2600,10 @@ proto_register_q931(void)
{ "Call reference value length", "q931.call_ref_len", FT_UINT8, BASE_DEC, NULL, 0x0,
"", HFILL }},
+ { &hf_q931_call_ref_flag,
+ { "Call reference flag", "q931.call_ref_flag", FT_BOOLEAN, BASE_NONE, TFS(&tfs_call_ref_flag), 0x0,
+ "", HFILL }},
+
{ &hf_q931_call_ref,
{ "Call reference value", "q931.call_ref", FT_BYTES, BASE_HEX, NULL, 0x0,
"", HFILL }},