Update to 3GPP TS 32.298 V6.4.1 (2006-06)
[obnox/wireshark/wip.git] / asn1 / gprscdr / gprscdr.cnf
1 # gprscdr.cnf
2 # Anders Broman 2011
3 # $Id$
4
5 #.IMPORT ../gsm_map/gsm_map-exp.cnf
6
7 #.MODULE
8
9 #.OMIT_ASSIGNMENT
10 CalledNumber
11 CallReference
12 ChargeIndicator
13 MscNo
14 SystemType
15 SGSNMTLCSRecord
16 SGSNMOLCSRecord
17 SGSNNILCSRecord
18 LCSCause
19 LCSClientIdentity
20 LCSQoSInfo
21 LocationAreaAndCell
22 PositioningData
23 # 6.4 If these are needed MBMS asn1 should be added.
24 SGSNMBMSRecord
25 GGSNMBMSRecord
26 ChangeOfMBMSCondition
27
28 #.EXPORTS
29 GPRSCallEventRecord
30 GPRSCallEventRecord_PDU
31
32 #.CLASS ATTRIBUTE
33 &id                    ObjectIdentifierType
34 &Value
35
36 #.CLASS CONTEXT
37 &id                    ObjectIdentifierType
38 &Value
39
40 #.PDU_NEW
41 GPRSCallEventRecord
42
43
44 #.FN_BODY ManagementExtension/information
45
46    proto_tree_add_text(tree, tvb, offset, -1, "Not dissected");
47    
48 #.FN_BODY TimeStamp VAL_PTR = &parameter_tvb
49 /*
50  *
51  * The contents of this field are a compact form of the UTCTime format
52  * containing local time plus an offset to universal time. Binary coded
53  * decimal encoding is employed for the digits to reduce the storage and
54  * transmission overhead
55  * e.g. YYMMDDhhmmssShhmm
56  * where
57  * YY   =       Year 00 to 99           BCD encoded
58  * MM   =       Month 01 to 12          BCD encoded
59  * DD   =       Day 01 to 31            BCD encoded
60  * hh   =       hour 00 to 23           BCD encoded
61  * mm   =       minute 00 to 59         BCD encoded
62  * ss   =       second 00 to 59         BCD encoded
63  * S    =       Sign 0 = "+", "-"       ASCII encoded
64  * hh   =       hour 00 to 23           BCD encoded
65  * mm   =       minute 00 to 59         BCD encoded
66  */
67
68  tvbuff_t       *parameter_tvb;
69  
70 %(DEFAULT_BODY)s
71
72  if (!parameter_tvb)
73         return offset;
74
75  proto_item_append_text(actx->created_item, " (UTC %%x-%%x-%%x %%x:%%x:%%x %%s%%x:%%x)",
76                         tvb_get_guint8(parameter_tvb,0),             /* Year */
77                         tvb_get_guint8(parameter_tvb,1),             /* Month */
78                         tvb_get_guint8(parameter_tvb,2),             /* Day */
79                         tvb_get_guint8(parameter_tvb,3),             /* Hour */
80                         tvb_get_guint8(parameter_tvb,4),             /* Minute */
81                         tvb_get_guint8(parameter_tvb,5),             /* Second */
82                         tvb_get_ephemeral_string(parameter_tvb,6,1), /* Sign */
83                         tvb_get_guint8(parameter_tvb,7),             /* Hour */
84                         tvb_get_guint8(parameter_tvb,8)             /* Minute */
85                         );
86  
87 #.FN_BODY MSTimeZone VAL_PTR = &parameter_tvb
88 /*
89  *
90  * 1.Octet: Time Zone and 2. Octet: Daylight saving time, see TS 29.060 [75]
91  */
92  tvbuff_t       *parameter_tvb;
93  guint8 data, data2;
94  char sign;
95
96 %(DEFAULT_BODY)s
97
98  if (!parameter_tvb)
99         return offset;
100
101         data = tvb_get_guint8(parameter_tvb, 0);
102         sign = (data & 0x08) ? '-' : '+';
103         data = (data >> 4) + (data & 0x07) * 10;
104
105         data2 = tvb_get_guint8(tvb, 1) & 0x3;
106         
107         proto_item_append_text(actx->created_item, " (GMT %%c %%d hours %%d minutes %%s)", 
108                         sign, 
109                         data / 4, 
110                         data %% 4 * 15,
111                         val_to_str_const(data2, gprscdr_daylight_saving_time_vals, "Unknown")
112                         );
113                         
114 #.FN_BODY PLMN-Id VAL_PTR = &parameter_tvb
115  tvbuff_t       *parameter_tvb;
116  proto_tree *subtree;
117
118 %(DEFAULT_BODY)s
119
120  if (!parameter_tvb)
121         return offset;
122            
123  subtree = proto_item_add_subtree(actx->created_item, ett_gprscdr_plmn_id);        
124  dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, subtree, 0, TRUE);
125  
126 #.TYPE_ATTR
127 IPBinaryAddress/iPBinV4Address TYPE = FT_IPv4  DISPLAY = BASE_NONE   
128 IPBinaryAddress/iPBinV6Address TYPE = FT_IPv6  DISPLAY = BASE_NONE   
129 #.END