Replace a handful of tabs with spaces.
[obnox/wireshark/wip.git] / asn1 / rtse / rtse.cnf
1 #.EXPORTS
2 RTORQapdu
3 RTOACapdu
4 RTORJapdu
5 RTABapdu
6
7 #.FN_BODY RTORJapdu/userDataRJ
8         char *oid = NULL;
9
10         switch(app_proto)  {
11         case 1:         /* mts-transfer-protocol-1984 */
12                 oid = "applicationProtocol.1";
13                 break;
14         case 12:        /* mts-transfer-protocol */
15                 oid = "applicationProtocol.12";
16                 break;
17         default:
18                 if(session && session->pres_ctx_id)
19                         oid = find_oid_by_pres_ctx_id(actx->pinfo, session->pres_ctx_id);
20                 break;
21         }
22         
23         if(!oid) /* XXX: problem here is we haven't decoded the applicationProtocol yet - so we make assumptions! */
24                 oid = "applicationProtocol.12";
25
26         if(oid) {
27           if((session = (struct SESSION_DATA_STRUCTURE*)(actx->pinfo->private_data)) != NULL)
28                 session->ros_op = (ROS_OP_BIND | ROS_OP_ERROR);
29
30                 offset = call_rtse_oid_callback(oid, tvb, offset, actx->pinfo, top_tree ? top_tree : tree);
31         }
32
33 #.FN_BODY RTABapdu/userdataAB
34 /*XXX not implemented yet */
35
36 #.FN_BODY RTORQapdu
37
38   if((session = (struct SESSION_DATA_STRUCTURE*)(actx->pinfo->private_data)) != NULL)
39         session->ros_op = (ROS_OP_BIND | ROS_OP_ARGUMENT);
40   open_request=TRUE;
41   %(DEFAULT_BODY)s
42   open_request=FALSE;
43
44 #.FN_BODY RTOACapdu
45
46   if((session = (struct SESSION_DATA_STRUCTURE*)(actx->pinfo->private_data)) != NULL)
47         session->ros_op = (ROS_OP_BIND | ROS_OP_RESULT);
48
49   %(DEFAULT_BODY)s
50
51 #.FN_BODY ConnectionData/open
52
53         char *oid = NULL;
54
55         switch(app_proto)  {
56         case 1:         /* mts-transfer-protocol-1984 */
57                 oid = "applicationProtocol.1";
58                 break;
59         case 12:        /* mts-transfer-protocol */
60                 oid = "applicationProtocol.12";
61                 break;
62         default:
63                 if(session && session->pres_ctx_id)
64                         oid = find_oid_by_pres_ctx_id(actx->pinfo, session->pres_ctx_id);
65                 break;
66         }
67         
68         if(!oid) /* XXX: problem here is we haven't decoded the applicationProtocol yet - so we make assumptions! */
69                 oid = "applicationProtocol.12";
70
71         if(oid) {
72
73                 offset = call_rtse_oid_callback(oid, tvb, offset, actx->pinfo, top_tree ? top_tree : tree);
74         }
75
76         /* else XXX: need to flag we can't find the presentation context */
77
78 #.FN_BODY RTTRapdu
79         tvbuff_t *next_tvb = NULL;
80
81         offset = dissect_ber_octet_string(FALSE, actx, tree, tvb, offset, hf_index, &next_tvb);
82
83         if(next_tvb) {
84
85                 /* XXX: we should check is this is an EXTERNAL first */
86
87                 /* ROS won't do this for us */
88                 if(session)
89                         session->ros_op = (ROS_OP_INVOKE | ROS_OP_ARGUMENT);
90
91                 offset = dissect_ber_external_type(FALSE, tree, next_tvb, 0, actx,  -1, call_rtse_external_type_callback);
92         }
93
94
95 #.FN_BODY RTORQapdu/applicationProtocol
96
97   offset = dissect_ber_integer(TRUE, actx, tree, tvb, offset, hf_index, &app_proto);
98
99 #.FN_BODY SessionConnectionIdentifier
100   if(open_request && check_col(actx->pinfo->cinfo, COL_INFO))
101     col_append_str(actx->pinfo->cinfo, COL_INFO, "Recover");
102   %(DEFAULT_BODY)s
103
104 #.END
105   
106 #.FN_BODY CallingSSuserReference/t61String  VAL_PTR=&string
107   tvbuff_t *string = NULL;
108   %(DEFAULT_BODY)s
109   if(open_request && string && check_col(actx->pinfo->cinfo, COL_INFO))
110     col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", tvb_format_text(string, 0, tvb_length(string)));
111
112 #.FN_PARS CommonReference
113   VAL_PTR=&string
114 #.FN_BODY CommonReference
115   tvbuff_t *string = NULL;
116   %(DEFAULT_BODY)s
117   if(open_request && string && check_col(actx->pinfo->cinfo, COL_INFO))
118     col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", tvb_format_text(string, 0, tvb_length(string)));
119
120 #.END
121   
122 #.FN_BODY CallingSSuserReference/octetString  VAL_PTR=&string
123   tvbuff_t *string = NULL;
124   %(DEFAULT_BODY)s
125   if(open_request && string && check_col(actx->pinfo->cinfo, COL_INFO))
126     col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", tvb_format_text(string, 0, tvb_length(string)));
127
128 #.END