Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / asn1 / rtse / rtse.cnf
blobac1fa1ac8a395c0cc57bf14661b58511ce3050a1
1 #.EXPORTS
2 RTORQapdu
3 RTOACapdu
4 RTORJapdu
5 RTABapdu
7 #.NO_EMIT ONLY_VALS
8 RTSE-apdus
10 #.FN_BODY RTORJapdu/userDataRJ
11     struct SESSION_DATA_STRUCTURE* session = (struct SESSION_DATA_STRUCTURE*)actx->private_data;
12         const char *oid = NULL;
14         switch(app_proto)  {
15         case 1:         /* mts-transfer-protocol-1984 */
16                 oid = "applicationProtocol.1";
17                 break;
18         case 12:        /* mts-transfer-protocol */
19                 oid = "applicationProtocol.12";
20                 break;
21         default:
22                 if(session && session->pres_ctx_id)
23                         oid = find_oid_by_pres_ctx_id(actx->pinfo, session->pres_ctx_id);
24                 break;
25         }
27         if(!oid) /* XXX: problem here is we haven't decoded the applicationProtocol yet - so we make assumptions! */
28                 oid = "applicationProtocol.12";
30         if(oid) {
31           if(session != NULL)
32                 session->ros_op = (ROS_OP_BIND | ROS_OP_ERROR);
34           offset = call_rtse_oid_callback(oid, tvb, offset, actx->pinfo, top_tree ? top_tree : tree, session);
35         }
37 #.FN_BODY RTABapdu/userdataAB
38 /*XXX not implemented yet */
40 #.FN_BODY RTORQapdu
41   struct SESSION_DATA_STRUCTURE* session = (struct SESSION_DATA_STRUCTURE*)actx->private_data;
43   if(session != NULL)
44         session->ros_op = (ROS_OP_BIND | ROS_OP_ARGUMENT);
45   open_request=true;
46   %(DEFAULT_BODY)s
47   open_request=false;
49 #.FN_BODY RTOACapdu
50   struct SESSION_DATA_STRUCTURE* session = (struct SESSION_DATA_STRUCTURE*)actx->private_data;
52   if(session != NULL)
53         session->ros_op = (ROS_OP_BIND | ROS_OP_RESULT);
55   %(DEFAULT_BODY)s
57 #.FN_BODY ConnectionData/open
59         struct SESSION_DATA_STRUCTURE* session = (struct SESSION_DATA_STRUCTURE*)actx->private_data;
60         const char *oid = NULL;
62         switch(app_proto)  {
63         case 1:         /* mts-transfer-protocol-1984 */
64                 oid = "applicationProtocol.1";
65                 break;
66         case 12:        /* mts-transfer-protocol */
67                 oid = "applicationProtocol.12";
68                 break;
69         default:
70                 if(session && session->pres_ctx_id)
71                         oid = find_oid_by_pres_ctx_id(actx->pinfo, session->pres_ctx_id);
72                 break;
73         }
75         if(!oid) /* XXX: problem here is we haven't decoded the applicationProtocol yet - so we make assumptions! */
76                 oid = "applicationProtocol.12";
78         if(oid) {
80                 offset = call_rtse_oid_callback(oid, tvb, offset, actx->pinfo, top_tree ? top_tree : tree, session);
81         }
83         /* else XXX: need to flag we can't find the presentation context */
85 #.FN_BODY RTTRapdu
86         tvbuff_t *next_tvb = NULL;
87     struct SESSION_DATA_STRUCTURE* session = (struct SESSION_DATA_STRUCTURE*)actx->private_data;
89         offset = dissect_ber_octet_string(false, actx, tree, tvb, offset, hf_index, &next_tvb);
91         if(next_tvb) {
93                 /* XXX: we should check is this is an EXTERNAL first */
95                 /* ROS won't do this for us */
96                 if(session)
97                         session->ros_op = (ROS_OP_INVOKE | ROS_OP_ARGUMENT);
99                 offset = dissect_ber_external_type(false, tree, next_tvb, 0, actx,  -1, call_rtse_external_type_callback);
100         }
103 #.FN_BODY RTORQapdu/applicationProtocol
105   offset = dissect_ber_integer(true, actx, tree, tvb, offset, hf_index, &app_proto);
107 #.FN_BODY SessionConnectionIdentifier
108   if(open_request){
109     col_append_str(actx->pinfo->cinfo, COL_INFO, "Recover");
110   }
111   %(DEFAULT_BODY)s
113 #.END
115 #.FN_BODY CallingSSuserReference/t61String  VAL_PTR=&string
116   tvbuff_t *string = NULL;
117   %(DEFAULT_BODY)s
118   if(open_request && string)
119     col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", tvb_get_string_enc(actx->pinfo->pool, string, 0,
120                                                                             tvb_reported_length(string), ENC_T61));
122 #.TYPE_ATTR
123 CallingSSuserReference/t61String DISPLAY = BASE_NONE
125 #.FN_PARS CommonReference
126   VAL_PTR=&string
127 #.FN_BODY CommonReference
128   tvbuff_t *string = NULL;
129   %(DEFAULT_BODY)s
130   if(open_request && string)
131     col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", tvb_format_text(actx->pinfo->pool, string, 0, tvb_reported_length(string)));
133 #.END
135 #.FN_BODY CallingSSuserReference/octetString  VAL_PTR=&string
136   tvbuff_t *string = NULL;
137   %(DEFAULT_BODY)s
138   if(open_request && string)
139     col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", tvb_format_text(actx->pinfo->pool, string, 0, tvb_reported_length(string)));
141 #.FN_BODY RTTPapdu  VAL_PTR=&priority
142   int priority = -1;
144   col_append_str(actx->pinfo->cinfo, COL_INFO, "Turn-Please");
146   %(DEFAULT_BODY)s
148   if(priority != -1)
149     col_append_fstr(actx->pinfo->cinfo, COL_INFO, " (%%d)", priority);
151 #.FN_BODY RTORJapdu
152   col_append_str(actx->pinfo->cinfo, COL_INFO, "Refuse");
154   %(DEFAULT_BODY)s
156 #.FN_PARS RefuseReason
157   VAL_PTR=&reason
159 #.FN_BODY RefuseReason
160   int reason = -1;
162   %(DEFAULT_BODY)s
164   if(reason != -1)
165    col_append_fstr(actx->pinfo->cinfo, COL_INFO, " (%%s)", val_to_str(reason, rtse_RefuseReason_vals, "reason(%%d)"));
167 #.FN_BODY RTABapdu
168   col_append_str(actx->pinfo->cinfo, COL_INFO, "Abort");
170   %(DEFAULT_BODY)s
172 #.FN_PARS AbortReason
173   VAL_PTR=&reason
175 #.FN_BODY AbortReason
176   int reason = -1;
178   %(DEFAULT_BODY)s
180   if(reason != -1)
181    col_append_fstr(actx->pinfo->cinfo, COL_INFO, " (%%s)", val_to_str(reason, rtse_AbortReason_vals, "reason(%%d)"));
183 #.TYPE_ATTR
184 AdditionalReferenceInformation DISPLAY = BASE_NONE
186 #.END