aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2005-02-03 21:51:35 +0000
committerAnders Broman <anders.broman@ericsson.com>2005-02-03 21:51:35 +0000
commit72468bb0e5660867873a2febbeca74da83696d3d (patch)
treef9d72f9a7be3d94de52b9aadf939bdfbdcfbc440 /epan/dissectors
parent4d97ad9eb18d6556f7e78b81ac6ee3edbc29b2aa (diff)
From Francisco Alcoba:
Patch for graphing ISUP calls. It shows the type of message, in the first one the calling and called numbers, and in the second the SPs and CIC; in releases it shows the cause value. svn path=/trunk/; revision=13263
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-isup.c4
-rw-r--r--epan/dissectors/packet-isup.h1
-rw-r--r--epan/dissectors/packet-q931.c14
-rw-r--r--epan/dissectors/packet-q931.h2
4 files changed, 12 insertions, 9 deletions
diff --git a/epan/dissectors/packet-isup.c b/epan/dissectors/packet-isup.c
index 63880f559b..79ea708f9c 100644
--- a/epan/dissectors/packet-isup.c
+++ b/epan/dissectors/packet-isup.c
@@ -1318,6 +1318,7 @@ static dissector_handle_t q931_ie_handle = NULL;
/* Info for the tap that must be passed between procedures */
gchar *tap_called_number = NULL;
gchar *tap_calling_number = NULL;
+guint8 tap_cause_value = 0;
/* ------------------------------------------------------------------
Mapping number to ASCII-character
@@ -1684,7 +1685,7 @@ dissect_isup_cause_indicators_parameter(tvbuff_t *parameter_tvb, proto_tree *par
proto_tree_add_text(parameter_tree, parameter_tvb,0, -1, "Cause indicators (-> Q.850)");
dissect_q931_cause_ie(parameter_tvb,0,length,
parameter_tree,
- hf_isup_cause_indicator);
+ hf_isup_cause_indicator, &tap_cause_value);
proto_item_set_text(parameter_item, "Cause indicators, see Q.850 (%u byte%s length)", length , plurality(length, "", "s"));
}
@@ -5368,6 +5369,7 @@ dissect_isup_message(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *isup
tap_rec.calling_number=tap_calling_number;
tap_rec.called_number=tap_called_number;
+ tap_rec.cause_value=tap_cause_value;
tap_queue_packet(isup_tap, pinfo, &tap_rec);
}
diff --git a/epan/dissectors/packet-isup.h b/epan/dissectors/packet-isup.h
index edae5fb6c0..5c04e29e9f 100644
--- a/epan/dissectors/packet-isup.h
+++ b/epan/dissectors/packet-isup.h
@@ -31,6 +31,7 @@ typedef struct _isup_tap_rec_t {
/* added for VoIP calls analysis, see gtk/voip_calls.c*/
gchar *called_number;
gchar *calling_number;
+ guint8 cause_value;
} isup_tap_rec_t;
diff --git a/epan/dissectors/packet-q931.c b/epan/dissectors/packet-q931.c
index 6bb9ba79ed..4e2f40000b 100644
--- a/epan/dissectors/packet-q931.c
+++ b/epan/dissectors/packet-q931.c
@@ -1173,10 +1173,9 @@ static const value_string q931_rejection_reason_vals[] = {
void
dissect_q931_cause_ie(tvbuff_t *tvb, int offset, int len,
- proto_tree *tree, int hf_cause_value)
+ proto_tree *tree, int hf_cause_value, guint8 *cause_value)
{
guint8 octet;
- guint8 cause_value;
guint8 coding_standard;
guint8 rejection_reason;
@@ -1217,21 +1216,21 @@ dissect_q931_cause_ie(tvbuff_t *tvb, int offset, int len,
if (len == 0)
return;
octet = tvb_get_guint8(tvb, offset);
- cause_value = octet & 0x7F;
+ *cause_value = octet & 0x7F;
/* add cause value to packet info for use in tap */
if(have_valid_q931_pi) {
- q931_pi->cause_value = cause_value;
+ q931_pi->cause_value = *cause_value;
}
- proto_tree_add_uint(tree, hf_cause_value, tvb, offset, 1, cause_value);
+ proto_tree_add_uint(tree, hf_cause_value, tvb, offset, 1, *cause_value);
proto_tree_add_boolean(tree, hf_q931_extension_ind, tvb, offset, 1, octet);
offset += 1;
len -= 1;
if (len == 0)
return;
- switch (cause_value) {
+ switch (*cause_value) {
case Q931_CAUSE_UNALLOC_NUMBER:
case Q931_CAUSE_NO_ROUTE_TO_DEST:
@@ -2499,6 +2498,7 @@ dissect_q931_IEs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *root_tree,
proto_item *ti;
proto_tree *ie_tree = NULL;
guint8 info_element;
+ guint8 dummy;
guint16 info_element_len;
int codeset, locked_codeset;
gboolean non_locking_shift, first_segment;
@@ -2741,7 +2741,7 @@ dissect_q931_IEs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *root_tree,
dissect_q931_cause_ie(tvb,
offset + 2, info_element_len,
ie_tree,
- hf_q931_cause_value);
+ hf_q931_cause_value, &dummy);
break;
}
if (q931_tree != NULL) {
diff --git a/epan/dissectors/packet-q931.h b/epan/dissectors/packet-q931.h
index 0f0a12ced2..c83c2c45cf 100644
--- a/epan/dissectors/packet-q931.h
+++ b/epan/dissectors/packet-q931.h
@@ -31,7 +31,7 @@ extern void dissect_q931_bearer_capability_ie(tvbuff_t *, int, int,
proto_tree *);
extern void dissect_q931_cause_ie(tvbuff_t *, int, int,
- proto_tree *, int);
+ proto_tree *, int, guint8 *);
extern void dissect_q931_progress_indicator_ie(tvbuff_t *, int, int,
proto_tree *);