parent
10752972ea
commit
eafb792669
|
@ -40,24 +40,49 @@
|
|||
#include <epan/proto.h>
|
||||
|
||||
/* Initialize the protocol and registered fields */
|
||||
static int proto_dpnss = -1;
|
||||
static int hf_dpnss_msg_grp_id = -1;
|
||||
static int hf_dpnss_cc_msg_type = -1;
|
||||
static int hf_dpnss_e2e_msg_type = -1;
|
||||
static int hf_dpnss_LbL_msg_type = -1;
|
||||
static int hf_dpnss_ext_bit = -1;
|
||||
static int hf_dpnss_sic_type = -1;
|
||||
static int hf_dpnss_sic_details_for_speech = -1;
|
||||
static int hf_dpnss_sic_details_for_data1 = -1;
|
||||
static int hf_dpnss_sic_details_for_data2 = -1;
|
||||
static int proto_dpnss = -1;
|
||||
static int hf_dpnss_msg_grp_id = -1;
|
||||
static int hf_dpnss_cc_msg_type = -1;
|
||||
static int hf_dpnss_e2e_msg_type = -1;
|
||||
static int hf_dpnss_LbL_msg_type = -1;
|
||||
static int hf_dpnss_ext_bit = -1;
|
||||
static int hf_dpnss_ext_bit_notall = -1;
|
||||
static int hf_dpnss_sic_type = -1;
|
||||
static int hf_dpnss_sic_details_for_speech = -1;
|
||||
static int hf_dpnss_sic_details_for_data1 = -1;
|
||||
static int hf_dpnss_sic_details_for_data2 = -1;
|
||||
static int hf_dpnss_dest_addr = -1;
|
||||
static int hf_dpnss_sic_oct2_data_type = -1;
|
||||
static int hf_dpnss_sic_oct2_duplex = -1;
|
||||
static int hf_dpnss_sic_oct2_sync_data_format = -1;
|
||||
static int hf_dpnss_sic_oct2_sync_byte_timing = -1;
|
||||
static int hf_dpnss_sic_oct2_net_ind_clk = -1;
|
||||
static int hf_dpnss_sic_oct2_async_data = -1;
|
||||
static int hf_dpnss_sic_oct2_async_flow_ctrl = -1;
|
||||
static int hf_dpnss_clearing_cause = -1;
|
||||
static int hf_dpnss_rejection_cause = -1;
|
||||
|
||||
#define DPNNS_MESSAGE_GROUP_CC 0
|
||||
#define DPNNS_MESSAGE_GROUP_E2E 2
|
||||
#define DPNNS_MESSAGE_GROUP_LbL 4
|
||||
|
||||
#define DPNSS_CC_MDG_ISRMC 0
|
||||
#define DPNSS_CC_MSG_ISRM_C 0
|
||||
#define DPNSS_CC_MSG_ISRM_I 1
|
||||
#define DPNSS_CC_MSG_RM_C 2
|
||||
#define DPNSS_CC_MSG_RM_I 3
|
||||
#define DPNSS_CC_MSG_CCM 5
|
||||
#define DPNSS_CC_MSG_NIM 6
|
||||
#define DPNSS_CC_MSG_CRM 8
|
||||
#define DPNSS_CC_MSG_NAM 9
|
||||
#define DPNSS_CC_MSG_RRM 10
|
||||
#define DPNSS_CC_MSG_SSRM_I 11
|
||||
#define DPNSS_CC_MSG_SSRM_C 12
|
||||
|
||||
/* Initialize the subtree pointers */
|
||||
static int ett_dpnss = -1;
|
||||
static int ett_dpnss = -1;
|
||||
static int ett_dpnss_sel_field = -1;
|
||||
static int ett_dpnss_sic_field = -1;
|
||||
static int ett_dpnss_ind_field = -1;
|
||||
|
||||
static const value_string dpnss_msg_grp_id_vals[] = {
|
||||
{0, "Call Control Message Group"},
|
||||
|
@ -67,33 +92,33 @@ static const value_string dpnss_msg_grp_id_vals[] = {
|
|||
};
|
||||
|
||||
static const value_string dpnss_cc_msg_type_vals[] = {
|
||||
{0, "INITIAL SERVICE REQUEST Message (COMPLETE) - ISRM (C)"},
|
||||
{1, "INITIAL SERVICE REQUEST Message (INCOMPLETE) - ISRM(I)"},
|
||||
{2, "RECALL Message (COMPLETE) - RM(C)"},
|
||||
{3, "RECALL Message (INCOMPLETE) - RM(I)"},
|
||||
{5, "CALL CONNECTED Message - CCM"},
|
||||
{6, "NETWORK INDICATION Message - NIM"},
|
||||
{8, "CLEAR REQUEST Message - CRM/CLEAR INDICATION Message - CIM"}, /* Humm chek 2.1.7/2.1.8 - depends on dir? */
|
||||
{9, "NUMBER ACKNOWLEDGE Message - NAM"},
|
||||
{10, "RECALL REJECTION Message - RRM"},
|
||||
{11, "SUBSEQUENT SERVICE REQUEST Message (INCOMPLETE) - SSRM(I)"},
|
||||
{12, "SUBSEQUENT SERVICE REQUEST Message (COMPLETE) - SSRM(C)"},
|
||||
{DPNSS_CC_MSG_ISRM_C, "INITIAL SERVICE REQUEST Message (COMPLETE) - ISRM (C)"},
|
||||
{DPNSS_CC_MSG_ISRM_I, "INITIAL SERVICE REQUEST Message (INCOMPLETE) - ISRM(I)"},
|
||||
{DPNSS_CC_MSG_RM_C, "RECALL Message (COMPLETE) - RM(C)"},
|
||||
{DPNSS_CC_MSG_RM_I, "RECALL Message (INCOMPLETE) - RM(I)"},
|
||||
{DPNSS_CC_MSG_CCM, "CALL CONNECTED Message - CCM"},
|
||||
{DPNSS_CC_MSG_NIM, "NETWORK INDICATION Message - NIM"},
|
||||
{DPNSS_CC_MSG_CRM, "CLEAR REQUEST Message - CRM/CLEAR INDICATION Message - CIM"}, /* Humm chek 2.1.7/2.1.8 - depends on dir? */
|
||||
{DPNSS_CC_MSG_NAM, "NUMBER ACKNOWLEDGE Message - NAM"},
|
||||
{DPNSS_CC_MSG_RRM, "RECALL REJECTION Message - RRM"},
|
||||
{DPNSS_CC_MSG_SSRM_I, "SUBSEQUENT SERVICE REQUEST Message (INCOMPLETE) - SSRM(I)"},
|
||||
{DPNSS_CC_MSG_SSRM_C, "SUBSEQUENT SERVICE REQUEST Message (COMPLETE) - SSRM(C)"},
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
|
||||
static const value_string dpnss_cc_msg_short_type_vals[] = {
|
||||
{0, "ISRM (C)"},
|
||||
{1, "ISRM(I)"},
|
||||
{2, "RM(C)"},
|
||||
{3, "RM(I)"},
|
||||
{5, "CCM"},
|
||||
{6, "NIM"},
|
||||
{8, "CRM/CIM"}, /* Humm chek 2.1.7/2.1.8 - depends on dir? */
|
||||
{9, "NAM"},
|
||||
{10, "RRM"},
|
||||
{11, "SSRM(I)"},
|
||||
{12, "SSRM(C)"},
|
||||
{DPNSS_CC_MSG_ISRM_C, "ISRM (C)"},
|
||||
{DPNSS_CC_MSG_ISRM_I, "ISRM(I)"},
|
||||
{DPNSS_CC_MSG_RM_C, "RM(C)"},
|
||||
{DPNSS_CC_MSG_RM_I, "RM(I)"},
|
||||
{DPNSS_CC_MSG_CCM, "CCM"},
|
||||
{DPNSS_CC_MSG_NIM, "NIM"},
|
||||
{DPNSS_CC_MSG_CRM, "CRM/CIM"}, /* Humm chek 2.1.7/2.1.8 - depends on dir? */
|
||||
{DPNSS_CC_MSG_NAM, "NAM"},
|
||||
{DPNSS_CC_MSG_RRM, "RRM"},
|
||||
{DPNSS_CC_MSG_SSRM_I, "SSRM(I)"},
|
||||
{DPNSS_CC_MSG_SSRM_C, "SSRM(C)"},
|
||||
{0, NULL }
|
||||
};
|
||||
|
||||
|
@ -146,6 +171,10 @@ static const true_false_string dpnss_ext_bit_vals = {
|
|||
"no further octets"
|
||||
};
|
||||
|
||||
static const true_false_string dpnss_ext_bit_no_ext_vals = {
|
||||
"no further octets",
|
||||
"Invalid"
|
||||
};
|
||||
/* SECTION 4 ANNEX 1 */
|
||||
static const value_string dpnss_sic_type_type_vals[] = {
|
||||
{0, "invalid"},
|
||||
|
@ -159,7 +188,7 @@ static const value_string dpnss_sic_type_type_vals[] = {
|
|||
{ 0, NULL }
|
||||
};
|
||||
|
||||
static const value_string dpnss_sic_sic_details_for_speech_vals[] = {
|
||||
static const value_string dpnss_sic_details_for_speech_vals[] = {
|
||||
{0, "64 kbit/s PCM G.711 A-Law or analogue"},
|
||||
{1, "32 kbit/s ADPCM G.721"},
|
||||
{2, "64 kbit/s PCM G.711 u-Law or analogue"},
|
||||
|
@ -179,7 +208,7 @@ static const value_string dpnss_sic_sic_details_for_speech_vals[] = {
|
|||
{ 0, NULL }
|
||||
};
|
||||
|
||||
static const value_string dpnss_sic_sic_details_for_data_rates1_vals[] = {
|
||||
static const value_string dpnss_sic_details_for_data_rates1_vals[] = {
|
||||
{0, "64000 bit/s"},
|
||||
{1, "56000 bit/s"},
|
||||
{2, "48000 bit/s"},
|
||||
|
@ -199,7 +228,7 @@ static const value_string dpnss_sic_sic_details_for_data_rates1_vals[] = {
|
|||
{ 0, NULL }
|
||||
};
|
||||
|
||||
static const value_string dpnss_sic_sic_details_for_data_rates2_vals[] = {
|
||||
static const value_string dpnss_sic_details_for_data_rates2_vals[] = {
|
||||
{0, "300 bit/s"},
|
||||
{1, "200 bit/s"},
|
||||
{2, "150 bit/s"},
|
||||
|
@ -218,87 +247,90 @@ static const value_string dpnss_sic_sic_details_for_data_rates2_vals[] = {
|
|||
{15, "invalid"},
|
||||
{ 0, NULL }
|
||||
};
|
||||
/* Octet 2 */
|
||||
|
||||
/* A suplemetarry string
|
||||
*
|
||||
static const value_string dpnss_sic_oct2_data_type_vals[] = {
|
||||
{0, "Invalid"},
|
||||
{1, "Invalid"},
|
||||
{2, "Invalid"},
|
||||
{3, "Synchronous"},
|
||||
{4, "Synchronous"},
|
||||
{5, "Asynchronous"},
|
||||
{6, "Asynchronous"},
|
||||
{7, "Asynchronous"},
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
static const true_false_string dpnss_duplex_vals = {
|
||||
"Half Duplex (HDX)",
|
||||
"Full Duplex (FDX)"
|
||||
};
|
||||
|
||||
static const true_false_string dpnss_sic_oct2_sync_data_format_vals = {
|
||||
"X.25 Packet Mode",
|
||||
"Anonymous or Unformatted"
|
||||
};
|
||||
|
||||
static const true_false_string dpnss_sic_oct2_net_ind_clk_vals = {
|
||||
"Bits E4/E5/E6 indicate phase",
|
||||
"Clock Locked to Transmission"
|
||||
};
|
||||
|
||||
static const true_false_string dpnss_provided_vals = {
|
||||
"Provided",
|
||||
"Not Provided"
|
||||
};
|
||||
|
||||
static const value_string dpnss_sic_oct2_async_data_type_vals[] = {
|
||||
{0, "Unspecified"},
|
||||
{1, "5 data bits"},
|
||||
{2, "7 data bits"},
|
||||
{3, "8 data bits"},
|
||||
{ 0, NULL }
|
||||
};
|
||||
static const true_false_string dpnss_flow_control_vals = {
|
||||
"TA has ESRA capability",
|
||||
"TA does not have ESRA capability"
|
||||
};
|
||||
|
||||
/* SECTION 4 Global Issue 7
|
||||
* ANNEX 3 CLEARING/REJECTION CAUSE CODES
|
||||
*/
|
||||
static const value_string dpnss_clearing_cause_code_vals[] = {
|
||||
{0x29, "Access Barred"},
|
||||
{0x14, "Acknowledgement"},
|
||||
{0x01, "Address Incomplete"},
|
||||
{0x08, "Busy"},
|
||||
{0x23, "Channel Out of Service"},
|
||||
{0x2d, "DTE Controlled Not Ready"},
|
||||
{0x07, "Congestion"},
|
||||
{0x30, "Call Termination"},
|
||||
{0x18, "Facility Not Registered"},
|
||||
{0x0a, "Incoming Calls Barred"},
|
||||
{0x13, "Service Incompatible"},
|
||||
{0x1a, "Message Not Understood"},
|
||||
{0x1e, "Network Address Extension-Error"},
|
||||
{0x02, "Network Termination"},
|
||||
{0x00, "Number Unobtainable"},
|
||||
{0x24, "Priority Forced Release"},
|
||||
{0x19, "Reject"},
|
||||
{0x1c, "Route Out of Service"},
|
||||
{0x04, "Subscriber Incompatible"},
|
||||
{0x15, "Signal Not Understood"},
|
||||
{0x16, "Signal Not Valid"},
|
||||
{0x09, "Subscriber Out of Service"},
|
||||
{0x1b, "Signalling System Incompatible"},
|
||||
{0x17, "Service Temporarily Unavailable"},
|
||||
{0x03, "Service Unavailable"},
|
||||
{0x1d, "Transferred"},
|
||||
{0x2e, "DTE Uncontrolled Not Ready"},
|
||||
{ 0, NULL }
|
||||
};
|
||||
static int
|
||||
dissect_dpnss_sup_info_str(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, gint offset)
|
||||
dissect_dpnss_sic(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
|
||||
{
|
||||
guint hash_offset;
|
||||
guint8 octet, type_of_data;
|
||||
|
||||
hash_offset = tvb_find_guint8(tvb, offset, -1, '#');
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
||||
static int
|
||||
dissect_dpnss_LbL_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
{
|
||||
int offset = 0;
|
||||
guint8 octet;
|
||||
|
||||
proto_tree_add_item(tree, hf_dpnss_LbL_msg_type, tvb, offset, 1, FALSE);
|
||||
octet = tvb_get_guint8(tvb,offset)&0x0f;
|
||||
offset++;
|
||||
if(check_col(pinfo->cinfo, COL_INFO))
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",
|
||||
val_to_str(octet, dpnss_LbL_msg_short_type_vals, "Unknown (%d)" ));
|
||||
switch (octet){
|
||||
default:
|
||||
proto_tree_add_text(tree, tvb, offset, 1, "Dissection of this message not supported yet");
|
||||
break;
|
||||
}
|
||||
|
||||
return offset;
|
||||
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
dissect_dpnss_e2e_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
{
|
||||
int offset = 0;
|
||||
guint8 octet;
|
||||
|
||||
proto_tree_add_item(tree, hf_dpnss_e2e_msg_type, tvb, offset, 1, FALSE);
|
||||
octet = tvb_get_guint8(tvb,offset)&0x0f;
|
||||
offset++;
|
||||
if(check_col(pinfo->cinfo, COL_INFO))
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",
|
||||
val_to_str(octet, dpnss_e2e_msg_short_type_vals, "Unknown (%d)" ));
|
||||
switch (octet){
|
||||
default:
|
||||
proto_tree_add_text(tree, tvb, offset, 1, "Dissection of this message not supported yet");
|
||||
break;
|
||||
}
|
||||
|
||||
return offset;
|
||||
|
||||
}
|
||||
|
||||
static int
|
||||
dissect_dpnss_cc_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
{
|
||||
int offset = 0;
|
||||
guint8 octet;
|
||||
guint8 type_of_data;
|
||||
|
||||
proto_tree_add_item(tree, hf_dpnss_cc_msg_type, tvb, offset, 1, FALSE);
|
||||
octet = tvb_get_guint8(tvb,offset)&0x0f;
|
||||
offset++;
|
||||
if(check_col(pinfo->cinfo, COL_INFO))
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",
|
||||
val_to_str(octet, dpnss_cc_msg_short_type_vals, "Unknown (%d)" ));
|
||||
|
||||
switch (octet){
|
||||
case DPNSS_CC_MDG_ISRMC:
|
||||
/* 2.1.1 INITIAL SERVICE REQUEST Message (COMPLETE) - ISRM (C) */
|
||||
/* Service Indicator Code
|
||||
* Note: On data calls the SIC may comprise more than one octet.
|
||||
* The Service Indicator Code is coded in accordance with ANNEX 1.
|
||||
*/
|
||||
/* Routing Information */
|
||||
octet = tvb_get_guint8(tvb,offset);
|
||||
type_of_data = (octet & 0x70)>>4;
|
||||
proto_tree_add_item(tree, hf_dpnss_ext_bit, tvb, offset, 1, FALSE);
|
||||
|
@ -325,25 +357,245 @@ dissect_dpnss_cc_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
/* Extension bit set
|
||||
* Synch/Asynchronous Information
|
||||
*/
|
||||
|
||||
/* TODO add decoding here */
|
||||
octet = tvb_get_guint8(tvb,offset);
|
||||
type_of_data = octet&0x3;
|
||||
proto_tree_add_item(tree, hf_dpnss_ext_bit_notall, tvb, offset, 1, FALSE);
|
||||
switch(type_of_data){
|
||||
case 3:
|
||||
/* Synchronous */
|
||||
case 4:
|
||||
/* Synchronous */
|
||||
proto_tree_add_item(tree, hf_dpnss_sic_oct2_net_ind_clk, tvb, offset, 1, FALSE);
|
||||
proto_tree_add_item(tree, hf_dpnss_sic_oct2_sync_data_format, tvb, offset, 1, FALSE);
|
||||
proto_tree_add_item(tree, hf_dpnss_sic_oct2_sync_byte_timing, tvb, offset, 1, FALSE);
|
||||
break;
|
||||
case 5:
|
||||
/* Asynchronous */
|
||||
case 6:
|
||||
/* Asynchronous */
|
||||
case 7:
|
||||
/* Asynchronous */
|
||||
proto_tree_add_item(tree, hf_dpnss_sic_oct2_async_flow_ctrl, tvb, offset, 1, FALSE);
|
||||
proto_tree_add_item(tree, hf_dpnss_sic_oct2_async_data, tvb, offset, 1, FALSE);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
proto_tree_add_item(tree, hf_dpnss_sic_oct2_duplex, tvb, offset, 1, FALSE);
|
||||
proto_tree_add_item(tree, hf_dpnss_sic_oct2_data_type, tvb, offset, 1, FALSE);
|
||||
offset++;
|
||||
}
|
||||
|
||||
/*
|
||||
* Selection Field
|
||||
* 2 + n structured as shown in Subsection 3.
|
||||
*/
|
||||
proto_tree_add_text(tree, tvb, offset, -1, "Selection Field: %s",tvb_format_text(tvb,offset,tvb_length_remaining(tvb, offset)));
|
||||
offset = dissect_dpnss_sup_info_str(tvb, pinfo, tree, offset);
|
||||
break;
|
||||
return offset;
|
||||
}
|
||||
|
||||
/* 3.1 Supplementary Information Strings
|
||||
* A Supplementary Information String comprises a Supplementary
|
||||
* Information Identifier which may be followed by one or more
|
||||
* Parameters. A Supplementary Information String starts with the
|
||||
* IA5 character * and ends with the IA5 character #.
|
||||
*
|
||||
* When the Supplementary Information String includes Parameters
|
||||
* these are separated from the identifier and each other by a *.
|
||||
* eg * Supplementary Information Identifier code #
|
||||
* or * Supplementary Information Identifier code * Parameter #
|
||||
* or * Supplementary Information Identifier code * Parameter * Parameter #
|
||||
* A Supplementary Information String shall be wholly contained
|
||||
* within one Selection or Indication Field (ie it shall not be
|
||||
* split between messages).
|
||||
*
|
||||
* 3.2 Supplementary Information String Identifier
|
||||
* The identifier comprises one or more IA5 numerals 0-9 which may
|
||||
* be followed by a single IA5 alpha-character suffix in the range A-Z.
|
||||
* The numerals of the identifier indicate the main function of the
|
||||
* Supplementary Information String, eg "39F" indicates "Diverting
|
||||
* on No Reply". "F" is the suffix.
|
||||
*
|
||||
* 3.5 Destination Address
|
||||
* The Destination Address comprises one or more IA5 numerals 0 to
|
||||
* 9, has no identifier code and is not prefixed by a * or
|
||||
* terminated by a #. The digits are always the last characters in
|
||||
* the Selection Block. The first Destination Address digit
|
||||
* immediately follows the # of the last Supplementary Information
|
||||
* String.
|
||||
*/
|
||||
static int
|
||||
dissect_dpnss_sup_info_str(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, gint offset)
|
||||
{
|
||||
gint start_offset, hash_offset, tvb_end_offset;
|
||||
guint8 octet;
|
||||
gboolean last_string = FALSE;
|
||||
|
||||
tvb_end_offset = tvb_length(tvb);
|
||||
|
||||
while((offset<tvb_end_offset)&&(last_string == FALSE)){
|
||||
octet = tvb_get_guint8(tvb,offset);
|
||||
if (octet == '*'){
|
||||
/* Supplementary Information String */
|
||||
start_offset = offset;
|
||||
hash_offset = tvb_find_guint8(tvb, offset, -1, '#');
|
||||
proto_tree_add_text(tree, tvb, offset, hash_offset-offset, "Supplementary Information: %s",tvb_format_text(tvb,offset,hash_offset-offset));
|
||||
|
||||
offset = hash_offset+1;
|
||||
}else{
|
||||
last_string = TRUE;
|
||||
proto_tree_add_item(tree, hf_dpnss_dest_addr, tvb, offset, -1, FALSE);
|
||||
}
|
||||
}
|
||||
return offset;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
dissect_dpnss_LbL_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
{
|
||||
int offset = 0;
|
||||
guint8 octet;
|
||||
|
||||
proto_tree_add_item(tree, hf_dpnss_LbL_msg_type, tvb, offset, 1, FALSE);
|
||||
octet = tvb_get_guint8(tvb,offset)&0x0f;
|
||||
offset++;
|
||||
if(check_col(pinfo->cinfo, COL_INFO))
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO, "%s ",
|
||||
val_to_str(octet, dpnss_LbL_msg_short_type_vals, "Unknown (%d)" ));
|
||||
switch (octet){
|
||||
default:
|
||||
proto_tree_add_text(tree, tvb, offset, 1, "Dissection of this message not supported yet");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return offset;
|
||||
|
||||
static void
|
||||
dissect_dpnss_e2e_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
{
|
||||
int offset = 0;
|
||||
guint8 octet;
|
||||
|
||||
proto_tree_add_item(tree, hf_dpnss_e2e_msg_type, tvb, offset, 1, FALSE);
|
||||
octet = tvb_get_guint8(tvb,offset)&0x0f;
|
||||
offset++;
|
||||
if(check_col(pinfo->cinfo, COL_INFO))
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO, "%s ",
|
||||
val_to_str(octet, dpnss_e2e_msg_short_type_vals, "Unknown (%d)" ));
|
||||
switch (octet){
|
||||
default:
|
||||
proto_tree_add_text(tree, tvb, offset, 1, "Dissection of this message not supported yet");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_dpnss_cc_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
{
|
||||
proto_item *sel_field_item, *sic_field_item, *ind_field_item;
|
||||
proto_tree *sel_field_tree, *sic_field_tree, *ind_field_tree;
|
||||
int offset = 0;
|
||||
int tvb_end_offset;
|
||||
guint8 octet;
|
||||
|
||||
tvb_end_offset = tvb_length(tvb);
|
||||
proto_tree_add_item(tree, hf_dpnss_cc_msg_type, tvb, offset, 1, FALSE);
|
||||
octet = tvb_get_guint8(tvb,offset)&0x0f;
|
||||
offset++;
|
||||
if(check_col(pinfo->cinfo, COL_INFO))
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",
|
||||
val_to_str(octet, dpnss_cc_msg_short_type_vals, "Unknown (%d)" ));
|
||||
|
||||
if(tree){
|
||||
switch (octet){
|
||||
case DPNSS_CC_MSG_ISRM_C:
|
||||
/* 2.1.1 INITIAL SERVICE REQUEST Message (COMPLETE) - ISRM (C) */
|
||||
/* fall trough */
|
||||
case DPNSS_CC_MSG_ISRM_I:
|
||||
/* 2.1.2 INITIAL SERVICE REQUEST Message (INCOMPLETE) - ISRM(I) */
|
||||
case DPNSS_CC_MSG_RM_C:
|
||||
/* 2.1.3 RECALL Message (COMPLETE) - RM(C) */
|
||||
/* fall trough */
|
||||
case DPNSS_CC_MSG_RM_I:
|
||||
/* 2.1.4 RECALL Message (INCOMPLETE) - RM(I)*/
|
||||
/* fall trough */
|
||||
|
||||
|
||||
/* Service Indicator Code
|
||||
* Note: On data calls the SIC may comprise more than one octet.
|
||||
* The Service Indicator Code is coded in accordance with ANNEX 1.
|
||||
*/
|
||||
sic_field_item = proto_tree_add_text(tree, tvb, offset, -1, "Selection Field: %s",tvb_format_text(tvb,offset,tvb_length_remaining(tvb, offset)));
|
||||
sic_field_tree = proto_item_add_subtree(sic_field_item, ett_dpnss_sic_field);
|
||||
offset =dissect_dpnss_sic(tvb, pinfo, sic_field_tree, offset);
|
||||
/*
|
||||
* Selection Field
|
||||
* The Selection Field contains the selection information relating
|
||||
* to a call set-up or Supplementary Service Request, and is
|
||||
* structured as shown in Subsection 3.
|
||||
*/
|
||||
sel_field_item = proto_tree_add_text(tree, tvb, offset, -1, "Selection Field: %s",tvb_format_text(tvb,offset,tvb_length_remaining(tvb, offset)));
|
||||
sel_field_tree = proto_item_add_subtree(sel_field_item, ett_dpnss_sel_field);
|
||||
offset = dissect_dpnss_sup_info_str(tvb, pinfo, sel_field_tree, offset);
|
||||
break;
|
||||
case DPNSS_CC_MSG_CCM:
|
||||
/* 2.1.5 CALL CONNECTED Message - CCM */
|
||||
if(tvb_end_offset>offset){
|
||||
/* Indication Field (Optional) */
|
||||
ind_field_item = proto_tree_add_text(tree, tvb, offset, -1, "Indication Field: %s",tvb_format_text(tvb,offset,tvb_length_remaining(tvb, offset)));
|
||||
ind_field_tree = proto_item_add_subtree(ind_field_item, ett_dpnss_ind_field);
|
||||
offset = dissect_dpnss_sup_info_str(tvb, pinfo, ind_field_tree, offset);
|
||||
}
|
||||
break;
|
||||
case DPNSS_CC_MSG_NIM:
|
||||
/* 2.1.6 NETWORK INDICATION Message - NIM */
|
||||
case DPNSS_CC_MSG_NAM:
|
||||
/* 2.1.9 NUMBER ACKNOWLEDGE Message - NAM */
|
||||
/* Indication Field */
|
||||
ind_field_item = proto_tree_add_text(tree, tvb, offset, -1, "Indication Field: %s",tvb_format_text(tvb,offset,tvb_length_remaining(tvb, offset)));
|
||||
ind_field_tree = proto_item_add_subtree(ind_field_item, ett_dpnss_ind_field);
|
||||
offset = dissect_dpnss_sup_info_str(tvb, pinfo, ind_field_tree, offset);
|
||||
case DPNSS_CC_MSG_CRM:
|
||||
/* 2.1.7 CLEAR REQUEST Message - CRM */
|
||||
/* 2.1.8 CLEAR INDICATION Message - CIM */
|
||||
/* Clearing Cause */
|
||||
proto_tree_add_item(tree, hf_dpnss_clearing_cause, tvb, offset, 1, FALSE);
|
||||
offset++;
|
||||
/* Indication Field (Optional) */
|
||||
if(tvb_end_offset>offset){
|
||||
ind_field_item = proto_tree_add_text(tree, tvb, offset, -1, "Indication Field: %s",tvb_format_text(tvb,offset,tvb_length_remaining(tvb, offset)));
|
||||
ind_field_tree = proto_item_add_subtree(ind_field_item, ett_dpnss_ind_field);
|
||||
offset = dissect_dpnss_sup_info_str(tvb, pinfo, ind_field_tree, offset);
|
||||
}
|
||||
break;
|
||||
case DPNSS_CC_MSG_RRM:
|
||||
/* 2.1.10 RECALL REJECTION Message - RRM */
|
||||
/* Rejection Cause */
|
||||
proto_tree_add_item(tree, hf_dpnss_rejection_cause, tvb, offset, 1, FALSE);
|
||||
/* Indication Field (Optional) */
|
||||
if(tvb_end_offset>offset){
|
||||
ind_field_item = proto_tree_add_text(tree, tvb, offset, -1, "Indication Field: %s",tvb_format_text(tvb,offset,tvb_length_remaining(tvb, offset)));
|
||||
ind_field_tree = proto_item_add_subtree(ind_field_item, ett_dpnss_ind_field);
|
||||
offset = dissect_dpnss_sup_info_str(tvb, pinfo, ind_field_tree, offset);
|
||||
}
|
||||
break;
|
||||
case DPNSS_CC_MSG_SSRM_I:
|
||||
/* 2.1.11 SUBSEQUENT SERVICE REQUEST Message (INCOMPLETE) - SSRM(I) */
|
||||
sel_field_item = proto_tree_add_text(tree, tvb, offset, -1, "Selection Field: %s",tvb_format_text(tvb,offset,tvb_length_remaining(tvb, offset)));
|
||||
sel_field_tree = proto_item_add_subtree(sel_field_item, ett_dpnss_sel_field);
|
||||
/* Selection Field */
|
||||
offset = dissect_dpnss_sup_info_str(tvb, pinfo, sel_field_tree, offset);
|
||||
break;
|
||||
case DPNSS_CC_MSG_SSRM_C:
|
||||
/* 2.1.12 SUBSEQUENT SERVICE REQUEST Message (COMPLETE) - SSRM(C) */
|
||||
/* Selection Field (Optional) */
|
||||
if(tvb_end_offset>offset){
|
||||
sel_field_item = proto_tree_add_text(tree, tvb, offset, -1, "Selection Field: %s",tvb_format_text(tvb,offset,tvb_length_remaining(tvb, offset)));
|
||||
sel_field_tree = proto_item_add_subtree(sel_field_item, ett_dpnss_sel_field);
|
||||
offset = dissect_dpnss_sup_info_str(tvb, pinfo, sel_field_tree, offset);
|
||||
}
|
||||
break;
|
||||
break;
|
||||
default:
|
||||
proto_tree_add_text(tree, tvb, offset, 1, "Unknown or Dissection of this message not supported yet");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Code to actually dissect the packets */
|
||||
static void
|
||||
|
@ -358,31 +610,32 @@ dissect_dpnss(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
if (check_col(pinfo->cinfo, COL_PROTOCOL))
|
||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "DPNSS/DASS2");
|
||||
|
||||
if (tree) {
|
||||
item = proto_tree_add_item(tree, proto_dpnss, tvb, 0, -1, FALSE);
|
||||
dpnss_tree = proto_item_add_subtree(item, ett_dpnss);
|
||||
proto_tree_add_item(dpnss_tree, hf_dpnss_msg_grp_id, tvb, offset, 1, FALSE);
|
||||
octet = tvb_get_guint8(tvb,offset)>>4;
|
||||
switch (octet){
|
||||
case DPNNS_MESSAGE_GROUP_CC:
|
||||
/* Call Control Message Group */
|
||||
offset = dissect_dpnss_cc_msg(tvb, pinfo, dpnss_tree);
|
||||
break;
|
||||
case DPNNS_MESSAGE_GROUP_E2E:
|
||||
/* End-to-End Message Group */
|
||||
offset = dissect_dpnss_e2e_msg(tvb, pinfo, dpnss_tree);
|
||||
break;
|
||||
case DPNNS_MESSAGE_GROUP_LbL:
|
||||
/* Link-by-Link Message Group */
|
||||
offset = dissect_dpnss_LbL_msg(tvb, pinfo, dpnss_tree);
|
||||
break;
|
||||
default:
|
||||
proto_tree_add_text(tree, tvb, offset, 1, "Unknown Message Group");
|
||||
break;
|
||||
}
|
||||
item = proto_tree_add_item(tree, proto_dpnss, tvb, 0, -1, FALSE);
|
||||
dpnss_tree = proto_item_add_subtree(item, ett_dpnss);
|
||||
proto_tree_add_item(dpnss_tree, hf_dpnss_msg_grp_id, tvb, offset, 1, FALSE);
|
||||
octet = tvb_get_guint8(tvb,offset)>>4;
|
||||
switch (octet){
|
||||
case DPNNS_MESSAGE_GROUP_CC:
|
||||
if (check_col(pinfo->cinfo, COL_INFO))
|
||||
col_set_str(pinfo->cinfo, COL_INFO, "CC MSG");
|
||||
/* Call Control Message Group */
|
||||
dissect_dpnss_cc_msg(tvb, pinfo, dpnss_tree);
|
||||
break;
|
||||
case DPNNS_MESSAGE_GROUP_E2E:
|
||||
/* End-to-End Message Group */
|
||||
dissect_dpnss_e2e_msg(tvb, pinfo, dpnss_tree);
|
||||
break;
|
||||
case DPNNS_MESSAGE_GROUP_LbL:
|
||||
/* Link-by-Link Message Group */
|
||||
dissect_dpnss_LbL_msg(tvb, pinfo, dpnss_tree);
|
||||
break;
|
||||
default:
|
||||
proto_tree_add_text(tree, tvb, offset, 1, "Unknown Message Group");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Register the protocol with Wireshark */
|
||||
/* If this dissector uses sub-dissector registration add a registration routine.
|
||||
This format is required because a script is used to find these routines and
|
||||
|
@ -392,11 +645,8 @@ void
|
|||
proto_reg_handoff_dpnss(void)
|
||||
{
|
||||
dissector_handle_t dpnss_handle;
|
||||
/** static int dpnss_prefs_initialized = FALSE; **/
|
||||
|
||||
dpnss_handle = create_dissector_handle(dissect_dpnss, proto_dpnss);
|
||||
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -431,6 +681,11 @@ proto_register_dpnss(void)
|
|||
FT_BOOLEAN, 8, TFS(&dpnss_ext_bit_vals), 0x80,
|
||||
"Extension bit", HFILL }
|
||||
},
|
||||
{ &hf_dpnss_ext_bit_notall,
|
||||
{ "Extension bit", "dpnss.ext_bit_notall",
|
||||
FT_BOOLEAN, 8, TFS(&dpnss_ext_bit_no_ext_vals), 0x80,
|
||||
"Extension bit", HFILL }
|
||||
},
|
||||
{ &hf_dpnss_sic_type,
|
||||
{ "Type of data", "dpnss.sic_type",
|
||||
FT_UINT8, BASE_DEC, VALS(dpnss_sic_type_type_vals), 0x70,
|
||||
|
@ -438,25 +693,77 @@ proto_register_dpnss(void)
|
|||
},
|
||||
{ &hf_dpnss_sic_details_for_speech,
|
||||
{ "Details for Speech", "dpnss.sic_details_for_speech",
|
||||
FT_UINT8, BASE_DEC, VALS(dpnss_sic_sic_details_for_speech_vals), 0x0f,
|
||||
FT_UINT8, BASE_DEC, VALS(dpnss_sic_details_for_speech_vals), 0x0f,
|
||||
"Details for Speech", HFILL }
|
||||
},
|
||||
{ &hf_dpnss_sic_details_for_data1,
|
||||
{ "Data Rates", "dpnss.sic_details_for_data1",
|
||||
FT_UINT8, BASE_DEC, VALS(dpnss_sic_sic_details_for_data_rates1_vals), 0x0f,
|
||||
FT_UINT8, BASE_DEC, VALS(dpnss_sic_details_for_data_rates1_vals), 0x0f,
|
||||
"Type of Data (010) : Data Rates", HFILL }
|
||||
},
|
||||
{ &hf_dpnss_sic_details_for_data2,
|
||||
{ "Data Rates", "dpnss.sic_details_data2",
|
||||
FT_UINT8, BASE_DEC, VALS(dpnss_sic_sic_details_for_data_rates2_vals), 0x0f,
|
||||
FT_UINT8, BASE_DEC, VALS(dpnss_sic_details_for_data_rates2_vals), 0x0f,
|
||||
"Type of Data (011) : Data Rates", HFILL }
|
||||
},
|
||||
|
||||
{ &hf_dpnss_dest_addr,
|
||||
{ "Destination Address", "dpnss.dest_addr",
|
||||
FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
"Destination Address", HFILL }
|
||||
},
|
||||
{ &hf_dpnss_sic_oct2_data_type,
|
||||
{ "Data Type", "dpnss.sic_oct2_data_type",
|
||||
FT_UINT8, BASE_DEC, VALS(dpnss_sic_oct2_data_type_vals), 0x03,
|
||||
"Data Type", HFILL }
|
||||
},
|
||||
{ &hf_dpnss_sic_oct2_duplex,
|
||||
{ "Data Type", "dpnss.sic_oct2_duplex",
|
||||
FT_BOOLEAN, 8, TFS(&dpnss_duplex_vals), 0x08,
|
||||
"Data Type", HFILL }
|
||||
},
|
||||
{ &hf_dpnss_sic_oct2_net_ind_clk,
|
||||
{ "Network Independent Clock", "dpnss.sic_oct2_sync_data_format",
|
||||
FT_BOOLEAN, 8, TFS(&dpnss_sic_oct2_net_ind_clk_vals), 0x40,
|
||||
"Network Independent Clock", HFILL }
|
||||
},
|
||||
{ &hf_dpnss_sic_oct2_sync_data_format,
|
||||
{ "Data Format", "dpnss.sic_oct2_sync_data_format",
|
||||
FT_BOOLEAN, 8, TFS(&dpnss_sic_oct2_sync_data_format_vals), 0x20,
|
||||
"Data Format", HFILL }
|
||||
},
|
||||
{ &hf_dpnss_sic_oct2_sync_byte_timing,
|
||||
{ "Byte Timing", "dpnss.sic_oct2_sync_byte_timing",
|
||||
FT_BOOLEAN, 8, TFS(&dpnss_provided_vals), 0x10,
|
||||
"Byte Timing", HFILL }
|
||||
},
|
||||
{ &hf_dpnss_sic_oct2_async_data,
|
||||
{ "Data Format", "dpnss.sic_oct2_async_data",
|
||||
FT_UINT8, BASE_DEC, VALS(dpnss_sic_oct2_async_data_type_vals), 0x30,
|
||||
"Data Format", HFILL }
|
||||
},
|
||||
{ &hf_dpnss_sic_oct2_async_flow_ctrl,
|
||||
{ "Flow Control", "dpnss.sic_oct2_async_flow_ctrl",
|
||||
FT_BOOLEAN, 8, TFS(&dpnss_flow_control_vals), 0x40,
|
||||
"Flow Control", HFILL }
|
||||
},
|
||||
{ &hf_dpnss_clearing_cause,
|
||||
{ "Clearing Cause", "dpnss.clearing_cause",
|
||||
FT_UINT8, BASE_DEC, VALS(dpnss_clearing_cause_code_vals), 0x0,
|
||||
"Clearing Cause", HFILL }
|
||||
},
|
||||
{ &hf_dpnss_rejection_cause,
|
||||
{ "Rejection Cause", "dpnss.rejection_cause",
|
||||
FT_UINT8, BASE_DEC, VALS(dpnss_clearing_cause_code_vals), 0x0,
|
||||
"Rejection Cause", HFILL }
|
||||
},
|
||||
};
|
||||
|
||||
/* Setup protocol subtree array */
|
||||
static gint *ett[] = {
|
||||
&ett_dpnss,
|
||||
&ett_dpnss_sel_field,
|
||||
&ett_dpnss_sic_field,
|
||||
&ett_dpnss_ind_field,
|
||||
};
|
||||
|
||||
/* Register the protocol name and description */
|
||||
|
|
Loading…
Reference in New Issue