aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-sccpmg.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2006-04-05 16:03:36 +0000
committerAnders Broman <anders.broman@ericsson.com>2006-04-05 16:03:36 +0000
commitba35e5d4d96f74408e8b4cde611ddda4e22db2b2 (patch)
tree0e8713d5e2c8353cde8f39d27fedd8cf78a40103 /epan/dissectors/packet-sccpmg.c
parent5e89308fe3c5cc87533e32b97c856ffdd1525796 (diff)
Frof Jeff Morriss:
The attached patch adds support for the Japan SS7 variants (TTC/NTT) to the MTP3, MTP3MG, SCCP, and SCCPMG dissectors. It's not as thoroughly implemented nor tested as I'd like, but it does a good job of at least the basic dissection and I'm out of time for now. It also fixes bug I found in the SCCP dissector where it would show an End of Optional parameter even when the Optional pointer was 0. svn path=/trunk/; revision=17815
Diffstat (limited to 'epan/dissectors/packet-sccpmg.c')
-rw-r--r--epan/dissectors/packet-sccpmg.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/epan/dissectors/packet-sccpmg.c b/epan/dissectors/packet-sccpmg.c
index 26d836e212..777617a671 100644
--- a/epan/dissectors/packet-sccpmg.c
+++ b/epan/dissectors/packet-sccpmg.c
@@ -5,6 +5,10 @@
* ANSI T1.112.3-1996
* ITU-T Q.713 7/1996
* YDN 038-1997 (Chinese ITU variant)
+ * JT-Q714 and NTT-Q714 (Japan)
+ *
+ * Note that NTT Annex E (SCCP Management Procedure (Global Title Status
+ * Management)) is not implemented (yet)
*
* Copyright 2002, Jeff Morriss <jeff.morriss[AT]ulticom.com>
*
@@ -109,7 +113,8 @@ static const value_string sccpmg_message_type_acro_values[] = {
static int proto_sccpmg = -1;
static int hf_sccpmg_message_type = -1;
static int hf_sccpmg_affected_ssn = -1;
-static int hf_sccpmg_affected_pc = -1;
+static int hf_sccpmg_affected_itu_pc = -1;
+static int hf_sccpmg_affected_japan_pc = -1;
static int hf_sccpmg_affected_ansi_pc = -1;
static int hf_sccpmg_affected_chinese_pc = -1;
static int hf_sccpmg_affected_pc_member = -1;
@@ -152,8 +157,11 @@ dissect_sccpmg_affected_pc(tvbuff_t *tvb, proto_tree *sccpmg_tree)
char pc[ANSI_PC_STRING_LENGTH];
if (mtp3_standard == ITU_STANDARD) {
- proto_tree_add_item(sccpmg_tree, hf_sccpmg_affected_pc, tvb,
+ proto_tree_add_item(sccpmg_tree, hf_sccpmg_affected_itu_pc, tvb,
offset, ITU_PC_LENGTH, TRUE);
+ } else if (mtp3_standard == JAPAN_STANDARD) {
+ proto_tree_add_item(sccpmg_tree, hf_sccpmg_affected_japan_pc,
+ tvb, offset, JAPAN_PC_LENGTH, TRUE);
} else /* ANSI_STANDARD and CHINESE_ITU_STANDARD */ {
int *hf_affected_pc;
@@ -196,7 +204,7 @@ dissect_sccpmg_smi(tvbuff_t *tvb, proto_tree *sccpmg_tree)
{
guint8 offset = 0;
- if (mtp3_standard == ITU_STANDARD)
+ if (mtp3_standard == ITU_STANDARD || mtp3_standard == JAPAN_STANDARD)
offset = ITU_SCCPMG_SMI_OFFSET;
else /* ANSI_STANDARD and CHINESE_ITU_STANDARD */
offset = ANSI_SCCPMG_SMI_OFFSET;
@@ -212,7 +220,7 @@ dissect_sccpmg_congestion_level(tvbuff_t *tvb, proto_tree *sccpmg_tree)
if (mtp3_standard == CHINESE_ITU_STANDARD)
offset = CHINESE_ITU_SCCPMG_CONGESTION_OFFSET;
- else /* ITU_STANDARD */
+ else /* ITU_STANDARD or JAPAN_STANDARD */
offset = ITU_SCCPMG_CONGESTION_OFFSET;
proto_tree_add_item(sccpmg_tree, hf_sccpmg_congestion_level, tvb,
@@ -229,8 +237,8 @@ dissect_sccpmg_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccpmg_tre
message_type = tvb_get_guint8(tvb, SCCPMG_MESSAGE_TYPE_OFFSET);
offset = SCCPMG_MESSAGE_TYPE_LENGTH;
- if (check_col(pinfo->cinfo, COL_INFO))
- col_add_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str(message_type, sccpmg_message_type_acro_values, "Unknown"));
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str(message_type, sccpmg_message_type_acro_values, "Unknown"));
if (sccpmg_tree) {
/* add the message type to the protocol tree */
@@ -321,10 +329,14 @@ proto_register_sccpmg(void)
{ "Affected SubSystem Number", "sccpmg.ssn",
FT_UINT8, BASE_DEC, NULL, 0x0,
"", HFILL}},
- { &hf_sccpmg_affected_pc,
+ { &hf_sccpmg_affected_itu_pc,
{ "Affected Point Code", "sccpmg.pc",
FT_UINT16, BASE_DEC, NULL, ITU_PC_MASK,
"", HFILL}},
+ { &hf_sccpmg_affected_japan_pc,
+ { "Affected Point Code", "sccpmg.pc",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ "", HFILL}},
{ &hf_sccpmg_affected_ansi_pc,
{ "Affected Point Code", "sccpmg.ansi_pc",
FT_STRING, BASE_NONE, NULL, 0x0,