Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / asn1 / h248 / h248.cnf
blobf422429876a57de78a2781336a60d34ac6796712
1 # h248.cnf
2 # H.248 conformation file
4 #.MODULE_IMPORT
6 #.EXPORTS
8 #.PDU
10 #.NO_EMIT
11 MtpAddress
12 PkgdName
13 ErrorCode
14 PropertyID
15 SignalName
16 SigParameterName
17 SigParamValue
18 EventName
19 EventParameterName
20 EventParamValue
21 ContextID
22 EventParamValueV1
23 SigParamValueV1
25 #.TYPE_RENAME
26 IndAudMediaDescriptor/streams                   IndAudMediaDescriptorStreams
27 ActionRequest/contextId                                 ContextId
28 ActionReply/contextId                                   ContextId
29 StatisticsParameter/statName                    StatName
30 StatisticsParameter/statValue                   StatValue
31 PropertyParm/propertyName                               PropertyName
32 EventParameter/extraInfo                                EventPar_extraInfo
33 PropertyParm/extraInfo                                  PropParm_extraInfo
34 ContextRequest/iepscallind                              Iepscallind_BOOL
36 #.FIELD_RENAME
37 IP4Address/address              iP4Address
38 IP6Address/address              iP6Address
39 ContextAttrAuditRequest/emergency       cAAREmergency
40 ContextAttrAuditRequest/priority        cAARPriority
41 SecondRequestedEvent/eventAction        secondaryEventAction
42 TerminationStateDescriptor/eventBufferControl   tSEventBufferControl
43 SecondEventsDescriptor/eventList        secondaryEventList
44 IndAudEventBufferDescriptor/eventName   iAEBDEventName
45 TerminationID/id                        terminationId
46 IndAudStreamParms/localControlDescriptor iASPLocalControlDescriptor
47 IndAudStreamParms/localDescriptor       iASPLocalDescriptor
48 LocalControlDescriptor/propertyParms lCDpropertyParms
49 TerminationStateDescriptor/propertyParms tSDpropertyParms
50 MediaDescriptor/streams/oneStream       mediaDescriptorOneStream
51 MediaDescriptor/streams/multiStream     mediaDescriptorMultiStream
52 MediaDescriptor/streams/multiStream/_item       mediaDescriptorMultiStream_item
53 DomainName/name                         domName
54 IndAudEventsDescriptor/pkgdName         iAEDPkgdName
55 IndAudLocalRemoteDescriptor/propGrps    iAPropertyGroup
56 IndAudLocalControlDescriptor/propertyParms      indAudPropertyParms
57 IndAudTerminationStateDescriptor/propertyParms  indAudPropertyParms
58 IndAudLocalControlDescriptor/reserveGroup       iALCDReserveGroup
59 IndAudLocalControlDescriptor/reserveValue       iALCDReserveValue
60 IndAudLocalControlDescriptor/streamMode         iALCDStreamMode
61 IndAudStreamDescriptor/streamParms              indAudStreamParms
62 IndAudMediaDescriptor/termStateDescr            indAudTerminationStateDescriptor
63 IndAudSignal/signalName                         iASignalName
64 IndAudSeqSigList/signalList                     iASignalList
65 IndAudSignalsDescriptor/signal                  indAudSignal
66 IndAudSignalsDescriptor/seqSigList              indAudSeqSigList
67 IndAudTerminationStateDescriptor/serviceState   iATSDServiceState
68 IndAudStreamParms/remoteDescriptor              iASPRemoteDescriptor
69 PropertyParm/value                              propertyParamValue
70 IndAudMediaDescriptor/streams                   indAudMediaDescriptorStreams
71 AmmRequest/terminationID                        terminationIDList
72 AmmsReply/terminationID                 terminationIDList
73 AmmDescriptor/statisticsDescriptor      aDstatisticsDescriptor
74 AuditReturnParameter/statisticsDescriptor       aRPstatisticsDescriptor
75 StreamParms/statisticsDescriptor                                sPstatisticsDescriptor
76 SubtractRequest/terminationID                   terminationIDList
77 NotifyRequest/terminationID                     terminationIDList
78 NotifyReply/terminationID                       terminationIDList
79 ServiceChangeRequest/terminationID                      terminationIDList
80 ServiceChangeReply/terminationID                        terminationIDList
81 IndAudStatisticsDescriptor/statName             iAStatName
82 EventParameter/extraInfo                                eventPar_extraInfo
83 PropertyParm/extraInfo                                  propParm_extraInfo
84 ContextRequest/iepscallind                              iepscallind_BOOL
85 TransactionRequest/transactionId        transactionId
86 SegmentReply/transactionId                      seg_rep_transactionId
87 TransactionReply/transactionId          trep_transactionId
88 TransactionPending/transactionId        tpend_transactionId
89 EventParameterV1/value          event_param_value
90 SigParameterV1/value            sig_param_value
91 AuditReplyV1/auditResult        audit_result
93 #.FIELD_ATTR
94 IP4Address/address                  ABBREV=iP4Address
95 IP6Address/address                  ABBREV=iP6Address
96 TransactionRequest/transactionId    ABBREV=transactionRequest.transactionId
97 SegmentReply/transactionId          ABBREV=segmentreply.transactionId
98 TransactionReply/transactionId      ABBREV=transactionreply.transactionId
99 TransactionPending/transactionId    ABBREV=transactionpending.transactionId
100 DomainName/name                     ABBREV=domainname
101 TerminationID/id                    ABBREV=terminationId
102 PropertyParm/value                  ABBREV=propertyParamValue
103 EventParameterV1/value              ABBREV=event_param_value
104 SigParameterV1/value                ABBREV=sig_param_value
106 #.FN_HDR Message
107     curr_info.msg = gcp_msg(actx->pinfo,tvb_raw_offset(tvb),keep_persistent_data);
108 #.END
110 #.FN_FTR Message
111     col_add_str(actx->pinfo->cinfo, COL_INFO, gcp_msg_to_str(curr_info.msg,actx->pinfo->pool,keep_persistent_data));
113     if (keep_persistent_data)
114         gcp_analyze_msg(h248_tree, actx->pinfo, tvb, curr_info.msg, &h248_arrel, &ei_h248_errored_command);
115 #.END
117 #.FN_BODY Message/version VAL_PTR = &h248_version
118         %(DEFAULT_BODY)s
119 #.END
121 #.FN_BODY TransactionRequest/transactionId
122     uint32_t trx_id = 0;
123         offset = dissect_h248_trx_id(implicit_tag, actx->pinfo, tree, tvb, offset, &trx_id);
124     curr_info.trx = gcp_trx(curr_info.msg, trx_id, GCP_TRX_REQUEST, actx->pinfo, keep_persistent_data);
125     error_code = 0;
126 #.END
128 #.FN_BODY TransactionPending/transactionId
129     uint32_t trx_id = 0;
130         offset = dissect_h248_trx_id(implicit_tag, actx->pinfo, tree, tvb, offset, &trx_id);
131     curr_info.trx = gcp_trx(curr_info.msg, trx_id, GCP_TRX_PENDING, actx->pinfo, keep_persistent_data);
132     error_code = 0;
134 #.FN_BODY TransactionReply/transactionId
135     uint32_t trx_id = 0;
136         offset = dissect_h248_trx_id(implicit_tag, actx->pinfo, tree, tvb, offset, &trx_id);
137     curr_info.trx = gcp_trx(curr_info.msg, trx_id, GCP_TRX_REPLY, actx->pinfo, keep_persistent_data);
138     error_code = 0;
140 #.FN_BODY SegmentReply/transactionId
141     uint32_t trx_id = 0;
142         offset = dissect_h248_trx_id(implicit_tag, actx->pinfo, tree, tvb, offset, &trx_id);
143     curr_info.trx = gcp_trx(curr_info.msg, trx_id, GCP_TRX_ACK, actx->pinfo, keep_persistent_data);
144     error_code = 0;
146 #.FN_BODY ActionRequest/contextId
147     uint32_t ctx_id = 0;
148         offset = dissect_h248_ctx_id(implicit_tag, actx->pinfo, tree, tvb, offset, &ctx_id);
149     curr_info.ctx = gcp_ctx(curr_info.msg,curr_info.trx,ctx_id,actx->pinfo,keep_persistent_data);
150     curr_info.cmd = NULL;
151     curr_info.term = NULL;
152 #.END
155 #.FN_FTR ActionReply
156     if (!curr_info.cmd) {
157           curr_info.cmd = gcp_cmd(curr_info.msg,curr_info.trx,curr_info.ctx,GCP_CMD_REPLY,offset,actx->pinfo,keep_persistent_data);
158       H248_TAP();
159         }
160 #.END
162 #.FN_HDR Command/addReq
163           curr_info.cmd = gcp_cmd(curr_info.msg,curr_info.trx,curr_info.ctx,GCP_CMD_ADD_REQ,offset,actx->pinfo,keep_persistent_data);
164       H248_TAP();
165 #.END
167 #.FN_FTR Command/addReq
168       curr_info.cmd = NULL;
169 #.END
171 #.FN_HDR Command/moveReq
172           curr_info.cmd = gcp_cmd(curr_info.msg,curr_info.trx,curr_info.ctx,GCP_CMD_MOVE_REQ,offset,actx->pinfo,keep_persistent_data);
173       H248_TAP();
175 #.END
177 #.FN_FTR Command/moveReq
178       curr_info.cmd = NULL;
179 #.END
181 #.FN_HDR Command/modReq
182           curr_info.cmd = gcp_cmd(curr_info.msg,curr_info.trx,curr_info.ctx,GCP_CMD_MOD_REQ,offset,actx->pinfo,keep_persistent_data);
183       H248_TAP();
184 #.END
185 #.FN_FTR Command/modReq
186       curr_info.cmd = NULL;
187 #.END
189 #.FN_HDR Command/subtractReq
190           curr_info.cmd = gcp_cmd(curr_info.msg,curr_info.trx,curr_info.ctx,GCP_CMD_SUB_REQ,offset,actx->pinfo,keep_persistent_data);
191       H248_TAP();
192 #.END
193 #.FN_FTR Command/subtractReq
194       curr_info.cmd = NULL;
195 #.END
197 #.FN_HDR Command/auditCapRequest
198           curr_info.cmd = gcp_cmd(curr_info.msg,curr_info.trx,curr_info.ctx,GCP_CMD_AUDITCAP_REQ,offset,actx->pinfo,keep_persistent_data);
199       H248_TAP();
200 #.END
201 #.FN_FTR Command/auditCapRequest
202       curr_info.cmd = NULL;
203 #.END
205 #.FN_HDR Command/auditValueRequest
206           curr_info.cmd = gcp_cmd(curr_info.msg,curr_info.trx,curr_info.ctx,GCP_CMD_AUDITVAL_REQ,offset,actx->pinfo,keep_persistent_data);
207       H248_TAP();
208 #.END
209 #.FN_FTR Command/auditValueRequest
210       curr_info.cmd = NULL;
211 #.END
213 #.FN_HDR Command/notifyReq
214           curr_info.cmd = gcp_cmd(curr_info.msg,curr_info.trx,curr_info.ctx,GCP_CMD_NOTIFY_REQ,offset,actx->pinfo,keep_persistent_data);
215       H248_TAP();
216 #.END
217 #.FN_FTR Command/notifyReq
218       curr_info.cmd = NULL;
219 #.END
221 #.FN_HDR ServiceChangeRequest
222       curr_info.cmd = gcp_cmd(curr_info.msg,curr_info.trx,curr_info.ctx,GCP_CMD_SVCCHG_REQ,offset,actx->pinfo,keep_persistent_data);
223       H248_TAP();
224 #.END
225 #.FN_FTR ServiceChangeRequest
226       curr_info.cmd = NULL;
227 #.END
229 #.FN_HDR ContextRequest/topologyReq
230       curr_info.cmd = gcp_cmd(curr_info.msg,curr_info.trx,curr_info.ctx,GCP_CMD_TOPOLOGY_REQ,offset,actx->pinfo,keep_persistent_data);
231       H248_TAP();
232 #.END
233 #.FN_FTR ContextRequest/topologyReq
234       curr_info.cmd = NULL;
235 #.END
237 #.FN_HDR ActionRequest/contextAttrAuditReq
238       curr_info.cmd = gcp_cmd(curr_info.msg,curr_info.trx,curr_info.ctx,GCP_CMD_CTX_ATTR_AUDIT_REQ,offset,actx->pinfo,keep_persistent_data);
239       H248_TAP();
240 #.END
241 #.FN_FTR ActionRequest/contextAttrAuditReq
242       curr_info.cmd = NULL;
243 #.END
245 #.FN_HDR CommandReply/addReply
246       curr_info.cmd = gcp_cmd(curr_info.msg,curr_info.trx,curr_info.ctx,GCP_CMD_ADD_REPLY,offset,actx->pinfo,keep_persistent_data);
247       H248_TAP();
248 #.END
250 #.FN_HDR CommandReply/moveReply
251       curr_info.cmd = gcp_cmd(curr_info.msg,curr_info.trx,curr_info.ctx,GCP_CMD_MOVE_REPLY,offset,actx->pinfo,keep_persistent_data);
252       H248_TAP();
253 #.END
255 #.FN_HDR CommandReply/modReply
256       curr_info.cmd = gcp_cmd(curr_info.msg,curr_info.trx,curr_info.ctx,GCP_CMD_MOD_REPLY,offset,actx->pinfo,keep_persistent_data);
257       H248_TAP();
258 #.END
260 #.FN_HDR CommandReply/subtractReply
261       curr_info.cmd = gcp_cmd(curr_info.msg,curr_info.trx,curr_info.ctx,GCP_CMD_SUB_REPLY,offset,actx->pinfo,keep_persistent_data);
262       H248_TAP();
263 #.END
265 #.FN_HDR CommandReply/notifyReply
266       curr_info.cmd = gcp_cmd(curr_info.msg,curr_info.trx,curr_info.ctx,GCP_CMD_NOTIFY_REPLY,offset,actx->pinfo,keep_persistent_data);
267       H248_TAP();
268 #.END
270 #.FN_HDR ServiceChangeReply
271       curr_info.cmd = gcp_cmd(curr_info.msg,curr_info.trx,curr_info.ctx,GCP_CMD_SVCCHG_REPLY,offset,actx->pinfo,keep_persistent_data);
272       H248_TAP();
273 #.END
275 #.FN_HDR CommandReply/auditCapReply
276       curr_info.cmd = gcp_cmd(curr_info.msg,curr_info.trx,curr_info.ctx,GCP_CMD_AUDITCAP_REPLY,offset,actx->pinfo,keep_persistent_data);
277       H248_TAP();
278 #.END
280 #.FN_BODY CommandReply/auditCapReply
281 /* h248v1 support */
282         if(h248_version > 1) {
283                 %(DEFAULT_BODY)s
284 } else {
285         /* call V1 of the dissector */
286         offset = dissect_h248_AuditReplyV1(implicit_tag, tvb, offset, actx, tree, hf_index);
288 #.END
290 #.FN_HDR CommandReply/auditValueReply
291       curr_info.cmd = gcp_cmd(curr_info.msg,curr_info.trx,curr_info.ctx,GCP_CMD_AUDITVAL_REPLY,offset,actx->pinfo,keep_persistent_data);
292       H248_TAP();
293 #.END
295 #.FN_BODY CommandReply/auditValueReply
296 /* h248v1 support */
297         if(h248_version > 1) {
298                 %(DEFAULT_BODY)s
299 } else {
300         /* call V1 of the dissector */
301         offset = dissect_h248_AuditReplyV1(implicit_tag, tvb, offset, actx, tree, hf_index);
303 #.END
305 #.FN_BODY AuditReplyV1
306 /* h248v1 support */
307         offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
308                 AuditReplyV1_sequence, hf_h248_auditValueReplyV1, ett_h248_AuditReplyV1);
309 #.END
311 #.FN_BODY ErrorDescriptor/errorCode
312     offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, &error_code);
313     expert_add_info(actx->pinfo, actx->created_item, &ei_h248_errored_command);
315     if (curr_info.cmd) {
316         gcp_cmd_set_error(curr_info.cmd,error_code);
317     } else if (curr_info.trx) {
318         gcp_trx_set_error(curr_info.trx,error_code);
319     }
320 #.END
322 #.FN_HDR TerminationID
323     curr_info.term = wmem_new0(actx->pinfo->pool, gcp_term_t);
324     wild_term = GCP_WILDCARD_NONE;
325 #.END
327 #.FN_BODY WildcardField
328     tvbuff_t* new_tvb;
329     offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, &new_tvb);
330     tree = proto_item_add_subtree(actx->created_item,ett_wildcard);
331     proto_tree_add_item(tree,hf_h248_term_wild_type,new_tvb,0,1,ENC_BIG_ENDIAN);
332     proto_tree_add_item(tree,hf_h248_term_wild_level,new_tvb,0,1,ENC_BIG_ENDIAN);
333     proto_tree_add_item(tree,hf_h248_term_wild_position,new_tvb,0,1,ENC_BIG_ENDIAN);
335     wild_term = tvb_get_uint8(new_tvb,0) & 0x80 ? GCP_WILDCARD_CHOOSE : GCP_WILDCARD_ALL;
336     /* limitation: assume only one wildcard is used */
337     wild_card = tvb_get_uint8(new_tvb,0);
339 #.END
341 #.FN_BODY TerminationID/id
342         tvbuff_t* new_tvb;
343         h248_term_info_t term_info;
345         term_info.wild_card = wild_card;
346         term_info.str = NULL;
348         offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, &new_tvb);
350         if (new_tvb) {
351                 curr_info.term->len = tvb_reported_length(new_tvb);
352                 curr_info.term->type = 0; /* unknown */
354                 if (h248_term_handle) {
355                         call_dissector_with_data(h248_term_handle, new_tvb, actx->pinfo, tree, &term_info);
356                         wild_card = 0xFF;
357                 }
359                 if (curr_info.term->len) {
360                         curr_info.term->buffer = (uint8_t *)tvb_memdup(actx->pinfo->pool,new_tvb,0,curr_info.term->len);
361                         if(term_info.str){
362                                 curr_info.term->str = wmem_strdup_printf(actx->pinfo->pool, "%s %s",
363                                                                                         bytes_to_str_punct(actx->pinfo->pool,curr_info.term->buffer,curr_info.term->len, 0),
364                                                                                         term_info.str);
365                         }else{
366                                 curr_info.term->str = bytes_to_str_punct(actx->pinfo->pool,curr_info.term->buffer,curr_info.term->len, 0);
367                         }
368                 }
371                 curr_info.term = gcp_cmd_add_term(curr_info.msg, curr_info.trx, curr_info.cmd, curr_info.term, wild_term, actx->pinfo, keep_persistent_data);
373         } else {
374                 curr_info.term->len = 0;
375                 curr_info.term->buffer = (uint8_t*)wmem_strdup(actx->pinfo->pool, "");
376                 curr_info.term->str = wmem_strdup(actx->pinfo->pool, "?");
377         }
378 #.END
380 #.FN_BODY SCreasonValueOctetStr VAL_PTR = &parameter_tvb
381  tvbuff_t       *parameter_tvb;
382  %(DEFAULT_BODY)s
384  if (!parameter_tvb)
385         return offset;
387  dissect_h248_ServiceChangeReasonStr(false, parameter_tvb, 0, actx, tree, hf_h248_serviceChangeReasonStr);
388 #.END
390 #.FN_BODY EventParameter
391 /* H248 v1 support */
392         if (h248_version > 1) {
393                 %(DEFAULT_BODY)s
394 } else {
395         offset = dissect_h248_EventParameterV1( implicit_tag, tvb, offset, actx, tree, hf_index);
397 #.END
399 #.FN_BODY SigParameter
400 /* H248 v1 support */
401         if (h248_version > 1) {
402                 %(DEFAULT_BODY)s
403 } else {
404         offset = dissect_h248_SigParameterV1( implicit_tag, tvb, offset, actx, tree, hf_index);
406 #.END
408 #.TYPE_ATTR
409 IP4Address/address  TYPE = FT_IPv4  DISPLAY = BASE_NONE  STRINGS = NULL
410 IP6Address/address  TYPE = FT_IPv6  DISPLAY = BASE_NONE  STRINGS = NULL
411 ActionRequest/contextId TYPE = FT_UINT32 DISPLAY = BASE_HEX STRINGS = NULL
412 ActionReply/contextId TYPE = FT_UINT32 DISPLAY = BASE_HEX STRINGS = NULL
413 ErrorDescriptor/errorCode TYPE = FT_UINT32 DISPLAY = BASE_DEC|BASE_EXT_STRING STRINGS = &h248_reasons_ext