summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/asn1/h450-ros/h450-ros.cnf
blob: cbb657769c5bff79313d15fd8b4bb68259f5dcbf (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
#.EXPORTS

ROS

#.OMIT_ASSIGNMENT

Priority
RejectProblem

#.TYPE_RENAME

Invoke/argument             InvokeArgument
ReturnResult/result/result  ResultArgument

#.FIELD_RENAME

Invoke/invokeId             invokeIdConstrained

Reject/problem/invoke       invokeProblem
Reject/problem/returnError  returnErrorProblem
Reject/problem/returnResult returnResultProblem

ReturnResult/result/result  resultArgument

#--- ROS ---

#.FN_HDR ROS
  DISSECTOR_ASSERT(actx->rose_ctx);
  rose_ctx_clean_data(actx->rose_ctx);
#.END

#--- Code ---

#.FN_PARS
Code         VAL_PTR = &%(ACTX)s->rose_ctx->d.code
Code/local   VAL_PTR = &%(ACTX)s->rose_ctx->d.code_local
Code/global  FN_VARIANT = _str  VAL_PTR = &%(ACTX)s->rose_ctx->d.code_global
#.FN_FTR Code
  actx->rose_ctx->d.code_item = actx->created_item;
#.END

#--- Problem ---

#.FN_PARS
GeneralProblem       VAL_PTR = &problem_val
InvokeProblem        VAL_PTR = &problem_val
ReturnResultProblem  VAL_PTR = &problem_val
ReturnErrorProblem   VAL_PTR = &problem_val
#.FN_FTR GeneralProblem
  (void) g_strlcpy(problem_str, val_to_str_const(problem_val, VALS(h450_ros_GeneralProblem_vals), ""), 64);
  problem_str[64-1] = '\0';
#.FN_FTR InvokeProblem
  (void) g_strlcpy(problem_str, val_to_str_const(problem_val, VALS(h450_ros_InvokeProblem_vals), ""), 64);
  problem_str[64-1] = '\0';
#.FN_FTR ReturnResultProblem
  (void) g_strlcpy(problem_str, val_to_str_const(problem_val, VALS(h450_ros_ReturnResultProblem_vals), ""), 64);
  problem_str[64-1] = '\0';
#.FN_FTR ReturnErrorProblem
  (void) g_strlcpy(problem_str, val_to_str_const(problem_val, VALS(h450_ros_ReturnErrorProblem_vals), ""), 64);
  problem_str[64-1] = '\0';
#.END

#--- INVOKE ---

# body is implemented manually as asn2wrs is not able to handle subtype constraint event passed through parameter
#.FN_BODY Invoke/invokeId
  offset = dissect_per_constrained_integer(%(TVB)s, %(OFFSET)s, %(ACTX)s, %(TREE)s, %(HF_INDEX)s,
                                           0U, 65535U, %(VAL_PTR)s, TRUE);
#.END

#.FIELD_ATTR
Invoke/argument  TYPE = FT_BYTES  DISPLAY = BASE_NONE

#.FN_PARS Invoke/argument
FN_VARIANT = _pdu_new
TYPE_REF_FN = argument_cb
#.END

#.INCLUDE ../ros/ros-inv.cnf

#--- RETURN RESULT ---

#.FIELD_ATTR
ReturnResult/result/result  TYPE = FT_BYTES  DISPLAY = BASE_NONE

#.FN_PARS ReturnResult/result/result
FN_VARIANT = _pdu_new
TYPE_REF_FN = result_cb

#.END

#.INCLUDE ../ros/ros-res.cnf

#--- RETURN ERROR ---

#.FIELD_ATTR
ReturnError/parameter  TYPE = FT_BYTES  DISPLAY = BASE_NONE

#.FN_PARS ReturnError/parameter
FN_VARIANT = _pdu_new
TYPE_REF_FN = error_cb
#.END

#.INCLUDE ../ros/ros-err.cnf

#--- REJECT ---

#.INCLUDE ../ros/ros-rej.cnf