aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/asn1/ros/ros.cnf
blob: 8511a8e20bed2ac49c106fbde404cc67eaba9424 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
#.EXPORTS
OPERATION
ERROR
OPERATION-PACKAGE
CONTRACT
InvokeId
Code
ROS

#.OMIT_ASSIGNMENT
Priority
#.END

#.TYPE_RENAME
ReturnResult/result/result	OperationResult

#.FIELD_RENAME
Reject/problem/invoke		invokeProblem
ReturnResult/result/result	operationResult
Reject/problem/returnError	rejectError
Reject/problem/returnResult	rejectResult

#.FN_PARS OperationCode VAL_PTR = &opcode

#.FN_PARS ErrorCode VAL_PTR = &opcode

#.FN_PARS InvokeId/present VAL_PTR = &invokeid

#.FN_BODY Invoke/argument
  char *oid;
  proto_tree* subtree;
  struct SESSION_DATA_STRUCTURE* session = (struct SESSION_DATA_STRUCTURE *)actx->private_data;

  /* not sure what the length should be - -1 for now */
  subtree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_ros_invoke_argument, NULL, "invoke argument");

  ros_match_call_response(tvb, actx->pinfo, subtree, invokeid, TRUE);

  if(session && session->pres_ctx_id && (oid = find_oid_by_pres_ctx_id(actx->pinfo, session->pres_ctx_id))) {
	/* this should be ROS! */
	session->ros_op = (ROS_OP_INVOKE | ROS_OP_ARGUMENT);
	/* now add the opcode */
	session->ros_op |= opcode;
	offset = call_ros_oid_callback(oid, tvb, offset, actx->pinfo, top_tree, session);
  }

#.FN_BODY ReturnResult/result/result
  char *oid;
  proto_tree* subtree;
  struct SESSION_DATA_STRUCTURE* session = (struct SESSION_DATA_STRUCTURE *)actx->private_data;

  /* not sure what the length should be - -1 for now */
  subtree = proto_tree_add_subtree(tree, tvb, offset,-1, ett_ros_return_result, NULL, "return result");

  ros_match_call_response(tvb, actx->pinfo, subtree, invokeid, FALSE);

  if(session && session->pres_ctx_id && (oid = find_oid_by_pres_ctx_id(actx->pinfo, session->pres_ctx_id))) {
	/* this should be ROS! */
	session->ros_op = (ROS_OP_INVOKE | ROS_OP_RESULT);
	/* now add the opcode */
	session->ros_op |= opcode;
	offset = call_ros_oid_callback(oid, tvb, offset, actx->pinfo, top_tree, session);
  }

#.FN_BODY ReturnError/parameter
  char *oid;
  proto_tree* subtree;
  struct SESSION_DATA_STRUCTURE* session = (struct SESSION_DATA_STRUCTURE *)actx->private_data;

  /* not sure what the length should be - -1 for now */
  subtree = proto_tree_add_subtree(tree, tvb, offset,-1, ett_ros_return_result, NULL, "return result");

  ros_match_call_response(tvb, actx->pinfo, subtree, invokeid, FALSE);

  if(session && session->pres_ctx_id && (oid = find_oid_by_pres_ctx_id(actx->pinfo, session->pres_ctx_id))) {
	/* this should be ROS! */
	session->ros_op = (ROS_OP_INVOKE | ROS_OP_ERROR);
	/* now add the opcode  (really the error code) */
	session->ros_op |= opcode;
	offset = call_ros_oid_callback(oid, tvb, offset, actx->pinfo, top_tree, session);
  }

#.FN_BODY ROS/bind-invoke
  char *oid;
  struct SESSION_DATA_STRUCTURE* session = (struct SESSION_DATA_STRUCTURE *)actx->private_data;

  /* not sure what the length should be - -1 for now */
  proto_tree_add_subtree(tree, tvb, offset,-1, ett_ros_bind_result, NULL, "bind-invoke");

  if(session && session->pres_ctx_id && (oid = find_oid_by_pres_ctx_id(actx->pinfo, session->pres_ctx_id))) {
    /* this should be ROS! */
    session->ros_op = (ROS_OP_BIND | ROS_OP_ARGUMENT);
    offset = call_ros_oid_callback(oid, tvb, offset, actx->pinfo, top_tree, session);
  }

