aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/ansi_map
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2010-11-16 15:20:33 +0000
committerBill Meier <wmeier@newsguy.com>2010-11-16 15:20:33 +0000
commit491f05b16e89754a05a8dd50b2232b2474847926 (patch)
tree9853f7fa74e96a74045ca9b2f4fdc797c96375a7 /asn1/ansi_map
parent58d018e21a846d589dce4ffcbad4bb58ed6d05f8 (diff)
Use value_string_ext fcns to access several value_string arrays;
Minor whitespace cleanup. svn path=/trunk/; revision=34900
Diffstat (limited to 'asn1/ansi_map')
-rw-r--r--asn1/ansi_map/ansi_map.cnf27
-rw-r--r--asn1/ansi_map/packet-ansi_map-template.c27
-rw-r--r--asn1/ansi_map/packet-ansi_map-template.h2
3 files changed, 39 insertions, 17 deletions
diff --git a/asn1/ansi_map/ansi_map.cnf b/asn1/ansi_map/ansi_map.cnf
index 1a2927eb39..b7fc70d9e8 100644
--- a/asn1/ansi_map/ansi_map.cnf
+++ b/asn1/ansi_map/ansi_map.cnf
@@ -1,11 +1,22 @@
# ansi_map.cnf
# ansi_map conformation file
-# Copyright 2005-2007 Anders Broman
+# Copyright 2005-2007 Anders Broman
# $Id$
#.IMPORT ../gsm_map/gsm_map-exp.cnf
#.EXPORTS
+#.USE_VALS_EXT
+##AnnouncementCode-std-ann
+TriggerType
+SMS-CauseCode
+SystemMyTypeCode
+##AnnouncementCode-tone
+DMH-RedirectionIndicator
+ActionCode
+SignalQuality
+##AlertCode-Cadence
+TerminalType
#.NO_EMIT
@@ -168,7 +179,7 @@
dissect_ansi_map_intermsccircuitid(parameter_tvb,actx->pinfo,tree, actx);
}
-# 6.5.2.78 MessageWaitingNotificationCount
+# 6.5.2.78 MessageWaitingNotificationCount
#.FN_BODY MessageWaitingNotificationCount VAL_PTR = &parameter_tvb
tvbuff_t *parameter_tvb = NULL;
%(DEFAULT_BODY)s
@@ -411,7 +422,7 @@
%(DEFAULT_BODY)s
if (parameter_tvb){
subtree = proto_item_add_subtree(actx->created_item, ett_CDMA2000HandoffInvokeIOSData);
- dissect_cdma2000_a1_elements(parameter_tvb, actx->pinfo, subtree,
+ dissect_cdma2000_a1_elements(parameter_tvb, actx->pinfo, subtree,
0, tvb_length_remaining(parameter_tvb,0));
}
#6.5.2.gn CDMA2000HandoffResponseIOSData
@@ -422,7 +433,7 @@
%(DEFAULT_BODY)s
if (parameter_tvb){
subtree = proto_item_add_subtree(actx->created_item, ett_CDMA2000HandoffResponseIOSData);
- dissect_cdma2000_a1_elements(parameter_tvb, actx->pinfo, subtree,
+ dissect_cdma2000_a1_elements(parameter_tvb, actx->pinfo, subtree,
0, tvb_length_remaining(parameter_tvb,0));
}
#6.5.2.wB ServiceIndicator N.S0011-0 v 1.0
@@ -446,7 +457,7 @@
}
}
}
-
+
#.TYPE_ATTR
# Dont't put the bytes after the name in the display
CDMA2000HandoffInvokeIOSData TYPE = FT_NONE DISPLAY = BASE_NONE STRINGS = NULL
@@ -472,8 +483,8 @@ CallingPartyNumberDigits1 = FT_NONE DISPLAY = BASE_NONE STRINGS = NULL
CallingPartyNumberDigits2 = FT_NONE DISPLAY = BASE_NONE STRINGS = NULL
TemporaryReferenceNumber TYPE = FT_NONE DISPLAY = BASE_NONE STRINGS = NULL
-ActionCode TYPE = FT_UINT8 DISPLAY = BASE_DEC STRINGS = VALS(ansi_map_ActionCode_vals)
-AuthenticationCapability TYPE = FT_UINT8 DISPLAY = BASE_DEC STRINGS = VALS(ansi_map_AuthenticationCapability_vals)
+ActionCode TYPE = FT_UINT8 DISPLAY = BASE_DEC|BASE_EXT_STRING STRINGS = &ansi_map_ActionCode_vals_ext
+AuthenticationCapability TYPE = FT_UINT8 DISPLAY = BASE_DEC STRINGS = VALS(ansi_map_AuthenticationCapability_vals)
AlertResult TYPE = FT_UINT8 DISPLAY = BASE_DEC STRINGS = VALS(ansi_map_AlertResult_result_vals)
AvailabilityType TYPE = FT_UINT8 DISPLAY = BASE_DEC STRINGS = VALS(ansi_map_AvailabilityType_vals)
CancellationType TYPE = FT_UINT8 DISPLAY = BASE_DEC STRINGS = VALS(ansi_map_CancellationType_vals)
@@ -482,7 +493,7 @@ CountUpdateReport TYPE = FT_UINT8 DISPLAY = BASE_DEC STRINGS = VALS(ansi_map_C
ControlChannelMode TYPE = FT_UINT8 DISPLAY = BASE_DEC STRINGS = VALS(ansi_map_ControlChannelMode_vals)
PageIndicator TYPE = FT_UINT8 DISPLAY = BASE_DEC STRINGS = VALS(ansi_map_PageIndicator_vals)
SMS-AccessDeniedReason TYPE = FT_UINT8 DISPLAY = BASE_DEC STRINGS = VALS(ansi_map_SMS_AccessDeniedReason_vals)
-SMS-CauseCode TYPE = FT_UINT8 DISPLAY = BASE_DEC STRINGS = VALS(ansi_map_SMS_CauseCode_vals)
+SMS-CauseCode TYPE = FT_UINT8 DISPLAY = BASE_DEC|BASE_EXT_STRING STRINGS = &ansi_map_SMS_CauseCode_vals_ext
SMS-ChargeIndicator TYPE = FT_UINT8 DISPLAY = BASE_DEC STRINGS = VALS(ansi_map_SMS_ChargeIndicator_vals)
SMS-NotificationIndicator TYPE = FT_UINT8 DISPLAY = BASE_DEC STRINGS = VALS(ansi_map_SMS_NotificationIndicator_vals)
#SMS-TeleserviceIdentifier TYPE = FT_UINT16 DISPLAY = BASE_DEC STRINGS = VALS(ansi_map_SMS_TeleserviceIdentifier_vals)
diff --git a/asn1/ansi_map/packet-ansi_map-template.c b/asn1/ansi_map/packet-ansi_map-template.c
index dd2e8a2b37..c62b991340 100644
--- a/asn1/ansi_map/packet-ansi_map-template.c
+++ b/asn1/ansi_map/packet-ansi_map-template.c
@@ -552,11 +552,19 @@ const value_string ansi_map_opr_code_strings[] = {
{ 100, "Drop Service" },
{ 101, "InterSystemSMSPage" },
{ 102, "LCSParameterRequest" },
+ { 103, "Unknown ANSI-MAP PDU" },
+ { 104, "Unknown ANSI-MAP PDU" },
+ { 105, "Unknown ANSI-MAP PDU" },
{ 106, "PositionEventNotification" },
+ { 107, "Unknown ANSI-MAP PDU" },
+ { 108, "Unknown ANSI-MAP PDU" },
+ { 109, "Unknown ANSI-MAP PDU" },
+ { 110, "Unknown ANSI-MAP PDU" },
{ 111, "InterSystemSMSDelivery-PointToPoint" },
{ 112, "QualificationRequest2" },
{ 0, NULL },
};
+static value_string_ext ansi_map_opr_code_strings_ext = VALUE_STRING_EXT_INIT(ansi_map_opr_code_strings);
static int dissect_invokeData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx);
static int dissect_returnData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx);
@@ -887,6 +895,8 @@ static const value_string ansi_map_ActionCode_vals[] = {
{ 23, "CDMA Handset-Based Position Determination Complete"},
{ 0, NULL }
};
+static value_string_ext ansi_map_ActionCode_vals_ext = VALUE_STRING_EXT_INIT(ansi_map_ActionCode_vals);
+
/* 6.5.2.3 AlertCode */
/* Pitch (octet 1, bits G-H) */
@@ -2398,6 +2408,7 @@ static const value_string ansi_map_SMS_CauseCode_vals[] = {
{ 110, "MS Disconnect"},
{ 0, NULL }
};
+static value_string_ext ansi_map_SMS_CauseCode_vals_ext = VALUE_STRING_EXT_INIT(ansi_map_SMS_CauseCode_vals);
/* 6.5.2.126 SMS_ChargeIndicator */
/* SMS Charge Indicator (octet 1) */
@@ -3664,7 +3675,7 @@ dissect_ansi_map_win_trigger_list(tvbuff_t *tvb, packet_info *pinfo _U_, proto_t
j=0;
break;
default:
- proto_tree_add_text(subtree, tvb, offset, 1, "[%u] (%u) %s",j,octet,val_to_str(octet, ansi_map_TriggerType_vals, "Unknown TriggerType (%u)"));
+ proto_tree_add_text(subtree, tvb, offset, 1, "[%u] (%u) %s",j,octet,val_to_str_ext(octet, &ansi_map_TriggerType_vals_ext, "Unknown TriggerType (%u)"));
j++;
break;
}
@@ -4411,22 +4422,22 @@ dissect_ansi_map(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case 1:
OperationCode = p_private_tcap->d.OperationCode_private & 0x00ff;
ansi_map_is_invoke = TRUE;
- col_add_fstr(pinfo->cinfo, COL_INFO,"%s Invoke ", val_to_str(OperationCode, ansi_map_opr_code_strings, "Unknown ANSI-MAP PDU (%u)"));
- proto_item_append_text(p_private_tcap->d.OperationCode_item," %s",val_to_str(OperationCode, ansi_map_opr_code_strings, "Unknown ANSI-MAP PDU (%u)"));
+ col_add_fstr(pinfo->cinfo, COL_INFO,"%s Invoke ", val_to_str_ext(OperationCode, &ansi_map_opr_code_strings_ext, "Unknown ANSI-MAP PDU (%u)"));
+ proto_item_append_text(p_private_tcap->d.OperationCode_item," %s",val_to_str_ext(OperationCode, &ansi_map_opr_code_strings_ext, "Unknown ANSI-MAP PDU (%u)"));
offset = dissect_invokeData(ansi_map_tree, tvb, 0, &asn1_ctx);
update_saved_invokedata(pinfo, ansi_map_tree, tvb);
break;
case 2:
OperationCode = find_saved_invokedata(&asn1_ctx);
- col_add_fstr(pinfo->cinfo, COL_INFO,"%s ReturnResult ", val_to_str(OperationCode, ansi_map_opr_code_strings, "Unknown ANSI-MAP PDU (%u)"));
- proto_item_append_text(p_private_tcap->d.OperationCode_item," %s",val_to_str(OperationCode, ansi_map_opr_code_strings, "Unknown ANSI-MAP PDU (%u)"));
+ col_add_fstr(pinfo->cinfo, COL_INFO,"%s ReturnResult ", val_to_str_ext(OperationCode, &ansi_map_opr_code_strings_ext, "Unknown ANSI-MAP PDU (%u)"));
+ proto_item_append_text(p_private_tcap->d.OperationCode_item," %s",val_to_str_ext(OperationCode, &ansi_map_opr_code_strings_ext, "Unknown ANSI-MAP PDU (%u)"));
offset = dissect_returnData(ansi_map_tree, tvb, 0, &asn1_ctx);
break;
case 3:
- col_add_fstr(pinfo->cinfo, COL_INFO,"%s ReturnError ", val_to_str(OperationCode, ansi_map_opr_code_strings, "Unknown ANSI-MAP PDU (%u)"));
+ col_add_fstr(pinfo->cinfo, COL_INFO,"%s ReturnError ", val_to_str_ext(OperationCode, &ansi_map_opr_code_strings_ext, "Unknown ANSI-MAP PDU (%u)"));
break;
case 4:
- col_add_fstr(pinfo->cinfo, COL_INFO,"%s Reject ", val_to_str(OperationCode, ansi_map_opr_code_strings, "Unknown ANSI-MAP PDU (%u)"));
+ col_add_fstr(pinfo->cinfo, COL_INFO,"%s Reject ", val_to_str_ext(OperationCode, &ansi_map_opr_code_strings_ext, "Unknown ANSI-MAP PDU (%u)"));
break;
default:
/* Must be Invoke ReturnResult ReturnError or Reject */
@@ -4509,7 +4520,7 @@ void proto_register_ansi_map(void) {
NULL, HFILL }},
{ &hf_ansi_map_op_code,
{ "Operation Code", "ansi_map.op_code",
- FT_UINT8, BASE_DEC, VALS(ansi_map_opr_code_strings), 0x0,
+ FT_UINT8, BASE_DEC|BASE_EXT_STRING, &ansi_map_opr_code_strings_ext, 0x0,
NULL, HFILL }},
{ &hf_ansi_map_type_of_digits,
{ "Type of Digits", "ansi_map.type_of_digits",
diff --git a/asn1/ansi_map/packet-ansi_map-template.h b/asn1/ansi_map/packet-ansi_map-template.h
index 52bcbb3313..790cc4357b 100644
--- a/asn1/ansi_map/packet-ansi_map-template.h
+++ b/asn1/ansi_map/packet-ansi_map-template.h
@@ -36,7 +36,7 @@ typedef struct _ansi_map_tap_rec_t {
/*
* the following allows TAP code access to the messages
- * without having to duplicate it. With MSVC and a
+ * without having to duplicate it. With MSVC and a
* libwireshark.dll, we need a special declaration.
*/
WS_VAR_IMPORT const value_string ansi_map_opr_code_strings[];