- dissect_ber_object_identifier() returns value as tvb
[obnox/wireshark/wip.git] / asn1 / pres / pres.cnf
1 # pres.cnf
2 # pres conformation file
3
4 # $Id$
5
6 #.MODULE_IMPORT
7 Reliable-Transfer-APDU  rtse
8
9 #.INCLUDE ../rtse/rtse-exp.cnf
10
11 #.EXPORTS
12
13 #.PDU
14
15 #.NO_EMIT
16
17 #.TYPE_RENAME
18 CPA-PPDU/normal-mode-parameters T_CPA_PPDU_normal_mode_parameters
19 CPR-PPDU/normal-mode-parameters T_CPR_PPDU_normal_mode_parameters       
20 ARU-PPDU/normal-mode-parameters T_ARU_PPDU_normal_mode_parameters
21
22 #.FIELD_RENAME
23 ARU-PPDU/normal-mode-parameters aRU_PPDU_normal_mode_parameters
24 CPA-PPDU/normal-mode-parameters cPU_PPDU_normal_mode_parameters
25 CPR-PPDU/normal-mode-parameters cPR_PPDU_normal_mode_parameters
26
27 ARU-PPDU/x400-mode-parameters aRU_PPDU_x400_mode_parameters
28 CPR-PPDU/x400-mode-parameters cPU_PPDU_x400_mode_parameters
29 CPA-PPDU/x410-mode-parameters cPR_PPDU_x400_mode_parameters
30
31 ARP-PPDU/provider-reason aRU_PPDU_provider-reason
32 CPR-PPDU/normal-mode-parameters/provider-reason cPR_PPDU__provider-reason
33
34 #.FN_BODY OPEN
35 /* FIX ME*/
36
37 #.FN_BODY PDV-list/presentation-data-values/single-ASN1-type
38
39  tvbuff_t       *next_tvb;
40  char *oid; 
41
42         oid=find_oid_by_pres_ctx_id(pinfo, presentation_context_identifier);
43         if(oid){
44                 next_tvb = tvb_new_subset(tvb, offset, -1, -1);
45                 call_ber_oid_callback(oid, next_tvb, offset, pinfo, global_tree);
46         } else {
47                 proto_tree_add_text(tree, tvb, offset, -1,"dissector is not available");
48                 %(DEFAULT_BODY)s        
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(pinfo, presentation_context_identifier);
56         if(oid){
57                 next_tvb = tvb_new_subset(tvb, offset, -1, -1);
58                 call_ber_oid_callback(oid, next_tvb, offset, pinfo, global_tree);
59         } else {
60                 proto_tree_add_text(tree, tvb, offset, -1,"dissector is not available");
61                 %(DEFAULT_BODY)s        
62         }
63
64
65 #.FN_PARS Abstract_syntax_name
66   FN_VARIANT = _str  VAL_PTR = &abstract_syntax_name_oid
67
68 #.FN_PARS Presentation_context_identifier
69  VAL_PTR = &presentation_context_identifier
70
71 #.FN_BODY Presentation_context_identifier
72
73   %(DEFAULT_BODY)s
74
75   if(session)
76         session->pres_ctx_id = presentation_context_identifier;
77
78 #.FN_FTR Context-list/_item
79         register_ctx_id_and_oid(pinfo, presentation_context_identifier, abstract_syntax_name_oid);
80 #.END