aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/asn1/gprscdr/gprscdr.cnf
blob: bac6db2ed376e9d01d53c28ab5f57d789512d5f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# gprscdr.cnf
# Anders Broman 2011

#.IMPORT ../gsm_map/gsm_map-exp.cnf

#.MODULE

#.OMIT_ASSIGNMENT
CalledNumber
ChargeIndicator
MscNo
SystemType
SGSNMTLCSRecord
SGSNMOLCSRecord
SGSNNILCSRecord
LCSCause
LCSClientIdentity
LCSQoSInfo
LocationAreaAndCell
PositioningData
MCC-MNC
NodeAddress
ServiceContextID
ChangeLocationV651
CTEID
DataVolumeMBMS
SubscriberEquipmentNumber
SubscriberEquipmentType
# 6.4 If these are needed MBMS asn1 should be added.
SGSNMBMSRecord
GGSNMBMSRecord
GWMBMSRecord
ChangeOfMBMSCondition
CNIPMulticastDistribution
MBMS2G3GIndicator
TMGI
MBMSSessionIdentity
MBMSServiceType
MBMSUserServiceType
MBMSServiceArea
RequiredMBMSBearerCapabilities

#.NO_EMIT
MBMSInformation

#.EXPORTS
GPRSCallEventRecord
GPRSCallEventRecord_PDU
GPRSRecord
GPRSRecord_PDU

#.CLASS ATTRIBUTE
&id                    ObjectIdentifierType
&Value

#.CLASS CONTEXT
&id                    ObjectIdentifierType
&Value

#.PDU
GPRSCallEventRecord
GPRSRecord


# Get the OID
#.FN_PARS ManagementExtension/identifier FN_VARIANT = _str  VAL_PTR = &obj_id

#.FN_BODY ManagementExtension/information

  proto_tree *ext_tree;
  ext_tree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_gprscdr_managementextension_information, NULL, "Information");
  if (obj_id){
	 offset=call_ber_oid_callback(obj_id, tvb, offset, actx->pinfo, ext_tree, NULL);
  }else{
	 proto_tree_add_expert(ext_tree, actx->pinfo, &ei_gprscdr_not_dissected, tvb, offset, -1);
  }

#.FN_BODY TimeStamp VAL_PTR = &parameter_tvb
/*
 *
 * The contents of this field are a compact form of the UTCTime format
 * containing local time plus an offset to universal time. Binary coded
 * decimal encoding is employed for the digits to reduce the storage and
 * transmission overhead
 * e.g. YYMMDDhhmmssShhmm
 * where
 * YY 	= 	Year 00 to 99		BCD encoded
 * MM 	= 	Month 01 to 12 		BCD encoded
 * DD	=	Day 01 to 31		BCD encoded
 * hh	=	hour 00 to 23		BCD encoded
 * mm	=	minute 00 to 59		BCD encoded
 * ss	=	second 00 to 59		BCD encoded
 * S	=	Sign 0 = "+", "-"	ASCII encoded
 * hh	=	hour 00 to 23		BCD encoded
 * mm	=	minute 00 to 59		BCD encoded
 */

 tvbuff_t	*parameter_tvb;

%(DEFAULT_BODY)s

 if (!parameter_tvb)
	return offset;

 proto_item_append_text(actx->created_item, " (UTC %%x-%%x-%%x %%x:%%x:%%x %%s%%x:%%x)",
			tvb_get_guint8(parameter_tvb,0),                        /* Year */
			tvb_get_guint8(parameter_tvb,1),                        /* Month */
			tvb_get_guint8(parameter_tvb,2),                        /* Day */
			tvb_get_guint8(parameter_tvb,3),                        /* Hour */
			tvb_get_guint8(parameter_tvb,4),                        /* Minute */
			tvb_get_guint8(parameter_tvb,5),                        /* Second */
			tvb_get_string_enc(wmem_packet_scope(), parameter_tvb,6,1,ENC_ASCII|ENC_NA), /* Sign */
			tvb_get_guint8(parameter_tvb,7),                        /* Hour */
			tvb_get_guint8(parameter_tvb,8)                         /* Minute */
			);

#.FN_BODY MSTimeZone VAL_PTR = &parameter_tvb
/*
 *
 * 1.Octet: Time Zone and 2. Octet: Daylight saving time, see TS 29.060 [75]
 */
 tvbuff_t	*parameter_tvb;
 guint8 data, data2;
 char sign;

%(DEFAULT_BODY)s

 if (!parameter_tvb)
	return offset;

	data = tvb_get_guint8(parameter_tvb, 0);
	sign = (data & 0x08) ? '-' : '+';
	data = (data >> 4) + (data & 0x07) * 10;

	data2 = tvb_get_guint8(tvb, 1) & 0x3;

	proto_item_append_text(actx->created_item, " (GMT %%c %%d hours %%d minutes %%s)",
			sign,
			data / 4,
			data %% 4 * 15,
			val_to_str_const(data2, gprscdr_daylight_saving_time_vals, "Unknown")
			);

#.FN_BODY PLMN-Id VAL_PTR = &parameter_tvb
 tvbuff_t	*parameter_tvb;
 proto_tree *subtree;

%(DEFAULT_BODY)s

 if (!parameter_tvb)
	return offset;

 subtree = proto_item_add_subtree(actx->created_item, ett_gprscdr_plmn_id);
 dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, subtree, 0, E212_NONE, TRUE);

#.FN_BODY GPRSRecord VAL_PTR = &branch_taken
proto_item *item;
gint branch_taken, t_offset = offset;
gint32   tag;

 %(DEFAULT_BODY)s

 if(branch_taken == -1){
    get_ber_identifier(tvb, t_offset, NULL, NULL, &tag);
	item = proto_tree_add_uint(tree, hf_index, tvb, t_offset, 1, tag);
	dissect_ber_identifier(actx->pinfo, tree, tvb, t_offset, NULL, NULL, &tag);
	expert_add_info_format(actx->pinfo, item, &ei_gprscdr_choice_not_found,
              "Record type(BER choice) not found: %%u", tag);
 }
#.TYPE_ATTR
IPBinaryAddress/iPBinV4Address TYPE = FT_IPv4  DISPLAY = BASE_NONE
IPBinaryAddress/iPBinV6Address TYPE = FT_IPv6  DISPLAY = BASE_NONE
#.END