#.FN_BODY ROS/bind-result
  char *oid;
  struct SESSION_DATA_STRUCTURE* session = (struct SESSION_DATA_STRUCTURE *)actx->private_data;

  /* not sure what the length should be - -1 for now */
  proto_tree_add_subtree(tree, tvb, offset,-1, ett_ros_bind_result, NULL, "bind-result");

  if(session && session->pres_ctx_id && (oid = find_oid_by_pres_ctx_id(actx->pinfo, session->pres_ctx_id))) {
    /* this should be ROS! */
    session->ros_op = (ROS_OP_BIND | ROS_OP_RESULT);
    offset = call_ros_oid_callback(oid, tvb, offset, actx->pinfo, top_tree, session);
  }

#.FN_BODY ROS/bind-error
  char *oid;
  struct SESSION_DATA_STRUCTURE* session = (struct SESSION_DATA_STRUCTURE *)actx->private_data;

  /* not sure what the length should be - -1 for now */
  proto_tree_add_subtree(tree, tvb, offset,-1, ett_ros_bind_error, NULL, "bind-error");

  if(session && session->pres_ctx_id && (oid = find_oid_by_pres_ctx_id(actx->pinfo, session->pres_ctx_id))) {
    /* this should be ROS! */
    session->ros_op = (ROS_OP_BIND | ROS_OP_ERROR);
    offset = call_ros_oid_callback(oid, tvb, offset, actx->pinfo, top_tree, session);
  }


#.FN_BODY ROS/unbind-invoke
  char *oid;
  struct SESSION_DATA_STRUCTURE* session = (struct SESSION_DATA_STRUCTURE *)actx->private_data;

  /* not sure what the length should be - -1 for now */
  proto_tree_add_subtree(tree, tvb, offset,-1, ett_ros_unbind_invoke, NULL, "unbind-invoke");

  if(session && session->pres_ctx_id && (oid = find_oid_by_pres_ctx_id(actx->pinfo, session->pres_ctx_id))) {
    /* this should be ROS! */
    session->ros_op = (ROS_OP_UNBIND | ROS_OP_ARGUMENT);
    offset = call_ros_oid_callback(oid, tvb, offset, actx->pinfo, top_tree, session);
  }


#.FN_BODY ROS/unbind-result
  char *oid;
  struct SESSION_DATA_STRUCTURE* session = (struct SESSION_DATA_STRUCTURE *)actx->private_data;

  /* not sure what the length should be - -1 for now */
  proto_tree_add_subtree(tree, tvb, offset,-1, ett_ros_unbind_result, NULL, "unbind-result");

  if(session && session->pres_ctx_id && (oid = find_oid_by_pres_ctx_id(actx->pinfo, session->pres_ctx_id))) {
    /* this should be ROS! */
    session->ros_op = (ROS_OP_UNBIND | ROS_OP_RESULT);
    offset = call_ros_oid_callback(oid, tvb, offset, actx->pinfo, top_tree, session);
  }

#.FN_BODY ROS/unbind-error
  char *oid;
  struct SESSION_DATA_STRUCTURE* session = (struct SESSION_DATA_STRUCTURE *)actx->private_data;

  /* not sure what the length should be - -1 for now */
  proto_tree_add_subtree(tree, tvb, offset,-1, ett_ros_unbind_error, NULL, "unbind-error");

  if(session && session->pres_ctx_id && (oid = find_oid_by_pres_ctx_id(actx->pinfo, session->pres_ctx_id))) {
    /* this should be ROS! */
    session->ros_op = (ROS_OP_UNBIND | ROS_OP_ERROR);
    offset = call_ros_oid_callback(oid, tvb, offset, actx->pinfo, top_tree, session);
  }

#.FN_BODY ROS/reject
	col_set_str(actx->pinfo->cinfo, COL_INFO, "Reject");
	%(DEFAULT_BODY)s

#.FN_PARS GeneralProblem
	VAL_PTR = &problem

#.FN_BODY GeneralProblem
  guint32 problem;

  %(DEFAULT_BODY)s

  col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, ros_GeneralProblem_vals, "GeneralProblem(%%d)"));

#.FN_PARS InvokeProblem
	VAL_PTR = &problem

#.FN_BODY InvokeProblem
  guint32 problem;

  %(DEFAULT_BODY)s

  col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, ros_InvokeProblem_vals, "InvokeProblem(%%d)"));

#.FN_PARS ReturnResultProblem
	VAL_PTR = &problem

#.FN_BODY ReturnResultProblem
  guint32 problem;

  %(DEFAULT_BODY)s

  col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, ros_ReturnResultProblem_vals, "ReturnResultProblem(%%d)"));

#.FN_PARS ReturnErrorProblem
	VAL_PTR = &problem

#.FN_BODY ReturnErrorProblem
  guint32 problem;

  %(DEFAULT_BODY)s

  col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, ros_ReturnErrorProblem_vals, "ReturnErrorProblem(%%d)"));

#.END