287825c4bbbb065959ea8c829ddf3292c4e71017
[obnox/wireshark/wip.git] / asn1 / lcsap / lcsap.cnf
1 # lcsap.cnf
2 # lcsap conformation file
3
4 # $Id$
5
6 #.OPT
7 PER
8 ALIGNED
9 #.END
10
11 #.EXPORTS
12 Correlation-ID_PDU
13
14 #.PDU_NEW
15 LCS-AP-PDU
16
17 #.MAKE_ENUM
18 ProcedureCode
19 ProtocolIE-ID
20
21 #.NO_EMIT
22 TBCD-STRING
23
24 #.OMIT_ASSIGNMENT
25 # Get rid of unused code warnings
26 Presence
27
28 TriggeringMessage
29 ProtocolIE-ContainerList
30 Message-Identifier
31
32 #.END
33
34
35 #.TYPE_RENAME
36 InitiatingMessage/value InitiatingMessage_value
37 SuccessfulOutcome/value SuccessfulOutcome_value
38 UnsuccessfulOutcome/value UnsuccessfulOutcome_value
39
40 #.FIELD_RENAME
41
42 InitiatingMessage/value initiatingMessagevalue
43 UnsuccessfulOutcome/value unsuccessfulOutcome_value
44 SuccessfulOutcome/value successfulOutcome_value
45
46
47
48
49 ProtocolIE-Field/value ie_field_value
50
51 #.FN_PARS ProtocolIE-ID  VAL_PTR=&ProtocolIE_ID
52 #.FN_FTR ProtocolIE-ID
53   if (tree) {
54     proto_item_append_text(proto_item_get_parent_nth(actx->created_item, 2), ": %s", val_to_str(ProtocolIE_ID, VALS(lcsap_ProtocolIE_ID_vals), "unknown (%d)"));
55   }
56 #.END
57
58
59 #.FN_PARS ProtocolIE-Field/value  FN_VARIANT=_pdu_new  TYPE_REF_FN=dissect_ProtocolIEFieldValue 
60 #.FN_PARS ProtocolExtensionID  VAL_PTR=&ProtocolExtensionID
61 #.FN_PARS ProtocolExtensionField/extensionValue  FN_VARIANT=_pdu_new  TYPE_REF_FN=dissect_ProtocolExtensionFieldExtensionValue
62
63 #.FN_PARS Payload-Type VAL_PTR=&PayloadType
64
65 #.FN_BODY APDU VAL_PTR = &parameter_tvb
66
67   tvbuff_t *parameter_tvb=NULL;
68   
69 %(DEFAULT_BODY)s
70
71   if (parameter_tvb) {
72     switch (PayloadType) {
73     case 0:
74       /* LPP */
75       if (lpp_handle) {
76         call_dissector(lpp_handle, parameter_tvb, %(ACTX)s->pinfo, tree);
77       }
78       break;
79     case 1:
80       /* LPPa */
81       if (lppa_handle) {
82         call_dissector(lppa_handle, parameter_tvb, %(ACTX)s->pinfo, tree);
83       }
84       break;
85     default:
86       break;
87     }
88   }
89   PayloadType = -1;
90
91 #.FN_PARS  ProcedureCode  VAL_PTR = &ProcedureCode
92 #.FN_FTR ProcedureCode
93
94         if (check_col(actx->pinfo->cinfo, COL_INFO))
95         {
96                 guint8 tmp = tvb_get_guint8(tvb, 0);
97                         
98                 if(tmp == 0)
99                                 
100                 col_add_fstr(actx->pinfo->cinfo, COL_INFO, "%sReq",
101                            val_to_str(ProcedureCode, lcsap_ProcedureCode_vals,
102                                 "unknown message"));
103
104                 else if(tmp == 32)
105                         col_add_fstr(actx->pinfo->cinfo, COL_INFO, "%sResp",
106                                   val_to_str(ProcedureCode, lcsap_ProcedureCode_vals,
107                                     "unknown message"));
108                         else
109                                 col_add_fstr(actx->pinfo->cinfo, COL_INFO, "%s",
110                                   val_to_str(ProcedureCode, lcsap_ProcedureCode_vals,   
111                                     "unknown message"));
112  
113         }
114
115         if (ProcedureCode != 0) 
116         {
117                 
118                 _pro_code.code = ProcedureCode;
119  
120                 actx->pinfo->private_data = &_pro_code;
121    
122         }
123 #.END
124
125 #.FN_PARS InitiatingMessage/value  FN_VARIANT=_pdu_new  TYPE_REF_FN=dissect_InitiatingMessageValue
126
127 #.FN_PARS SuccessfulOutcome/value  FN_VARIANT=_pdu_new  TYPE_REF_FN=dissect_SuccessfulOutcomeValue
128
129 #.FN_PARS UnsuccessfulOutcome/value  FN_VARIANT=_pdu_new  TYPE_REF_FN=dissect_UnsuccessfulOutcomeValue
130
131 #--- Parameterization is not supported in asn2wrs ---
132
133 #ProtocolIE-ContainerList {INTEGER : lowerBound, INTEGER : upperBound, LCS-AP-PROTOCOL-IES : IEsSetParam} ::=
134 #       SEQUENCE (SIZE (lowerBound..upperBound)) OF
135 #       ProtocolIE-Container {{IEsSetParam}}
136
137
138 #.END
139
140
141 # Currently not used
142 # FN_PARS ProtocolIE-ContainerPairList
143 #MIN_VAL = asn1_param_get_integer(%(ACTX)s,"lowerBound")
144 #MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound")
145 # FN_HDR ProtocolIE-ContainerPairList
146 #  static const asn1_par_def_t ProtocolIE_ContainerPairList_pars[] = {
147 #    { "lowerBound", ASN1_PAR_INTEGER },
148 #    { "upperBound", ASN1_PAR_INTEGER },
149 #    { NULL, 0 }
150 #  };
151 #  asn1_stack_frame_check(actx, "ProtocolIE-ContainerPairList", ProtocolIE_ContainerPairList_pars);
152 # END
153
154
155
156
157
158
159 # following construction is not supported by asn2wrs
160 # PLMN-ID ::= TBCD-STRING (SIZE (3))
161 # TBCD-STRING ::= OCTET STRING
162
163 #.FN_BODY PLMN-ID  VAL_PTR = parameter_tvb
164   tvbuff_t *parameter_tvb=NULL;
165   offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
166                                        3, 3, FALSE, &parameter_tvb);
167         if(tvb_length(tvb)==0) 
168                 return offset;
169                 
170         if (!parameter_tvb)
171                 return offset;
172         dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, tree, 0, FALSE);
173 #.END
174
175 #.TYPE_ATTR
176 ProtocolExtensionID TYPE = FT_UINT8  DISPLAY = BASE_DEC STRINGS = VALS(lcsap_ProtocolIE_ID_vals)
177 #.ASSIGN_VALUE_TO_TYPE  # LCSAP does not have constants assigned to types, they are pure INTEGER
178 # ProcedureCode
179 id-Location-Service-Request                    ProcedureCode
180 id-Connection-Oriented-Information-Transfer    ProcedureCode
181 id-Connectionless-Information-Transfer         ProcedureCode
182 id-Location-Abort                              ProcedureCode
183 id-Reset                                       ProcedureCode
184
185 # ProtocolIE-ID
186 id-Correlation-ID                   ProtocolIE-ID
187 id-Location-Type                    ProtocolIE-ID
188 id-E-UTRAN-Cell-Identifier          ProtocolIE-ID
189 id-LCS-Client-Type                  ProtocolIE-ID
190 id-LCS-Priority                     ProtocolIE-ID
191 id-LCS-QOS                          ProtocolIE-ID
192 id-UE-Positioning-Capability        ProtocolIE-ID
193 id-Include-Velocity                 ProtocolIE-ID
194 id-IMSI                             ProtocolIE-ID
195 id-IMEI                             ProtocolIE-ID
196 id-MultipleAPDUs                    ProtocolIE-ID
197 id-Positioning-Data                 ProtocolIE-ID
198 id-Velocity-Estimate                ProtocolIE-ID
199 id-Accuracy-Fulfillment-Indicator   ProtocolIE-ID
200 id-LCS-Cause                        ProtocolIE-ID
201 id-Payload-Type                     ProtocolIE-ID
202 id-Return-Error-Cause               ProtocolIE-ID
203 id-APDU                             ProtocolIE-ID
204 id-Return-Error-Request             ProtocolIE-ID
205 id-Location-Estimate                ProtocolIE-ID
206 id-Source-Identity                  ProtocolIE-ID
207 id-Destination-ID                   ProtocolIE-ID
208
209
210 #.REGISTER_NEW
211
212 #LCS-AP-PROTOCOL-IES
213 Accuracy-Fulfillment-Indicator          N lcsap.ies id-Accuracy-Fulfillment-Indicator
214 APDU                                    N lcsap.ies id-APDU
215 Correlation-ID                          N lcsap.ies id-Correlation-ID
216 Network-Element                         N lcsap.ies id-Destination-ID
217 E-CGI                                   N lcsap.ies id-E-UTRAN-Cell-Identifier
218 Include-Velocity                        N lcsap.ies id-Include-Velocity
219 IMEI                                    N lcsap.ies id-IMEI
220 IMSI                                    N lcsap.ies id-IMSI
221 LCS-Client-Type                         N lcsap.ies id-LCS-Client-Type
222 LCS-Priority                            N lcsap.ies id-LCS-Priority
223 LCS-QoS                                 N lcsap.ies id-LCS-QOS
224 LCS-Cause                               N lcsap.ies id-LCS-Cause
225 Geographical-Area                       N lcsap.ies id-Location-Estimate
226 Location-Type                           N lcsap.ies id-Location-Type
227 MultipleAPDUs                           N lcsap.ies id-MultipleAPDUs
228 Payload-Type                            N lcsap.ies id-Payload-Type
229 Positioning-Data                        N lcsap.ies id-Positioning-Data
230 Return-Error-Type                       N lcsap.ies id-Return-Error-Request
231 Return-Error-Cause                      N lcsap.ies id-Return-Error-Cause
232 Network-Element                         N lcsap.ies id-Source-Identity
233 Correlation-ID                                              N lcsap.ies id-Correlation-ID
234 UE-Positioning-Capability               N lcsap.ies id-UE-Positioning-Capability
235 Velocity-Estimate                       N lcsap.ies id-Velocity-Estimate
236
237
238
239
240
241 Location-Request                       N lcsap.proc.imsg id-Location-Service-Request 
242 Location-Response                      N lcsap.proc.sout id-Location-Service-Request 
243 Location-Response                      N lcsap.proc.uout id-Location-Service-Request 
244
245 Connection-Oriented-Information        N lcsap.proc.imsg id-Connection-Oriented-Information-Transfer
246
247 Connectionless-Information             N lcsap.proc.imsg id-Connectionless-Information-Transfer
248 Connectionless-Information             N lcsap.proc.uout id-Connectionless-Information-Transfer
249
250 Location-Abort-Request                 N lcsap.proc.imsg id-Location-Abort
251 Location-Response                      N lcsap.proc.sout id-Location-Abort
252
253 Reset-Request                          N lcsap.proc.imsg id-Reset
254 Reset-Acknowledge                      N lcsap.proc.sout id-Reset
255
256
257
258 #.TYPE_ATTR
259 BitRate TYPE = FT_UINT64 DISPLAY = BASE_DEC STRINGS = NULL
260 #.END