| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
#################################################################### |
|
2
|
|
|
|
|
|
|
# |
|
3
|
|
|
|
|
|
|
# This file was generated using XDR::Parse version v1.0.1, |
|
4
|
|
|
|
|
|
|
# XDR::Gen version 1.1.2 and LibVirt version v12.1.0 |
|
5
|
|
|
|
|
|
|
# |
|
6
|
|
|
|
|
|
|
# Don't edit this file, use the source template instead |
|
7
|
|
|
|
|
|
|
# |
|
8
|
|
|
|
|
|
|
# ANY CHANGES HERE WILL BE LOST ! |
|
9
|
|
|
|
|
|
|
# |
|
10
|
|
|
|
|
|
|
#################################################################### |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
package Protocol::Sys::Virt::Transport::XDR v12.1.0; |
|
13
|
|
|
|
|
|
|
|
|
14
|
1
|
|
|
1
|
|
19
|
use v5.14; |
|
|
1
|
|
|
|
|
6
|
|
|
15
|
1
|
|
|
1
|
|
7
|
use warnings FATAL => 'uninitialized'; |
|
|
1
|
|
|
|
|
4
|
|
|
|
1
|
|
|
|
|
89
|
|
|
16
|
1
|
|
|
1
|
|
7
|
use Config; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
50
|
|
|
17
|
1
|
|
|
1
|
|
6
|
use Carp qw(croak); |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
116
|
|
|
18
|
1
|
|
|
1
|
|
9
|
use constant INITIAL => 65536; # 65536 |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
83
|
|
|
19
|
1
|
|
|
1
|
|
8
|
use constant LEGACY_PAYLOAD_MAX => 262120; # 262120 |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
55
|
|
|
20
|
1
|
|
|
1
|
|
6
|
use constant MAX => 33554432; # 33554432 |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
109
|
|
|
21
|
1
|
|
|
1
|
|
8
|
use constant HEADER_MAX => 24; # 24 |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
58
|
|
|
22
|
1
|
|
|
1
|
|
7
|
use constant PAYLOAD_MAX => 33554408; # 33554408 |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
45
|
|
|
23
|
1
|
|
|
1
|
|
7
|
use constant LEN_MAX => 4; # 4 |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
52
|
|
|
24
|
1
|
|
|
1
|
|
6
|
use constant STRING_MAX => 4194304; # 4194304 |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
44
|
|
|
25
|
1
|
|
|
1
|
|
5
|
use constant NUM_FDS_MAX => 32; # 32 |
|
|
1
|
|
|
|
|
4
|
|
|
|
1
|
|
|
|
|
120
|
|
|
26
|
|
|
|
|
|
|
# Define elements from enum 'Type' |
|
27
|
|
|
|
|
|
|
use constant { |
|
28
|
1
|
|
|
|
|
383
|
CALL => 0, |
|
29
|
|
|
|
|
|
|
REPLY => 1, |
|
30
|
|
|
|
|
|
|
MESSAGE => 2, |
|
31
|
|
|
|
|
|
|
STREAM => 3, |
|
32
|
|
|
|
|
|
|
CALL_WITH_FDS => 4, |
|
33
|
|
|
|
|
|
|
REPLY_WITH_FDS => 5, |
|
34
|
|
|
|
|
|
|
STREAM_HOLE => 6, |
|
35
|
1
|
|
|
1
|
|
8
|
}; |
|
|
1
|
|
|
|
|
3
|
|
|
36
|
|
|
|
|
|
|
# @_: ($class, $value, $index, $input) = @_; |
|
37
|
|
|
|
|
|
|
sub deserialize_Type { |
|
38
|
0
|
|
|
0
|
0
|
|
my $input_length = length $_[3]; |
|
39
|
|
|
|
|
|
|
# my ($class, $value, $index, $input) = @_; |
|
40
|
0
|
0
|
|
|
|
|
die "Input buffer too short" |
|
41
|
|
|
|
|
|
|
if ($input_length - $_[2]) < 4; |
|
42
|
0
|
|
|
|
|
|
$_[1] = unpack("l>", substr( $_[3], $_[2] ) ); |
|
43
|
0
|
0
|
|
|
|
|
die "Out of range enum value supplied: $_[1]" |
|
44
|
|
|
|
|
|
|
unless vec(state $m = pack('H*', '7f'), |
|
45
|
|
|
|
|
|
|
$_[1], 1); |
|
46
|
0
|
|
|
|
|
|
$_[2] += 4; |
|
47
|
|
|
|
|
|
|
} |
|
48
|
|
|
|
|
|
|
# @_: ($class, $value, $index, $output) = @_; |
|
49
|
|
|
|
|
|
|
sub serialize_Type { |
|
50
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
51
|
0
|
0
|
|
0
|
0
|
|
croak "Missing required input 'enum' value" |
|
52
|
|
|
|
|
|
|
unless defined $_[1]; |
|
53
|
0
|
0
|
|
|
|
|
die "Out of range enum value: $_[1]" |
|
54
|
|
|
|
|
|
|
unless vec(state $m = pack('H*', '7f'), |
|
55
|
|
|
|
|
|
|
$_[1], 1); |
|
56
|
0
|
|
|
|
|
|
substr( $_[3], $_[2] ) = pack("l>", $_[1]); |
|
57
|
0
|
|
|
|
|
|
$_[2] += 4; |
|
58
|
|
|
|
|
|
|
} |
|
59
|
|
|
|
|
|
|
# Define elements from enum 'Status' |
|
60
|
|
|
|
|
|
|
use constant { |
|
61
|
1
|
|
|
|
|
337
|
OK => 0, |
|
62
|
|
|
|
|
|
|
ERROR => 1, |
|
63
|
|
|
|
|
|
|
CONTINUE => 2, |
|
64
|
1
|
|
|
1
|
|
8
|
}; |
|
|
1
|
|
|
|
|
3
|
|
|
65
|
|
|
|
|
|
|
# @_: ($class, $value, $index, $input) = @_; |
|
66
|
|
|
|
|
|
|
sub deserialize_Status { |
|
67
|
0
|
|
|
0
|
0
|
|
my $input_length = length $_[3]; |
|
68
|
|
|
|
|
|
|
# my ($class, $value, $index, $input) = @_; |
|
69
|
0
|
0
|
|
|
|
|
die "Input buffer too short" |
|
70
|
|
|
|
|
|
|
if ($input_length - $_[2]) < 4; |
|
71
|
0
|
|
|
|
|
|
$_[1] = unpack("l>", substr( $_[3], $_[2] ) ); |
|
72
|
0
|
0
|
|
|
|
|
die "Out of range enum value supplied: $_[1]" |
|
73
|
|
|
|
|
|
|
unless vec(state $m = pack('H*', '07'), |
|
74
|
|
|
|
|
|
|
$_[1], 1); |
|
75
|
0
|
|
|
|
|
|
$_[2] += 4; |
|
76
|
|
|
|
|
|
|
} |
|
77
|
|
|
|
|
|
|
# @_: ($class, $value, $index, $output) = @_; |
|
78
|
|
|
|
|
|
|
sub serialize_Status { |
|
79
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
80
|
0
|
0
|
|
0
|
0
|
|
croak "Missing required input 'enum' value" |
|
81
|
|
|
|
|
|
|
unless defined $_[1]; |
|
82
|
0
|
0
|
|
|
|
|
die "Out of range enum value: $_[1]" |
|
83
|
|
|
|
|
|
|
unless vec(state $m = pack('H*', '07'), |
|
84
|
|
|
|
|
|
|
$_[1], 1); |
|
85
|
0
|
|
|
|
|
|
substr( $_[3], $_[2] ) = pack("l>", $_[1]); |
|
86
|
0
|
|
|
|
|
|
$_[2] += 4; |
|
87
|
|
|
|
|
|
|
} |
|
88
|
1
|
|
|
1
|
|
9
|
use constant HEADER_XDR_LEN => 4; # 4 |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
5002
|
|
|
89
|
|
|
|
|
|
|
# @_: ($class, $value, $index, $input) = @_; |
|
90
|
|
|
|
|
|
|
sub deserialize_Header { |
|
91
|
0
|
|
|
0
|
0
|
|
my $input_length = length $_[3]; |
|
92
|
0
|
|
|
|
|
|
$_[1] = {}; |
|
93
|
|
|
|
|
|
|
# Deserializing field: 'prog' |
|
94
|
|
|
|
|
|
|
# my ($class, $value, $index, $input) = @_; |
|
95
|
0
|
0
|
|
|
|
|
die "Input buffer too short" |
|
96
|
|
|
|
|
|
|
if ($input_length - $_[2]) < 4; |
|
97
|
0
|
|
|
|
|
|
$_[1]->{prog} = unpack("L>", substr( $_[3], $_[2] )); |
|
98
|
0
|
|
|
|
|
|
$_[2] += 4; |
|
99
|
|
|
|
|
|
|
die "Out of bounds 'unsigned int': $_[1]->{prog}" |
|
100
|
0
|
0
|
0
|
|
|
|
unless (0 <= $_[1]->{prog} and $_[1]->{prog} <= 4294967295); |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
# Deserializing field: 'vers' |
|
103
|
|
|
|
|
|
|
# my ($class, $value, $index, $input) = @_; |
|
104
|
0
|
0
|
|
|
|
|
die "Input buffer too short" |
|
105
|
|
|
|
|
|
|
if ($input_length - $_[2]) < 4; |
|
106
|
0
|
|
|
|
|
|
$_[1]->{vers} = unpack("L>", substr( $_[3], $_[2] )); |
|
107
|
0
|
|
|
|
|
|
$_[2] += 4; |
|
108
|
|
|
|
|
|
|
die "Out of bounds 'unsigned int': $_[1]->{vers}" |
|
109
|
0
|
0
|
0
|
|
|
|
unless (0 <= $_[1]->{vers} and $_[1]->{vers} <= 4294967295); |
|
110
|
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
# Deserializing field: 'proc' |
|
112
|
|
|
|
|
|
|
# my ($class, $value, $index, $input) = @_; |
|
113
|
0
|
0
|
|
|
|
|
die "Input buffer too short" |
|
114
|
|
|
|
|
|
|
if ($input_length - $_[2]) < 4; |
|
115
|
0
|
|
|
|
|
|
$_[1]->{proc} = unpack("l>", substr( $_[3], $_[2] )); |
|
116
|
0
|
|
|
|
|
|
$_[2] += 4; |
|
117
|
|
|
|
|
|
|
die "Out of bounds 'int': $_[1]->{proc}" |
|
118
|
0
|
0
|
0
|
|
|
|
unless (-2147483648 <= $_[1]->{proc} and $_[1]->{proc} < 2147483648); |
|
119
|
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
# Deserializing field: 'type' |
|
121
|
|
|
|
|
|
|
# my ($class, $value, $index, $input) = @_; |
|
122
|
0
|
|
|
|
|
|
$_[0]->deserialize_Type( $_[1]->{type}, $_[2], $_[3] ); |
|
123
|
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
# Deserializing field: 'serial' |
|
125
|
|
|
|
|
|
|
# my ($class, $value, $index, $input) = @_; |
|
126
|
0
|
0
|
|
|
|
|
die "Input buffer too short" |
|
127
|
|
|
|
|
|
|
if ($input_length - $_[2]) < 4; |
|
128
|
0
|
|
|
|
|
|
$_[1]->{serial} = unpack("L>", substr( $_[3], $_[2] )); |
|
129
|
0
|
|
|
|
|
|
$_[2] += 4; |
|
130
|
|
|
|
|
|
|
die "Out of bounds 'unsigned int': $_[1]->{serial}" |
|
131
|
0
|
0
|
0
|
|
|
|
unless (0 <= $_[1]->{serial} and $_[1]->{serial} <= 4294967295); |
|
132
|
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
# Deserializing field: 'status' |
|
134
|
|
|
|
|
|
|
# my ($class, $value, $index, $input) = @_; |
|
135
|
0
|
|
|
|
|
|
$_[0]->deserialize_Status( $_[1]->{status}, $_[2], $_[3] ); |
|
136
|
|
|
|
|
|
|
} |
|
137
|
|
|
|
|
|
|
# @_: ($class, $value, $index, $output) = @_; |
|
138
|
|
|
|
|
|
|
sub serialize_Header { |
|
139
|
0
|
0
|
|
0
|
0
|
|
croak "Missing required input 'struct' value" |
|
140
|
|
|
|
|
|
|
unless defined $_[1]; |
|
141
|
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
# Serializing field: 'prog' |
|
143
|
|
|
|
|
|
|
croak "Missing required input value 'prog'" |
|
144
|
0
|
0
|
|
|
|
|
unless exists $_[1]->{prog}; |
|
145
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
146
|
|
|
|
|
|
|
croak "Missing required input 'unsigned int' value" |
|
147
|
0
|
0
|
|
|
|
|
unless defined $_[1]->{prog}; |
|
148
|
|
|
|
|
|
|
die "Out of bounds 'unsigned int': $_[1]->{prog}" |
|
149
|
0
|
0
|
0
|
|
|
|
unless (0 <= $_[1]->{prog} and $_[1]->{prog} <= 4294967295); |
|
150
|
|
|
|
|
|
|
die "Non-integer 'int' value given: $_[1]->{prog}" |
|
151
|
0
|
0
|
|
|
|
|
unless int($_[1]->{prog}) == $_[1]->{prog}; |
|
152
|
0
|
|
|
|
|
|
substr( $_[3], $_[2] ) = pack("L>", $_[1]->{prog}); |
|
153
|
0
|
|
|
|
|
|
$_[2] += 4; |
|
154
|
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
# Serializing field: 'vers' |
|
156
|
|
|
|
|
|
|
croak "Missing required input value 'vers'" |
|
157
|
0
|
0
|
|
|
|
|
unless exists $_[1]->{vers}; |
|
158
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
159
|
|
|
|
|
|
|
croak "Missing required input 'unsigned int' value" |
|
160
|
0
|
0
|
|
|
|
|
unless defined $_[1]->{vers}; |
|
161
|
|
|
|
|
|
|
die "Out of bounds 'unsigned int': $_[1]->{vers}" |
|
162
|
0
|
0
|
0
|
|
|
|
unless (0 <= $_[1]->{vers} and $_[1]->{vers} <= 4294967295); |
|
163
|
|
|
|
|
|
|
die "Non-integer 'int' value given: $_[1]->{vers}" |
|
164
|
0
|
0
|
|
|
|
|
unless int($_[1]->{vers}) == $_[1]->{vers}; |
|
165
|
0
|
|
|
|
|
|
substr( $_[3], $_[2] ) = pack("L>", $_[1]->{vers}); |
|
166
|
0
|
|
|
|
|
|
$_[2] += 4; |
|
167
|
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
# Serializing field: 'proc' |
|
169
|
|
|
|
|
|
|
croak "Missing required input value 'proc'" |
|
170
|
0
|
0
|
|
|
|
|
unless exists $_[1]->{proc}; |
|
171
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
172
|
|
|
|
|
|
|
croak "Missing required input 'int' value" |
|
173
|
0
|
0
|
|
|
|
|
unless defined $_[1]->{proc}; |
|
174
|
|
|
|
|
|
|
die "Out of bounds 'int': $_[1]->{proc}" |
|
175
|
0
|
0
|
0
|
|
|
|
unless (-2147483648 <= $_[1]->{proc} and $_[1]->{proc} < 2147483648); |
|
176
|
|
|
|
|
|
|
die "Non-integer 'int' value given: $_[1]->{proc}" |
|
177
|
0
|
0
|
|
|
|
|
unless int($_[1]->{proc}) == $_[1]->{proc}; |
|
178
|
0
|
|
|
|
|
|
substr( $_[3], $_[2] ) = pack("l>", $_[1]->{proc}); |
|
179
|
0
|
|
|
|
|
|
$_[2] += 4; |
|
180
|
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
# Serializing field: 'type' |
|
182
|
|
|
|
|
|
|
croak "Missing required input value 'type'" |
|
183
|
0
|
0
|
|
|
|
|
unless exists $_[1]->{type}; |
|
184
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
185
|
0
|
|
|
|
|
|
$_[0]->serialize_Type( $_[1]->{type}, $_[2], $_[3] ); |
|
186
|
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
# Serializing field: 'serial' |
|
188
|
|
|
|
|
|
|
croak "Missing required input value 'serial'" |
|
189
|
0
|
0
|
|
|
|
|
unless exists $_[1]->{serial}; |
|
190
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
191
|
|
|
|
|
|
|
croak "Missing required input 'unsigned int' value" |
|
192
|
0
|
0
|
|
|
|
|
unless defined $_[1]->{serial}; |
|
193
|
|
|
|
|
|
|
die "Out of bounds 'unsigned int': $_[1]->{serial}" |
|
194
|
0
|
0
|
0
|
|
|
|
unless (0 <= $_[1]->{serial} and $_[1]->{serial} <= 4294967295); |
|
195
|
|
|
|
|
|
|
die "Non-integer 'int' value given: $_[1]->{serial}" |
|
196
|
0
|
0
|
|
|
|
|
unless int($_[1]->{serial}) == $_[1]->{serial}; |
|
197
|
0
|
|
|
|
|
|
substr( $_[3], $_[2] ) = pack("L>", $_[1]->{serial}); |
|
198
|
0
|
|
|
|
|
|
$_[2] += 4; |
|
199
|
|
|
|
|
|
|
|
|
200
|
|
|
|
|
|
|
# Serializing field: 'status' |
|
201
|
|
|
|
|
|
|
croak "Missing required input value 'status'" |
|
202
|
0
|
0
|
|
|
|
|
unless exists $_[1]->{status}; |
|
203
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
204
|
0
|
|
|
|
|
|
$_[0]->serialize_Status( $_[1]->{status}, $_[2], $_[3] ); |
|
205
|
|
|
|
|
|
|
} |
|
206
|
|
|
|
|
|
|
# @_: ($class, $value, $index, $input) = @_; |
|
207
|
|
|
|
|
|
|
sub deserialize_UUID { |
|
208
|
0
|
|
|
0
|
0
|
|
my $input_length = length $_[3]; |
|
209
|
|
|
|
|
|
|
# my ($class, $value, $index, $input) = @_; |
|
210
|
0
|
0
|
|
|
|
|
die "Input buffer too short" |
|
211
|
|
|
|
|
|
|
if ($input_length - $_[2]) < 16; |
|
212
|
0
|
|
|
|
|
|
$_[1] = substr( $_[3], $_[2], 16 ); |
|
213
|
0
|
|
|
|
|
|
$_[2] += 16; |
|
214
|
|
|
|
|
|
|
} |
|
215
|
|
|
|
|
|
|
# @_: ($class, $value, $index, $output) = @_; |
|
216
|
|
|
|
|
|
|
sub serialize_UUID { |
|
217
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
218
|
0
|
0
|
|
0
|
0
|
|
croak "Missing required input 'opaque data' value" |
|
219
|
|
|
|
|
|
|
unless defined $_[1]; |
|
220
|
0
|
|
|
|
|
|
do { |
|
221
|
0
|
|
|
|
|
|
my $len = length $_[1]; |
|
222
|
0
|
0
|
|
|
|
|
die "Opaque data length mismatch (defined: 16): $len" |
|
223
|
|
|
|
|
|
|
if not $len == 16; |
|
224
|
|
|
|
|
|
|
|
|
225
|
0
|
|
|
|
|
|
substr( $_[3], $_[2] ) = $_[1]; |
|
226
|
0
|
|
|
|
|
|
$_[2] += $len; |
|
227
|
|
|
|
|
|
|
}; |
|
228
|
|
|
|
|
|
|
} |
|
229
|
|
|
|
|
|
|
# @_: ($class, $value, $index, $input) = @_; |
|
230
|
|
|
|
|
|
|
sub deserialize_NonnullString { |
|
231
|
0
|
|
|
0
|
0
|
|
my $input_length = length $_[3]; |
|
232
|
|
|
|
|
|
|
# my ($class, $value, $index, $input) = @_; |
|
233
|
0
|
|
|
|
|
|
do { |
|
234
|
0
|
0
|
|
|
|
|
die "Input buffer too short" |
|
235
|
|
|
|
|
|
|
if ($input_length - $_[2]) < 4; |
|
236
|
0
|
|
|
|
|
|
my $len = unpack("L>", substr( $_[3], $_[2] )); |
|
237
|
0
|
|
|
|
|
|
$_[2] += 4; |
|
238
|
0
|
0
|
|
|
|
|
die "String too long (max: 4194304): $len" |
|
239
|
|
|
|
|
|
|
unless ($len <= 4194304); |
|
240
|
0
|
0
|
|
|
|
|
die "Input buffer too short" |
|
241
|
|
|
|
|
|
|
if ($input_length - $_[2]) < $len; |
|
242
|
0
|
|
|
|
|
|
$_[1] = substr( $_[3], $_[2], $len ); |
|
243
|
0
|
|
|
|
|
|
$_[2] += $len + ((4 - ($len % 4)) % 4); # skip padding too |
|
244
|
|
|
|
|
|
|
}; |
|
245
|
|
|
|
|
|
|
} |
|
246
|
|
|
|
|
|
|
# @_: ($class, $value, $index, $output) = @_; |
|
247
|
|
|
|
|
|
|
sub serialize_NonnullString { |
|
248
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
249
|
0
|
|
|
0
|
0
|
|
do { |
|
250
|
0
|
|
|
|
|
|
my $len = length $_[1]; |
|
251
|
0
|
0
|
|
|
|
|
croak "Missing required input 'string' value" |
|
252
|
|
|
|
|
|
|
unless defined $_[1]; |
|
253
|
0
|
0
|
|
|
|
|
die "String too long (max: 4194304): $len" |
|
254
|
|
|
|
|
|
|
unless ($len <= 4194304); |
|
255
|
|
|
|
|
|
|
|
|
256
|
0
|
|
|
|
|
|
substr( $_[3], $_[2] ) = pack("L>", $len); |
|
257
|
0
|
|
|
|
|
|
$_[2] += 4; |
|
258
|
0
|
|
|
|
|
|
substr( $_[3], $_[2] ) = $_[1]; |
|
259
|
0
|
|
|
|
|
|
$_[2] += $len; |
|
260
|
0
|
0
|
|
|
|
|
if (my $pad = ((4 - ($len % 4)) % 4)) { |
|
261
|
0
|
|
|
|
|
|
substr( $_[3], $_[2] ) = ("\0" x $pad); |
|
262
|
0
|
|
|
|
|
|
$_[2] += $pad; |
|
263
|
|
|
|
|
|
|
} |
|
264
|
|
|
|
|
|
|
}; |
|
265
|
|
|
|
|
|
|
} |
|
266
|
|
|
|
|
|
|
# @_: ($class, $value, $index, $input) = @_; |
|
267
|
|
|
|
|
|
|
sub deserialize_String { |
|
268
|
0
|
|
|
0
|
0
|
|
my $input_length = length $_[3]; |
|
269
|
|
|
|
|
|
|
# my ($class, $value, $index, $input) = @_; |
|
270
|
0
|
|
|
|
|
|
do { |
|
271
|
0
|
|
|
|
|
|
my $b; |
|
272
|
|
|
|
|
|
|
# my ($class, $value, $index, $input) = @_; |
|
273
|
0
|
0
|
|
|
|
|
die "Input buffer too short" |
|
274
|
|
|
|
|
|
|
if ($input_length - $_[2]) < 4; |
|
275
|
0
|
|
|
|
|
|
$b = unpack("L>", substr( $_[3], $_[2] )); |
|
276
|
0
|
0
|
0
|
|
|
|
die "Incorrect bool value $b (must be 0 or 1)" |
|
277
|
|
|
|
|
|
|
unless $b == 0 or $b == 1; |
|
278
|
0
|
|
|
|
|
|
$_[2] += 4; |
|
279
|
0
|
0
|
|
|
|
|
if ($b) { |
|
280
|
|
|
|
|
|
|
# my ($class, $value, $index, $input) = @_; |
|
281
|
0
|
|
|
|
|
|
$_[0]->deserialize_NonnullString( $_[1], $_[2], $_[3] ); |
|
282
|
|
|
|
|
|
|
} |
|
283
|
|
|
|
|
|
|
else { |
|
284
|
0
|
|
|
|
|
|
$_[1] = undef; |
|
285
|
|
|
|
|
|
|
} |
|
286
|
|
|
|
|
|
|
}; |
|
287
|
|
|
|
|
|
|
} |
|
288
|
|
|
|
|
|
|
# @_: ($class, $value, $index, $output) = @_; |
|
289
|
|
|
|
|
|
|
sub serialize_String { |
|
290
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
291
|
0
|
0
|
|
0
|
0
|
|
if (defined $_[1]) { |
|
292
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
293
|
|
|
|
|
|
|
# Allow to model a value |
|
294
|
0
|
|
|
|
|
|
substr( $_[3], $_[2] ) = pack("L>", 1); |
|
295
|
0
|
|
|
|
|
|
$_[2] += 4; |
|
296
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
297
|
0
|
|
|
|
|
|
$_[0]->serialize_NonnullString( $_[1], $_[2], $_[3] ); |
|
298
|
|
|
|
|
|
|
} |
|
299
|
|
|
|
|
|
|
else { |
|
300
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
301
|
|
|
|
|
|
|
# Allow to model a value |
|
302
|
0
|
|
|
|
|
|
substr( $_[3], $_[2] ) = pack("L>", 0); |
|
303
|
0
|
|
|
|
|
|
$_[2] += 4; |
|
304
|
|
|
|
|
|
|
} |
|
305
|
|
|
|
|
|
|
} |
|
306
|
|
|
|
|
|
|
# @_: ($class, $value, $index, $input) = @_; |
|
307
|
|
|
|
|
|
|
sub deserialize_NonnullDomain { |
|
308
|
0
|
|
|
0
|
0
|
|
my $input_length = length $_[3]; |
|
309
|
0
|
|
|
|
|
|
$_[1] = {}; |
|
310
|
|
|
|
|
|
|
# Deserializing field: 'name' |
|
311
|
|
|
|
|
|
|
# my ($class, $value, $index, $input) = @_; |
|
312
|
0
|
|
|
|
|
|
$_[0]->deserialize_NonnullString( $_[1]->{name}, $_[2], $_[3] ); |
|
313
|
|
|
|
|
|
|
|
|
314
|
|
|
|
|
|
|
# Deserializing field: 'uuid' |
|
315
|
|
|
|
|
|
|
# my ($class, $value, $index, $input) = @_; |
|
316
|
0
|
|
|
|
|
|
$_[0]->deserialize_UUID( $_[1]->{uuid}, $_[2], $_[3] ); |
|
317
|
|
|
|
|
|
|
|
|
318
|
|
|
|
|
|
|
# Deserializing field: 'id' |
|
319
|
|
|
|
|
|
|
# my ($class, $value, $index, $input) = @_; |
|
320
|
0
|
0
|
|
|
|
|
die "Input buffer too short" |
|
321
|
|
|
|
|
|
|
if ($input_length - $_[2]) < 4; |
|
322
|
0
|
|
|
|
|
|
$_[1]->{id} = unpack("l>", substr( $_[3], $_[2] )); |
|
323
|
0
|
|
|
|
|
|
$_[2] += 4; |
|
324
|
|
|
|
|
|
|
die "Out of bounds 'int': $_[1]->{id}" |
|
325
|
0
|
0
|
0
|
|
|
|
unless (-2147483648 <= $_[1]->{id} and $_[1]->{id} < 2147483648); |
|
326
|
|
|
|
|
|
|
} |
|
327
|
|
|
|
|
|
|
# @_: ($class, $value, $index, $output) = @_; |
|
328
|
|
|
|
|
|
|
sub serialize_NonnullDomain { |
|
329
|
0
|
0
|
|
0
|
0
|
|
croak "Missing required input 'struct' value" |
|
330
|
|
|
|
|
|
|
unless defined $_[1]; |
|
331
|
|
|
|
|
|
|
|
|
332
|
|
|
|
|
|
|
# Serializing field: 'name' |
|
333
|
|
|
|
|
|
|
croak "Missing required input value 'name'" |
|
334
|
0
|
0
|
|
|
|
|
unless exists $_[1]->{name}; |
|
335
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
336
|
0
|
|
|
|
|
|
$_[0]->serialize_NonnullString( $_[1]->{name}, $_[2], $_[3] ); |
|
337
|
|
|
|
|
|
|
|
|
338
|
|
|
|
|
|
|
# Serializing field: 'uuid' |
|
339
|
|
|
|
|
|
|
croak "Missing required input value 'uuid'" |
|
340
|
0
|
0
|
|
|
|
|
unless exists $_[1]->{uuid}; |
|
341
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
342
|
0
|
|
|
|
|
|
$_[0]->serialize_UUID( $_[1]->{uuid}, $_[2], $_[3] ); |
|
343
|
|
|
|
|
|
|
|
|
344
|
|
|
|
|
|
|
# Serializing field: 'id' |
|
345
|
|
|
|
|
|
|
croak "Missing required input value 'id'" |
|
346
|
0
|
0
|
|
|
|
|
unless exists $_[1]->{id}; |
|
347
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
348
|
|
|
|
|
|
|
croak "Missing required input 'int' value" |
|
349
|
0
|
0
|
|
|
|
|
unless defined $_[1]->{id}; |
|
350
|
|
|
|
|
|
|
die "Out of bounds 'int': $_[1]->{id}" |
|
351
|
0
|
0
|
0
|
|
|
|
unless (-2147483648 <= $_[1]->{id} and $_[1]->{id} < 2147483648); |
|
352
|
|
|
|
|
|
|
die "Non-integer 'int' value given: $_[1]->{id}" |
|
353
|
0
|
0
|
|
|
|
|
unless int($_[1]->{id}) == $_[1]->{id}; |
|
354
|
0
|
|
|
|
|
|
substr( $_[3], $_[2] ) = pack("l>", $_[1]->{id}); |
|
355
|
0
|
|
|
|
|
|
$_[2] += 4; |
|
356
|
|
|
|
|
|
|
} |
|
357
|
|
|
|
|
|
|
# @_: ($class, $value, $index, $input) = @_; |
|
358
|
|
|
|
|
|
|
sub deserialize_NonnullNetwork { |
|
359
|
0
|
|
|
0
|
0
|
|
my $input_length = length $_[3]; |
|
360
|
0
|
|
|
|
|
|
$_[1] = {}; |
|
361
|
|
|
|
|
|
|
# Deserializing field: 'name' |
|
362
|
|
|
|
|
|
|
# my ($class, $value, $index, $input) = @_; |
|
363
|
0
|
|
|
|
|
|
$_[0]->deserialize_NonnullString( $_[1]->{name}, $_[2], $_[3] ); |
|
364
|
|
|
|
|
|
|
|
|
365
|
|
|
|
|
|
|
# Deserializing field: 'uuid' |
|
366
|
|
|
|
|
|
|
# my ($class, $value, $index, $input) = @_; |
|
367
|
0
|
|
|
|
|
|
$_[0]->deserialize_UUID( $_[1]->{uuid}, $_[2], $_[3] ); |
|
368
|
|
|
|
|
|
|
} |
|
369
|
|
|
|
|
|
|
# @_: ($class, $value, $index, $output) = @_; |
|
370
|
|
|
|
|
|
|
sub serialize_NonnullNetwork { |
|
371
|
0
|
0
|
|
0
|
0
|
|
croak "Missing required input 'struct' value" |
|
372
|
|
|
|
|
|
|
unless defined $_[1]; |
|
373
|
|
|
|
|
|
|
|
|
374
|
|
|
|
|
|
|
# Serializing field: 'name' |
|
375
|
|
|
|
|
|
|
croak "Missing required input value 'name'" |
|
376
|
0
|
0
|
|
|
|
|
unless exists $_[1]->{name}; |
|
377
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
378
|
0
|
|
|
|
|
|
$_[0]->serialize_NonnullString( $_[1]->{name}, $_[2], $_[3] ); |
|
379
|
|
|
|
|
|
|
|
|
380
|
|
|
|
|
|
|
# Serializing field: 'uuid' |
|
381
|
|
|
|
|
|
|
croak "Missing required input value 'uuid'" |
|
382
|
0
|
0
|
|
|
|
|
unless exists $_[1]->{uuid}; |
|
383
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
384
|
0
|
|
|
|
|
|
$_[0]->serialize_UUID( $_[1]->{uuid}, $_[2], $_[3] ); |
|
385
|
|
|
|
|
|
|
} |
|
386
|
|
|
|
|
|
|
# @_: ($class, $value, $index, $input) = @_; |
|
387
|
|
|
|
|
|
|
sub deserialize_Domain { |
|
388
|
0
|
|
|
0
|
0
|
|
my $input_length = length $_[3]; |
|
389
|
|
|
|
|
|
|
# my ($class, $value, $index, $input) = @_; |
|
390
|
0
|
|
|
|
|
|
do { |
|
391
|
0
|
|
|
|
|
|
my $b; |
|
392
|
|
|
|
|
|
|
# my ($class, $value, $index, $input) = @_; |
|
393
|
0
|
0
|
|
|
|
|
die "Input buffer too short" |
|
394
|
|
|
|
|
|
|
if ($input_length - $_[2]) < 4; |
|
395
|
0
|
|
|
|
|
|
$b = unpack("L>", substr( $_[3], $_[2] )); |
|
396
|
0
|
0
|
0
|
|
|
|
die "Incorrect bool value $b (must be 0 or 1)" |
|
397
|
|
|
|
|
|
|
unless $b == 0 or $b == 1; |
|
398
|
0
|
|
|
|
|
|
$_[2] += 4; |
|
399
|
0
|
0
|
|
|
|
|
if ($b) { |
|
400
|
|
|
|
|
|
|
# my ($class, $value, $index, $input) = @_; |
|
401
|
0
|
|
|
|
|
|
$_[0]->deserialize_NonnullDomain( $_[1], $_[2], $_[3] ); |
|
402
|
|
|
|
|
|
|
} |
|
403
|
|
|
|
|
|
|
else { |
|
404
|
0
|
|
|
|
|
|
$_[1] = undef; |
|
405
|
|
|
|
|
|
|
} |
|
406
|
|
|
|
|
|
|
}; |
|
407
|
|
|
|
|
|
|
} |
|
408
|
|
|
|
|
|
|
# @_: ($class, $value, $index, $output) = @_; |
|
409
|
|
|
|
|
|
|
sub serialize_Domain { |
|
410
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
411
|
0
|
0
|
|
0
|
0
|
|
if (defined $_[1]) { |
|
412
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
413
|
|
|
|
|
|
|
# Allow to model a value |
|
414
|
0
|
|
|
|
|
|
substr( $_[3], $_[2] ) = pack("L>", 1); |
|
415
|
0
|
|
|
|
|
|
$_[2] += 4; |
|
416
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
417
|
0
|
|
|
|
|
|
$_[0]->serialize_NonnullDomain( $_[1], $_[2], $_[3] ); |
|
418
|
|
|
|
|
|
|
} |
|
419
|
|
|
|
|
|
|
else { |
|
420
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
421
|
|
|
|
|
|
|
# Allow to model a value |
|
422
|
0
|
|
|
|
|
|
substr( $_[3], $_[2] ) = pack("L>", 0); |
|
423
|
0
|
|
|
|
|
|
$_[2] += 4; |
|
424
|
|
|
|
|
|
|
} |
|
425
|
|
|
|
|
|
|
} |
|
426
|
|
|
|
|
|
|
# @_: ($class, $value, $index, $input) = @_; |
|
427
|
|
|
|
|
|
|
sub deserialize_Network { |
|
428
|
0
|
|
|
0
|
0
|
|
my $input_length = length $_[3]; |
|
429
|
|
|
|
|
|
|
# my ($class, $value, $index, $input) = @_; |
|
430
|
0
|
|
|
|
|
|
do { |
|
431
|
0
|
|
|
|
|
|
my $b; |
|
432
|
|
|
|
|
|
|
# my ($class, $value, $index, $input) = @_; |
|
433
|
0
|
0
|
|
|
|
|
die "Input buffer too short" |
|
434
|
|
|
|
|
|
|
if ($input_length - $_[2]) < 4; |
|
435
|
0
|
|
|
|
|
|
$b = unpack("L>", substr( $_[3], $_[2] )); |
|
436
|
0
|
0
|
0
|
|
|
|
die "Incorrect bool value $b (must be 0 or 1)" |
|
437
|
|
|
|
|
|
|
unless $b == 0 or $b == 1; |
|
438
|
0
|
|
|
|
|
|
$_[2] += 4; |
|
439
|
0
|
0
|
|
|
|
|
if ($b) { |
|
440
|
|
|
|
|
|
|
# my ($class, $value, $index, $input) = @_; |
|
441
|
0
|
|
|
|
|
|
$_[0]->deserialize_NonnullNetwork( $_[1], $_[2], $_[3] ); |
|
442
|
|
|
|
|
|
|
} |
|
443
|
|
|
|
|
|
|
else { |
|
444
|
0
|
|
|
|
|
|
$_[1] = undef; |
|
445
|
|
|
|
|
|
|
} |
|
446
|
|
|
|
|
|
|
}; |
|
447
|
|
|
|
|
|
|
} |
|
448
|
|
|
|
|
|
|
# @_: ($class, $value, $index, $output) = @_; |
|
449
|
|
|
|
|
|
|
sub serialize_Network { |
|
450
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
451
|
0
|
0
|
|
0
|
0
|
|
if (defined $_[1]) { |
|
452
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
453
|
|
|
|
|
|
|
# Allow to model a value |
|
454
|
0
|
|
|
|
|
|
substr( $_[3], $_[2] ) = pack("L>", 1); |
|
455
|
0
|
|
|
|
|
|
$_[2] += 4; |
|
456
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
457
|
0
|
|
|
|
|
|
$_[0]->serialize_NonnullNetwork( $_[1], $_[2], $_[3] ); |
|
458
|
|
|
|
|
|
|
} |
|
459
|
|
|
|
|
|
|
else { |
|
460
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
461
|
|
|
|
|
|
|
# Allow to model a value |
|
462
|
0
|
|
|
|
|
|
substr( $_[3], $_[2] ) = pack("L>", 0); |
|
463
|
0
|
|
|
|
|
|
$_[2] += 4; |
|
464
|
|
|
|
|
|
|
} |
|
465
|
|
|
|
|
|
|
} |
|
466
|
|
|
|
|
|
|
# @_: ($class, $value, $index, $input) = @_; |
|
467
|
|
|
|
|
|
|
sub deserialize_Error { |
|
468
|
0
|
|
|
0
|
0
|
|
my $input_length = length $_[3]; |
|
469
|
0
|
|
|
|
|
|
$_[1] = {}; |
|
470
|
|
|
|
|
|
|
# Deserializing field: 'code' |
|
471
|
|
|
|
|
|
|
# my ($class, $value, $index, $input) = @_; |
|
472
|
0
|
0
|
|
|
|
|
die "Input buffer too short" |
|
473
|
|
|
|
|
|
|
if ($input_length - $_[2]) < 4; |
|
474
|
0
|
|
|
|
|
|
$_[1]->{code} = unpack("l>", substr( $_[3], $_[2] )); |
|
475
|
0
|
|
|
|
|
|
$_[2] += 4; |
|
476
|
|
|
|
|
|
|
die "Out of bounds 'int': $_[1]->{code}" |
|
477
|
0
|
0
|
0
|
|
|
|
unless (-2147483648 <= $_[1]->{code} and $_[1]->{code} < 2147483648); |
|
478
|
|
|
|
|
|
|
|
|
479
|
|
|
|
|
|
|
# Deserializing field: 'domain' |
|
480
|
|
|
|
|
|
|
# my ($class, $value, $index, $input) = @_; |
|
481
|
0
|
0
|
|
|
|
|
die "Input buffer too short" |
|
482
|
|
|
|
|
|
|
if ($input_length - $_[2]) < 4; |
|
483
|
0
|
|
|
|
|
|
$_[1]->{domain} = unpack("l>", substr( $_[3], $_[2] )); |
|
484
|
0
|
|
|
|
|
|
$_[2] += 4; |
|
485
|
|
|
|
|
|
|
die "Out of bounds 'int': $_[1]->{domain}" |
|
486
|
0
|
0
|
0
|
|
|
|
unless (-2147483648 <= $_[1]->{domain} and $_[1]->{domain} < 2147483648); |
|
487
|
|
|
|
|
|
|
|
|
488
|
|
|
|
|
|
|
# Deserializing field: 'message' |
|
489
|
|
|
|
|
|
|
# my ($class, $value, $index, $input) = @_; |
|
490
|
0
|
|
|
|
|
|
$_[0]->deserialize_String( $_[1]->{message}, $_[2], $_[3] ); |
|
491
|
|
|
|
|
|
|
|
|
492
|
|
|
|
|
|
|
# Deserializing field: 'level' |
|
493
|
|
|
|
|
|
|
# my ($class, $value, $index, $input) = @_; |
|
494
|
0
|
0
|
|
|
|
|
die "Input buffer too short" |
|
495
|
|
|
|
|
|
|
if ($input_length - $_[2]) < 4; |
|
496
|
0
|
|
|
|
|
|
$_[1]->{level} = unpack("l>", substr( $_[3], $_[2] )); |
|
497
|
0
|
|
|
|
|
|
$_[2] += 4; |
|
498
|
|
|
|
|
|
|
die "Out of bounds 'int': $_[1]->{level}" |
|
499
|
0
|
0
|
0
|
|
|
|
unless (-2147483648 <= $_[1]->{level} and $_[1]->{level} < 2147483648); |
|
500
|
|
|
|
|
|
|
|
|
501
|
|
|
|
|
|
|
# Deserializing field: 'dom' |
|
502
|
|
|
|
|
|
|
# my ($class, $value, $index, $input) = @_; |
|
503
|
0
|
|
|
|
|
|
$_[0]->deserialize_Domain( $_[1]->{dom}, $_[2], $_[3] ); |
|
504
|
|
|
|
|
|
|
|
|
505
|
|
|
|
|
|
|
# Deserializing field: 'str1' |
|
506
|
|
|
|
|
|
|
# my ($class, $value, $index, $input) = @_; |
|
507
|
0
|
|
|
|
|
|
$_[0]->deserialize_String( $_[1]->{str1}, $_[2], $_[3] ); |
|
508
|
|
|
|
|
|
|
|
|
509
|
|
|
|
|
|
|
# Deserializing field: 'str2' |
|
510
|
|
|
|
|
|
|
# my ($class, $value, $index, $input) = @_; |
|
511
|
0
|
|
|
|
|
|
$_[0]->deserialize_String( $_[1]->{str2}, $_[2], $_[3] ); |
|
512
|
|
|
|
|
|
|
|
|
513
|
|
|
|
|
|
|
# Deserializing field: 'str3' |
|
514
|
|
|
|
|
|
|
# my ($class, $value, $index, $input) = @_; |
|
515
|
0
|
|
|
|
|
|
$_[0]->deserialize_String( $_[1]->{str3}, $_[2], $_[3] ); |
|
516
|
|
|
|
|
|
|
|
|
517
|
|
|
|
|
|
|
# Deserializing field: 'int1' |
|
518
|
|
|
|
|
|
|
# my ($class, $value, $index, $input) = @_; |
|
519
|
0
|
0
|
|
|
|
|
die "Input buffer too short" |
|
520
|
|
|
|
|
|
|
if ($input_length - $_[2]) < 4; |
|
521
|
0
|
|
|
|
|
|
$_[1]->{int1} = unpack("l>", substr( $_[3], $_[2] )); |
|
522
|
0
|
|
|
|
|
|
$_[2] += 4; |
|
523
|
|
|
|
|
|
|
die "Out of bounds 'int': $_[1]->{int1}" |
|
524
|
0
|
0
|
0
|
|
|
|
unless (-2147483648 <= $_[1]->{int1} and $_[1]->{int1} < 2147483648); |
|
525
|
|
|
|
|
|
|
|
|
526
|
|
|
|
|
|
|
# Deserializing field: 'int2' |
|
527
|
|
|
|
|
|
|
# my ($class, $value, $index, $input) = @_; |
|
528
|
0
|
0
|
|
|
|
|
die "Input buffer too short" |
|
529
|
|
|
|
|
|
|
if ($input_length - $_[2]) < 4; |
|
530
|
0
|
|
|
|
|
|
$_[1]->{int2} = unpack("l>", substr( $_[3], $_[2] )); |
|
531
|
0
|
|
|
|
|
|
$_[2] += 4; |
|
532
|
|
|
|
|
|
|
die "Out of bounds 'int': $_[1]->{int2}" |
|
533
|
0
|
0
|
0
|
|
|
|
unless (-2147483648 <= $_[1]->{int2} and $_[1]->{int2} < 2147483648); |
|
534
|
|
|
|
|
|
|
|
|
535
|
|
|
|
|
|
|
# Deserializing field: 'net' |
|
536
|
|
|
|
|
|
|
# my ($class, $value, $index, $input) = @_; |
|
537
|
0
|
|
|
|
|
|
$_[0]->deserialize_Network( $_[1]->{net}, $_[2], $_[3] ); |
|
538
|
|
|
|
|
|
|
} |
|
539
|
|
|
|
|
|
|
# @_: ($class, $value, $index, $output) = @_; |
|
540
|
|
|
|
|
|
|
sub serialize_Error { |
|
541
|
0
|
0
|
|
0
|
0
|
|
croak "Missing required input 'struct' value" |
|
542
|
|
|
|
|
|
|
unless defined $_[1]; |
|
543
|
|
|
|
|
|
|
|
|
544
|
|
|
|
|
|
|
# Serializing field: 'code' |
|
545
|
|
|
|
|
|
|
croak "Missing required input value 'code'" |
|
546
|
0
|
0
|
|
|
|
|
unless exists $_[1]->{code}; |
|
547
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
548
|
|
|
|
|
|
|
croak "Missing required input 'int' value" |
|
549
|
0
|
0
|
|
|
|
|
unless defined $_[1]->{code}; |
|
550
|
|
|
|
|
|
|
die "Out of bounds 'int': $_[1]->{code}" |
|
551
|
0
|
0
|
0
|
|
|
|
unless (-2147483648 <= $_[1]->{code} and $_[1]->{code} < 2147483648); |
|
552
|
|
|
|
|
|
|
die "Non-integer 'int' value given: $_[1]->{code}" |
|
553
|
0
|
0
|
|
|
|
|
unless int($_[1]->{code}) == $_[1]->{code}; |
|
554
|
0
|
|
|
|
|
|
substr( $_[3], $_[2] ) = pack("l>", $_[1]->{code}); |
|
555
|
0
|
|
|
|
|
|
$_[2] += 4; |
|
556
|
|
|
|
|
|
|
|
|
557
|
|
|
|
|
|
|
# Serializing field: 'domain' |
|
558
|
|
|
|
|
|
|
croak "Missing required input value 'domain'" |
|
559
|
0
|
0
|
|
|
|
|
unless exists $_[1]->{domain}; |
|
560
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
561
|
|
|
|
|
|
|
croak "Missing required input 'int' value" |
|
562
|
0
|
0
|
|
|
|
|
unless defined $_[1]->{domain}; |
|
563
|
|
|
|
|
|
|
die "Out of bounds 'int': $_[1]->{domain}" |
|
564
|
0
|
0
|
0
|
|
|
|
unless (-2147483648 <= $_[1]->{domain} and $_[1]->{domain} < 2147483648); |
|
565
|
|
|
|
|
|
|
die "Non-integer 'int' value given: $_[1]->{domain}" |
|
566
|
0
|
0
|
|
|
|
|
unless int($_[1]->{domain}) == $_[1]->{domain}; |
|
567
|
0
|
|
|
|
|
|
substr( $_[3], $_[2] ) = pack("l>", $_[1]->{domain}); |
|
568
|
0
|
|
|
|
|
|
$_[2] += 4; |
|
569
|
|
|
|
|
|
|
|
|
570
|
|
|
|
|
|
|
# Serializing field: 'message' |
|
571
|
|
|
|
|
|
|
croak "Missing required input value 'message'" |
|
572
|
0
|
0
|
|
|
|
|
unless exists $_[1]->{message}; |
|
573
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
574
|
0
|
|
|
|
|
|
$_[0]->serialize_String( $_[1]->{message}, $_[2], $_[3] ); |
|
575
|
|
|
|
|
|
|
|
|
576
|
|
|
|
|
|
|
# Serializing field: 'level' |
|
577
|
|
|
|
|
|
|
croak "Missing required input value 'level'" |
|
578
|
0
|
0
|
|
|
|
|
unless exists $_[1]->{level}; |
|
579
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
580
|
|
|
|
|
|
|
croak "Missing required input 'int' value" |
|
581
|
0
|
0
|
|
|
|
|
unless defined $_[1]->{level}; |
|
582
|
|
|
|
|
|
|
die "Out of bounds 'int': $_[1]->{level}" |
|
583
|
0
|
0
|
0
|
|
|
|
unless (-2147483648 <= $_[1]->{level} and $_[1]->{level} < 2147483648); |
|
584
|
|
|
|
|
|
|
die "Non-integer 'int' value given: $_[1]->{level}" |
|
585
|
0
|
0
|
|
|
|
|
unless int($_[1]->{level}) == $_[1]->{level}; |
|
586
|
0
|
|
|
|
|
|
substr( $_[3], $_[2] ) = pack("l>", $_[1]->{level}); |
|
587
|
0
|
|
|
|
|
|
$_[2] += 4; |
|
588
|
|
|
|
|
|
|
|
|
589
|
|
|
|
|
|
|
# Serializing field: 'dom' |
|
590
|
|
|
|
|
|
|
croak "Missing required input value 'dom'" |
|
591
|
0
|
0
|
|
|
|
|
unless exists $_[1]->{dom}; |
|
592
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
593
|
0
|
|
|
|
|
|
$_[0]->serialize_Domain( $_[1]->{dom}, $_[2], $_[3] ); |
|
594
|
|
|
|
|
|
|
|
|
595
|
|
|
|
|
|
|
# Serializing field: 'str1' |
|
596
|
|
|
|
|
|
|
croak "Missing required input value 'str1'" |
|
597
|
0
|
0
|
|
|
|
|
unless exists $_[1]->{str1}; |
|
598
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
599
|
0
|
|
|
|
|
|
$_[0]->serialize_String( $_[1]->{str1}, $_[2], $_[3] ); |
|
600
|
|
|
|
|
|
|
|
|
601
|
|
|
|
|
|
|
# Serializing field: 'str2' |
|
602
|
|
|
|
|
|
|
croak "Missing required input value 'str2'" |
|
603
|
0
|
0
|
|
|
|
|
unless exists $_[1]->{str2}; |
|
604
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
605
|
0
|
|
|
|
|
|
$_[0]->serialize_String( $_[1]->{str2}, $_[2], $_[3] ); |
|
606
|
|
|
|
|
|
|
|
|
607
|
|
|
|
|
|
|
# Serializing field: 'str3' |
|
608
|
|
|
|
|
|
|
croak "Missing required input value 'str3'" |
|
609
|
0
|
0
|
|
|
|
|
unless exists $_[1]->{str3}; |
|
610
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
611
|
0
|
|
|
|
|
|
$_[0]->serialize_String( $_[1]->{str3}, $_[2], $_[3] ); |
|
612
|
|
|
|
|
|
|
|
|
613
|
|
|
|
|
|
|
# Serializing field: 'int1' |
|
614
|
|
|
|
|
|
|
croak "Missing required input value 'int1'" |
|
615
|
0
|
0
|
|
|
|
|
unless exists $_[1]->{int1}; |
|
616
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
617
|
|
|
|
|
|
|
croak "Missing required input 'int' value" |
|
618
|
0
|
0
|
|
|
|
|
unless defined $_[1]->{int1}; |
|
619
|
|
|
|
|
|
|
die "Out of bounds 'int': $_[1]->{int1}" |
|
620
|
0
|
0
|
0
|
|
|
|
unless (-2147483648 <= $_[1]->{int1} and $_[1]->{int1} < 2147483648); |
|
621
|
|
|
|
|
|
|
die "Non-integer 'int' value given: $_[1]->{int1}" |
|
622
|
0
|
0
|
|
|
|
|
unless int($_[1]->{int1}) == $_[1]->{int1}; |
|
623
|
0
|
|
|
|
|
|
substr( $_[3], $_[2] ) = pack("l>", $_[1]->{int1}); |
|
624
|
0
|
|
|
|
|
|
$_[2] += 4; |
|
625
|
|
|
|
|
|
|
|
|
626
|
|
|
|
|
|
|
# Serializing field: 'int2' |
|
627
|
|
|
|
|
|
|
croak "Missing required input value 'int2'" |
|
628
|
0
|
0
|
|
|
|
|
unless exists $_[1]->{int2}; |
|
629
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
630
|
|
|
|
|
|
|
croak "Missing required input 'int' value" |
|
631
|
0
|
0
|
|
|
|
|
unless defined $_[1]->{int2}; |
|
632
|
|
|
|
|
|
|
die "Out of bounds 'int': $_[1]->{int2}" |
|
633
|
0
|
0
|
0
|
|
|
|
unless (-2147483648 <= $_[1]->{int2} and $_[1]->{int2} < 2147483648); |
|
634
|
|
|
|
|
|
|
die "Non-integer 'int' value given: $_[1]->{int2}" |
|
635
|
0
|
0
|
|
|
|
|
unless int($_[1]->{int2}) == $_[1]->{int2}; |
|
636
|
0
|
|
|
|
|
|
substr( $_[3], $_[2] ) = pack("l>", $_[1]->{int2}); |
|
637
|
0
|
|
|
|
|
|
$_[2] += 4; |
|
638
|
|
|
|
|
|
|
|
|
639
|
|
|
|
|
|
|
# Serializing field: 'net' |
|
640
|
|
|
|
|
|
|
croak "Missing required input value 'net'" |
|
641
|
0
|
0
|
|
|
|
|
unless exists $_[1]->{net}; |
|
642
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
643
|
0
|
|
|
|
|
|
$_[0]->serialize_Network( $_[1]->{net}, $_[2], $_[3] ); |
|
644
|
|
|
|
|
|
|
} |
|
645
|
|
|
|
|
|
|
# @_: ($class, $value, $index, $input) = @_; |
|
646
|
|
|
|
|
|
|
sub deserialize_StreamHole { |
|
647
|
0
|
|
|
0
|
0
|
|
my $input_length = length $_[3]; |
|
648
|
0
|
|
|
|
|
|
$_[1] = {}; |
|
649
|
|
|
|
|
|
|
# Deserializing field: 'length' |
|
650
|
|
|
|
|
|
|
# my ($class, $value, $index, $input) = @_; |
|
651
|
0
|
0
|
|
|
|
|
die "Input buffer too short" |
|
652
|
|
|
|
|
|
|
if ($input_length - $_[2]) < 8; |
|
653
|
0
|
|
|
|
|
|
$_[1]->{length} = unpack("q>", substr( $_[3], $_[2] )); |
|
654
|
0
|
|
|
|
|
|
$_[2] += 8; |
|
655
|
|
|
|
|
|
|
die "Out of bounds 'hyper': $_[1]->{length}" |
|
656
|
|
|
|
|
|
|
unless (-9223372036854775808 <= $_[1]->{length} |
|
657
|
0
|
0
|
0
|
|
|
|
and $_[1]->{length} < 9223372036854775808); |
|
658
|
|
|
|
|
|
|
|
|
659
|
|
|
|
|
|
|
# Deserializing field: 'flags' |
|
660
|
|
|
|
|
|
|
# my ($class, $value, $index, $input) = @_; |
|
661
|
0
|
0
|
|
|
|
|
die "Input buffer too short" |
|
662
|
|
|
|
|
|
|
if ($input_length - $_[2]) < 4; |
|
663
|
0
|
|
|
|
|
|
$_[1]->{flags} = unpack("L>", substr( $_[3], $_[2] )); |
|
664
|
0
|
|
|
|
|
|
$_[2] += 4; |
|
665
|
|
|
|
|
|
|
die "Out of bounds 'unsigned int': $_[1]->{flags}" |
|
666
|
0
|
0
|
0
|
|
|
|
unless (0 <= $_[1]->{flags} and $_[1]->{flags} <= 4294967295); |
|
667
|
|
|
|
|
|
|
} |
|
668
|
|
|
|
|
|
|
# @_: ($class, $value, $index, $output) = @_; |
|
669
|
|
|
|
|
|
|
sub serialize_StreamHole { |
|
670
|
0
|
0
|
|
0
|
0
|
|
croak "Missing required input 'struct' value" |
|
671
|
|
|
|
|
|
|
unless defined $_[1]; |
|
672
|
|
|
|
|
|
|
|
|
673
|
|
|
|
|
|
|
# Serializing field: 'length' |
|
674
|
|
|
|
|
|
|
croak "Missing required input value 'length'" |
|
675
|
0
|
0
|
|
|
|
|
unless exists $_[1]->{length}; |
|
676
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
677
|
|
|
|
|
|
|
croak "Missing required input 'long' value" |
|
678
|
0
|
0
|
|
|
|
|
unless defined $_[1]->{length}; |
|
679
|
|
|
|
|
|
|
die "Out of bounds 'hyper': $_[1]->{length}" |
|
680
|
|
|
|
|
|
|
unless (-9223372036854775808 <= $_[1]->{length} |
|
681
|
0
|
0
|
0
|
|
|
|
and $_[1]->{length} < 9223372036854775808); |
|
682
|
|
|
|
|
|
|
die "Non-integer 'long' value given: $_[1]->{length}" |
|
683
|
0
|
0
|
|
|
|
|
unless int($_[1]->{length}) == $_[1]->{length}; |
|
684
|
0
|
|
|
|
|
|
substr( $_[3], $_[2] ) = pack("q>", $_[1]->{length}); |
|
685
|
0
|
|
|
|
|
|
$_[2] += 8; |
|
686
|
|
|
|
|
|
|
|
|
687
|
|
|
|
|
|
|
# Serializing field: 'flags' |
|
688
|
|
|
|
|
|
|
croak "Missing required input value 'flags'" |
|
689
|
0
|
0
|
|
|
|
|
unless exists $_[1]->{flags}; |
|
690
|
|
|
|
|
|
|
# my ($class, $value, $index, $output) = @_; |
|
691
|
|
|
|
|
|
|
croak "Missing required input 'unsigned int' value" |
|
692
|
0
|
0
|
|
|
|
|
unless defined $_[1]->{flags}; |
|
693
|
|
|
|
|
|
|
die "Out of bounds 'unsigned int': $_[1]->{flags}" |
|
694
|
0
|
0
|
0
|
|
|
|
unless (0 <= $_[1]->{flags} and $_[1]->{flags} <= 4294967295); |
|
695
|
|
|
|
|
|
|
die "Non-integer 'int' value given: $_[1]->{flags}" |
|
696
|
0
|
0
|
|
|
|
|
unless int($_[1]->{flags}) == $_[1]->{flags}; |
|
697
|
0
|
|
|
|
|
|
substr( $_[3], $_[2] ) = pack("L>", $_[1]->{flags}); |
|
698
|
0
|
|
|
|
|
|
$_[2] += 4; |
|
699
|
|
|
|
|
|
|
} |
|
700
|
|
|
|
|
|
|
|
|
701
|
|
|
|
|
|
|
|
|
702
|
|
|
|
|
|
|
1; |
|
703
|
|
|
|
|
|
|
|
|
704
|
|
|
|
|
|
|
__END__ |