6fab8901d1f39b9136f8e7cebc67b6b2b09df626
[metze/wireshark/wip.git] / asn1 / pres / pres.cnf
1 # pres.cnf
2 # pres conformation file
3
4 # $Id$
5
6 #.IMPORT ../rtse/rtse-exp.cnf
7
8 #.EXPORTS
9
10 #.PDU
11 UD-type
12
13 #.NO_EMIT
14 UDC-type
15
16 #.TYPE_RENAME
17 CPA-PPDU/normal-mode-parameters T_CPA_PPDU_normal_mode_parameters
18 CPR-PPDU/normal-mode-parameters T_CPR_PPDU_normal_mode_parameters       
19 ARU-PPDU/normal-mode-parameters T_ARU_PPDU_normal_mode_parameters
20
21 #.FIELD_RENAME
22 ARU-PPDU/normal-mode-parameters aRU_PPDU_normal_mode_parameters
23 CPA-PPDU/normal-mode-parameters cPU_PPDU_normal_mode_parameters
24 CPR-PPDU/normal-mode-parameters cPR_PPDU_normal_mode_parameters
25
26 ARU-PPDU/x400-mode-parameters aRU_PPDU_x400_mode_parameters
27 CPR-PPDU/x400-mode-parameters cPU_PPDU_x400_mode_parameters
28 CPA-PPDU/x410-mode-parameters cPR_PPDU_x400_mode_parameters
29
30 ARP-PPDU/provider-reason aRU_PPDU_provider-reason
31 CPR-PPDU/normal-mode-parameters/provider-reason cPR_PPDU__provider-reason
32
33
34
35
36 #.FN_BODY PDV-list/presentation-data-values/single-ASN1-type
37
38  tvbuff_t       *next_tvb;
39  char *oid; 
40
41         oid=find_oid_by_pres_ctx_id(actx->pinfo, presentation_context_identifier);
42         if(oid){
43                 next_tvb = tvb_new_subset_remaining(tvb, offset);
44                 call_ber_oid_callback(oid, next_tvb, offset, actx->pinfo, global_tree);
45         } else {
46                 proto_item *ti = proto_tree_add_text(tree, tvb, offset, -1,"dissector is not available");
47                 expert_add_info_format(actx->pinfo, ti, PI_UNDECODED, PI_WARN, "Dissector is not available");
48         }
49
50 #.FN_BODY PDV-list/presentation-data-values/octet-aligned
51
52  tvbuff_t       *next_tvb;
53  char *oid; 
54
55         oid=find_oid_by_pres_ctx_id(actx->pinfo, presentation_context_identifier);
56         if(oid){
57                 dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, &next_tvb);
58                 call_ber_oid_callback(oid, next_tvb, offset, actx->pinfo, global_tree);
59         } else {
60                 proto_item *ti = proto_tree_add_text(tree, tvb, offset, -1,"dissector is not available");
61                 expert_add_info_format(actx->pinfo, ti, PI_UNDECODED, PI_WARN, "Dissector is not available");
62                 %(DEFAULT_BODY)s
63         }
64
65
66 #.FN_PARS Abstract-syntax-name
67   FN_VARIANT = _str  VAL_PTR = &abstract_syntax_name_oid
68
69 #.FN_PARS Presentation-context-identifier
70  VAL_PTR = &presentation_context_identifier
71
72 #.FN_BODY Presentation-context-identifier
73   const char *name;
74   char *oid;
75
76   %(DEFAULT_BODY)s
77
78   if(session)
79         session->pres_ctx_id = presentation_context_identifier;
80
81   oid = find_oid_by_pres_ctx_id(actx->pinfo, presentation_context_identifier);
82
83   if(oid && (name = oid_resolved_from_string(oid))) {
84         proto_item_append_text(actx->created_item, " (%%s)", name);
85   }
86
87 #.FN_PARS Abort-reason
88   VAL_PTR = &reason
89
90 #.FN_BODY Abort-reason
91   guint32 reason;
92
93   %(DEFAULT_BODY)s
94
95   col_append_fstr(actx->pinfo->cinfo, COL_INFO, " (%%s)", val_to_str(reason, pres_Abort_reason_vals, "unknown: %%d"));
96
97 #.FN_HDR Context-list/_item
98         abstract_syntax_name_oid=NULL;
99 #.END
100 #.FN_FTR Context-list/_item
101         register_ctx_id_and_oid(actx->pinfo, presentation_context_identifier, abstract_syntax_name_oid);
102 #.END