From Anders Broman: dissect access transport, user teleservice info,

user service infor prime, and echo control information parameters.

svn path=/trunk/; revision=9668
This commit is contained in:
Guy Harris 2004-01-15 02:23:18 +00:00
parent 065edac68b
commit 4495c27aa5
3 changed files with 132 additions and 32 deletions

View File

@ -1,6 +1,7 @@
/* packet-isup.c
* Routines for ISUP dissection
* Copyright 2001, Martina Obermeier <martina.obermeier@icn.siemens.de>
* Copyright 2004, Anders Broman <anders.broman@ericsson.com>
* Modified 2003-09-10 by Anders Broman
* <anders.broman@ericsson.com>
* Inserted routines for BICC dissection according to Q.765.5 Q.1902 Q.1970 Q.1990,
@ -8,7 +9,7 @@
* Modified 2004-01-10 by Anders Broman to add abillity to dissect
* Content type application/ISUP RFC 3204 used in SIP-T
*
* $Id: packet-isup.c,v 1.45 2004/01/13 23:11:19 guy Exp $
* $Id: packet-isup.c,v 1.46 2004/01/15 02:23:18 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -1139,6 +1140,7 @@ static const true_false_string isup_Sequence_ind_value = {
#define DC_8BIT_MASK 0x0C
#define FE_8BIT_MASK 0x30
#define GF_8BIT_MASK 0x60
#define HG_8BIT_MASK 0xC0
#define GFE_8BIT_MASK 0x70
#define DCBA_8BIT_MASK 0x0F
#define EDCBA_8BIT_MASK 0x1F
@ -1218,8 +1220,13 @@ static int hf_isup_screening_indicator = -1;
static int hf_isup_screening_indicator_enhanced = -1;
static int hf_isup_called_party_odd_address_signal_digit = -1;
static int hf_isup_calling_party_odd_address_signal_digit = -1;
static int hf_isup_called_party_even_address_signal_digit = -1;
static int hf_isup_calling_party_even_address_signal_digit = -1;
static int hf_isup_called_party_even_address_signal_digit = -1;
static int hf_isup_calling_party_even_address_signal_digit = -1;
static int hf_isup_OECD_inf_ind = -1;
static int hf_isup_IECD_inf_ind = -1;
static int hf_isup_OECD_req_ind = -1;
static int hf_isup_IECD_req_ind = -1;
static int hf_isup_calling_party_address_request_indicator = -1;
static int hf_isup_info_req_holding_indicator = -1;
@ -1853,10 +1860,16 @@ dissect_isup_call_reference_parameter(tvbuff_t *parameter_tvb, proto_tree *param
Dissector Parameter Access Transport - no detailed dissection since defined in Rec. Q.931
*/
static void
dissect_isup_access_transport_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
dissect_isup_access_transport_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree,
proto_item *parameter_item, packet_info *pinfo)
{ guint length = tvb_reported_length(parameter_tvb);
proto_tree_add_text(parameter_tree, parameter_tvb, 0, -1, "Access transport parameter field (-> Q.931)");
proto_item_set_text(parameter_item, "Access transport, see Q.931 (%u byte%s length)", length , plurality(length, "", "s"));
gint offset = 0;
proto_tree_add_text(parameter_tree, parameter_tvb, 0, -1,
"Access transport parameter field (-> Q.931)");
dissect_q931_IEs(parameter_tvb, pinfo, NULL, parameter_tree, FALSE, offset);
proto_item_set_text(parameter_item, "Access transport (%u byte%s length)", length , plurality(length, "", "s"));
}
/* dissect x.213 NSAP coded Address */
@ -3423,7 +3436,7 @@ static void
dissect_isup_user_service_information_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
{ guint length = tvb_length(parameter_tvb);
proto_tree_add_text(parameter_tree, parameter_tvb, 0, length, "User service information (-> Q.931 Bearer_capability)");
proto_item_set_text(parameter_item, "User service information, see Q.931 (%u byte%s length)", length , plurality(length, "", "s"));
proto_item_set_text(parameter_item, "User service information,(%u byte%s length)", length , plurality(length, "", "s"));
dissect_q931_bearer_capability_ie(parameter_tvb,
0, length,
parameter_tree);
@ -3658,7 +3671,11 @@ static void
dissect_isup_user_service_information_prime_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
{ guint length = tvb_length(parameter_tvb);
proto_tree_add_text(parameter_tree, parameter_tvb, 0, length, "User service information prime (-> Q.931)");
proto_item_set_text(parameter_item, "User service information prime, see Q.931 (%u byte%s length)", length , plurality(length, "", "s"));
dissect_q931_bearer_capability_ie(parameter_tvb,
0, length,
parameter_tree);
proto_item_set_text(parameter_item, "User service information prime, (%u byte%s length)", length , plurality(length, "", "s"));
}
/* ------------------------------------------------------------------
Dissector Parameter Propagation delay counter
@ -3701,9 +3718,15 @@ dissect_isup_service_activation_parameter(tvbuff_t *parameter_tvb, proto_tree *p
*/
static void
dissect_isup_user_teleservice_information_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
{ guint length = tvb_length(parameter_tvb);
proto_tree_add_text(parameter_tree, parameter_tvb, 0, length, "User teleservice information (-> Q.931)");
proto_item_set_text(parameter_item, "User teleservice information, see Q.931");
{
guint length = tvb_length(parameter_tvb);
proto_tree_add_text(parameter_tree, parameter_tvb, 0, length,
"User teleservice information (-> Q.931)");
dissect_q931_high_layer_compat_ie(parameter_tvb, 0, length, parameter_tree);
proto_item_set_text(parameter_item,
"User teleservice information");
}
/* ------------------------------------------------------------------
Dissector Parameter Transmission medium requirement used
@ -3732,12 +3755,57 @@ dissect_isup_call_diversion_information_parameter(tvbuff_t *parameter_tvb, proto
/* ------------------------------------------------------------------
Dissector Parameter Echo control information
*/
static const value_string OECD_inf_ind_vals[] = {
{0x00, "no information"},
{0x01, "outgoing echo control device not included and not available"},
{0x02, "outgoing echo control device included"},
{0x03, "outgoing echo control device not included but available"},
{ 0, NULL }
};
static const value_string IECD_inf_ind_vals[] = {
{0x00, "no information"},
{0x01, "incomming echo control device not included and not available"},
{0x02, "incomming echo control device included"},
{0x03, "incomming echo control device not included but available"},
{ 0, NULL }
};
static const value_string OECD_req_ind_vals[] = {
{0x00, "no information"},
{0x01, "outgoing echo control device activation request"},
{0x02, "outgoing echo control device deactivation request"},
{0x03, "spare"},
{ 0, NULL }
};
static const value_string IECD_req_ind_vals[] = {
{0x00, "no information"},
{0x01, "incomming echo control device activation request"},
{0x02, "incomming echo control device deactivation request"},
{0x03, "spare"},
{ 0, NULL }
};
static void
dissect_isup_echo_control_information_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
{ guint8 indicator;
gint offset = 0;
indicator = tvb_get_guint8(parameter_tvb, 0);
proto_tree_add_text(parameter_tree, parameter_tvb, 0, ECHO_CONTROL_INFO_LENGTH, "Echo control information: 0x%x (refer to 3.19/Q.763 for detailed decoding)", indicator);
proto_tree_add_text(parameter_tree, parameter_tvb, 0, ECHO_CONTROL_INFO_LENGTH,
"Echo control information: 0x%x", indicator);
proto_tree_add_uint(parameter_tree, hf_isup_OECD_inf_ind,
parameter_tvb, offset, 1, indicator );
proto_tree_add_uint(parameter_tree, hf_isup_IECD_inf_ind,
parameter_tvb, offset, 1, indicator );
proto_tree_add_uint(parameter_tree, hf_isup_OECD_req_ind,
parameter_tvb, offset, 1, indicator );
proto_tree_add_uint(parameter_tree, hf_isup_IECD_req_ind,
parameter_tvb, offset, 1, indicator );
proto_item_set_text(parameter_item, "Echo control information: 0x%x", indicator);
}
/* ------------------------------------------------------------------
@ -4469,7 +4537,7 @@ dissect_isup_optional_parameter(tvbuff_t *optional_parameters_tvb,packet_info *p
dissect_isup_transmission_medium_requirement_parameter(parameter_tvb, parameter_tree, parameter_item);
break;
case PARAM_TYPE_ACC_TRANSP:
dissect_isup_access_transport_parameter(parameter_tvb, parameter_tree, parameter_item);
dissect_isup_access_transport_parameter(parameter_tvb, parameter_tree, parameter_item, pinfo);
break;
case PARAM_TYPE_CALLED_PARTY_NR:
dissect_isup_called_party_number_parameter(parameter_tvb, parameter_tree, parameter_item);
@ -5873,6 +5941,26 @@ proto_register_isup(void)
FT_UINT16, BASE_HEX, VALS(isup_calling_party_address_response_ind_value), BA_16BIT_MASK,
"", HFILL }},
{ &hf_isup_OECD_inf_ind,
{ "OECD information indicator", "isup.OECD_inf_ind_vals",
FT_UINT8, BASE_HEX, VALS(OECD_inf_ind_vals), BA_8BIT_MASK,
"", HFILL }},
{ &hf_isup_IECD_inf_ind,
{ "IECD information indicator", "isup.IECD_inf_ind_vals",
FT_UINT8, BASE_HEX, VALS(IECD_inf_ind_vals), DC_8BIT_MASK,
"", HFILL }},
{ &hf_isup_OECD_req_ind,
{ "OECD request indicator", "isup.OECD_req_ind_vals",
FT_UINT8, BASE_HEX, VALS(OECD_req_ind_vals), FE_8BIT_MASK,
"", HFILL }},
{ &hf_isup_IECD_req_ind,
{ "IECD request indicator", "isup.IECD_req_ind_vals",
FT_UINT8, BASE_HEX, VALS(IECD_req_ind_vals), HG_8BIT_MASK,
"", HFILL }},
{ &hf_isup_hold_provided_indicator,
{ "Hold provided indicator", "isup.hold_provided_indicator",
FT_BOOLEAN, 16, TFS(&isup_hold_provided_ind_value), C_16BIT_MASK,

View File

@ -2,7 +2,7 @@
* Routines for Q.931 frame disassembly
* Guy Harris <guy@alum.mit.edu>
*
* $Id: packet-q931.c,v 1.63 2003/11/10 08:14:07 sahlberg Exp $
* $Id: packet-q931.c,v 1.64 2004/01/15 02:23:18 guy Exp $
*
* Modified by Andreas Sikkema for possible use with H.323
*
@ -2273,15 +2273,6 @@ dissect_q931_ia5_ie(tvbuff_t *tvb, int offset, int len, proto_tree *tree,
}
}
static const value_string q931_codeset_vals[] = {
{ 0x00, "Q.931 information elements" },
{ 0x04, "Information elements for ISO/IEC use" },
{ 0x05, "Information elements for national use" },
{ 0x06, "Information elements specific to the local network" },
{ 0x07, "User-specific information elements" },
{ 0x00, NULL },
};
static void
dissect_q931_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
gboolean is_tpkt)
@ -2289,15 +2280,9 @@ dissect_q931_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
int offset = 0;
proto_tree *q931_tree = NULL;
proto_item *ti;
proto_tree *ie_tree = NULL;
guint8 call_ref_len;
guint8 call_ref[15];
guint8 message_type;
guint8 info_element;
guint16 info_element_len;
int codeset, locked_codeset;
gboolean non_locking_shift;
tvbuff_t *h225_tvb, *next_tvb;
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "Q.931");
@ -2338,12 +2323,36 @@ dissect_q931_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/*
* And now for the information elements....
*/
dissect_q931_IEs(tvb, pinfo, tree, q931_tree,is_tpkt, offset);
}
static const value_string q931_codeset_vals[] = {
{ 0x00, "Q.931 information elements" },
{ 0x04, "Information elements for ISO/IEC use" },
{ 0x05, "Information elements for national use" },
{ 0x06, "Information elements specific to the local network" },
{ 0x07, "User-specific information elements" },
{ 0x00, NULL },
};
void
dissect_q931_IEs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_tree *q931_tree, gboolean is_tpkt, int offset)
{
proto_item *ti;
proto_tree *ie_tree = NULL;
guint8 info_element;
guint16 info_element_len;
int codeset, locked_codeset;
gboolean non_locking_shift;
tvbuff_t *h225_tvb, *next_tvb;
codeset = locked_codeset = 0; /* start out in codeset 0 */
non_locking_shift = TRUE;
while (tvb_reported_length_remaining(tvb, offset) > 0) {
info_element = tvb_get_guint8(tvb, offset);
/* Check for the codeset shift */
/* Check for the codeset shift */
if ((info_element & Q931_IE_SO_MASK) &&
((info_element & Q931_IE_SO_IDENTIFIER_MASK) == Q931_IE_SHIFT)) {
non_locking_shift = info_element & Q931_IE_SHIFT_NON_LOCKING;

View File

@ -3,7 +3,7 @@
* disassembly
* Guy Harris <guy@alum.mit.edu>
*
* $Id: packet-q931.h,v 1.9 2003/04/14 18:04:13 guy Exp $
* $Id: packet-q931.h,v 1.10 2004/01/15 02:23:18 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -42,6 +42,9 @@ extern void dissect_q931_high_layer_compat_ie(tvbuff_t *, int, int,
extern void dissect_q931_user_user_ie(tvbuff_t *tvb, int offset, int len,
proto_tree *tree);
extern void dissect_q931_IEs(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, proto_tree *q931_tree, gboolean is_tpkt, int offset);
extern const value_string q931_cause_location_vals[];
extern const value_string q931_cause_code_vals[];