If ENBname is a string append that string.
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 19 Jun 2008 16:03:15 +0000 (16:03 +0000)
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 19 Jun 2008 16:03:15 +0000 (16:03 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25488 f5534014-38df-0310-8fa8-9805f1628bb7

asn1/s1ap/s1ap.cnf
epan/dissectors/packet-s1ap.c

index f4c8ee05e9508c4bd4d1bffdd20773469fd475b1..443cbed8cc6cd938e1bea9e2d41ea5db0e7f8c75 100644 (file)
@@ -134,7 +134,7 @@ MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound")
 # PLMNidentity ::= TBCD-STRING (SIZE (3))
 # TBCD-STRING ::= OCTET STRING
 
-#.FN_BODY PLMNidentity  VAL_PTR = 
+#.FN_BODY PLMNidentity  VAL_PTR = parameter_tvb
   tvbuff_t *parameter_tvb=NULL;
 
   offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
@@ -145,6 +145,32 @@ MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound")
        dissect_e212_mcc_mnc(parameter_tvb, tree, 0);
 #.END
 
+#.FN_BODY ENBname VAL_PTR = parameter_tvb
+  tvbuff_t *parameter_tvb=NULL;
+  int length;
+  int p_offset;
+  gboolean is_ascii;
+
+  offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
+                                       NO_BOUND, NO_BOUND, FALSE, &parameter_tvb);
+
+if (!parameter_tvb)
+ return offset;
+
+ length = tvb_length(parameter_tvb);
+ for (p_offset=0; p_offset < length; p_offset++){
+        if(!isalpha(tvb_get_guint8(parameter_tvb, p_offset ))){
+               is_ascii = FALSE;
+               break;
+        }
+        is_ascii = TRUE;
+ }
+ if (is_ascii)
+               proto_item_append_text(actx->created_item,"(%%s)",tvb_format_text(parameter_tvb, 0, length));
+
+#.END
+
 #.TYPE_ATTR
 ProtocolExtensionID TYPE = FT_UINT8  DISPLAY = BASE_DEC STRINGS = VALS(s1ap_ProtocolIE_ID_vals)
 
index ee12d5d14c3987ee2c8887a7e9b9fe1169ac9b04..c22cf0c850dd7527a27e97920b1862c836d378c7 100644 (file)
@@ -1758,8 +1758,31 @@ dissect_s1ap_ENB_Global_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _
 
 static int
 dissect_s1ap_ENBname(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
+#line 149 "s1ap.cnf"
+  tvbuff_t *parameter_tvb=NULL;
+  int length;
+  int p_offset;
+  gboolean is_ascii;
+
   offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
-                                       NO_BOUND, NO_BOUND, FALSE, NULL);
+                                       NO_BOUND, NO_BOUND, FALSE, &parameter_tvb);
+
+if (!parameter_tvb)
+ return offset;
+
+ length = tvb_length(parameter_tvb);
+ for (p_offset=0; p_offset < length; p_offset++){
+        if(!isalpha(tvb_get_guint8(parameter_tvb, p_offset ))){
+               is_ascii = FALSE;
+               break;
+        }
+        is_ascii = TRUE;
+ }
+ if (is_ascii)
+               proto_item_append_text(actx->created_item,"(%s)",tvb_format_text(parameter_tvb, 0, length));
+
+
 
   return offset;
 }