2 * Routines for Signaling Compression (SigComp) dissection.
3 * Copyright 2004-2005, Anders Broman <anders.broman@ericsson.com>
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * SPDX-License-Identifier: GPL-2.0-or-later
11 * https://www.ietf.org/rfc/rfc3320
12 * https://www.ietf.org/rfc/rfc3321
13 * https://www.ietf.org/rfc/rfc4077
15 * https://tools.ietf.org/html/draft-ietf-rohc-sigcomp-impl-guide-10
16 * https://tools.ietf.org/html/draft-ietf-rohc-sigcomp-sip-01
21 #include <epan/packet.h>
22 #include <epan/prefs.h>
23 #include <epan/expert.h>
24 #include <epan/to_str.h>
25 #include <epan/strutil.h>
26 #include <epan/exceptions.h>
28 #include <wsutil/wsgcrypt.h>
29 #include <wsutil/crc16.h>
30 #include <wsutil/pow2.h>
32 void proto_register_sigcomp(void);
33 void proto_reg_handoff_sigcomp(void);
35 /* Initialize the protocol and registered fields */
36 static int proto_sigcomp
;
37 static int proto_raw_sigcomp
;
38 static int hf_sigcomp_t_bit
;
39 static int hf_sigcomp_len
;
40 static int hf_sigcomp_returned_feedback_item
;
41 static int hf_sigcomp_returned_feedback_item_len
;
42 static int hf_sigcomp_code_len
;
43 static int hf_sigcomp_destination
;
44 static int hf_sigcomp_partial_state
;
45 static int hf_sigcomp_remaining_message_bytes
;
46 static int hf_sigcomp_compression_ratio
;
47 static int hf_sigcomp_udvm_bytecode
;
48 static int hf_sigcomp_udvm_instr
;
49 static int hf_udvm_multitype_bytecode
;
50 static int hf_udvm_reference_bytecode
;
51 static int hf_udvm_literal_bytecode
;
52 /* static int hf_udvm_operand; */
53 static int hf_udvm_length
;
54 static int hf_udvm_addr_length
;
55 static int hf_udvm_destination
;
56 static int hf_udvm_addr_destination
;
57 static int hf_udvm_at_address
;
58 static int hf_udvm_address
;
59 static int hf_udvm_literal_num
;
60 static int hf_udvm_value
;
61 static int hf_udvm_addr_value
;
62 static int hf_partial_identifier_start
;
63 static int hf_partial_identifier_length
;
64 static int hf_state_begin
;
65 static int hf_udvm_state_length
;
66 static int hf_udvm_state_length_addr
;
67 static int hf_udvm_state_address
;
68 static int hf_udvm_state_address_addr
;
69 static int hf_udvm_state_instr
;
70 static int hf_udvm_operand_1
;
71 static int hf_udvm_operand_2
;
72 static int hf_udvm_operand_2_addr
;
74 static int hf_udvm_addr_j
;
75 static int hf_udvm_output_start
;
76 static int hf_udvm_addr_output_start
;
77 static int hf_udvm_output_length
;
78 static int hf_udvm_output_length_addr
;
79 static int hf_udvm_req_feedback_loc
;
80 static int hf_udvm_min_acc_len
;
81 static int hf_udvm_state_ret_pri
;
82 static int hf_udvm_ret_param_loc
;
83 static int hf_udvm_position
;
84 static int hf_udvm_ref_dest
;
85 static int hf_udvm_bits
;
86 static int hf_udvm_lower_bound
;
87 static int hf_udvm_upper_bound
;
88 static int hf_udvm_uncompressed
;
89 static int hf_udvm_offset
;
90 static int hf_udvm_addr_offset
;
91 static int hf_udvm_start_value
;
92 static int hf_udvm_execution_trace
;
93 static int hf_sigcomp_nack_ver
;
94 static int hf_sigcomp_nack_reason_code
;
95 static int hf_sigcomp_nack_failed_op_code
;
96 static int hf_sigcomp_nack_pc
;
97 static int hf_sigcomp_nack_sha1
;
98 static int hf_sigcomp_nack_state_id
;
99 static int hf_sigcomp_nack_memory_size
;
100 static int hf_sigcomp_nack_cycles_per_bit
;
101 static int hf_sigcomp_decompress_instruction
;
102 static int hf_sigcomp_loading_result
;
103 static int hf_sigcomp_byte_copy
;
104 /* Generated from convert_proto_tree_add_text.pl */
105 static int hf_sigcomp_accessing_state
;
106 static int hf_sigcomp_getting_value
;
107 static int hf_sigcomp_load_bytecode_into_udvm_start
;
108 static int hf_sigcomp_instruction_code
;
109 static int hf_sigcomp_current_instruction
;
110 static int hf_sigcomp_decompression_failure
;
111 static int hf_sigcomp_wireshark_udvm_diagnostic
;
112 static int hf_sigcomp_calculated_sha_1
;
113 static int hf_sigcomp_copying_value
;
114 static int hf_sigcomp_storing_value
;
115 static int hf_sigcomp_loading_value
;
116 static int hf_sigcomp_set_hu
;
117 static int hf_sigcomp_loading_h
;
118 static int hf_sigcomp_state_value
;
119 static int hf_sigcomp_output_value
;
120 static int hf_sigcomp_num_state_create
;
121 static int hf_sigcomp_sha1_digest
;
122 static int hf_sigcomp_creating_state
;
123 static int hf_sigcomp_sigcomp_message_decompressed
;
124 static int hf_sigcomp_starting_to_remove_escape_digits
;
125 static int hf_sigcomp_escape_digit_found
;
126 static int hf_sigcomp_illegal_escape_code
;
127 static int hf_sigcomp_end_of_sigcomp_message_indication_found
;
128 static int hf_sigcomp_addr_value
;
129 static int hf_sigcomp_copying_bytes_literally
;
130 static int hf_sigcomp_data_for_sigcomp_dissector
;
131 static int hf_sigcomp_remaining_sigcomp_message
;
132 static int hf_sigcomp_sha1buff
;
133 static int hf_sigcomp_udvm_instruction
;
134 static int hf_sigcomp_remaining_bytes
;
135 static int hf_sigcomp_max_udvm_cycles
;
136 static int hf_sigcomp_used_udvm_cycles
;
137 static int hf_sigcomp_udvm_execution_stated
;
138 static int hf_sigcomp_message_length
;
139 static int hf_sigcomp_byte_code_length
;
142 /* Initialize the subtree pointers */
143 static int ett_sigcomp
;
144 static int ett_sigcomp_udvm
;
145 static int ett_sigcomp_udvm_exe
;
146 static int ett_raw_text
;
148 static expert_field ei_sigcomp_nack_failed_op_code
;
149 static expert_field ei_sigcomp_invalid_instruction
;
150 static expert_field ei_sigcomp_invalid_shift_value
;
151 /* Generated from convert_proto_tree_add_text.pl */
152 static expert_field ei_sigcomp_tcp_fragment
;
153 static expert_field ei_sigcomp_decompression_failure
;
154 static expert_field ei_sigcomp_failed_to_access_state_wireshark_udvm_diagnostic
;
155 static expert_field ei_sigcomp_all_remaining_parameters_zero
;
156 static expert_field ei_sigcomp_sigcomp_message_decompression_failure
;
157 static expert_field ei_sigcomp_execution_of_this_instruction_is_not_implemented
;
159 static dissector_handle_t sip_handle
;
160 static dissector_handle_t sigcomp_handle
;
161 static dissector_handle_t sigcomp_tcp_handle
;
164 /* set the tcp ports */
165 #define SIGCOMP_TCP_PORT_RANGE "5555,6666" /* Not IANA registered */
167 /* Default preference whether to display the bytecode in UDVM operands or not */
168 static bool display_udvm_bytecode
;
169 /* Default preference whether to dissect the UDVM code or not */
170 /* WARNING: Setting this to true might result in the entire dissector being
171 disabled by default or removed completely. */
172 static bool dissect_udvm_code
;
173 static bool display_raw_txt
;
174 /* Default preference whether to decompress the message or not */
175 /* WARNING: Setting this to true might result in the entire dissector being
176 disabled by default or removed completely. */
177 static bool decompress
;
178 /* Default preference whether to print debug info at execution of UDVM
180 * 1 = details level 1
181 * 2 = details level 2
182 * 3 = details level 3
183 * 4 = details level 4
185 static int udvm_print_detail_level
;
188 static const value_string length_encoding_vals
[] = {
189 { 0x00, "No partial state (Message type 2)" },
190 { 0x01, "(6 bytes)" },
191 { 0x02, "(9 bytes)" },
192 { 0x03, "(12 bytes)" },
197 static const value_string destination_address_encoding_vals
[] = {
198 { 0x00, "Reserved" },
216 static value_string_ext destination_address_encoding_vals_ext
=
217 VALUE_STRING_EXT_INIT(destination_address_encoding_vals
);
220 * Figure 10: Bytecode for a multitype (%) operand
221 * Bytecode: Operand value: Range: HEX val
222 * 00nnnnnn N 0 - 63 0x00
223 * 01nnnnnn memory[2 * N] 0 - 65535 0x40
224 * 1000011n 2 ^ (N + 6) 64 , 128 0x86
225 * 10001nnn 2 ^ (N + 8) 256 , ... , 32768 0x88
226 * 111nnnnn N + 65504 65504 - 65535 0xe0
227 * 1001nnnn nnnnnnnn N + 61440 61440 - 65535 0x90
228 * 101nnnnn nnnnnnnn N 0 - 8191 0xa0
229 * 110nnnnn nnnnnnnn memory[N] 0 - 65535 0xc0
230 * 10000000 nnnnnnnn nnnnnnnn N 0 - 65535 0x80
231 * 10000001 nnnnnnnn nnnnnnnn memory[N] 0 - 65535 0x81
234 static const value_string display_bytecode_vals
[] = {
235 { 0x00, "00nnnnnn, N, 0 - 63" },
236 { 0x40, "01nnnnnn, memory[2 * N],0 - 65535" },
237 { 0x86, "1000011n, 2 ^ (N + 6), 64 , 128" },
238 { 0x88, "10001nnn, 2 ^ (N + 8), 256,..., 32768" },
239 { 0xe0, "111nnnnn N + 65504, 65504 - 65535" },
240 { 0x90, "1001nnnn nnnnnnnn, N + 61440, 61440 - 65535" },
241 { 0xa0, "101nnnnn nnnnnnnn, N, 0 - 8191" },
242 { 0xc0, "110nnnnn nnnnnnnn, memory[N], 0 - 65535" },
243 { 0x80, "10000000 nnnnnnnn nnnnnnnn, N, 0 - 65535" },
244 { 0x81, "10000001 nnnnnnnn nnnnnnnn, memory[N], 0 - 65535" },
248 * 0nnnnnnn memory[2 * N] 0 - 65535
249 * 10nnnnnn nnnnnnnn memory[2 * N] 0 - 65535
250 * 11000000 nnnnnnnn nnnnnnnn memory[N] 0 - 65535
252 static const value_string display_ref_bytecode_vals
[] = {
253 { 0x00, "0nnnnnnn memory[2 * N] 0 - 65535" },
254 { 0x80, "10nnnnnn nnnnnnnn memory[2 * N] 0 - 65535" },
255 { 0xc0, "11000000 nnnnnnnn nnnnnnnn memory[N] 0 - 65535" },
258 /* The simplest operand type is the literal (#), which encodes a
259 * constant integer from 0 to 65535 inclusive. A literal operand may
260 * require between 1 and 3 bytes depending on its value.
261 * Bytecode: Operand value: Range:
263 * 10nnnnnn nnnnnnnn N 0 - 16383
264 * 11000000 nnnnnnnn nnnnnnnn N 0 - 65535
266 * Figure 8: Bytecode for a literal (#) operand
270 static const value_string display_lit_bytecode_vals
[] = {
271 { 0x00, "0nnnnnnn N 0 - 127" },
272 { 0x80, "10nnnnnn nnnnnnnn N 0 - 16383" },
273 { 0xc0, "11000000 nnnnnnnn nnnnnnnn N 0 - 65535" },
277 #define SIGCOMP_NACK_STATE_NOT_FOUND 1
278 #define SIGCOMP_NACK_CYCLES_EXHAUSTED 2
279 #define SIGCOMP_NACK_BYTECODES_TOO_LARGE 18
280 #define SIGCOMP_NACK_ID_NOT_UNIQUE 21
281 #define SIGCOMP_NACK_STATE_TOO_SHORT 23
283 static const value_string sigcomp_nack_reason_code_vals
[] = {
284 { 1, "STATE_NOT_FOUND" }, /*1 State ID (6 - 20 bytes) */
285 { 2, "CYCLES_EXHAUSTED" }, /*2 Cycles Per Bit (1 byte) */
286 { 3, "USER_REQUESTED" },
288 { 5, "TOO_MANY_STATE_REQUESTS" },
289 { 6, "INVALID_STATE_ID_LENGTH" },
290 { 7, "INVALID_STATE_PRIORITY" },
291 { 8, "OUTPUT_OVERFLOW" },
292 { 9, "STACK_UNDERFLOW" },
293 { 10, "BAD_INPUT_BITORDER" },
294 { 11, "DIV_BY_ZERO" },
295 { 12, "SWITCH_VALUE_TOO_HIGH" },
296 { 13, "TOO_MANY_BITS_REQUESTED" },
297 { 14, "INVALID_OPERAND" },
298 { 15, "HUFFMAN_NO_MATCH" },
299 { 16, "MESSAGE_TOO_SHORT" },
300 { 17, "INVALID_CODE_LOCATION" },
301 { 18, "BYTECODES_TOO_LARGE" }, /*18 Memory size (2 bytes) */
302 { 19, "INVALID_OPCODE" },
303 { 20, "INVALID_STATE_PROBE" },
304 { 21, "ID_NOT_UNIQUE" }, /*21 State ID (6 - 20 bytes) */
305 { 22, "MULTILOAD_OVERWRITTEN" },
306 { 23, "STATE_TOO_SHORT" }, /*23 State ID (6 - 20 bytes) */
307 { 24, "INTERNAL_ERROR" },
308 { 25, "FRAMING_ERROR" },
311 static value_string_ext sigcomp_nack_reason_code_vals_ext
=
312 VALUE_STRING_EXT_INIT(sigcomp_nack_reason_code_vals
);
315 static void dissect_udvm_bytecode(tvbuff_t
*udvm_tvb
, packet_info
* pinfo
, proto_tree
*sigcomp_udvm_tree
, unsigned destination
);
317 static int dissect_udvm_multitype_operand(tvbuff_t
*udvm_tvb
, proto_tree
*sigcomp_udvm_tree
,
318 int offset
,bool is_addr
,int *start_offset
,
319 uint16_t *value
, bool *is_memory_address
);
321 static int dissect_udvm_literal_operand(tvbuff_t
*udvm_tvb
, proto_tree
*sigcomp_udvm_tree
,
322 int offset
, int *start_offset
, uint16_t *value
);
324 static int dissect_udvm_reference_operand(tvbuff_t
*udvm_tvb
, proto_tree
*sigcomp_udvm_tree
,
325 int offset
, int *start_offset
, uint16_t *value
);
326 static void tvb_raw_text_add(tvbuff_t
*tvb
, proto_tree
*tree
);
328 static int dissect_sigcomp_common(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
);
330 static proto_tree
*top_tree
;
332 #define UDVM_MEMORY_SIZE 65536
334 /**********************************************************************************************
336 * SIGCOMP STATE HANDLER
338 **********************************************************************************************/
339 #define STATE_BUFFER_SIZE 20
340 #define STATE_MIN_ACCESS_LEN 6
344 * The Session Initiation Protocol (SIP) and Session Description Protocol
345 * (SDP) Static Dictionary for Signaling Compression (SigComp)
346 * https://www.ietf.org/rfc/rfc3485
348 #define SIP_SDP_STATE_LENGTH 0x12e4
350 static const uint8_t sip_sdp_state_identifier
[STATE_BUFFER_SIZE
] =
352 /* -0000, */ 0xfb, 0xe5, 0x07, 0xdf, 0xe5, 0xe6, 0xaa, 0x5a, 0xf2, 0xab, 0xb9, 0x14, 0xce, 0xaa, 0x05, 0xf9,
353 /* -0010, */ 0x9c, 0xe6, 0x1b, 0xa5
356 static const uint8_t sip_sdp_static_dictionaty_for_sigcomp
[0x12e4] =
359 /* -0000, */ 0x0d, 0x0a, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74,
360 /* -0010, */ 0x3a, 0x20, 0x0d, 0x0a, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2d, 0x49, 0x6e, 0x66, 0x6f, 0x3a, 0x20,
361 /* -0020, */ 0x0d, 0x0a, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x3a, 0x20, 0x0d, 0x0a, 0x43,
362 /* -0030, */ 0x61, 0x6c, 0x6c, 0x2d, 0x49, 0x6e, 0x66, 0x6f, 0x3a, 0x20, 0x0d, 0x0a, 0x52, 0x65, 0x70, 0x6c,
363 /* -0040, */ 0x79, 0x2d, 0x54, 0x6f, 0x3a, 0x20, 0x0d, 0x0a, 0x57, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x3a,
364 /* -0050, */ 0x20, 0x0d, 0x0a, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x3a, 0x20, 0x3b, 0x68, 0x61, 0x6e,
365 /* -0060, */ 0x64, 0x6c, 0x69, 0x6e, 0x67, 0x3d, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x3b, 0x70, 0x75, 0x72, 0x70,
366 /* -0070, */ 0x6f, 0x73, 0x65, 0x3d, 0x3b, 0x63, 0x61, 0x75, 0x73, 0x65, 0x3d, 0x3b, 0x74, 0x65, 0x78, 0x74,
367 /* -0080, */ 0x3d, 0x63, 0x61, 0x72, 0x64, 0x33, 0x30, 0x30, 0x20, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c,
368 /* -0090, */ 0x65, 0x20, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x6d, 0x69, 0x6d, 0x65, 0x73, 0x73, 0x61,
369 /* -00A0, */ 0x67, 0x65, 0x2f, 0x73, 0x69, 0x70, 0x66, 0x72, 0x61, 0x67, 0x34, 0x30, 0x37, 0x20, 0x50, 0x72,
370 /* -00B0, */ 0x6f, 0x78, 0x79, 0x20, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69,
371 /* -00C0, */ 0x6f, 0x6e, 0x20, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74,
372 /* -00D0, */ 0x2d, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x69, 0x74, 0x79, 0x34, 0x38, 0x34, 0x20, 0x41, 0x64,
373 /* -00E0, */ 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65,
374 /* -00F0, */ 0x6c, 0x65, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x2d, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x34, 0x39,
375 /* -0100, */ 0x34, 0x20, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x20, 0x41, 0x67, 0x72, 0x65, 0x65,
376 /* -0110, */ 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x65, 0x61, 0x63,
377 /* -0120, */ 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x64, 0x34, 0x38, 0x31, 0x20, 0x43, 0x61, 0x6c, 0x6c, 0x2f,
378 /* -0130, */ 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x44, 0x6f, 0x65, 0x73,
379 /* -0140, */ 0x20, 0x4e, 0x6f, 0x74, 0x20, 0x45, 0x78, 0x69, 0x73, 0x74, 0x61, 0x6c, 0x65, 0x3d, 0x35, 0x30,
380 /* -0150, */ 0x30, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61,
381 /* -0160, */ 0x6c, 0x20, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x6f, 0x62, 0x75, 0x73, 0x74, 0x2d, 0x73, 0x6f, 0x72,
382 /* -0170, */ 0x74, 0x69, 0x6e, 0x67, 0x3d, 0x34, 0x31, 0x36, 0x20, 0x55, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f,
383 /* -0180, */ 0x72, 0x74, 0x65, 0x64, 0x20, 0x55, 0x52, 0x49, 0x20, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x72,
384 /* -0190, */ 0x67, 0x65, 0x6e, 0x63, 0x79, 0x34, 0x31, 0x35, 0x20, 0x55, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f,
385 /* -01A0, */ 0x72, 0x74, 0x65, 0x64, 0x20, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x20, 0x54, 0x79, 0x70, 0x65, 0x6e,
386 /* -01B0, */ 0x64, 0x69, 0x6e, 0x67, 0x34, 0x38, 0x38, 0x20, 0x4e, 0x6f, 0x74, 0x20, 0x41, 0x63, 0x63, 0x65,
387 /* -01C0, */ 0x70, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x48, 0x65, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65,
388 /* -01D0, */ 0x64, 0x34, 0x32, 0x33, 0x20, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x20, 0x54, 0x6f,
389 /* -01E0, */ 0x6f, 0x20, 0x42, 0x72, 0x69, 0x65, 0x66, 0x72, 0x6f, 0x6d, 0x2d, 0x74, 0x61, 0x67, 0x51, 0x2e,
390 /* -01F0, */ 0x38, 0x35, 0x30, 0x35, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x4e, 0x6f, 0x74,
391 /* -0200, */ 0x20, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x34, 0x30, 0x33, 0x20, 0x46, 0x6f,
392 /* -0210, */ 0x72, 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x6f, 0x6e, 0x2d, 0x75, 0x72, 0x67, 0x65, 0x6e, 0x74,
393 /* -0220, */ 0x34, 0x32, 0x39, 0x20, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x20, 0x52, 0x65, 0x66, 0x65,
394 /* -0230, */ 0x72, 0x72, 0x6f, 0x72, 0x20, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x34, 0x32, 0x30,
395 /* -0240, */ 0x20, 0x42, 0x61, 0x64, 0x20, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x6f, 0x72,
396 /* -0250, */ 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x0d, 0x0a, 0x61, 0x3d, 0x6b, 0x65, 0x79, 0x2d, 0x6d,
397 /* -0260, */ 0x67, 0x6d, 0x74, 0x3a, 0x6d, 0x69, 0x6b, 0x65, 0x79, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x53,
398 /* -0270, */ 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x3a, 0x20, 0x35, 0x30, 0x34, 0x20, 0x53,
399 /* -0280, */ 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x54, 0x69, 0x6d, 0x65, 0x2d, 0x6f, 0x75, 0x74, 0x6f, 0x2d,
400 /* -0290, */ 0x74, 0x61, 0x67, 0x0d, 0x0a, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74,
401 /* -02A0, */ 0x69, 0x6f, 0x6e, 0x2d, 0x49, 0x6e, 0x66, 0x6f, 0x3a, 0x20, 0x44, 0x65, 0x63, 0x20, 0x33, 0x38,
402 /* -02B0, */ 0x30, 0x20, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x53, 0x65,
403 /* -02C0, */ 0x72, 0x76, 0x69, 0x63, 0x65, 0x35, 0x30, 0x33, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
404 /* -02D0, */ 0x20, 0x55, 0x6e, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x34, 0x32, 0x31, 0x20,
405 /* -02E0, */ 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72,
406 /* -02F0, */ 0x65, 0x64, 0x34, 0x30, 0x35, 0x20, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x4e, 0x6f, 0x74,
407 /* -0300, */ 0x20, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x34, 0x38, 0x37, 0x20, 0x52, 0x65, 0x71, 0x75,
408 /* -0310, */ 0x65, 0x73, 0x74, 0x20, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x61, 0x75,
409 /* -0320, */ 0x74, 0x68, 0x2d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6c, 0x65, 0x61, 0x76, 0x69, 0x6e, 0x67, 0x3d,
410 /* -0330, */ 0x0d, 0x0a, 0x6d, 0x3d, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20,
411 /* -0340, */ 0x41, 0x75, 0x67, 0x20, 0x35, 0x31, 0x33, 0x20, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20,
412 /* -0350, */ 0x54, 0x6f, 0x6f, 0x20, 0x4c, 0x61, 0x72, 0x67, 0x65, 0x36, 0x38, 0x37, 0x20, 0x44, 0x69, 0x61,
413 /* -0360, */ 0x6c, 0x6f, 0x67, 0x20, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x33, 0x30,
414 /* -0370, */ 0x32, 0x20, 0x4d, 0x6f, 0x76, 0x65, 0x64, 0x20, 0x54, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x72,
415 /* -0380, */ 0x69, 0x6c, 0x79, 0x33, 0x30, 0x31, 0x20, 0x4d, 0x6f, 0x76, 0x65, 0x64, 0x20, 0x50, 0x65, 0x72,
416 /* -0390, */ 0x6d, 0x61, 0x6e, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72,
417 /* -03A0, */ 0x74, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x0d, 0x0a, 0x52, 0x65, 0x74, 0x72, 0x79, 0x2d,
418 /* -03B0, */ 0x41, 0x66, 0x74, 0x65, 0x72, 0x3a, 0x20, 0x47, 0x4d, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x34, 0x30,
419 /* -03C0, */ 0x32, 0x20, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72,
420 /* -03D0, */ 0x65, 0x64, 0x0d, 0x0a, 0x61, 0x3d, 0x6f, 0x72, 0x69, 0x65, 0x6e, 0x74, 0x3a, 0x6c, 0x61, 0x6e,
421 /* -03E0, */ 0x64, 0x73, 0x63, 0x61, 0x70, 0x65, 0x34, 0x30, 0x30, 0x20, 0x42, 0x61, 0x64, 0x20, 0x52, 0x65,
422 /* -03F0, */ 0x71, 0x75, 0x65, 0x73, 0x74, 0x72, 0x75, 0x65, 0x34, 0x39, 0x31, 0x20, 0x52, 0x65, 0x71, 0x75,
423 /* -0400, */ 0x65, 0x73, 0x74, 0x20, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x35, 0x30, 0x31, 0x20, 0x4e,
424 /* -0410, */ 0x6f, 0x74, 0x20, 0x49, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x34, 0x30,
425 /* -0420, */ 0x36, 0x20, 0x4e, 0x6f, 0x74, 0x20, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x61, 0x62, 0x6c, 0x65,
426 /* -0430, */ 0x36, 0x30, 0x36, 0x20, 0x4e, 0x6f, 0x74, 0x20, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x61, 0x62,
427 /* -0440, */ 0x6c, 0x65, 0x0d, 0x0a, 0x61, 0x3d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x62, 0x72, 0x6f, 0x61, 0x64,
428 /* -0450, */ 0x63, 0x61, 0x73, 0x74, 0x6f, 0x6e, 0x65, 0x34, 0x39, 0x33, 0x20, 0x55, 0x6e, 0x64, 0x65, 0x63,
429 /* -0460, */ 0x69, 0x70, 0x68, 0x65, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x0d, 0x0a, 0x4d, 0x49, 0x4d, 0x45, 0x2d,
430 /* -0470, */ 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x4d, 0x61, 0x79, 0x20, 0x34, 0x38, 0x32,
431 /* -0480, */ 0x20, 0x4c, 0x6f, 0x6f, 0x70, 0x20, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x0d, 0x0a,
432 /* -0490, */ 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x4a, 0x75,
433 /* -04A0, */ 0x6e, 0x20, 0x6d, 0x6f, 0x64, 0x65, 0x2d, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2d, 0x6e, 0x65,
434 /* -04B0, */ 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x3d, 0x63, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x65,
435 /* -04C0, */ 0x72, 0x74, 0x63, 0x70, 0x2d, 0x66, 0x62, 0x34, 0x38, 0x39, 0x20, 0x42, 0x61, 0x64, 0x20, 0x45,
436 /* -04D0, */ 0x76, 0x65, 0x6e, 0x74, 0x6c, 0x73, 0x0d, 0x0a, 0x55, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72,
437 /* -04E0, */ 0x74, 0x65, 0x64, 0x3a, 0x20, 0x4a, 0x61, 0x6e, 0x20, 0x35, 0x30, 0x32, 0x20, 0x42, 0x61, 0x64,
438 /* -04F0, */ 0x20, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x6d, 0x6f, 0x64, 0x65, 0x2d, 0x63, 0x68, 0x61,
439 /* -0500, */ 0x6e, 0x67, 0x65, 0x2d, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x3d, 0x0d, 0x0a, 0x61, 0x3d, 0x6f,
440 /* -0510, */ 0x72, 0x69, 0x65, 0x6e, 0x74, 0x3a, 0x73, 0x65, 0x61, 0x73, 0x63, 0x61, 0x70, 0x65, 0x0d, 0x0a,
441 /* -0520, */ 0x61, 0x3d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64,
442 /* -0530, */ 0x34, 0x30, 0x34, 0x20, 0x4e, 0x6f, 0x74, 0x20, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x33, 0x30, 0x35,
443 /* -0540, */ 0x20, 0x55, 0x73, 0x65, 0x20, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x0d, 0x0a, 0x61, 0x3d, 0x74, 0x79,
444 /* -0550, */ 0x70, 0x65, 0x3a, 0x72, 0x65, 0x63, 0x76, 0x6f, 0x6e, 0x6c, 0x79, 0x0d, 0x0a, 0x61, 0x3d, 0x74,
445 /* -0560, */ 0x79, 0x70, 0x65, 0x3a, 0x6d, 0x65, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x0d, 0x0a, 0x6b, 0x3d, 0x70,
446 /* -0570, */ 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x3a, 0x0d, 0x0a, 0x52, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64,
447 /* -0580, */ 0x2d, 0x42, 0x79, 0x3a, 0x20, 0x0d, 0x0a, 0x49, 0x6e, 0x2d, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x2d,
448 /* -0590, */ 0x54, 0x6f, 0x3a, 0x20, 0x54, 0x52, 0x55, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x3a,
449 /* -05A0, */ 0x20, 0x31, 0x38, 0x32, 0x20, 0x51, 0x75, 0x65, 0x75, 0x65, 0x64, 0x41, 0x75, 0x74, 0x68, 0x65,
450 /* -05B0, */ 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
451 /* -05C0, */ 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x0d, 0x0a, 0x61, 0x3d, 0x66, 0x72, 0x61, 0x6d, 0x65,
452 /* -05D0, */ 0x72, 0x61, 0x74, 0x65, 0x3a, 0x0d, 0x0a, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x2d, 0x49, 0x6e, 0x66,
453 /* -05E0, */ 0x6f, 0x3a, 0x20, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x20, 0x0d, 0x0a, 0x61, 0x3d, 0x6d, 0x61,
454 /* -05F0, */ 0x78, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x3a, 0x3b, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2d, 0x61, 0x66,
455 /* -0600, */ 0x74, 0x65, 0x72, 0x3d, 0x75, 0x61, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x3d, 0x34,
456 /* -0610, */ 0x31, 0x30, 0x20, 0x47, 0x6f, 0x6e, 0x65, 0x0d, 0x0a, 0x52, 0x65, 0x66, 0x65, 0x72, 0x2d, 0x54,
457 /* -0620, */ 0x6f, 0x3a, 0x20, 0x0d, 0x0a, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x20, 0x0d,
458 /* -0630, */ 0x0a, 0x6d, 0x3d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x20, 0x0d, 0x0a, 0x61, 0x3d, 0x71,
459 /* -0640, */ 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x3a, 0x0d, 0x0a, 0x61, 0x3d, 0x73, 0x64, 0x70, 0x6c, 0x61,
460 /* -0650, */ 0x6e, 0x67, 0x3a, 0x0d, 0x0a, 0x61, 0x3d, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x3a, 0x0d,
461 /* -0660, */ 0x0a, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x73, 0x3a, 0x20, 0x52, 0x45, 0x46, 0x45, 0x52,
462 /* -0670, */ 0x20, 0x69, 0x70, 0x73, 0x65, 0x63, 0x2d, 0x69, 0x6b, 0x65, 0x3b, 0x74, 0x72, 0x61, 0x6e, 0x73,
463 /* -0680, */ 0x70, 0x6f, 0x72, 0x74, 0x3d, 0x0d, 0x0a, 0x61, 0x3d, 0x6b, 0x65, 0x79, 0x77, 0x64, 0x73, 0x3a,
464 /* -0690, */ 0x0d, 0x0a, 0x6b, 0x3d, 0x62, 0x61, 0x73, 0x65, 0x36, 0x34, 0x3a, 0x3b, 0x72, 0x65, 0x66, 0x72,
465 /* -06A0, */ 0x65, 0x73, 0x68, 0x65, 0x72, 0x3d, 0x0d, 0x0a, 0x61, 0x3d, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x3a,
466 /* -06B0, */ 0x0d, 0x0a, 0x6b, 0x3d, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x3a, 0x3b, 0x72, 0x65, 0x63, 0x65, 0x69,
467 /* -06C0, */ 0x76, 0x65, 0x64, 0x3d, 0x3b, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x0d, 0x0a,
468 /* -06D0, */ 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20, 0x0d, 0x0a, 0x61, 0x3d, 0x67, 0x72, 0x6f, 0x75,
469 /* -06E0, */ 0x70, 0x3a, 0x46, 0x41, 0x4c, 0x53, 0x45, 0x3a, 0x20, 0x49, 0x4e, 0x46, 0x4f, 0x20, 0x0d, 0x0a,
470 /* -06F0, */ 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x0d, 0x0a, 0x61, 0x3d, 0x6c, 0x61, 0x6e, 0x67, 0x3a,
471 /* -0700, */ 0x0d, 0x0a, 0x6d, 0x3d, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6d, 0x6f, 0x64, 0x65, 0x2d, 0x73, 0x65,
472 /* -0710, */ 0x74, 0x3d, 0x0d, 0x0a, 0x61, 0x3d, 0x74, 0x6f, 0x6f, 0x6c, 0x3a, 0x54, 0x4c, 0x53, 0x75, 0x6e,
473 /* -0720, */ 0x2c, 0x20, 0x0d, 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x0d, 0x0a, 0x61, 0x3d, 0x63, 0x61,
474 /* -0730, */ 0x74, 0x3a, 0x0d, 0x0a, 0x6b, 0x3d, 0x75, 0x72, 0x69, 0x3a, 0x0d, 0x0a, 0x50, 0x72, 0x6f, 0x78,
475 /* -0740, */ 0x79, 0x2d, 0x3b, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x3d, 0x3b, 0x6d, 0x65, 0x74, 0x68, 0x6f,
476 /* -0750, */ 0x64, 0x3d, 0x0d, 0x0a, 0x61, 0x3d, 0x6d, 0x69, 0x64, 0x3a, 0x3b, 0x6d, 0x61, 0x64, 0x64, 0x72,
477 /* -0760, */ 0x3d, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x3d, 0x0d, 0x0a, 0x4d, 0x69, 0x6e, 0x2d, 0x3b, 0x61,
478 /* -0770, */ 0x6c, 0x67, 0x3d, 0x4d, 0x6f, 0x6e, 0x2c, 0x20, 0x54, 0x75, 0x65, 0x2c, 0x20, 0x57, 0x65, 0x64,
479 /* -0780, */ 0x2c, 0x20, 0x46, 0x72, 0x69, 0x2c, 0x20, 0x53, 0x61, 0x74, 0x2c, 0x20, 0x3b, 0x74, 0x74, 0x6c,
480 /* -0790, */ 0x3d, 0x61, 0x75, 0x74, 0x73, 0x3d, 0x0d, 0x0a, 0x72, 0x3d, 0x0d, 0x0a, 0x7a, 0x3d, 0x0d, 0x0a,
481 /* -07A0, */ 0x65, 0x3d, 0x3b, 0x69, 0x64, 0x3d, 0x0d, 0x0a, 0x69, 0x3d, 0x63, 0x72, 0x63, 0x3d, 0x0d, 0x0a,
482 /* -07B0, */ 0x75, 0x3d, 0x3b, 0x71, 0x3d, 0x75, 0x61, 0x73, 0x34, 0x31, 0x34, 0x20, 0x52, 0x65, 0x71, 0x75,
483 /* -07C0, */ 0x65, 0x73, 0x74, 0x2d, 0x55, 0x52, 0x49, 0x20, 0x54, 0x6f, 0x6f, 0x20, 0x4c, 0x6f, 0x6e, 0x67,
484 /* -07D0, */ 0x69, 0x76, 0x65, 0x75, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x75, 0x64, 0x70, 0x72, 0x65,
485 /* -07E0, */ 0x66, 0x65, 0x72, 0x36, 0x30, 0x30, 0x20, 0x42, 0x75, 0x73, 0x79, 0x20, 0x45, 0x76, 0x65, 0x72,
486 /* -07F0, */ 0x79, 0x77, 0x68, 0x65, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x34, 0x38, 0x30, 0x20,
487 /* -0800, */ 0x54, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x72, 0x69, 0x6c, 0x79, 0x20, 0x55, 0x6e, 0x61, 0x76,
488 /* -0810, */ 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x0d, 0x0a, 0x61, 0x3d, 0x74, 0x79, 0x70, 0x65, 0x3a,
489 /* -0820, */ 0x48, 0x2e, 0x33, 0x33, 0x32, 0x30, 0x32, 0x20, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64,
490 /* -0830, */ 0x0d, 0x0a, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2d, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65,
491 /* -0840, */ 0x73, 0x3a, 0x20, 0x0d, 0x0a, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
492 /* -0850, */ 0x6e, 0x2d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x0d, 0x0a, 0x53,
493 /* -0860, */ 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2d, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x3a, 0x20, 0x53, 0x65,
494 /* -0870, */ 0x70, 0x20, 0x0d, 0x0a, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x2d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73,
495 /* -0880, */ 0x3a, 0x20, 0x46, 0x65, 0x62, 0x20, 0x0d, 0x0a, 0x61, 0x3d, 0x69, 0x6e, 0x61, 0x63, 0x74, 0x69,
496 /* -0890, */ 0x76, 0x65, 0x52, 0x54, 0x50, 0x2f, 0x53, 0x41, 0x56, 0x50, 0x20, 0x52, 0x54, 0x50, 0x2f, 0x41,
497 /* -08A0, */ 0x56, 0x50, 0x46, 0x20, 0x41, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x6f, 0x75, 0x73, 0x69, 0x70, 0x73,
498 /* -08B0, */ 0x3a, 0x0d, 0x0a, 0x61, 0x3d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x74, 0x65, 0x73, 0x74, 0x65, 0x6c,
499 /* -08C0, */ 0x3a, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x20, 0x0d, 0x0a, 0x61, 0x3d, 0x72, 0x65, 0x63,
500 /* -08D0, */ 0x76, 0x6f, 0x6e, 0x6c, 0x79, 0x0d, 0x0a, 0x61, 0x3d, 0x73, 0x65, 0x6e, 0x64, 0x6f, 0x6e, 0x6c,
501 /* -08E0, */ 0x79, 0x0d, 0x0a, 0x63, 0x3d, 0x49, 0x4e, 0x20, 0x49, 0x50, 0x34, 0x20, 0x0d, 0x0a, 0x52, 0x65,
502 /* -08F0, */ 0x61, 0x73, 0x6f, 0x6e, 0x3a, 0x20, 0x0d, 0x0a, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x3a, 0x20, 0x0d,
503 /* -0900, */ 0x0a, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x0d, 0x0a, 0x50, 0x61, 0x74, 0x68, 0x3a, 0x20,
504 /* -0910, */ 0x3b, 0x75, 0x73, 0x65, 0x72, 0x3d, 0x0d, 0x0a, 0x62, 0x3d, 0x41, 0x53, 0x20, 0x43, 0x54, 0x20,
505 /* -0920, */ 0x0d, 0x0a, 0x57, 0x57, 0x57, 0x2d, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61,
506 /* -0930, */ 0x74, 0x65, 0x3a, 0x20, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x20, 0x0d, 0x0a, 0x61, 0x3d, 0x73,
507 /* -0940, */ 0x65, 0x6e, 0x64, 0x72, 0x65, 0x63, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x63, 0x74, 0x65, 0x74, 0x2d,
508 /* -0950, */ 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3d, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,
509 /* -0960, */ 0x6e, 0x2f, 0x73, 0x64, 0x70, 0x61, 0x74, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x70, 0x61,
510 /* -0970, */ 0x75, 0x74, 0x68, 0x3d, 0x0d, 0x0a, 0x61, 0x3d, 0x6f, 0x72, 0x69, 0x65, 0x6e, 0x74, 0x3a, 0x70,
511 /* -0980, */ 0x6f, 0x72, 0x74, 0x72, 0x61, 0x69, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x74, 0x72, 0x2d,
512 /* -0990, */ 0x69, 0x6e, 0x74, 0x69, 0x63, 0x6f, 0x6e, 0x63, 0x3d, 0x34, 0x38, 0x33, 0x20, 0x54, 0x6f, 0x6f,
513 /* -09A0, */ 0x20, 0x4d, 0x61, 0x6e, 0x79, 0x20, 0x48, 0x6f, 0x70, 0x73, 0x6c, 0x69, 0x6e, 0x66, 0x6f, 0x70,
514 /* -09B0, */ 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x3d, 0x36, 0x30,
515 /* -09C0, */ 0x34, 0x20, 0x44, 0x6f, 0x65, 0x73, 0x20, 0x4e, 0x6f, 0x74, 0x20, 0x45, 0x78, 0x69, 0x73, 0x74,
516 /* -09D0, */ 0x20, 0x41, 0x6e, 0x79, 0x77, 0x68, 0x65, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x3d,
517 /* -09E0, */ 0x0d, 0x0a, 0x0d, 0x0a, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2d, 0x44, 0x69, 0x73, 0x70,
518 /* -09F0, */ 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x4d, 0x44, 0x35, 0x38, 0x30, 0x20, 0x50,
519 /* -0A00, */ 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x46, 0x61, 0x69, 0x6c,
520 /* -0A10, */ 0x75, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x73, 0x34, 0x32, 0x32, 0x20, 0x53, 0x65, 0x73,
521 /* -0A20, */ 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x20, 0x54, 0x6f,
522 /* -0A30, */ 0x6f, 0x20, 0x53, 0x6d, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x31, 0x38, 0x31, 0x20, 0x43,
523 /* -0A40, */ 0x61, 0x6c, 0x6c, 0x20, 0x49, 0x73, 0x20, 0x42, 0x65, 0x69, 0x6e, 0x67, 0x20, 0x46, 0x6f, 0x72,
524 /* -0A50, */ 0x77, 0x61, 0x72, 0x64, 0x65, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x3d, 0x66, 0x61, 0x69, 0x6c,
525 /* -0A60, */ 0x75, 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x3d, 0x53, 0x55, 0x42, 0x53,
526 /* -0A70, */ 0x43, 0x52, 0x49, 0x42, 0x45, 0x20, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69,
527 /* -0A80, */ 0x6f, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x70, 0x73, 0x65, 0x63, 0x2d, 0x6d, 0x61, 0x6e,
528 /* -0A90, */ 0x64, 0x61, 0x74, 0x6f, 0x72, 0x79, 0x34, 0x31, 0x33, 0x20, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
529 /* -0AA0, */ 0x74, 0x20, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x20, 0x54, 0x6f, 0x6f, 0x20, 0x4c, 0x61, 0x72,
530 /* -0AB0, */ 0x67, 0x65, 0x32, 0x65, 0x31, 0x38, 0x33, 0x20, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20,
531 /* -0AC0, */ 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x63, 0x74, 0x70, 0x34, 0x38, 0x36, 0x20, 0x42,
532 /* -0AD0, */ 0x75, 0x73, 0x79, 0x20, 0x48, 0x65, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e,
533 /* -0AE0, */ 0x61, 0x74, 0x65, 0x64, 0x41, 0x4b, 0x41, 0x76, 0x31, 0x2d, 0x4d, 0x44, 0x35, 0x2d, 0x73, 0x65,
534 /* -0AF0, */ 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x6f, 0x6e, 0x65, 0x0d, 0x0a, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72,
535 /* -0B00, */ 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x36, 0x30, 0x33, 0x20, 0x44, 0x65, 0x63,
536 /* -0B10, */ 0x6c, 0x69, 0x6e, 0x65, 0x78, 0x74, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x3d, 0x34, 0x38, 0x35, 0x20,
537 /* -0B20, */ 0x41, 0x6d, 0x62, 0x69, 0x67, 0x75, 0x6f, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
538 /* -0B30, */ 0x61, 0x75, 0x64, 0x69, 0x6f, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54,
539 /* -0B40, */ 0x79, 0x70, 0x65, 0x3a, 0x20, 0x4d, 0x61, 0x72, 0x20, 0x0d, 0x0a, 0x52, 0x65, 0x63, 0x6f, 0x72,
540 /* -0B50, */ 0x64, 0x2d, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x3a, 0x20, 0x4a, 0x75, 0x6c, 0x20, 0x34, 0x30, 0x31,
541 /* -0B60, */ 0x20, 0x55, 0x6e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x0d, 0x0a, 0x52,
542 /* -0B70, */ 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x3a, 0x20, 0x0d, 0x0a, 0x74, 0x3d, 0x30, 0x20, 0x30, 0x2e,
543 /* -0B80, */ 0x30, 0x2e, 0x30, 0x2e, 0x30, 0x0d, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x52,
544 /* -0B90, */ 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x20, 0x0d, 0x0a, 0x63, 0x3d, 0x49, 0x4e, 0x20, 0x49,
545 /* -0BA0, */ 0x50, 0x36, 0x20, 0x31, 0x38, 0x30, 0x20, 0x52, 0x69, 0x6e, 0x67, 0x69, 0x6e, 0x67, 0x31, 0x30,
546 /* -0BB0, */ 0x30, 0x20, 0x54, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x76, 0x3d, 0x30, 0x0d, 0x0a, 0x6f, 0x3d, 0x55,
547 /* -0BC0, */ 0x50, 0x44, 0x41, 0x54, 0x45, 0x20, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x59, 0x20, 0x0d, 0x0a, 0x53,
548 /* -0BD0, */ 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x3a, 0x20, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77,
549 /* -0BE0, */ 0x6e, 0x41, 0x4d, 0x52, 0x54, 0x50, 0x2f, 0x41, 0x56, 0x50, 0x20, 0x0d, 0x0a, 0x50, 0x72, 0x69,
550 /* -0BF0, */ 0x76, 0x61, 0x63, 0x79, 0x3a, 0x20, 0x0d, 0x0a, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79,
551 /* -0C00, */ 0x2d, 0x0d, 0x0a, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x3a, 0x20, 0x0d, 0x0a, 0x61, 0x3d,
552 /* -0C10, */ 0x72, 0x74, 0x70, 0x6d, 0x61, 0x70, 0x3a, 0x0d, 0x0a, 0x6d, 0x3d, 0x76, 0x69, 0x64, 0x65, 0x6f,
553 /* -0C20, */ 0x20, 0x0d, 0x0a, 0x6d, 0x3d, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x20, 0x0d, 0x0a, 0x73, 0x3d, 0x20,
554 /* -0C30, */ 0x66, 0x61, 0x6c, 0x73, 0x65, 0x0d, 0x0a, 0x61, 0x3d, 0x63, 0x6f, 0x6e, 0x66, 0x3a, 0x3b, 0x65,
555 /* -0C40, */ 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x3d, 0x0d, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x3a, 0x20,
556 /* -0C50, */ 0x0d, 0x0a, 0x61, 0x3d, 0x66, 0x6d, 0x74, 0x70, 0x3a, 0x0d, 0x0a, 0x61, 0x3d, 0x63, 0x75, 0x72,
557 /* -0C60, */ 0x72, 0x3a, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79,
558 /* -0C70, */ 0x3a, 0x20, 0x0d, 0x0a, 0x61, 0x3d, 0x64, 0x65, 0x73, 0x3a, 0x0d, 0x0a, 0x52, 0x41, 0x63, 0x6b,
559 /* -0C80, */ 0x3a, 0x20, 0x0d, 0x0a, 0x52, 0x53, 0x65, 0x71, 0x3a, 0x20, 0x42, 0x59, 0x45, 0x20, 0x63, 0x6e,
560 /* -0C90, */ 0x6f, 0x6e, 0x63, 0x65, 0x3d, 0x31, 0x30, 0x30, 0x72, 0x65, 0x6c, 0x75, 0x72, 0x69, 0x3d, 0x71,
561 /* -0CA0, */ 0x6f, 0x70, 0x3d, 0x54, 0x43, 0x50, 0x55, 0x44, 0x50, 0x71, 0x6f, 0x73, 0x78, 0x6d, 0x6c, 0x3b,
562 /* -0CB0, */ 0x6c, 0x72, 0x0d, 0x0a, 0x56, 0x69, 0x61, 0x3a, 0x20, 0x53, 0x49, 0x50, 0x2f, 0x32, 0x2e, 0x30,
563 /* -0CC0, */ 0x2f, 0x54, 0x43, 0x50, 0x20, 0x34, 0x30, 0x38, 0x20, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
564 /* -0CD0, */ 0x20, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x70, 0x73, 0x69, 0x70,
565 /* -0CE0, */ 0x3a, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c, 0x65, 0x6e, 0x67, 0x74,
566 /* -0CF0, */ 0x68, 0x3a, 0x20, 0x4f, 0x63, 0x74, 0x20, 0x0d, 0x0a, 0x56, 0x69, 0x61, 0x3a, 0x20, 0x53, 0x49,
567 /* -0D00, */ 0x50, 0x2f, 0x32, 0x2e, 0x30, 0x2f, 0x55, 0x44, 0x50, 0x20, 0x3b, 0x63, 0x6f, 0x6d, 0x70, 0x3d,
568 /* -0D10, */ 0x73, 0x69, 0x67, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x6f, 0x62, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61,
569 /* -0D20, */ 0x63, 0x6b, 0x3b, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x3d, 0x7a, 0x39, 0x68, 0x47, 0x34, 0x62,
570 /* -0D30, */ 0x4b, 0x0d, 0x0a, 0x4d, 0x61, 0x78, 0x2d, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x73, 0x3a,
571 /* -0D40, */ 0x20, 0x41, 0x70, 0x72, 0x20, 0x53, 0x43, 0x54, 0x50, 0x52, 0x41, 0x43, 0x4b, 0x20, 0x49, 0x4e,
572 /* -0D50, */ 0x56, 0x49, 0x54, 0x45, 0x20, 0x0d, 0x0a, 0x43, 0x61, 0x6c, 0x6c, 0x2d, 0x49, 0x44, 0x3a, 0x20,
573 /* -0D60, */ 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x3a, 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f,
574 /* -0D70, */ 0x4b, 0x0d, 0x0a, 0x46, 0x72, 0x6f, 0x6d, 0x3a, 0x20, 0x0d, 0x0a, 0x43, 0x53, 0x65, 0x71, 0x3a,
575 /* -0D80, */ 0x20, 0x0d, 0x0a, 0x54, 0x6f, 0x3a, 0x20, 0x3b, 0x74, 0x61, 0x67, 0x3d, 0x04, 0x10, 0xdd, 0x10,
576 /* -0D90, */ 0x11, 0x31, 0x0d, 0x11, 0x0a, 0x07, 0x10, 0xb9, 0x0c, 0x10, 0xfe, 0x12, 0x10, 0xe1, 0x06, 0x11,
577 /* -0DA0, */ 0x4e, 0x07, 0x11, 0x4e, 0x03, 0x11, 0x4a, 0x04, 0x11, 0x4a, 0x07, 0x10, 0xb2, 0x08, 0x11, 0x79,
578 /* -0DB0, */ 0x06, 0x11, 0x81, 0x0f, 0x11, 0x22, 0x0b, 0x11, 0x55, 0x06, 0x11, 0x6b, 0x0b, 0x11, 0x60, 0x13,
579 /* -0DC0, */ 0x10, 0xb2, 0x08, 0x11, 0x71, 0x05, 0x11, 0x87, 0x13, 0x10, 0xf7, 0x09, 0x0e, 0x8d, 0x08, 0x0d,
580 /* -0DD0, */ 0xae, 0x0c, 0x10, 0xb9, 0x07, 0x10, 0x8e, 0x03, 0x0d, 0x96, 0x03, 0x10, 0x8a, 0x04, 0x10, 0x8a,
581 /* -0DE0, */ 0x09, 0x0d, 0xd7, 0x0a, 0x0f, 0x12, 0x08, 0x0f, 0x8f, 0x09, 0x0f, 0x8f, 0x08, 0x0d, 0x6c, 0x06,
582 /* -0DF0, */ 0x0e, 0x66, 0x09, 0x0e, 0x6c, 0x0a, 0x0e, 0x6c, 0x06, 0x0f, 0xc6, 0x07, 0x0f, 0xc6, 0x05, 0x11,
583 /* -0E00, */ 0x48, 0x06, 0x11, 0x48, 0x06, 0x0f, 0xbf, 0x07, 0x0f, 0xbf, 0x07, 0x0e, 0x55, 0x06, 0x0f, 0x16,
584 /* -0E10, */ 0x04, 0x0e, 0xf4, 0x03, 0x0e, 0xb1, 0x03, 0x10, 0xa6, 0x09, 0x10, 0x50, 0x03, 0x10, 0xa3, 0x0a,
585 /* -0E20, */ 0x0d, 0xb4, 0x05, 0x0e, 0x36, 0x06, 0x0e, 0xd6, 0x03, 0x0d, 0xf9, 0x11, 0x0e, 0xf8, 0x04, 0x0c,
586 /* -0E30, */ 0xd9, 0x08, 0x0e, 0xea, 0x04, 0x09, 0x53, 0x03, 0x0a, 0x4b, 0x04, 0x0e, 0xe4, 0x10, 0x0f, 0x35,
587 /* -0E40, */ 0x09, 0x0e, 0xe4, 0x08, 0x0d, 0x3f, 0x03, 0x0f, 0xe1, 0x0b, 0x10, 0x01, 0x03, 0x10, 0xac, 0x06,
588 /* -0E50, */ 0x10, 0x95, 0x0c, 0x0e, 0x76, 0x0b, 0x0f, 0xeb, 0x0a, 0x0f, 0xae, 0x05, 0x10, 0x2b, 0x04, 0x10,
589 /* -0E60, */ 0x2b, 0x08, 0x10, 0x7a, 0x10, 0x0f, 0x49, 0x07, 0x0f, 0xb8, 0x09, 0x10, 0x3e, 0x0b, 0x10, 0x0c,
590 /* -0E70, */ 0x07, 0x0f, 0x78, 0x0b, 0x0f, 0x6d, 0x09, 0x10, 0x47, 0x08, 0x10, 0x82, 0x0b, 0x0f, 0xf6, 0x08,
591 /* -0E80, */ 0x10, 0x62, 0x08, 0x0f, 0x87, 0x08, 0x10, 0x6a, 0x04, 0x0f, 0x78, 0x0d, 0x0f, 0xcd, 0x08, 0x0d,
592 /* -0E90, */ 0xae, 0x10, 0x0f, 0x5d, 0x0b, 0x0f, 0x98, 0x14, 0x0d, 0x20, 0x1b, 0x0d, 0x20, 0x04, 0x0d, 0xe0,
593 /* -0EA0, */ 0x14, 0x0e, 0xb4, 0x0b, 0x0f, 0xa3, 0x0b, 0x07, 0x34, 0x0f, 0x0d, 0x56, 0x04, 0x0e, 0xf4, 0x03,
594 /* -0EB0, */ 0x10, 0xaf, 0x07, 0x0d, 0x34, 0x09, 0x0f, 0x27, 0x04, 0x10, 0x9b, 0x04, 0x10, 0x9f, 0x09, 0x10,
595 /* -0EC0, */ 0x59, 0x08, 0x10, 0x72, 0x09, 0x10, 0x35, 0x0a, 0x10, 0x21, 0x0a, 0x10, 0x17, 0x08, 0x0f, 0xe3,
596 /* -0ED0, */ 0x03, 0x10, 0xa9, 0x05, 0x0c, 0xac, 0x04, 0x0c, 0xbd, 0x07, 0x0c, 0xc1, 0x08, 0x0c, 0xc1, 0x09,
597 /* -0EE0, */ 0x0c, 0xf6, 0x10, 0x0c, 0x72, 0x0c, 0x0c, 0x86, 0x04, 0x0d, 0x64, 0x0c, 0x0c, 0xd5, 0x09, 0x0c,
598 /* -0EF0, */ 0xff, 0x1b, 0x0b, 0xfc, 0x11, 0x0c, 0x5d, 0x13, 0x0c, 0x30, 0x09, 0x0c, 0xa4, 0x0c, 0x0c, 0x24,
599 /* -0F00, */ 0x0c, 0x0d, 0x3b, 0x03, 0x0d, 0x1a, 0x03, 0x0d, 0x1d, 0x16, 0x0c, 0x43, 0x09, 0x0c, 0x92, 0x09,
600 /* -0F10, */ 0x0c, 0x9b, 0x0d, 0x0e, 0xcb, 0x04, 0x0d, 0x16, 0x06, 0x0d, 0x10, 0x05, 0x04, 0xf2, 0x0b, 0x0c,
601 /* -0F20, */ 0xe1, 0x05, 0x0b, 0xde, 0x0a, 0x0c, 0xec, 0x13, 0x0b, 0xe3, 0x07, 0x0b, 0xd4, 0x08, 0x0d, 0x08,
602 /* -0F30, */ 0x0c, 0x0c, 0xc9, 0x09, 0x0c, 0x3a, 0x04, 0x0a, 0xe5, 0x0c, 0x0a, 0x23, 0x08, 0x0b, 0x3a, 0x0e,
603 /* -0F40, */ 0x09, 0xab, 0x0f, 0x0e, 0xfa, 0x09, 0x0f, 0x6f, 0x0c, 0x0a, 0x17, 0x0f, 0x09, 0x76, 0x0c, 0x0a,
604 /* -0F50, */ 0x5f, 0x17, 0x0d, 0xe2, 0x0f, 0x07, 0xa8, 0x0a, 0x0f, 0x85, 0x0f, 0x08, 0xd6, 0x0e, 0x09, 0xb9,
605 /* -0F60, */ 0x0b, 0x0a, 0x7a, 0x03, 0x0b, 0xdb, 0x03, 0x08, 0xc1, 0x04, 0x0e, 0xc7, 0x03, 0x08, 0xd3, 0x02,
606 /* -0F70, */ 0x04, 0x8d, 0x08, 0x0b, 0x4a, 0x05, 0x0b, 0x8c, 0x07, 0x0b, 0x61, 0x06, 0x05, 0x48, 0x04, 0x07,
607 /* -0F80, */ 0xf4, 0x05, 0x10, 0x30, 0x04, 0x07, 0x1e, 0x08, 0x07, 0x1e, 0x05, 0x0b, 0x91, 0x10, 0x04, 0xca,
608 /* -0F90, */ 0x09, 0x0a, 0x71, 0x09, 0x0e, 0x87, 0x05, 0x04, 0x98, 0x05, 0x0b, 0x6e, 0x0b, 0x04, 0x9b, 0x0f,
609 /* -0FA0, */ 0x04, 0x9b, 0x07, 0x04, 0x9b, 0x03, 0x04, 0xa3, 0x07, 0x04, 0xa3, 0x10, 0x07, 0x98, 0x09, 0x07,
610 /* -0FB0, */ 0x98, 0x05, 0x0b, 0x73, 0x05, 0x0b, 0x78, 0x05, 0x0b, 0x7d, 0x05, 0x07, 0xb9, 0x05, 0x0b, 0x82,
611 /* -0FC0, */ 0x05, 0x0b, 0x87, 0x05, 0x0b, 0x1d, 0x05, 0x08, 0xe4, 0x05, 0x0c, 0x81, 0x05, 0x0f, 0x44, 0x05,
612 /* -0FD0, */ 0x11, 0x40, 0x05, 0x08, 0x78, 0x05, 0x08, 0x9d, 0x05, 0x0f, 0x58, 0x05, 0x07, 0x3f, 0x05, 0x0c,
613 /* -0FE0, */ 0x6d, 0x05, 0x10, 0xf2, 0x05, 0x0c, 0x58, 0x05, 0x06, 0xa9, 0x04, 0x07, 0xb6, 0x09, 0x05, 0x8c,
614 /* -0FF0, */ 0x06, 0x06, 0x1a, 0x06, 0x0e, 0x81, 0x0a, 0x06, 0x16, 0x0a, 0x0a, 0xc4, 0x07, 0x0b, 0x5a, 0x0a,
615 /* -1000, */ 0x0a, 0xba, 0x03, 0x0b, 0x1b, 0x04, 0x11, 0x45, 0x06, 0x0c, 0x8c, 0x07, 0x05, 0xad, 0x0a, 0x0e,
616 /* -1010, */ 0xda, 0x08, 0x0b, 0x42, 0x0d, 0x09, 0xf7, 0x0b, 0x05, 0x1c, 0x09, 0x11, 0x16, 0x08, 0x05, 0xc9,
617 /* -1020, */ 0x07, 0x0d, 0x86, 0x06, 0x0b, 0xcf, 0x0a, 0x06, 0x4d, 0x04, 0x0b, 0xa2, 0x06, 0x06, 0x8d, 0x08,
618 /* -1030, */ 0x05, 0xe6, 0x08, 0x0e, 0x11, 0x0b, 0x0a, 0x9b, 0x03, 0x0a, 0x04, 0x03, 0x0b, 0xb5, 0x05, 0x10,
619 /* -1040, */ 0xd7, 0x04, 0x09, 0x94, 0x05, 0x0a, 0xe2, 0x03, 0x0b, 0xb2, 0x06, 0x0d, 0x67, 0x04, 0x0d, 0x11,
620 /* -1050, */ 0x08, 0x08, 0xb7, 0x1b, 0x0e, 0x3b, 0x0a, 0x09, 0xa1, 0x14, 0x04, 0x85, 0x15, 0x07, 0x83, 0x15,
621 /* -1060, */ 0x07, 0x6e, 0x0d, 0x09, 0x3d, 0x17, 0x06, 0xae, 0x0f, 0x07, 0xe6, 0x14, 0x07, 0xbe, 0x0d, 0x06,
622 /* -1070, */ 0x0a, 0x0d, 0x09, 0x30, 0x16, 0x06, 0xf2, 0x12, 0x08, 0x1e, 0x21, 0x04, 0xaa, 0x13, 0x10, 0xc5,
623 /* -1080, */ 0x08, 0x0a, 0x0f, 0x1c, 0x0e, 0x96, 0x18, 0x0b, 0xb8, 0x1a, 0x05, 0x95, 0x1a, 0x05, 0x75, 0x11,
624 /* -1090, */ 0x06, 0x3d, 0x16, 0x06, 0xdc, 0x1e, 0x0e, 0x19, 0x16, 0x05, 0xd1, 0x1d, 0x06, 0x20, 0x23, 0x05,
625 /* -10A0, */ 0x27, 0x11, 0x08, 0x7d, 0x11, 0x0d, 0x99, 0x16, 0x04, 0xda, 0x0d, 0x0f, 0x1c, 0x16, 0x07, 0x08,
626 /* -10B0, */ 0x17, 0x05, 0xb4, 0x0d, 0x08, 0xc7, 0x13, 0x07, 0xf8, 0x12, 0x08, 0x57, 0x1f, 0x04, 0xfe, 0x19,
627 /* -10C0, */ 0x05, 0x4e, 0x13, 0x08, 0x0b, 0x0f, 0x08, 0xe9, 0x17, 0x06, 0xc5, 0x13, 0x06, 0x7b, 0x19, 0x05,
628 /* -10D0, */ 0xf1, 0x15, 0x07, 0x44, 0x18, 0x0d, 0xfb, 0x0b, 0x0f, 0x09, 0x1b, 0x0d, 0xbe, 0x12, 0x08, 0x30,
629 /* -10E0, */ 0x15, 0x07, 0x59, 0x04, 0x0b, 0xa6, 0x04, 0x0b, 0xae, 0x04, 0x0b, 0x9e, 0x04, 0x0b, 0x96, 0x04,
630 /* -10F0, */ 0x0b, 0x9a, 0x0a, 0x0a, 0xb0, 0x0b, 0x0a, 0x90, 0x08, 0x0b, 0x32, 0x0b, 0x09, 0x6b, 0x08, 0x0b,
631 /* -1100, */ 0x2a, 0x0b, 0x0a, 0x85, 0x09, 0x0b, 0x12, 0x0a, 0x0a, 0xa6, 0x0d, 0x09, 0xea, 0x13, 0x0d, 0x74,
632 /* -1110, */ 0x14, 0x07, 0xd2, 0x13, 0x09, 0x0b, 0x12, 0x08, 0x42, 0x10, 0x09, 0x5b, 0x12, 0x09, 0x1e, 0x0d,
633 /* -1120, */ 0x0c, 0xb1, 0x0e, 0x0c, 0x17, 0x11, 0x09, 0x4a, 0x0c, 0x0a, 0x53, 0x0c, 0x0a, 0x47, 0x09, 0x0a,
634 /* -1130, */ 0xf7, 0x0e, 0x09, 0xc7, 0x0c, 0x0a, 0x3b, 0x07, 0x06, 0x69, 0x08, 0x06, 0x69, 0x06, 0x09, 0xe3,
635 /* -1140, */ 0x08, 0x0b, 0x52, 0x0a, 0x0a, 0xd8, 0x12, 0x06, 0x57, 0x0d, 0x06, 0x57, 0x07, 0x09, 0xe3, 0x04,
636 /* -1150, */ 0x0a, 0xe9, 0x10, 0x07, 0x30, 0x09, 0x0b, 0x00, 0x0c, 0x0a, 0x2f, 0x05, 0x0a, 0xe9, 0x05, 0x0a,
637 /* -1160, */ 0x6b, 0x06, 0x0a, 0x6b, 0x0a, 0x0a, 0xce, 0x09, 0x0a, 0xee, 0x03, 0x0b, 0xdb, 0x07, 0x0f, 0x7e,
638 /* -1170, */ 0x0a, 0x09, 0x97, 0x0a, 0x06, 0x71, 0x0e, 0x09, 0xd5, 0x17, 0x06, 0x93, 0x07, 0x0e, 0x5c, 0x07,
639 /* -1180, */ 0x0f, 0xda, 0x0a, 0x0f, 0x35, 0x0d, 0x0d, 0xec, 0x0a, 0x09, 0x97, 0x0a, 0x06, 0x71, 0x08, 0x0b,
640 /* -1190, */ 0x22, 0x0f, 0x09, 0x85, 0x06, 0x0b, 0x68, 0x0c, 0x0d, 0x4a, 0x09, 0x0b, 0x09, 0x13, 0x08, 0xf8,
641 /* -11A0, */ 0x15, 0x08, 0xa2, 0x04, 0x0b, 0xaa, 0x0f, 0x05, 0x66, 0x0d, 0x07, 0x23, 0x09, 0x0a, 0x06, 0x0b,
642 /* -11B0, */ 0x0d, 0x4a, 0x0f, 0x04, 0xee, 0x06, 0x04, 0xf8, 0x04, 0x09, 0x2b, 0x04, 0x08, 0x53, 0x07, 0x08,
643 /* -11C0, */ 0xc0, 0x03, 0x11, 0x1f, 0x04, 0x11, 0x1e, 0x07, 0x0d, 0x8c, 0x03, 0x07, 0x34, 0x04, 0x10, 0xdb,
644 /* -11D0, */ 0x03, 0x07, 0x36, 0x03, 0x0d, 0xa9, 0x0d, 0x04, 0x20, 0x0b, 0x04, 0x51, 0x0c, 0x04, 0x3a, 0x04,
645 /* -11E0, */ 0x0b, 0xb8, 0x04, 0x0c, 0x24, 0x04, 0x05, 0x95, 0x04, 0x04, 0x7c, 0x04, 0x05, 0x75, 0x04, 0x04,
646 /* -11F0, */ 0x85, 0x04, 0x09, 0x6b, 0x04, 0x06, 0x3d, 0x06, 0x04, 0x7b, 0x04, 0x06, 0xdc, 0x04, 0x07, 0x83,
647 /* -1200, */ 0x04, 0x0e, 0x19, 0x12, 0x04, 0x00, 0x10, 0x08, 0x8e, 0x10, 0x08, 0x69, 0x0e, 0x04, 0x12, 0x0d,
648 /* -1210, */ 0x04, 0x2d, 0x03, 0x10, 0xb9, 0x04, 0x05, 0xd1, 0x04, 0x07, 0x6e, 0x04, 0x06, 0x20, 0x07, 0x04,
649 /* -1220, */ 0x74, 0x04, 0x0b, 0xfc, 0x0a, 0x04, 0x5c, 0x04, 0x05, 0x27, 0x04, 0x09, 0x3d, 0x04, 0x08, 0x7d,
650 /* -1230, */ 0x04, 0x0f, 0xae, 0x04, 0x0d, 0x99, 0x04, 0x06, 0xae, 0x04, 0x04, 0xda, 0x09, 0x04, 0x09, 0x08,
651 /* -1240, */ 0x11, 0x22, 0x04, 0x0f, 0x1c, 0x04, 0x07, 0xe6, 0x04, 0x0e, 0xcb, 0x05, 0x08, 0xbd, 0x04, 0x07,
652 /* -1250, */ 0x08, 0x04, 0x0f, 0xa3, 0x04, 0x06, 0x57, 0x04, 0x05, 0xb4, 0x04, 0x0f, 0x5d, 0x04, 0x08, 0xc7,
653 /* -1260, */ 0x08, 0x0b, 0xf4, 0x04, 0x07, 0xf8, 0x04, 0x07, 0x30, 0x04, 0x07, 0xbe, 0x04, 0x08, 0x57, 0x05,
654 /* -1270, */ 0x0d, 0x46, 0x04, 0x04, 0xfe, 0x04, 0x06, 0x0a, 0x04, 0x05, 0x4e, 0x04, 0x0e, 0x3b, 0x04, 0x08,
655 /* -1280, */ 0x0b, 0x04, 0x09, 0x30, 0x04, 0x08, 0xe9, 0x05, 0x05, 0xee, 0x04, 0x06, 0xc5, 0x04, 0x06, 0xf2,
656 /* -1290, */ 0x04, 0x06, 0x7b, 0x04, 0x09, 0xa1, 0x04, 0x05, 0xf1, 0x04, 0x08, 0x1e, 0x04, 0x07, 0x44, 0x04,
657 /* -12A0, */ 0x0b, 0xdd, 0x04, 0x0d, 0xfb, 0x04, 0x04, 0xaa, 0x04, 0x0b, 0xe3, 0x07, 0x0e, 0xee, 0x04, 0x0f,
658 /* -12B0, */ 0x09, 0x04, 0x0e, 0xb4, 0x04, 0x0d, 0xbe, 0x04, 0x10, 0xc5, 0x04, 0x08, 0x30, 0x05, 0x0f, 0x30,
659 /* -12C0, */ 0x04, 0x07, 0x59, 0x04, 0x0a, 0x0f, 0x06, 0x0e, 0x61, 0x04, 0x04, 0x81, 0x04, 0x0d, 0xab, 0x04,
660 /* -12D0, */ 0x0d, 0x93, 0x04, 0x11, 0x6b, 0x04, 0x0e, 0x96, 0x05, 0x04, 0x66, 0x09, 0x04, 0x6b, 0x0b, 0x04,
661 /* -12E0, */ 0x46, 0x04, 0x0c, 0xe1
667 * The Presence-Specific Static Dictionary for Signaling
668 * https://www.ietf.org/rfc/rfc5112
670 #define PRESENCE_STATE_LENGTH 0x0d93
672 static const uint8_t presence_state_identifier
[STATE_BUFFER_SIZE
] =
674 /* -0000, */ 0xd9, 0x42, 0x29, 0x7d, 0x0b, 0xb3, 0x8f, 0xc0, 0x1d, 0x67, 0x41, 0xd6, 0xb3, 0xb4, 0x81, 0x57,
675 /* -0010, */ 0xac, 0x8e, 0x1b, 0xe0
678 static const uint8_t presence_static_dictionary_for_sigcomp
[PRESENCE_STATE_LENGTH
] =
680 /* -0000, */ 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x63, 0x65, 0x6e, 0x74, 0x65,
681 /* -0010, */ 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x65, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64,
682 /* -0020, */ 0x69, 0x73, 0x67, 0x75, 0x73, 0x74, 0x65, 0x64, 0x69, 0x6e, 0x64, 0x75, 0x73, 0x74, 0x72, 0x69,
683 /* -0030, */ 0x61, 0x6c, 0x61, 0x73, 0x74, 0x2d, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x3d, 0x68, 0x75, 0x6d, 0x69,
684 /* -0040, */ 0x6c, 0x69, 0x61, 0x74, 0x65, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x3d, 0x61, 0x75, 0x74, 0x6f,
685 /* -0050, */ 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x63, 0x75, 0x72, 0x69, 0x6f, 0x75, 0x73, 0x70, 0x69, 0x72,
686 /* -0060, */ 0x69, 0x74, 0x73, 0x2d, 0x49, 0x4e, 0x44, 0x50, 0x73, 0x65, 0x6e, 0x64, 0x2d, 0x6f, 0x6e, 0x6c,
687 /* -0070, */ 0x79, 0x70, 0x61, 0x74, 0x68, 0x65, 0x61, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x6c, 0x65, 0x73,
688 /* -0080, */ 0x73, 0x6c, 0x65, 0x65, 0x70, 0x79, 0x69, 0x6e, 0x2d, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61,
689 /* -0090, */ 0x6c, 0x6f, 0x6e, 0x65, 0x6c, 0x79, 0x70, 0x6c, 0x61, 0x79, 0x66, 0x75, 0x6c, 0x6f, 0x77, 0x65,
690 /* -00A0, */ 0x72, 0x74, 0x68, 0x61, 0x6e, 0x6e, 0x6f, 0x79, 0x65, 0x64, 0x75, 0x6e, 0x63, 0x6f, 0x6d, 0x66,
691 /* -00B0, */ 0x6f, 0x72, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x3d, 0x63, 0x6f,
692 /* -00C0, */ 0x6e, 0x66, 0x75, 0x73, 0x65, 0x64, 0x76, 0x61, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x63, 0x6c,
693 /* -00D0, */ 0x75, 0x62, 0x75, 0x73, 0x2d, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x69, 0x72, 0x63,
694 /* -00E0, */ 0x72, 0x61, 0x66, 0x74, 0x68, 0x69, 0x72, 0x73, 0x74, 0x79, 0x63, 0x6f, 0x75, 0x72, 0x69, 0x65,
695 /* -00F0, */ 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x68, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x66, 0x6f,
696 /* -0100, */ 0x66, 0x66, 0x69, 0x63, 0x65, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x3d, 0x61, 0x72, 0x65, 0x6e,
697 /* -0110, */ 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3d, 0x52, 0x45, 0x46, 0x45, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54,
698 /* -0120, */ 0x45, 0x52, 0x77, 0x61, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x72, 0x75, 0x6d, 0x70, 0x79, 0x70, 0x72,
699 /* -0130, */ 0x65, 0x66, 0x69, 0x78, 0x3d, 0x68, 0x61, 0x6c, 0x66, 0x72, 0x65, 0x69, 0x67, 0x68, 0x74, 0x6d,
700 /* -0140, */ 0x65, 0x61, 0x6e, 0x67, 0x72, 0x79, 0x53, 0x55, 0x42, 0x53, 0x43, 0x52, 0x49, 0x42, 0x45, 0x70,
701 /* -0150, */ 0x72, 0x6f, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x3d,
702 /* -0160, */ 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x68, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x79, 0x75,
703 /* -0170, */ 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x70, 0x61, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x4d, 0x45, 0x53,
704 /* -0180, */ 0x53, 0x41, 0x47, 0x45, 0x77, 0x6f, 0x72, 0x72, 0x69, 0x65, 0x64, 0x68, 0x75, 0x6d, 0x62, 0x6c,
705 /* -0190, */ 0x65, 0x64, 0x61, 0x69, 0x72, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x73, 0x68, 0x61, 0x6d, 0x65, 0x64,
706 /* -01A0, */ 0x70, 0x6c, 0x61, 0x79, 0x69, 0x6e, 0x67, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x68, 0x75,
707 /* -01B0, */ 0x6e, 0x67, 0x72, 0x79, 0x63, 0x72, 0x61, 0x6e, 0x6b, 0x79, 0x61, 0x6d, 0x61, 0x7a, 0x65, 0x64,
708 /* -01C0, */ 0x61, 0x66, 0x72, 0x61, 0x69, 0x64, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x4e, 0x4f, 0x54, 0x49,
709 /* -01D0, */ 0x46, 0x59, 0x49, 0x4e, 0x56, 0x49, 0x54, 0x45, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x66, 0x72,
710 /* -01E0, */ 0x69, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x73, 0x74, 0x61, 0x6c, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79,
711 /* -01F0, */ 0x70, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x5f, 0x61, 0x77, 0x65, 0x62, 0x72, 0x61, 0x76,
712 /* -0200, */ 0x65, 0x71, 0x75, 0x69, 0x65, 0x74, 0x62, 0x6f, 0x72, 0x65, 0x64, 0x50, 0x52, 0x41, 0x43, 0x4b,
713 /* -0210, */ 0x70, 0x72, 0x6f, 0x75, 0x64, 0x66, 0x69, 0x78, 0x65, 0x64, 0x68, 0x6f, 0x74, 0x65, 0x6c, 0x68,
714 /* -0220, */ 0x61, 0x70, 0x70, 0x79, 0x63, 0x61, 0x66, 0x65, 0x63, 0x69, 0x64, 0x3d, 0x62, 0x61, 0x6e, 0x6b,
715 /* -0230, */ 0x6d, 0x69, 0x6e, 0x3d, 0x61, 0x77, 0x61, 0x79, 0x6d, 0x61, 0x78, 0x3d, 0x6d, 0x65, 0x61, 0x6c,
716 /* -0240, */ 0x62, 0x75, 0x73, 0x79, 0x77, 0x6f, 0x72, 0x6b, 0x75, 0x72, 0x6e, 0x3d, 0x63, 0x6f, 0x6c, 0x64,
717 /* -0250, */ 0x68, 0x75, 0x72, 0x74, 0x6a, 0x65, 0x61, 0x6c, 0x6f, 0x75, 0x73, 0x70, 0x69, 0x72, 0x69, 0x74,
718 /* -0260, */ 0x73, 0x2d, 0x75, 0x73, 0x65, 0x72, 0x2d, 0x70, 0x72, 0x6f, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e,
719 /* -0270, */ 0x6d, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x2d, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
720 /* -0280, */ 0x6f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x66,
721 /* -0290, */ 0x6f, 0x72, 0x65, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2d,
722 /* -02A0, */ 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73,
723 /* -02B0, */ 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x64, 0x3d, 0x68, 0x69, 0x67, 0x68, 0x65, 0x72,
724 /* -02C0, */ 0x74, 0x68, 0x61, 0x6e, 0x78, 0x69, 0x6f, 0x75, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2d,
725 /* -02D0, */ 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x62, 0x72, 0x65, 0x61,
726 /* -02E0, */ 0x6b, 0x66, 0x61, 0x73, 0x74, 0x61, 0x64, 0x69, 0x75, 0x6d, 0x73, 0x67, 0x2d, 0x74, 0x61, 0x6b,
727 /* -02F0, */ 0x65, 0x72, 0x65, 0x6d, 0x6f, 0x72, 0x73, 0x65, 0x66, 0x75, 0x6c, 0x6c, 0x3a, 0x63, 0x69, 0x76,
728 /* -0300, */ 0x69, 0x63, 0x4c, 0x6f, 0x63, 0x6f, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x71, 0x75,
729 /* -0310, */ 0x61, 0x6c, 0x73, 0x74, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x77, 0x61, 0x74, 0x65, 0x72, 0x63,
730 /* -0320, */ 0x72, 0x61, 0x66, 0x74, 0x65, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x3a, 0x62, 0x61, 0x73, 0x69, 0x63,
731 /* -0330, */ 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79,
732 /* -0340, */ 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x3d, 0x61, 0x64, 0x64,
733 /* -0350, */ 0x65, 0x64, 0x75, 0x72, 0x69, 0x3d, 0x77, 0x68, 0x61, 0x74, 0x70, 0x65, 0x72, 0x6d, 0x61, 0x6e,
734 /* -0360, */ 0x65, 0x6e, 0x74, 0x2d, 0x61, 0x62, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x72,
735 /* -0370, */ 0x61, 0x73, 0x73, 0x65, 0x64, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x64, 0x69,
736 /* -0380, */ 0x73, 0x74, 0x72, 0x61, 0x63, 0x74, 0x65, 0x64, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x76, 0x6f, 0x75,
737 /* -0390, */ 0x73, 0x65, 0x6c, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x6c, 0x69, 0x65, 0x76, 0x65, 0x64,
738 /* -03A0, */ 0x66, 0x6c, 0x69, 0x72, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x2d, 0x72,
739 /* -03B0, */ 0x75, 0x6c, 0x65, 0x73, 0x65, 0x72, 0x76, 0x63, 0x61, 0x70, 0x73, 0x70, 0x68, 0x65, 0x72, 0x65,
740 /* -03C0, */ 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x74, 0x61, 0x74, 0x65,
741 /* -03D0, */ 0x3d, 0x62, 0x61, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x2d, 0x73, 0x74, 0x61, 0x74, 0x65, 0x78, 0x74,
742 /* -03E0, */ 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2d, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x65, 0x74, 0x69, 0x6d, 0x65,
743 /* -03F0, */ 0x2d, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f,
744 /* -0400, */ 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x69, 0x6e, 0x67, 0x2d, 0x77, 0x69, 0x6c, 0x6c,
745 /* -0410, */ 0x69, 0x6e, 0x67, 0x6e, 0x65, 0x73, 0x73, 0x70, 0x65, 0x63, 0x74, 0x61, 0x74, 0x6f, 0x72, 0x65,
746 /* -0420, */ 0x73, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2d, 0x70, 0x61, 0x63, 0x6b,
747 /* -0430, */ 0x61, 0x67, 0x65, 0x73, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x65, 0x73, 0x74,
748 /* -0440, */ 0x61, 0x75, 0x72, 0x61, 0x6e, 0x74, 0x72, 0x75, 0x63, 0x6b, 0x70, 0x6c, 0x6d, 0x6f, 0x62, 0x69,
749 /* -0450, */ 0x6c, 0x69, 0x74, 0x79, 0x6a, 0x6f, 0x69, 0x6e, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x70, 0x72, 0x69,
750 /* -0460, */ 0x61, 0x74, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x65, 0x72, 0x69, 0x6e,
751 /* -0470, */ 0x67, 0x69, 0x76, 0x65, 0x75, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x61, 0x6e,
752 /* -0480, */ 0x67, 0x75, 0x61, 0x67, 0x65, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
753 /* -0490, */ 0x2d, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2d, 0x6f, 0x66,
754 /* -04A0, */ 0x2d, 0x77, 0x6f, 0x72, 0x73, 0x68, 0x69, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2d, 0x74, 0x79, 0x70,
755 /* -04B0, */ 0x65, 0x3d, 0x3a, 0x74, 0x69, 0x6d, 0x65, 0x64, 0x2d, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2d,
756 /* -04C0, */ 0x69, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x65, 0x75, 0x74,
757 /* -04D0, */ 0x72, 0x61, 0x6c, 0x49, 0x4e, 0x46, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x69, 0x65, 0x6d,
758 /* -04E0, */ 0x65, 0x6e, 0x73, 0x2d, 0x52, 0x54, 0x50, 0x2d, 0x53, 0x74, 0x61, 0x74, 0x73, 0x65, 0x72, 0x76,
759 /* -04F0, */ 0x69, 0x63, 0x65, 0x2d, 0x69, 0x64, 0x6c, 0x65, 0x2d, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f,
760 /* -0500, */ 0x6c, 0x64, 0x3d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70,
761 /* -0510, */ 0x6f, 0x72, 0x74, 0x6f, 0x6f, 0x62, 0x72, 0x69, 0x67, 0x68, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65,
762 /* -0520, */ 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3d, 0x3a, 0x67, 0x65, 0x6f, 0x70, 0x72, 0x69,
763 /* -0530, */ 0x76, 0x31, 0x30, 0x30, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70,
764 /* -0540, */ 0x6f, 0x63, 0x2d, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x75, 0x72, 0x70, 0x72, 0x69,
765 /* -0550, */ 0x73, 0x65, 0x64, 0x61, 0x72, 0x6b, 0x75, 0x72, 0x6e, 0x3a, 0x6f, 0x6d, 0x61, 0x3a, 0x78, 0x6d,
766 /* -0560, */ 0x6c, 0x3a, 0x70, 0x72, 0x73, 0x3a, 0x70, 0x69, 0x64, 0x66, 0x3a, 0x6f, 0x6d, 0x61, 0x2d, 0x70,
767 /* -0570, */ 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x6f, 0x69, 0x73, 0x79, 0x3a,
768 /* -0580, */ 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2d, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2d, 0x73, 0x65,
769 /* -0590, */ 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x64, 0x6f, 0x6f, 0x72, 0x73, 0x63, 0x68, 0x6f, 0x6f,
770 /* -05A0, */ 0x6c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d,
771 /* -05B0, */ 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6d, 0x65, 0x65, 0x74,
772 /* -05C0, */ 0x69, 0x6e, 0x67, 0x63, 0x61, 0x6c, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x74, 0x6f, 0x72,
773 /* -05D0, */ 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x3a,
774 /* -05E0, */ 0x77, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x66, 0x66, 0x65, 0x6e, 0x64,
775 /* -05F0, */ 0x65, 0x64, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x2d,
776 /* -0600, */ 0x66, 0x6f, 0x72, 0x2d, 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x77, 0x61, 0x74, 0x63, 0x68,
777 /* -0610, */ 0x65, 0x72, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65,
778 /* -0620, */ 0x2d, 0x69, 0x73, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x6f, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x77, 0x61,
779 /* -0630, */ 0x79, 0x68, 0x6f, 0x6d, 0x65, 0x70, 0x61, 0x67, 0x65, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79,
780 /* -0640, */ 0x77, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x72, 0x2d, 0x69, 0x6e, 0x70, 0x75, 0x74,
781 /* -0650, */ 0x72, 0x61, 0x76, 0x65, 0x6c, 0x62, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76,
782 /* -0660, */ 0x65, 0x2d, 0x6f, 0x6e, 0x6c, 0x79, 0x3a, 0x72, 0x6c, 0x6d, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x75,
783 /* -0670, */ 0x65, 0x3d, 0x3a, 0x63, 0x61, 0x70, 0x73, 0x6c, 0x65, 0x65, 0x70, 0x69, 0x6e, 0x67, 0x75, 0x69,
784 /* -0680, */ 0x6c, 0x74, 0x79, 0x69, 0x6e, 0x76, 0x69, 0x6e, 0x63, 0x69, 0x62, 0x6c, 0x65, 0x76, 0x65, 0x6e,
785 /* -0690, */ 0x74, 0x3d, 0x6d, 0x6f, 0x6f, 0x64, 0x79, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x3d, 0x70,
786 /* -06A0, */ 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x66, 0x72, 0x6f, 0x6d,
787 /* -06B0, */ 0x3d, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x63, 0x61, 0x72, 0x64, 0x70, 0x6f, 0x73, 0x3d, 0x61, 0x75,
788 /* -06C0, */ 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
789 /* -06D0, */ 0x6f, 0x74, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65,
790 /* -06E0, */ 0x49, 0x44, 0x69, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x69, 0x73, 0x61, 0x70, 0x70,
791 /* -06F0, */ 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x64, 0x6e, 0x6f, 0x74, 0x65, 0x2d, 0x77, 0x65, 0x6c, 0x6c, 0x69,
792 /* -0700, */ 0x62, 0x72, 0x61, 0x72, 0x79, 0x3a, 0x64, 0x61, 0x74, 0x61, 0x2d, 0x6d, 0x6f, 0x64, 0x65, 0x6c,
793 /* -0710, */ 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x69, 0x76, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72,
794 /* -0720, */ 0x65, 0x73, 0x73, 0x61, 0x72, 0x63, 0x61, 0x73, 0x74, 0x69, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
795 /* -0730, */ 0x74, 0x65, 0x64, 0x69, 0x6e, 0x64, 0x69, 0x67, 0x6e, 0x61, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x72,
796 /* -0740, */ 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x73, 0x68, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x63, 0x6c, 0x61,
797 /* -0750, */ 0x73, 0x73, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
798 /* -0760, */ 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x2d, 0x62, 0x79, 0x3a, 0x63, 0x69, 0x70, 0x69, 0x64,
799 /* -0770, */ 0x66, 0x2d, 0x66, 0x75, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x3d, 0x61, 0x63, 0x74, 0x6f,
800 /* -0780, */ 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x62, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x65,
801 /* -0790, */ 0x72, 0x69, 0x6f, 0x75, 0x73, 0x65, 0x6c, 0x3d, 0x3a, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x78,
802 /* -07A0, */ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3d, 0x3a, 0x72, 0x70, 0x69, 0x64, 0x75, 0x72, 0x6e, 0x3a, 0x69,
803 /* -07B0, */ 0x65, 0x74, 0x66, 0x3a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x78, 0x6d, 0x6c, 0x2d, 0x70,
804 /* -07C0, */ 0x61, 0x74, 0x63, 0x68, 0x2d, 0x6f, 0x70, 0x73, 0x65, 0x63, 0x2d, 0x61, 0x67, 0x72, 0x65, 0x65,
805 /* -07D0, */ 0x61, 0x72, 0x6c, 0x79, 0x2d, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2d, 0x70, 0x61, 0x74,
806 /* -07E0, */ 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x74, 0x68, 0x65, 0x2d, 0x70, 0x68,
807 /* -07F0, */ 0x6f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2d, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62,
808 /* -0800, */ 0x69, 0x6c, 0x69, 0x74, 0x79, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65,
809 /* -0810, */ 0x78, 0x63, 0x69, 0x74, 0x65, 0x64, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69,
810 /* -0820, */ 0x6f, 0x6e, 0x6f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2d, 0x70, 0x72, 0x69, 0x6f,
811 /* -0830, */ 0x72, 0x69, 0x74, 0x79, 0x3d, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2d,
812 /* -0840, */ 0x63, 0x6c, 0x61, 0x73, 0x73, 0x72, 0x6f, 0x6f, 0x6d, 0x75, 0x73, 0x74, 0x55, 0x6e, 0x64, 0x65,
813 /* -0850, */ 0x72, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x2d, 0x6e, 0x61, 0x6d,
814 /* -0860, */ 0x65, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
815 /* -0870, */ 0x6f, 0x6e, 0x73, 0x2d, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x64, 0x70, 0x2d, 0x61,
816 /* -0880, */ 0x6e, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x64, 0x61, 0x6e, 0x74, 0x72, 0x75, 0x65, 0x3a, 0x70, 0x69,
817 /* -0890, */ 0x64, 0x66, 0x2d, 0x64, 0x69, 0x66, 0x66, 0x72, 0x75, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x64,
818 /* -08A0, */ 0x75, 0x70, 0x6c, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x63, 0x6f,
819 /* -08B0, */ 0x6e, 0x74, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x69, 0x65, 0x73, 0x68, 0x6f, 0x70, 0x70,
820 /* -08C0, */ 0x69, 0x6e, 0x67, 0x2d, 0x61, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x3d, 0x61, 0x70, 0x70, 0x6f,
821 /* -08D0, */ 0x69, 0x6e, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x3d, 0x61, 0x73, 0x73, 0x6f, 0x63,
822 /* -08E0, */ 0x69, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x3d, 0x69, 0x6e, 0x74, 0x65,
823 /* -08F0, */ 0x72, 0x65, 0x73, 0x74, 0x65, 0x64, 0x65, 0x76, 0x63, 0x61, 0x70, 0x73, 0x74, 0x61, 0x74, 0x75,
824 /* -0900, */ 0x73, 0x3d, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3d, 0x77, 0x69,
825 /* -0910, */ 0x6e, 0x66, 0x6f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x69, 0x6e, 0x2d, 0x74, 0x72, 0x61,
826 /* -0920, */ 0x6e, 0x73, 0x69, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x68, 0x6f, 0x73, 0x70, 0x69, 0x74, 0x61, 0x6c,
827 /* -0930, */ 0x61, 0x6e, 0x67, 0x3d, 0x3c, 0x3f, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3d, 0x73, 0x69, 0x63, 0x6b,
828 /* -0940, */ 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x55, 0x54, 0x46, 0x2d, 0x38, 0x3f, 0x3e, 0x63,
829 /* -0950, */ 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x05, 0x0d, 0x34, 0x08, 0x0d, 0x06, 0x09, 0x0c, 0xe3, 0x07, 0x0d,
830 /* -0960, */ 0x48, 0x06, 0x0d, 0x36, 0x13, 0x0b, 0xab, 0x05, 0x09, 0x65, 0x07, 0x0c, 0xd4, 0x08, 0x0d, 0x40,
831 /* -0970, */ 0x05, 0x0d, 0x23, 0x05, 0x0c, 0x35, 0x07, 0x0c, 0xae, 0x05, 0x0d, 0x2f, 0x06, 0x08, 0xb9, 0x05,
832 /* -0980, */ 0x07, 0x2b, 0x04, 0x0d, 0x12, 0x06, 0x0d, 0x4f, 0x09, 0x0c, 0x2c, 0x04, 0x0c, 0x89, 0x04, 0x0a,
833 /* -0990, */ 0xf6, 0x09, 0x0b, 0x57, 0x0b, 0x0b, 0x05, 0x08, 0x0a, 0xda, 0x06, 0x0a, 0xda, 0x06, 0x04, 0x89,
834 /* -09A0, */ 0x05, 0x0b, 0xa6, 0x04, 0x0b, 0x94, 0x06, 0x05, 0x05, 0x07, 0x0b, 0x3f, 0x0e, 0x0b, 0xba, 0x07,
835 /* -09B0, */ 0x0b, 0x98, 0x0a, 0x0c, 0x8d, 0x09, 0x0b, 0x6d, 0x09, 0x0c, 0x8e, 0x0e, 0x0c, 0x48, 0x0a, 0x0c,
836 /* -09C0, */ 0xb2, 0x1d, 0x09, 0x56, 0x0d, 0x0c, 0x38, 0x06, 0x07, 0xba, 0x0b, 0x08, 0xb9, 0x0b, 0x07, 0xec,
837 /* -09D0, */ 0x06, 0x0d, 0x02, 0x0a, 0x0a, 0x46, 0x04, 0x08, 0xf4, 0x06, 0x0b, 0x6a, 0x04, 0x0a, 0xb6, 0x0c,
838 /* -09E0, */ 0x0c, 0x55, 0x08, 0x0a, 0x31, 0x04, 0x0a, 0x92, 0x08, 0x0a, 0x1b, 0x05, 0x0a, 0xb1, 0x04, 0x08,
839 /* -09F0, */ 0xc0, 0x05, 0x0a, 0x27, 0x05, 0x0a, 0xa7, 0x05, 0x0a, 0xac, 0x04, 0x0a, 0xba, 0x04, 0x07, 0xdc,
840 /* -0A00, */ 0x05, 0x08, 0xad, 0x0a, 0x09, 0x29, 0x0a, 0x08, 0xa7, 0x05, 0x0a, 0x56, 0x05, 0x0b, 0x4d, 0x07,
841 /* -0A10, */ 0x09, 0x2a, 0x0d, 0x09, 0xa7, 0x0b, 0x07, 0xa9, 0x06, 0x09, 0xc6, 0x0b, 0x0b, 0x5f, 0x0c, 0x09,
842 /* -0A20, */ 0xdf, 0x0b, 0x09, 0xe0, 0x06, 0x07, 0xcb, 0x0c, 0x0a, 0x0b, 0x09, 0x09, 0x20, 0x08, 0x0a, 0x97,
843 /* -0A30, */ 0x07, 0x09, 0xe0, 0x07, 0x0c, 0xfb, 0x06, 0x0a, 0x8c, 0x0e, 0x09, 0x7f, 0x0a, 0x09, 0x87, 0x0b,
844 /* -0A40, */ 0x0c, 0x71, 0x0a, 0x0c, 0x71, 0x06, 0x07, 0x93, 0x05, 0x0a, 0x66, 0x04, 0x08, 0x67, 0x04, 0x09,
845 /* -0A50, */ 0xba, 0x08, 0x09, 0x20, 0x0a, 0x0b, 0x72, 0x05, 0x0a, 0x72, 0x08, 0x07, 0xb3, 0x0b, 0x0a, 0xc5,
846 /* -0A60, */ 0x07, 0x09, 0xf2, 0x07, 0x08, 0x89, 0x04, 0x08, 0xad, 0x08, 0x0a, 0xbe, 0x06, 0x0c, 0x9f, 0x0b,
847 /* -0A70, */ 0x06, 0xd0, 0x0e, 0x08, 0x26, 0x08, 0x0a, 0x9f, 0x07, 0x09, 0xc6, 0x0a, 0x0c, 0x69, 0x07, 0x08,
848 /* -0A80, */ 0x85, 0x05, 0x0b, 0x7c, 0x07, 0x0a, 0x39, 0x0c, 0x09, 0x34, 0x07, 0x0a, 0x21, 0x09, 0x08, 0x7d,
849 /* -0A90, */ 0x07, 0x0c, 0xf5, 0x0b, 0x0c, 0xa3, 0x14, 0x06, 0xa6, 0x0d, 0x08, 0xb2, 0x0c, 0x07, 0x2a, 0x0c,
850 /* -0AA0, */ 0x08, 0xb3, 0x04, 0x07, 0x56, 0x07, 0x09, 0x1a, 0x04, 0x07, 0x52, 0x07, 0x07, 0x40, 0x05, 0x07,
851 /* -0AB0, */ 0x4d, 0x07, 0x0b, 0x80, 0x06, 0x07, 0x47, 0x16, 0x06, 0x91, 0x08, 0x0c, 0x62, 0x10, 0x09, 0xcf,
852 /* -0AC0, */ 0x10, 0x07, 0xdd, 0x09, 0x0a, 0xf6, 0x09, 0x06, 0xfc, 0x0c, 0x0b, 0x17, 0x07, 0x07, 0x39, 0x04,
853 /* -0AD0, */ 0x06, 0xf8, 0x07, 0x09, 0xa1, 0x06, 0x06, 0x8d, 0x05, 0x07, 0x21, 0x04, 0x0a, 0x55, 0x09, 0x0a,
854 /* -0AE0, */ 0xd2, 0x0c, 0x0a, 0xcf, 0x13, 0x06, 0xc8, 0x0a, 0x08, 0xec, 0x07, 0x0d, 0x06, 0x0b, 0x08, 0x0c,
855 /* -0AF0, */ 0x14, 0x0b, 0xd5, 0x12, 0x07, 0xbe, 0x0d, 0x07, 0xd1, 0x16, 0x08, 0x01, 0x14, 0x0b, 0xf1, 0x06,
856 /* -0B00, */ 0x05, 0xb4, 0x07, 0x04, 0x56, 0x09, 0x04, 0x17, 0x0c, 0x0a, 0xea, 0x09, 0x04, 0x1f, 0x0a, 0x07,
857 /* -0B10, */ 0x7e, 0x0b, 0x07, 0x6a, 0x07, 0x0c, 0x0f, 0x0b, 0x07, 0xa0, 0x0a, 0x0c, 0x96, 0x06, 0x05, 0x28,
858 /* -0B20, */ 0x06, 0x0a, 0x7d, 0x05, 0x06, 0x1f, 0x07, 0x05, 0x8b, 0x0a, 0x04, 0x3c, 0x06, 0x05, 0xae, 0x04,
859 /* -0B30, */ 0x06, 0x50, 0x09, 0x0a, 0xe2, 0x06, 0x05, 0xf6, 0x07, 0x07, 0xfd, 0x09, 0x0b, 0x33, 0x0a, 0x0c,
860 /* -0B40, */ 0xec, 0x0a, 0x0a, 0x83, 0x07, 0x06, 0x54, 0x06, 0x04, 0x90, 0x04, 0x05, 0x3f, 0x05, 0x0a, 0x92,
861 /* -0B50, */ 0x07, 0x07, 0x8a, 0x07, 0x08, 0xcc, 0x08, 0x09, 0xea, 0x07, 0x04, 0x96, 0x05, 0x06, 0x10, 0x08,
862 /* -0B60, */ 0x07, 0x98, 0x0a, 0x06, 0xf1, 0x08, 0x04, 0x79, 0x09, 0x0b, 0x22, 0x07, 0x0b, 0x8e, 0x07, 0x0b,
863 /* -0B70, */ 0x46, 0x04, 0x0d, 0x3c, 0x06, 0x04, 0x80, 0x08, 0x07, 0x12, 0x09, 0x09, 0x4a, 0x07, 0x04, 0xe3,
864 /* -0B80, */ 0x07, 0x05, 0x84, 0x05, 0x09, 0x7a, 0x05, 0x06, 0x01, 0x09, 0x09, 0x12, 0x04, 0x09, 0x52, 0x0d,
865 /* -0B90, */ 0x04, 0xaa, 0x0d, 0x08, 0x56, 0x08, 0x04, 0xdc, 0x07, 0x05, 0x92, 0x05, 0x05, 0x0c, 0x0a, 0x04,
866 /* -0BA0, */ 0x4c, 0x04, 0x06, 0x2c, 0x0b, 0x04, 0xd1, 0x04, 0x06, 0x24, 0x09, 0x0c, 0x40, 0x04, 0x04, 0xce,
867 /* -0BB0, */ 0x0c, 0x08, 0xc1, 0x11, 0x04, 0x00, 0x05, 0x07, 0x34, 0x0a, 0x06, 0x6a, 0x08, 0x0d, 0x28, 0x05,
868 /* -0BC0, */ 0x06, 0x1a, 0x0a, 0x04, 0x28, 0x07, 0x0a, 0xfe, 0x06, 0x04, 0xff, 0x08, 0x09, 0x94, 0x07, 0x05,
869 /* -0BD0, */ 0x76, 0x10, 0x08, 0x98, 0x06, 0x05, 0xf0, 0x06, 0x09, 0x03, 0x10, 0x09, 0x03, 0x09, 0x08, 0x1e,
870 /* -0BE0, */ 0x0a, 0x08, 0x3c, 0x06, 0x09, 0x9b, 0x0d, 0x0c, 0xbb, 0x07, 0x06, 0xe3, 0x05, 0x09, 0xcc, 0x06,
871 /* -0BF0, */ 0x0a, 0x15, 0x07, 0x04, 0x73, 0x05, 0x06, 0x73, 0x0d, 0x06, 0x73, 0x05, 0x08, 0x45, 0x08, 0x0a,
872 /* -0C00, */ 0x29, 0x09, 0x0a, 0x40, 0x05, 0x07, 0x1a, 0x0a, 0x07, 0x1a, 0x09, 0x0b, 0x4f, 0x09, 0x0c, 0xdb,
873 /* -0C10, */ 0x06, 0x05, 0xea, 0x06, 0x05, 0xde, 0x0a, 0x04, 0x0e, 0x0a, 0x0b, 0x0e, 0x09, 0x06, 0x86, 0x08,
874 /* -0C20, */ 0x05, 0x60, 0x0b, 0x07, 0x74, 0x09, 0x05, 0x4f, 0x08, 0x04, 0xf0, 0x07, 0x09, 0x90, 0x06, 0x08,
875 /* -0C30, */ 0x70, 0x0a, 0x0c, 0x21, 0x07, 0x05, 0x6f, 0x0b, 0x0c, 0xcc, 0x04, 0x07, 0x90, 0x07, 0x04, 0xea,
876 /* -0C40, */ 0x0a, 0x08, 0x33, 0x04, 0x06, 0x34, 0x09, 0x06, 0xdc, 0x04, 0x06, 0x40, 0x07, 0x05, 0x2e, 0x04,
877 /* -0C50, */ 0x06, 0x48, 0x06, 0x07, 0x87, 0x07, 0x05, 0x68, 0x0a, 0x0d, 0x1a, 0x07, 0x04, 0x45, 0x07, 0x05,
878 /* -0C60, */ 0x05, 0x08, 0x05, 0x0e, 0x08, 0x05, 0x58, 0x08, 0x04, 0xb6, 0x10, 0x09, 0xf8, 0x04, 0x06, 0x3c,
879 /* -0C70, */ 0x07, 0x09, 0xbc, 0x0c, 0x06, 0xd0, 0x0c, 0x0b, 0xe7, 0x04, 0x06, 0x44, 0x04, 0x0a, 0x31, 0x0b,
880 /* -0C80, */ 0x0c, 0x05, 0x04, 0x06, 0x28, 0x11, 0x07, 0x5a, 0x07, 0x0c, 0xc5, 0x07, 0x05, 0xa0, 0x0c, 0x09,
881 /* -0C90, */ 0x6f, 0x08, 0x0c, 0xbb, 0x08, 0x0a, 0x76, 0x09, 0x08, 0x16, 0x08, 0x08, 0x69, 0x06, 0x05, 0xe4,
882 /* -0CA0, */ 0x09, 0x04, 0x86, 0x07, 0x05, 0x38, 0x06, 0x0a, 0x4f, 0x08, 0x04, 0xc6, 0x0f, 0x08, 0xf4, 0x0b,
883 /* -0CB0, */ 0x04, 0x31, 0x07, 0x0a, 0x04, 0x07, 0x08, 0xa1, 0x0d, 0x0c, 0x55, 0x06, 0x05, 0xc0, 0x06, 0x05,
884 /* -0CC0, */ 0xba, 0x05, 0x05, 0x41, 0x08, 0x0b, 0x87, 0x08, 0x04, 0x89, 0x04, 0x05, 0x35, 0x0c, 0x0a, 0x5a,
885 /* -0CD0, */ 0x09, 0x04, 0x68, 0x09, 0x04, 0x9c, 0x0a, 0x06, 0xba, 0x06, 0x07, 0x0d, 0x05, 0x07, 0x25, 0x09,
886 /* -0CE0, */ 0x0b, 0x9d, 0x09, 0x0a, 0x69, 0x06, 0x0a, 0x6c, 0x04, 0x06, 0x38, 0x04, 0x06, 0x30, 0x07, 0x0d,
887 /* -0CF0, */ 0x13, 0x08, 0x08, 0x4c, 0x05, 0x06, 0x15, 0x06, 0x04, 0x50, 0x0a, 0x07, 0x04, 0x06, 0x07, 0xf7,
888 /* -0D00, */ 0x04, 0x08, 0x49, 0x0f, 0x08, 0x89, 0x0c, 0x09, 0x3f, 0x05, 0x06, 0x81, 0x11, 0x08, 0xdc, 0x0d,
889 /* -0D10, */ 0x04, 0x5c, 0x11, 0x06, 0x5a, 0x05, 0x0d, 0x0e, 0x06, 0x05, 0xd8, 0x04, 0x08, 0xd3, 0x06, 0x05,
890 /* -0D20, */ 0xd2, 0x07, 0x05, 0x7d, 0x06, 0x05, 0xcc, 0x07, 0x08, 0xd6, 0x05, 0x06, 0x0b, 0x07, 0x05, 0xa7,
891 /* -0D30, */ 0x05, 0x05, 0x16, 0x08, 0x05, 0x1a, 0x09, 0x05, 0x46, 0x06, 0x05, 0xc6, 0x06, 0x09, 0x31, 0x0d,
892 /* -0D40, */ 0x0b, 0xcf, 0x09, 0x08, 0x62, 0x08, 0x04, 0xf8, 0x04, 0x08, 0x54, 0x0a, 0x06, 0x7f, 0x04, 0x04,
893 /* -0D50, */ 0x71, 0x0c, 0x0c, 0x16, 0x04, 0x05, 0x2e, 0x08, 0x0b, 0x3f, 0x11, 0x0c, 0x23, 0x08, 0x0c, 0x7b,
894 /* -0D60, */ 0x09, 0x0b, 0xc7, 0x07, 0x07, 0xf6, 0x05, 0x0b, 0x3b, 0x09, 0x08, 0x75, 0x09, 0x0c, 0x81, 0x09,
895 /* -0D70, */ 0x06, 0xe9, 0x0b, 0x09, 0xb0, 0x07, 0x05, 0x22, 0x07, 0x04, 0xa3, 0x07, 0x06, 0xc2, 0x07, 0x05,
896 /* -0D80, */ 0x99, 0x05, 0x06, 0x06, 0x05, 0x05, 0xfc, 0x04, 0x09, 0xc3, 0x04, 0x06, 0x4c, 0x08, 0x04, 0xbe,
897 /* -0D90, */ 0x09, 0x0b, 0x2a
900 static GHashTable
*state_buffer_table
;
904 sigcomp_init_udvm(void) {
905 char *partial_state_str
;
906 uint8_t *sip_sdp_buff
, *presence_buff
;
907 state_buffer_table
= g_hash_table_new_full(g_str_hash
,
909 g_free
, /* key_destroy_func */
910 g_free
); /* value_destroy_func */
912 * Store static dictionaries in hash table
914 sip_sdp_buff
= (uint8_t *)g_malloc(SIP_SDP_STATE_LENGTH
+ 8);
916 partial_state_str
= bytes_to_str(NULL
, sip_sdp_state_identifier
, 6);
917 memset(sip_sdp_buff
, 0, 8);
918 sip_sdp_buff
[0] = SIP_SDP_STATE_LENGTH
>> 8;
919 sip_sdp_buff
[1] = SIP_SDP_STATE_LENGTH
& 0xff;
920 memcpy(sip_sdp_buff
+8, sip_sdp_static_dictionaty_for_sigcomp
, SIP_SDP_STATE_LENGTH
);
922 g_hash_table_insert(state_buffer_table
, g_strdup(partial_state_str
), sip_sdp_buff
);
923 wmem_free(NULL
, partial_state_str
);
925 presence_buff
= (uint8_t *)g_malloc(PRESENCE_STATE_LENGTH
+ 8);
927 partial_state_str
= bytes_to_str(NULL
, presence_state_identifier
, 6);
929 memset(presence_buff
, 0, 8);
930 presence_buff
[0] = PRESENCE_STATE_LENGTH
>> 8;
931 presence_buff
[1] = PRESENCE_STATE_LENGTH
& 0xff;
932 memcpy(presence_buff
+8, presence_static_dictionary_for_sigcomp
, PRESENCE_STATE_LENGTH
);
934 g_hash_table_insert(state_buffer_table
, g_strdup(partial_state_str
), presence_buff
);
935 wmem_free(NULL
, partial_state_str
);
939 sigcomp_cleanup_udvm(void) {
940 g_hash_table_destroy(state_buffer_table
);
944 static int udvm_state_access(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
,uint8_t *buff
,uint16_t p_id_start
, uint16_t p_id_length
, uint16_t state_begin
, uint16_t *state_length
,
945 uint16_t *state_address
, uint16_t *state_instruction
,
951 uint16_t buf_size_real
;
952 uint16_t byte_copy_right
;
953 uint16_t byte_copy_left
;
954 char partial_state
[STATE_BUFFER_SIZE
]; /* Size is 6 - 20 */
956 char *partial_state_str
;
959 * Perform initial checks on validity of data
961 * 9.4.5. STATE-ACCESS
963 * Decompression failure occurs if partial_identifier_length does not
964 * lie between 6 and 20 inclusive. Decompression failure also occurs if
965 * no state item matching the partial state identifier can be found, if
966 * more than one state item matches the partial identifier, or if
967 * partial_identifier_length is less than the minimum_access_length of
968 * the matched state item. Otherwise, a state item is returned from the
972 if (( p_id_length
< STATE_MIN_ACCESS_LEN
) || ( p_id_length
> STATE_BUFFER_SIZE
)) {
978 while ( n
< p_id_length
&& n
< STATE_BUFFER_SIZE
&& p_id_start
+ n
< UDVM_MEMORY_SIZE
) {
979 partial_state
[n
] = buff
[p_id_start
+ n
];
982 partial_state_str
= bytes_to_str(pinfo
->pool
, partial_state
, p_id_length
);
983 proto_tree_add_item(tree
, hf_sigcomp_accessing_state
, tvb
, 0, -1, ENC_NA
);
984 proto_tree_add_string(tree
,hf_id
, tvb
, 0, 0, partial_state_str
);
987 * ws_warning("State Access: partial state =%s",partial_state_str);
988 * ws_warning("g_hash_table_lookup = 0x%x",state_buff);
989 * ws_warning("State Access: partial state =%s",partial_state_str);
991 state_buff
= (uint8_t *)g_hash_table_lookup(state_buffer_table
, partial_state_str
);
992 if ( state_buff
== NULL
) {
993 result_code
= 2; /* No state match */
997 * sip_sdp_static_dictionaty
1001 * The string of bytes is copied in ascending order of memory address,
1002 * respecting the bounds set by byte_copy_left and byte_copy_right.
1003 * More precisely, if a byte is copied from/to Address m then the next
1004 * byte is copied from/to Address n where n is calculated as follows:
1006 * Set k := m + 1 (modulo 2^16)
1007 * If k = byte_copy_right then set n := byte_copy_left, else set n := k
1012 * buff = Where "state" will be stored
1013 * p_id_start = Partial state identifier start pos in the buffer(buff)
1014 * p-id_length = Partial state identifier length
1015 * state_begin = Where to start to read state from
1016 * state_length = Length of state
1017 * state_address = Address where to store the state in the buffer(buff)
1018 * state_instruction =
1019 * false = Indicates that state_* is in the stored state
1022 buf_size_real
= (state_buff
[0] << 8) | state_buff
[1];
1026 * state_length MUST be taken from the returned item of state in the
1027 * case that the state_length operand is set to 0.
1029 * The same is true of state_address, state_instruction.
1031 if (*state_length
== 0) {
1032 *state_length
= buf_size_real
;
1034 if ( *state_address
== 0 ) {
1035 *state_address
= state_buff
[2] << 8;
1036 *state_address
= *state_address
| state_buff
[3];
1038 if ( *state_instruction
== 0 ) {
1039 *state_instruction
= state_buff
[4] << 8;
1040 *state_instruction
= *state_instruction
| state_buff
[5];
1044 * Decompression failure occurs if bytes are copied from beyond the end of
1047 if ((state_begin
+ *state_length
) > buf_size_real
) {
1052 * Note that decompression failure will always occur if the state_length
1053 * operand is set to 0 but the state_begin operand is non-zero.
1055 if (*state_length
== 0 && state_begin
!= 0) {
1059 n
= state_begin
+ 8;
1063 * NOTE: Strictly speaking, byte_copy_left and byte_copy_right should
1064 * not be used if this has been called for bytecode referenced in
1065 * the message header. However, since the memory is initialised
1066 * to zero, the code works OK.
1068 byte_copy_right
= buff
[66] << 8;
1069 byte_copy_right
= byte_copy_right
| buff
[67];
1070 byte_copy_left
= buff
[64] << 8;
1071 byte_copy_left
= byte_copy_left
| buff
[65];
1073 *ws_warning(" state_begin %u state_address %u",state_begin , *state_address);
1075 while ( (int32_t) n
< (state_begin
+ *state_length
+ 8) && n
< UDVM_MEMORY_SIZE
) {
1076 buff
[k
] = state_buff
[n
];
1078 ws_warning(" Loading 0x%x at address %u",buff[k] , k);
1080 k
= ( k
+ 1 ) & 0xffff;
1081 if ( k
== byte_copy_right
) {
1093 static void udvm_state_create(uint8_t *state_buff
,uint8_t *state_identifier
,uint16_t p_id_length
) {
1095 char partial_state
[STATE_BUFFER_SIZE
];
1097 char *partial_state_str
;
1101 ws_warning("Received items of state,state_length_buff[0]= %u, state_length_buff[1]= %u",
1102 state_length_buff[0],state_length_buff[1]);
1106 while ( i
< p_id_length
&& i
< STATE_BUFFER_SIZE
) {
1107 partial_state
[i
] = state_identifier
[i
];
1110 partial_state_str
= bytes_to_str(NULL
, partial_state
, p_id_length
);
1112 dummy_buff
= (char *)g_hash_table_lookup(state_buffer_table
, partial_state_str
);
1113 if ( dummy_buff
== NULL
) {
1114 g_hash_table_insert(state_buffer_table
, g_strdup(partial_state_str
), state_buff
);
1116 /* The buffer allocated by sigcomp-udvm.c wasn't needed so free it
1121 wmem_free(NULL
, partial_state_str
);
1125 static void udvm_state_free(uint8_t buff
[] _U_
,uint16_t p_id_start _U_
,uint16_t p_id_length _U_
) {
1128 void udvm_state_free(uint8_t buff
[],uint16_t p_id_start
,uint16_t p_id_length
) {
1129 char partial_state
[STATE_BUFFER_SIZE
];
1131 char *partial_state_str
;
1136 while ( i
< p_id_length
&& i
< STATE_BUFFER_SIZE
&& p_id_start
+ i
< UDVM_MEMORY_SIZE
) {
1137 partial_state
[i
] = buff
[p_id_start
+ i
];
1140 partial_state_str
= bytes_to_str(NULL
, partial_state
, p_id_length
);
1141 /* TODO Implement a state create counter before actually freeing states
1142 * Hmm is it a good idea to free the buffer at all?
1143 * ws_warning("State-free on %s ",partial_state_str);
1145 dummy_buff
= g_hash_table_lookup(state_buffer_table
, partial_state_str
);
1146 if ( dummy_buff
!= NULL
) {
1147 g_hash_table_remove (state_buffer_table
, partial_state_str
);
1150 wmem_free(NULL
, partial_state_str
);
1154 /**********************************************************************************************
1156 * SIGCOMP DECOMPRESSION
1158 **********************************************************************************************/
1159 #define SIGCOMP_INSTR_DECOMPRESSION_FAILURE 0
1160 #define SIGCOMP_INSTR_AND 1
1161 #define SIGCOMP_INSTR_OR 2
1162 #define SIGCOMP_INSTR_NOT 3
1163 #define SIGCOMP_INSTR_LSHIFT 4
1164 #define SIGCOMP_INSTR_RSHIFT 5
1165 #define SIGCOMP_INSTR_ADD 6
1166 #define SIGCOMP_INSTR_SUBTRACT 7
1167 #define SIGCOMP_INSTR_MULTIPLY 8
1168 #define SIGCOMP_INSTR_DIVIDE 9
1169 #define SIGCOMP_INSTR_REMAINDER 10
1170 #define SIGCOMP_INSTR_SORT_ASCENDING 11
1171 #define SIGCOMP_INSTR_SORT_DESCENDING 12
1172 #define SIGCOMP_INSTR_SHA_1 13
1173 #define SIGCOMP_INSTR_LOAD 14
1174 #define SIGCOMP_INSTR_MULTILOAD 15
1175 #define SIGCOMP_INSTR_PUSH 16
1176 #define SIGCOMP_INSTR_POP 17
1177 #define SIGCOMP_INSTR_COPY 18
1178 #define SIGCOMP_INSTR_COPY_LITERAL 19
1179 #define SIGCOMP_INSTR_COPY_OFFSET 20
1180 #define SIGCOMP_INSTR_MEMSET 21
1181 #define SIGCOMP_INSTR_JUMP 22
1182 #define SIGCOMP_INSTR_COMPARE 23
1183 #define SIGCOMP_INSTR_CALL 24
1184 #define SIGCOMP_INSTR_RETURN 25
1185 #define SIGCOMP_INSTR_SWITCH 26
1186 #define SIGCOMP_INSTR_CRC 27
1187 #define SIGCOMP_INSTR_INPUT_BYTES 28
1188 #define SIGCOMP_INSTR_INPUT_BITS 29
1189 #define SIGCOMP_INSTR_INPUT_HUFFMAN 30
1190 #define SIGCOMP_INSTR_STATE_ACCESS 31
1191 #define SIGCOMP_INSTR_STATE_CREATE 32
1192 #define SIGCOMP_INSTR_STATE_FREE 33
1193 #define SIGCOMP_INSTR_OUTPUT 34
1194 #define SIGCOMP_INSTR_END_MESSAGE 35
1196 static const value_string udvm_instruction_code_vals
[] = {
1197 { SIGCOMP_INSTR_DECOMPRESSION_FAILURE
, "DECOMPRESSION-FAILURE" },
1198 { SIGCOMP_INSTR_AND
, "AND" },
1199 { SIGCOMP_INSTR_OR
, "OR" },
1200 { SIGCOMP_INSTR_NOT
, "NOT" },
1201 { SIGCOMP_INSTR_LSHIFT
, "LSHIFT" },
1202 { SIGCOMP_INSTR_RSHIFT
, "RSHIFT" },
1203 { SIGCOMP_INSTR_ADD
, "ADD" },
1204 { SIGCOMP_INSTR_SUBTRACT
, "SUBTRACT" },
1205 { SIGCOMP_INSTR_MULTIPLY
, "MULTIPLY" },
1206 { SIGCOMP_INSTR_DIVIDE
, "DIVIDE" },
1207 { SIGCOMP_INSTR_REMAINDER
, "REMAINDER" },
1208 { SIGCOMP_INSTR_SORT_ASCENDING
, "SORT-ASCENDING" },
1209 { SIGCOMP_INSTR_SORT_DESCENDING
, "SORT-DESCENDING" },
1210 { SIGCOMP_INSTR_SHA_1
, "SHA-1" },
1211 { SIGCOMP_INSTR_LOAD
, "LOAD" },
1212 { SIGCOMP_INSTR_MULTILOAD
, "MULTILOAD" },
1213 { SIGCOMP_INSTR_PUSH
, "PUSH" },
1214 { SIGCOMP_INSTR_POP
, "POP" },
1215 { SIGCOMP_INSTR_COPY
, "COPY" },
1216 { SIGCOMP_INSTR_COPY_LITERAL
, "COPY-LITERAL" },
1217 { SIGCOMP_INSTR_COPY_OFFSET
, "COPY-OFFSET" },
1218 { SIGCOMP_INSTR_MEMSET
, "MEMSET" },
1219 { SIGCOMP_INSTR_JUMP
, "JUMP" },
1220 { SIGCOMP_INSTR_COMPARE
, "COMPARE" },
1221 { SIGCOMP_INSTR_CALL
, "CALL" },
1222 { SIGCOMP_INSTR_RETURN
, "RETURN" },
1223 { SIGCOMP_INSTR_SWITCH
, "SWITCH" },
1224 { SIGCOMP_INSTR_CRC
, "CRC" },
1225 { SIGCOMP_INSTR_INPUT_BYTES
, "INPUT-BYTES" },
1226 { SIGCOMP_INSTR_INPUT_BITS
, "INPUT-BITS" },
1227 { SIGCOMP_INSTR_INPUT_HUFFMAN
, "INPUT-HUFFMAN" },
1228 { SIGCOMP_INSTR_STATE_ACCESS
, "STATE-ACCESS" },
1229 { SIGCOMP_INSTR_STATE_CREATE
, "STATE-CREATE" },
1230 { SIGCOMP_INSTR_STATE_FREE
, "STATE-FREE" },
1231 { SIGCOMP_INSTR_OUTPUT
, "OUTPUT" },
1232 { SIGCOMP_INSTR_END_MESSAGE
, "END-MESSAGE" },
1235 static value_string_ext udvm_instruction_code_vals_ext
=
1236 VALUE_STRING_EXT_INIT(udvm_instruction_code_vals
);
1238 /* Internal result code values of decompression failures */
1239 static const value_string result_code_vals
[] = {
1240 { 0, "No decompression failure" },
1241 { 1, "Partial state length less than 6 or greater than 20 bytes long" },
1242 { 2, "No state match" },
1243 { 3, "state_begin + state_length > size of state" },
1244 { 4, "Operand_2 is Zero" },
1245 { 5, "Switch statement failed j >= n" },
1246 { 6, "Attempt to jump outside of UDVM memory" },
1247 { 7, "L in input-bits > 16" },
1248 { 8, "input_bit_order > 7" },
1249 { 9, "Instruction Decompression failure encountered" },
1250 { 10, "Input huffman failed j > n" },
1251 { 11, "Input bits requested beyond end of message" },
1252 { 12, "more than four state creation requests are made before the END-MESSAGE instruction" },
1253 { 13, "state_retention_priority is 65535" },
1254 { 14, "Input bytes requested beyond end of message" },
1255 { 15, "Maximum number of UDVM cycles reached" },
1256 { 16, "UDVM stack underflow" },
1257 { 17, "state_length is 0, but state_begin is non-zero" },
1258 {255, "This branch isn't coded yet" },
1262 /* The simplest operand type is the literal (#), which encodes a
1263 * constant integer from 0 to 65535 inclusive. A literal operand may
1264 * require between 1 and 3 bytes depending on its value.
1265 * Bytecode: Operand value: Range:
1266 * 0nnnnnnn N 0 - 127
1267 * 10nnnnnn nnnnnnnn N 0 - 16383
1268 * 11000000 nnnnnnnn nnnnnnnn N 0 - 65535
1270 * Figure 8: Bytecode for a literal (#) operand
1274 decode_udvm_literal_operand(uint8_t *buff
,unsigned operand_address
, uint16_t *value
)
1279 unsigned offset
= operand_address
;
1282 if (operand_address
>= UDVM_MEMORY_SIZE
)
1284 bytecode
= buff
[operand_address
];
1285 test_bits
= bytecode
>> 7;
1286 if (test_bits
== 1) {
1287 test_bits
= bytecode
>> 6;
1288 if (test_bits
== 2) {
1290 * 10nnnnnn nnnnnnnn N 0 - 16383
1292 temp_data
= buff
[operand_address
] & 0x1f;
1293 operand
= temp_data
<< 8;
1294 temp_data
= buff
[(operand_address
+ 1) & 0xffff];
1295 operand
= operand
| temp_data
;
1297 offset
= offset
+ 2;
1301 * 111000000 nnnnnnnn nnnnnnnn N 0 - 65535
1304 temp_data
= buff
[operand_address
] & 0x1f;
1305 operand
= temp_data
<< 8;
1306 temp_data
= buff
[(operand_address
+ 1) & 0xffff];
1307 operand
= operand
| temp_data
;
1309 offset
= offset
+ 2;
1314 * 0nnnnnnn N 0 - 127
1316 operand
= ( bytecode
& 0x7f);
1326 * The second operand type is the reference ($), which is always used to
1327 * access a 2-byte value located elsewhere in the UDVM memory. The
1328 * bytecode for a reference operand is decoded to be a constant integer
1329 * from 0 to 65535 inclusive, which is interpreted as the memory address
1330 * containing the actual value of the operand.
1331 * Bytecode: Operand value: Range:
1333 * 0nnnnnnn memory[2 * N] 0 - 65535
1334 * 10nnnnnn nnnnnnnn memory[2 * N] 0 - 65535
1335 * 11000000 nnnnnnnn nnnnnnnn memory[N] 0 - 65535
1337 * Figure 9: Bytecode for a reference ($) operand
1340 dissect_udvm_reference_operand_memory(uint8_t *buff
,unsigned operand_address
, uint16_t *value
,unsigned *result_dest
)
1344 unsigned offset
= operand_address
;
1347 uint16_t temp_data16
;
1349 if (operand_address
>= UDVM_MEMORY_SIZE
)
1351 bytecode
= buff
[operand_address
];
1352 test_bits
= bytecode
>> 7;
1353 if (test_bits
== 1) {
1354 test_bits
= bytecode
>> 6;
1355 if (test_bits
== 2) {
1357 * 10nnnnnn nnnnnnnn memory[2 * N] 0 - 65535
1359 temp_data
= buff
[operand_address
] & 0x3f;
1360 operand
= temp_data
<< 8;
1361 temp_data
= buff
[(operand_address
+ 1) & 0xffff];
1362 operand
= operand
| temp_data
;
1363 operand
= (operand
* 2);
1364 *result_dest
= operand
;
1365 temp_data16
= buff
[operand
] << 8;
1366 temp_data16
= temp_data16
| buff
[(operand
+1) & 0xffff];
1367 *value
= temp_data16
;
1368 offset
= offset
+ 2;
1372 * 11000000 nnnnnnnn nnnnnnnn memory[N] 0 - 65535
1375 operand
= buff
[operand_address
] << 8;
1376 operand
= operand
| buff
[(operand_address
+ 1) & 0xffff];
1377 *result_dest
= operand
;
1378 temp_data16
= buff
[operand
] << 8;
1379 temp_data16
= temp_data16
| buff
[(operand
+1) & 0xffff];
1380 *value
= temp_data16
;
1381 offset
= offset
+ 3;
1386 * 0nnnnnnn memory[2 * N] 0 - 65535
1388 operand
= ( bytecode
& 0x7f);
1389 operand
= (operand
* 2);
1390 *result_dest
= operand
;
1391 temp_data16
= buff
[operand
] << 8;
1392 temp_data16
= temp_data16
| buff
[(operand
+1) & 0xffff];
1393 *value
= temp_data16
;
1397 if (offset
>= UDVM_MEMORY_SIZE
|| *result_dest
>= UDVM_MEMORY_SIZE
- 1 )
1404 * Figure 10: Bytecode for a multitype (%) operand
1405 * Bytecode: Operand value: Range: HEX val
1406 * 00nnnnnn N 0 - 63 0x00
1407 * 01nnnnnn memory[2 * N] 0 - 65535 0x40
1408 * 1000011n 2 ^ (N + 6) 64 , 128 0x86
1409 * 10001nnn 2 ^ (N + 8) 256 , ... , 32768 0x88
1410 * 111nnnnn N + 65504 65504 - 65535 0xe0
1411 * 1001nnnn nnnnnnnn N + 61440 61440 - 65535 0x90
1412 * 101nnnnn nnnnnnnn N 0 - 8191 0xa0
1413 * 110nnnnn nnnnnnnn memory[N] 0 - 65535 0xc0
1414 * 10000000 nnnnnnnn nnnnnnnn N 0 - 65535 0x80
1415 * 10000001 nnnnnnnn nnnnnnnn memory[N] 0 - 65535 0x81
1418 decode_udvm_multitype_operand(uint8_t *buff
,unsigned operand_address
, uint16_t *value
)
1422 unsigned offset
= operand_address
;
1426 uint16_t temp_data16
;
1427 uint16_t memmory_addr
= 0;
1431 if (operand_address
>= UDVM_MEMORY_SIZE
)
1433 bytecode
= buff
[operand_address
];
1434 test_bits
= ( bytecode
& 0xc0 ) >> 6;
1435 switch (test_bits
) {
1440 operand
= buff
[operand_address
];
1442 *ws_warning("Reading 0x%x From address %u",operand,offset);
1449 * 01nnnnnn memory[2 * N] 0 - 65535
1451 memmory_addr
= ( bytecode
& 0x3f) * 2;
1452 temp_data16
= buff
[memmory_addr
] << 8;
1453 temp_data16
= temp_data16
| buff
[(memmory_addr
+1) & 0xffff];
1454 *value
= temp_data16
;
1458 /* Check tree most significant bits */
1459 test_bits
= ( bytecode
& 0xe0 ) >> 5;
1460 if ( test_bits
== 5 ) {
1462 * 101nnnnn nnnnnnnn N 0 - 8191
1464 temp_data
= buff
[operand_address
] & 0x1f;
1465 operand
= temp_data
<< 8;
1466 temp_data
= buff
[(operand_address
+ 1) & 0xffff];
1467 operand
= operand
| temp_data
;
1469 offset
= offset
+ 2;
1471 test_bits
= ( bytecode
& 0xf0 ) >> 4;
1472 if ( test_bits
== 9 ) {
1474 * 1001nnnn nnnnnnnn N + 61440 61440 - 65535
1476 temp_data
= buff
[operand_address
] & 0x0f;
1477 operand
= temp_data
<< 8;
1478 temp_data
= buff
[(operand_address
+ 1) & 0xffff];
1479 operand
= operand
| temp_data
;
1480 operand
= operand
+ 61440;
1482 offset
= offset
+ 2;
1484 test_bits
= ( bytecode
& 0x08 ) >> 3;
1485 if ( test_bits
== 1) {
1487 * 10001nnn 2 ^ (N + 8) 256 , ... , 32768
1490 result
= 1 << ((buff
[operand_address
] & 0x07) + 8);
1491 operand
= result
& 0xffff;
1495 test_bits
= ( bytecode
& 0x0e ) >> 1;
1496 if ( test_bits
== 3 ) {
1498 * 1000 011n 2 ^ (N + 6) 64 , 128
1500 result
= 1 << ((buff
[operand_address
] & 0x01) + 6);
1501 operand
= result
& 0xffff;
1506 * 1000 0000 nnnnnnnn nnnnnnnn N 0 - 65535
1507 * 1000 0001 nnnnnnnn nnnnnnnn memory[N] 0 - 65535
1510 temp_data16
= buff
[(operand_address
+ 1) & 0xffff] << 8;
1511 temp_data16
= temp_data16
| buff
[(operand_address
+ 2) & 0xffff];
1513 * ws_warning("Reading 0x%x From address %u",temp_data16,operand_address);
1515 if ( (bytecode
& 0x01) == 1 ) {
1516 memmory_addr
= temp_data16
;
1517 temp_data16
= buff
[memmory_addr
] << 8;
1518 temp_data16
= temp_data16
| buff
[(memmory_addr
+1) & 0xffff];
1520 *value
= temp_data16
;
1531 test_bits
= ( bytecode
& 0x20 ) >> 5;
1532 if ( test_bits
== 1 ) {
1534 * 111nnnnn N + 65504 65504 - 65535
1536 operand
= ( buff
[operand_address
] & 0x1f) + 65504;
1541 * 110nnnnn nnnnnnnn memory[N] 0 - 65535
1543 memmory_addr
= buff
[operand_address
] & 0x1f;
1544 memmory_addr
= memmory_addr
<< 8;
1545 memmory_addr
= memmory_addr
| buff
[(operand_address
+ 1) & 0xffff];
1546 temp_data16
= buff
[memmory_addr
] << 8;
1547 temp_data16
= temp_data16
| buff
[(memmory_addr
+1) & 0xffff];
1548 *value
= temp_data16
;
1550 * ws_warning("Reading 0x%x From address %u",temp_data16,memmory_addr);
1562 * The fourth operand type is the address (@). This operand is decoded
1563 * as a multitype operand followed by a further step: the memory address
1564 * of the UDVM instruction containing the address operand is added to
1565 * obtain the correct operand value. So if the operand value from
1566 * Figure 10 is D then the actual operand value of an address is
1567 * calculated as follows:
1569 * operand_value = (memory_address_of_instruction + D) modulo 2^16
1571 * Address operands are always used in instructions that control program
1572 * flow, because they ensure that the UDVM bytecode is position-
1573 * independent code (i.e., it will run independently of where it is
1574 * placed in the UDVM memory).
1577 decode_udvm_address_operand(uint8_t *buff
,unsigned operand_address
, uint16_t *value
,unsigned current_address
)
1581 int next_operand_address
;
1583 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &value1
);
1584 result
= value1
& 0xffff;
1585 result
= result
+ current_address
;
1586 *value
= result
& 0xffff;
1587 return next_operand_address
;
1592 * This is a lookup table used to reverse the bits in a byte.
1594 static uint8_t reverse
[] = {
1595 0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0,
1596 0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0,
1597 0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8,
1598 0x18, 0x98, 0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8,
1599 0x04, 0x84, 0x44, 0xC4, 0x24, 0xA4, 0x64, 0xE4,
1600 0x14, 0x94, 0x54, 0xD4, 0x34, 0xB4, 0x74, 0xF4,
1601 0x0C, 0x8C, 0x4C, 0xCC, 0x2C, 0xAC, 0x6C, 0xEC,
1602 0x1C, 0x9C, 0x5C, 0xDC, 0x3C, 0xBC, 0x7C, 0xFC,
1603 0x02, 0x82, 0x42, 0xC2, 0x22, 0xA2, 0x62, 0xE2,
1604 0x12, 0x92, 0x52, 0xD2, 0x32, 0xB2, 0x72, 0xF2,
1605 0x0A, 0x8A, 0x4A, 0xCA, 0x2A, 0xAA, 0x6A, 0xEA,
1606 0x1A, 0x9A, 0x5A, 0xDA, 0x3A, 0xBA, 0x7A, 0xFA,
1607 0x06, 0x86, 0x46, 0xC6, 0x26, 0xA6, 0x66, 0xE6,
1608 0x16, 0x96, 0x56, 0xD6, 0x36, 0xB6, 0x76, 0xF6,
1609 0x0E, 0x8E, 0x4E, 0xCE, 0x2E, 0xAE, 0x6E, 0xEE,
1610 0x1E, 0x9E, 0x5E, 0xDE, 0x3E, 0xBE, 0x7E, 0xFE,
1611 0x01, 0x81, 0x41, 0xC1, 0x21, 0xA1, 0x61, 0xE1,
1612 0x11, 0x91, 0x51, 0xD1, 0x31, 0xB1, 0x71, 0xF1,
1613 0x09, 0x89, 0x49, 0xC9, 0x29, 0xA9, 0x69, 0xE9,
1614 0x19, 0x99, 0x59, 0xD9, 0x39, 0xB9, 0x79, 0xF9,
1615 0x05, 0x85, 0x45, 0xC5, 0x25, 0xA5, 0x65, 0xE5,
1616 0x15, 0x95, 0x55, 0xD5, 0x35, 0xB5, 0x75, 0xF5,
1617 0x0D, 0x8D, 0x4D, 0xCD, 0x2D, 0xAD, 0x6D, 0xED,
1618 0x1D, 0x9D, 0x5D, 0xDD, 0x3D, 0xBD, 0x7D, 0xFD,
1619 0x03, 0x83, 0x43, 0xC3, 0x23, 0xA3, 0x63, 0xE3,
1620 0x13, 0x93, 0x53, 0xD3, 0x33, 0xB3, 0x73, 0xF3,
1621 0x0B, 0x8B, 0x4B, 0xCB, 0x2B, 0xAB, 0x6B, 0xEB,
1622 0x1B, 0x9B, 0x5B, 0xDB, 0x3B, 0xBB, 0x7B, 0xFB,
1623 0x07, 0x87, 0x47, 0xC7, 0x27, 0xA7, 0x67, 0xE7,
1624 0x17, 0x97, 0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7,
1625 0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF,
1626 0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFF
1631 decomp_dispatch_get_bits(
1632 tvbuff_t
*message_tvb
,
1633 proto_tree
*udvm_tree
,
1636 uint16_t *old_input_bit_order
,
1637 uint16_t *remaining_bits
,
1638 uint16_t *input_bits
,
1639 unsigned *input_address
,
1641 uint16_t *result_code
,
1645 uint16_t input_bit_order
;
1646 uint16_t bits_still_required
= length
;
1649 int extra_bytes_available
= msg_end
- *input_address
;
1651 int prev_p_bit
= *old_input_bit_order
& 0x0001;
1652 int bits_to_use
= 0;
1655 input_bit_order
= buff
[68] << 8;
1656 input_bit_order
= input_bit_order
| buff
[69];
1658 p_bit
= (input_bit_order
& 0x0001) != 0;
1661 * Discard any spare bits.
1662 * Note: We take care to avoid remaining_bits having the value of 8.
1664 if (prev_p_bit
!= p_bit
)
1666 *remaining_bits
= 0;
1667 *old_input_bit_order
= input_bit_order
;
1671 * Check we can supply the required number of bits now, before we alter
1672 * the input buffer's state.
1674 if (*remaining_bits
+ extra_bytes_available
* 8 < length
)
1680 /* Note: This is never called with length > 16, so the following loop
1681 * never loops more than three time. */
1682 while (bits_still_required
> 0)
1685 * We only put anything into input_bits if we know we will remove
1686 * at least one bit. That ensures we can simply discard the spare
1687 * bits if the P-bit changes.
1689 if (*remaining_bits
== 0)
1691 octet
= tvb_get_uint8(message_tvb
, *input_address
);
1692 if (print_level_1
) {
1693 proto_tree_add_uint_format(udvm_tree
, hf_sigcomp_getting_value
, message_tvb
, *input_address
, 1, octet
,
1694 " Getting value: %u (0x%x) From Addr: %u", octet
, octet
, *input_address
);
1696 *input_address
= *input_address
+ 1;
1700 octet
= reverse
[octet
];
1702 *input_bits
= octet
;
1703 *remaining_bits
= 8;
1706 /* Add some more bits to the accumulated value. */
1707 bits_to_use
= bits_still_required
< *remaining_bits
? bits_still_required
: *remaining_bits
;
1708 bits_still_required
-= bits_to_use
;
1710 *input_bits
<<= bits_to_use
; /* Shift bits into MSByte */
1711 value
= (value
<< bits_to_use
) /* Then add to the accumulated value */
1712 | ((*input_bits
>> 8) & 0xFF);
1713 *remaining_bits
-= bits_to_use
;
1714 *input_bits
&= 0x00FF; /* Leave just the remaining bits */
1717 if ((bit_order
!= 0) && (length
<= 16))
1719 /* Bit reverse the entire word. */
1720 uint16_t lsb
= reverse
[(value
>> 8) & 0xFF];
1721 uint16_t msb
= reverse
[value
& 0xFF];
1723 value
= ((msb
<< 8) | lsb
) >> (16 - length
);
1730 decompress_sigcomp_message(tvbuff_t
*bytecode_tvb
, tvbuff_t
*message_tvb
, packet_info
*pinfo
,
1731 proto_tree
*udvm_tree
, int udvm_mem_dest
,
1732 int print_flags
, int hf_id
,
1734 int byte_code_state_len
, int byte_code_id_len
,
1737 tvbuff_t
*decomp_tvb
;
1738 /* UDVM memory must be initialised to zero */
1739 uint8_t *buff
= (uint8_t *)wmem_alloc0(pinfo
->pool
, UDVM_MEMORY_SIZE
);
1741 uint8_t *out_buff
; /* Largest allowed size for a message is UDVM_MEMORY_SIZE = 65536 */
1749 unsigned offset
= 0;
1750 unsigned start_offset
;
1751 unsigned result_dest
;
1752 unsigned code_length
= 0;
1753 uint8_t current_instruction
;
1754 unsigned current_address
;
1755 unsigned operand_address
;
1756 unsigned input_address
;
1757 uint16_t output_address
= 0;
1758 int next_operand_address
;
1762 uint16_t byte_copy_right
;
1763 uint16_t byte_copy_left
;
1764 uint16_t input_bit_order
;
1765 uint16_t stack_location
;
1766 uint16_t stack_fill
;
1768 unsigned msg_end
= tvb_reported_length_remaining(message_tvb
, 0);
1769 uint16_t result_code
= 0;
1770 uint16_t old_input_bit_order
= 0;
1771 uint16_t remaining_bits
= 0;
1772 uint16_t input_bits
= 0;
1773 uint8_t bit_order
= 0;
1774 bool outside_huffman_boundaries
= true;
1775 bool print_in_loop
= false;
1776 uint16_t instruction_address
;
1777 uint8_t no_of_state_create
= 0;
1778 uint16_t state_length_buff
[5];
1779 uint16_t state_address_buff
[5];
1780 uint16_t state_instruction_buff
[5];
1781 uint16_t state_minimum_access_length_buff
[5];
1782 /* uint16_t state_state_retention_priority_buff[5]; */
1783 uint32_t used_udvm_cycles
= 0;
1784 unsigned cycles_per_bit
;
1785 unsigned maximum_UDVM_cycles
;
1787 unsigned char sha1_digest_buf
[STATE_BUFFER_SIZE
];
1788 gcry_md_hd_t sha1_handle
;
1789 proto_item
*addr_item
= NULL
, *ti
= NULL
;
1792 /* UDVM operand variables */
1794 uint16_t at_address
;
1795 uint16_t destination
;
1798 uint16_t p_id_start
;
1799 uint16_t p_id_length
;
1800 uint16_t state_begin
;
1801 uint16_t state_length
;
1802 uint16_t state_address
;
1803 uint16_t state_instruction
;
1808 uint16_t at_address_1
;
1809 uint16_t at_address_2
;
1810 uint16_t at_address_3
;
1813 uint16_t lower_bound_n
;
1814 uint16_t upper_bound_n
;
1815 uint16_t uncompressed_n
;
1817 uint16_t ref_destination
; /* could I have used $destination ? */
1818 uint16_t multy_offset
;
1819 uint16_t output_start
;
1820 uint16_t output_length
;
1821 uint16_t minimum_access_length
;
1822 uint16_t state_retention_priority
;
1823 uint16_t requested_feedback_location
;
1824 uint16_t returned_parameters_location
;
1825 uint16_t start_value
;
1827 /* Set print parameters */
1828 bool print_level_1
= false;
1829 bool print_level_2
= false;
1830 bool print_level_3
= false;
1831 int show_instr_detail_level
= 0;
1833 switch ( print_flags
) {
1838 print_level_1
= true;
1839 show_instr_detail_level
= 1;
1842 print_level_1
= true;
1843 print_level_2
= true;
1844 show_instr_detail_level
= 1;
1847 print_level_1
= true;
1848 print_level_2
= true;
1849 print_level_3
= true;
1850 show_instr_detail_level
= 2;
1853 print_level_1
= true;
1854 show_instr_detail_level
= 1;
1858 /* Set initial UDVM data
1859 * The first 32 bytes of UDVM memory are then initialized to special
1860 * values as illustrated in Figure 5.
1863 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1864 * | UDVM_memory_size | 0 - 1
1865 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1866 * | cycles_per_bit | 2 - 3
1867 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1868 * | SigComp_version | 4 - 5
1869 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1870 * | partial_state_ID_length | 6 - 7
1871 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1872 * | state_length | 8 - 9
1873 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1875 * : reserved : 10 - 31
1877 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1879 * Figure 5: Initializing Useful Values in UDVM memory
1881 /* UDVM_memory_size */
1882 buff
[0] = (UDVM_MEMORY_SIZE
>> 8) & 0x00FF;
1883 buff
[1] = UDVM_MEMORY_SIZE
& 0x00FF;
1884 /* cycles_per_bit */
1887 /* SigComp_version */
1890 /* partial_state_ID_length */
1891 buff
[6] = (byte_code_id_len
>> 8) & 0x00FF;
1892 buff
[7] = byte_code_id_len
& 0x00FF;
1894 buff
[8] = (byte_code_state_len
>> 8) & 0x00FF;
1895 buff
[9] = byte_code_state_len
& 0x00FF;
1897 code_length
= tvb_reported_length_remaining(bytecode_tvb
, 0);
1899 cycles_per_bit
= buff
[2] << 8;
1900 cycles_per_bit
= cycles_per_bit
| buff
[3];
1902 * maximum_UDVM_cycles = (8 * n + 1000) * cycles_per_bit
1904 maximum_UDVM_cycles
= (( 8 * (header_len
+ msg_end
) ) + 1000) * cycles_per_bit
;
1906 proto_tree_add_uint(udvm_tree
, hf_sigcomp_message_length
, bytecode_tvb
, offset
, 1, msg_end
);
1907 proto_tree_add_uint(udvm_tree
, hf_sigcomp_byte_code_length
, bytecode_tvb
, offset
, 1, code_length
);
1908 proto_tree_add_uint(udvm_tree
, hf_sigcomp_max_udvm_cycles
, bytecode_tvb
, offset
, 1, maximum_UDVM_cycles
);
1910 /* Load bytecode into UDVM starting at "udvm_mem_dest" */
1912 if ( print_level_3
)
1913 proto_tree_add_uint(udvm_tree
, hf_sigcomp_load_bytecode_into_udvm_start
, bytecode_tvb
, offset
, 1, i
);
1914 while ( code_length
> offset
&& i
< UDVM_MEMORY_SIZE
) {
1915 buff
[i
] = tvb_get_uint8(bytecode_tvb
, offset
);
1916 if ( print_level_3
)
1917 proto_tree_add_uint_format(udvm_tree
, hf_sigcomp_instruction_code
, bytecode_tvb
, offset
, 1, buff
[i
],
1918 " Addr: %u Instruction code(0x%02x) ", i
, buff
[i
]);
1924 /* Start executing code */
1925 current_address
= udvm_start_ip
;
1928 proto_tree_add_uint_format(udvm_tree
, hf_sigcomp_udvm_execution_stated
, bytecode_tvb
, offset
, 1, current_address
,
1929 "UDVM EXECUTION STARTED at Address: %u Message size %u", current_address
, msg_end
);
1931 /* Largest allowed size for a message is UDVM_MEMORY_SIZE = 65536 */
1932 out_buff
= (uint8_t *)wmem_alloc(pinfo
->pool
, UDVM_MEMORY_SIZE
);
1934 /* Reset offset so proto_tree_add_xxx items below accurately reflect the bytes they represent */
1937 execute_next_instruction
:
1939 if ( used_udvm_cycles
> maximum_UDVM_cycles
) {
1941 goto decompression_failure
;
1944 current_instruction
= buff
[current_address
& 0xffff];
1946 if (show_instr_detail_level
== 2 ) {
1947 addr_item
= proto_tree_add_uint_format(udvm_tree
, hf_sigcomp_current_instruction
, bytecode_tvb
, offset
, 1, current_instruction
,
1948 "Addr: %u ## %s(%d)", current_address
,
1949 val_to_str_ext_const(current_instruction
, &udvm_instruction_code_vals_ext
, "INVALID INSTRUCTION"),
1950 current_instruction
);
1954 switch ( current_instruction
) {
1955 case SIGCOMP_INSTR_DECOMPRESSION_FAILURE
:
1956 if ( result_code
== 0 )
1958 proto_tree_add_uint_format(udvm_tree
, hf_sigcomp_decompression_failure
, NULL
, 0, 0,
1959 current_address
, "Addr: %u ## DECOMPRESSION-FAILURE(0)",
1961 proto_tree_add_uint(udvm_tree
, hf_sigcomp_wireshark_udvm_diagnostic
, NULL
, 0, 0, result_code
);
1962 if ( output_address
> 0 ) {
1963 /* At least something got decompressed, show it */
1964 decomp_tvb
= tvb_new_child_real_data(message_tvb
, out_buff
,output_address
,output_address
);
1965 /* Add the tvbuff to the list of tvbuffs to which the tvbuff we
1966 * were handed refers, so it'll get cleaned up when that tvbuff
1969 add_new_data_source(pinfo
, decomp_tvb
, "Decompressed SigComp message(Incomplete)");
1970 proto_tree_add_expert(udvm_tree
, pinfo
, &ei_sigcomp_sigcomp_message_decompression_failure
, decomp_tvb
, 0, -1);
1975 case SIGCOMP_INSTR_AND
: /* 1 AND ($operand_1, %operand_2) */
1976 if (show_instr_detail_level
== 2 ) {
1977 proto_item_append_text(addr_item
, " (operand_1, operand_2)");
1979 start_offset
= offset
;
1981 operand_address
= current_address
+ 1;
1982 next_operand_address
= dissect_udvm_reference_operand_memory(buff
, operand_address
, &operand_1
, &result_dest
);
1983 if (next_operand_address
< 0)
1984 goto decompression_failure
;
1985 if (show_instr_detail_level
== 2 ) {
1986 proto_tree_add_uint_format(udvm_tree
, hf_udvm_operand_1
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), operand_1
,
1987 "Addr: %u operand_1 %u", operand_address
, operand_1
);
1989 offset
+= (next_operand_address
-operand_address
);
1990 operand_address
= next_operand_address
;
1992 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &operand_2
);
1993 if (next_operand_address
< 0)
1994 goto decompression_failure
;
1995 if (show_instr_detail_level
== 2 ) {
1996 proto_tree_add_uint_format(udvm_tree
, hf_udvm_operand_2
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), operand_2
,
1997 "Addr: %u operand_2 %u", operand_address
, operand_2
);
1999 offset
+= (next_operand_address
-operand_address
);
2000 if (show_instr_detail_level
== 1)
2002 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_decompress_instruction
, bytecode_tvb
, start_offset
, offset
-start_offset
,
2003 "Addr: %u ## AND (operand_1=%u, operand_2=%u)",
2004 current_address
, operand_1
, operand_2
);
2006 /* execute the instruction */
2007 result
= operand_1
& operand_2
;
2008 lsb
= result
& 0xff;
2010 buff
[result_dest
] = msb
;
2011 buff
[(result_dest
+1) & 0xffff] = lsb
;
2012 if (print_level_1
) {
2013 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_loading_result
, bytecode_tvb
, 0, -1,
2014 " Loading result %u at %u", result
, result_dest
);
2016 current_address
= next_operand_address
;
2017 goto execute_next_instruction
;
2021 case SIGCOMP_INSTR_OR
: /* 2 OR ($operand_1, %operand_2) */
2022 if (show_instr_detail_level
== 2 ) {
2023 proto_item_append_text(addr_item
, " (operand_1, operand_2)");
2025 start_offset
= offset
;
2027 operand_address
= current_address
+ 1;
2028 next_operand_address
= dissect_udvm_reference_operand_memory(buff
, operand_address
, &operand_1
, &result_dest
);
2029 if (next_operand_address
< 0)
2030 goto decompression_failure
;
2031 if (show_instr_detail_level
== 2 ) {
2032 proto_tree_add_uint_format(udvm_tree
, hf_udvm_operand_1
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), operand_1
,
2033 "Addr: %u operand_1 %u", operand_address
, operand_1
);
2035 offset
+= (next_operand_address
-operand_address
);
2036 operand_address
= next_operand_address
;
2038 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &operand_2
);
2039 if (next_operand_address
< 0)
2040 goto decompression_failure
;
2041 if (show_instr_detail_level
== 2 ) {
2042 proto_tree_add_uint_format(udvm_tree
, hf_udvm_operand_2
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), operand_2
,
2043 "Addr: %u operand_2 %u", operand_address
, operand_2
);
2045 offset
+= (next_operand_address
-operand_address
);
2046 if (show_instr_detail_level
== 1)
2048 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_decompress_instruction
, bytecode_tvb
, start_offset
, offset
-start_offset
,
2049 "Addr: %u ## OR (operand_1=%u, operand_2=%u)",
2050 current_address
, operand_1
, operand_2
);
2052 /* execute the instruction */
2053 result
= operand_1
| operand_2
;
2054 lsb
= result
& 0xff;
2056 buff
[result_dest
] = msb
;
2057 buff
[(result_dest
+1) & 0xffff] = lsb
;
2058 if (print_level_1
) {
2059 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_loading_result
, bytecode_tvb
, 0, -1,
2060 " Loading result %u at %u", result
, result_dest
);
2062 current_address
= next_operand_address
;
2063 goto execute_next_instruction
;
2067 case SIGCOMP_INSTR_NOT
: /* 3 NOT ($operand_1) */
2068 if (show_instr_detail_level
== 2 ) {
2069 proto_item_append_text(addr_item
, " ($operand_1)");
2071 start_offset
= offset
;
2073 operand_address
= current_address
+ 1;
2074 next_operand_address
= dissect_udvm_reference_operand_memory(buff
, operand_address
, &operand_1
, &result_dest
);
2075 if (next_operand_address
< 0)
2076 goto decompression_failure
;
2077 if (show_instr_detail_level
== 2 ) {
2078 proto_tree_add_uint_format(udvm_tree
, hf_udvm_operand_1
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), operand_1
,
2079 "Addr: %u operand_1 %u", operand_address
, operand_1
);
2081 offset
+= (next_operand_address
-operand_address
);
2082 if (show_instr_detail_level
== 1)
2084 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_decompress_instruction
, bytecode_tvb
, start_offset
, offset
-start_offset
,
2085 "Addr: %u ## NOT (operand_1=%u)",
2086 current_address
, operand_1
);
2088 /* execute the instruction */
2089 result
= operand_1
^ 0xffff;
2090 lsb
= result
& 0xff;
2092 buff
[result_dest
] = msb
;
2093 buff
[(result_dest
+1) & 0xffff] = lsb
;
2094 if (print_level_1
) {
2095 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_loading_result
, bytecode_tvb
, 0, -1,
2096 " Loading result %u at %u", result
, result_dest
);
2098 current_address
= next_operand_address
;
2099 goto execute_next_instruction
;
2102 case SIGCOMP_INSTR_LSHIFT
: /* 4 LSHIFT ($operand_1, %operand_2) */
2103 if (show_instr_detail_level
== 2 ) {
2104 proto_item_append_text(addr_item
, " ($operand_1, operand_2)");
2106 start_offset
= offset
;
2108 operand_address
= current_address
+ 1;
2109 next_operand_address
= dissect_udvm_reference_operand_memory(buff
, operand_address
, &operand_1
, &result_dest
);
2110 if (next_operand_address
< 0)
2111 goto decompression_failure
;
2112 if (show_instr_detail_level
== 2 ) {
2113 proto_tree_add_uint_format(udvm_tree
, hf_udvm_operand_1
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), operand_1
,
2114 "Addr: %u operand_1 %u", operand_address
, operand_1
);
2116 offset
+= (next_operand_address
-operand_address
);
2117 operand_address
= next_operand_address
;
2119 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &operand_2
);
2120 if (next_operand_address
< 0)
2121 goto decompression_failure
;
2122 if (show_instr_detail_level
== 2 ) {
2123 ti
= proto_tree_add_uint_format(udvm_tree
, hf_udvm_operand_2
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), operand_2
,
2124 "Addr: %u operand_2 %u", operand_address
, operand_2
);
2126 if (operand_2
> 15) {
2127 expert_add_info(pinfo
, ti
, &ei_sigcomp_invalid_shift_value
);
2130 offset
+= (next_operand_address
-operand_address
);
2131 if (show_instr_detail_level
== 1)
2133 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_decompress_instruction
, bytecode_tvb
, start_offset
, offset
-start_offset
,
2134 "Addr: %u ## LSHIFT (operand_1=%u, operand_2=%u)",
2135 current_address
, operand_1
, operand_2
);
2137 /* execute the instruction */
2138 result
= operand_1
<< operand_2
;
2139 lsb
= result
& 0xff;
2141 buff
[result_dest
] = msb
;
2142 buff
[(result_dest
+1) & 0xffff] = lsb
;
2143 if (print_level_1
) {
2144 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_loading_result
, bytecode_tvb
, 0, -1,
2145 " Loading result %u at %u", result
, result_dest
);
2147 current_address
= next_operand_address
;
2148 goto execute_next_instruction
;
2151 case SIGCOMP_INSTR_RSHIFT
: /* 5 RSHIFT ($operand_1, %operand_2) */
2152 if (show_instr_detail_level
== 2 ) {
2153 proto_item_append_text(addr_item
, " (operand_1, operand_2)");
2155 start_offset
= offset
;
2157 operand_address
= current_address
+ 1;
2158 next_operand_address
= dissect_udvm_reference_operand_memory(buff
, operand_address
, &operand_1
, &result_dest
);
2159 if (next_operand_address
< 0)
2160 goto decompression_failure
;
2161 if (show_instr_detail_level
== 2 ) {
2162 proto_tree_add_uint_format(udvm_tree
, hf_udvm_operand_1
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), operand_1
,
2163 "Addr: %u operand_1 %u", operand_address
, operand_1
);
2165 offset
+= (next_operand_address
-operand_address
);
2166 operand_address
= next_operand_address
;
2168 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &operand_2
);
2169 if (next_operand_address
< 0)
2170 goto decompression_failure
;
2171 if (show_instr_detail_level
== 2 ) {
2172 ti
= proto_tree_add_uint_format(udvm_tree
, hf_udvm_operand_2
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), operand_2
,
2173 "Addr: %u operand_2 %u", operand_address
, operand_2
);
2175 if (operand_2
> 15) {
2176 expert_add_info(pinfo
, ti
, &ei_sigcomp_invalid_shift_value
);
2179 offset
+= (next_operand_address
-operand_address
);
2180 if (show_instr_detail_level
== 1)
2182 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_decompress_instruction
, bytecode_tvb
, start_offset
, offset
-start_offset
,
2183 "Addr: %u ## RSHIFT (operand_1=%u, operand_2=%u)",
2184 current_address
, operand_1
, operand_2
);
2186 /* execute the instruction */
2187 result
= operand_1
>> operand_2
;
2188 lsb
= result
& 0xff;
2190 buff
[result_dest
] = msb
;
2191 buff
[(result_dest
+1) & 0xffff] = lsb
;
2192 if (print_level_1
) {
2193 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_loading_result
, bytecode_tvb
, 0, -1,
2194 " Loading result %u at %u", result
, result_dest
);
2196 current_address
= next_operand_address
;
2197 goto execute_next_instruction
;
2199 case SIGCOMP_INSTR_ADD
: /* 6 ADD ($operand_1, %operand_2) */
2200 if (show_instr_detail_level
== 2 ) {
2201 proto_item_append_text(addr_item
, " (operand_1, operand_2)");
2203 start_offset
= offset
;
2205 operand_address
= current_address
+ 1;
2206 next_operand_address
= dissect_udvm_reference_operand_memory(buff
, operand_address
, &operand_1
, &result_dest
);
2207 if (next_operand_address
< 0)
2208 goto decompression_failure
;
2209 if (show_instr_detail_level
== 2 ) {
2210 proto_tree_add_uint_format(udvm_tree
, hf_udvm_operand_1
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), operand_1
,
2211 "Addr: %u operand_1 %u", operand_address
, operand_1
);
2213 offset
+= (next_operand_address
-operand_address
);
2214 operand_address
= next_operand_address
;
2216 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &operand_2
);
2217 if (next_operand_address
< 0)
2218 goto decompression_failure
;
2219 if (show_instr_detail_level
== 2 ) {
2220 proto_tree_add_uint_format(udvm_tree
, hf_udvm_operand_2
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), operand_2
,
2221 "Addr: %u operand_2 %u", operand_address
, operand_2
);
2223 offset
+= (next_operand_address
-operand_address
);
2224 if (show_instr_detail_level
== 1)
2226 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_decompress_instruction
, bytecode_tvb
, start_offset
, offset
-start_offset
,
2227 "Addr: %u ## ADD (operand_1=%u, operand_2=%u)",
2228 current_address
, operand_1
, operand_2
);
2230 /* execute the instruction */
2231 result
= operand_1
+ operand_2
;
2232 lsb
= result
& 0xff;
2234 buff
[result_dest
] = msb
;
2235 buff
[(result_dest
+1) & 0xffff] = lsb
;
2236 if (print_level_1
) {
2237 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_loading_result
, bytecode_tvb
, 0, -1,
2238 " Loading result %u at %u", result
, result_dest
);
2240 current_address
= next_operand_address
;
2241 goto execute_next_instruction
;
2243 case SIGCOMP_INSTR_SUBTRACT
: /* 7 SUBTRACT ($operand_1, %operand_2) */
2244 if (show_instr_detail_level
== 2 ) {
2245 proto_item_append_text(addr_item
, " (operand_1, operand_2)");
2247 start_offset
= offset
;
2249 operand_address
= current_address
+ 1;
2250 next_operand_address
= dissect_udvm_reference_operand_memory(buff
, operand_address
, &operand_1
, &result_dest
);
2251 if (next_operand_address
< 0)
2252 goto decompression_failure
;
2253 if (show_instr_detail_level
== 2 ) {
2254 proto_tree_add_uint_format(udvm_tree
, hf_udvm_operand_1
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), operand_1
,
2255 "Addr: %u operand_1 %u", operand_address
, operand_1
);
2257 offset
+= (next_operand_address
-operand_address
);
2258 operand_address
= next_operand_address
;
2260 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &operand_2
);
2261 if (next_operand_address
< 0)
2262 goto decompression_failure
;
2263 if (show_instr_detail_level
== 2 ) {
2264 proto_tree_add_uint_format(udvm_tree
, hf_udvm_operand_2
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), operand_2
,
2265 "Addr: %u operand_2 %u", operand_address
, operand_2
);
2267 offset
+= (next_operand_address
-operand_address
);
2268 if (show_instr_detail_level
== 1)
2270 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_decompress_instruction
, bytecode_tvb
, start_offset
, offset
-start_offset
,
2271 "Addr: %u ## SUBTRACT (operand_1=%u, operand_2=%u)",
2272 current_address
, operand_1
, operand_2
);
2274 /* execute the instruction */
2275 result
= operand_1
- operand_2
;
2276 lsb
= result
& 0xff;
2278 buff
[result_dest
] = msb
;
2279 buff
[(result_dest
+1) & 0xffff] = lsb
;
2280 if (print_level_1
) {
2281 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_loading_result
, bytecode_tvb
, 0, -1,
2282 " Loading result %u at %u", result
, result_dest
);
2284 current_address
= next_operand_address
;
2285 goto execute_next_instruction
;
2288 case SIGCOMP_INSTR_MULTIPLY
: /* 8 MULTIPLY ($operand_1, %operand_2) */
2289 if (show_instr_detail_level
== 2 ) {
2290 proto_item_append_text(addr_item
, " (operand_1, operand_2)");
2292 start_offset
= offset
;
2294 operand_address
= current_address
+ 1;
2295 next_operand_address
= dissect_udvm_reference_operand_memory(buff
, operand_address
, &operand_1
, &result_dest
);
2296 if (next_operand_address
< 0)
2297 goto decompression_failure
;
2298 if (show_instr_detail_level
== 2 ) {
2299 proto_tree_add_uint_format(udvm_tree
, hf_udvm_operand_1
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), operand_1
,
2300 "Addr: %u operand_1 %u", operand_address
, operand_1
);
2302 offset
+= (next_operand_address
-operand_address
);
2303 operand_address
= next_operand_address
;
2305 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &operand_2
);
2306 if (next_operand_address
< 0)
2307 goto decompression_failure
;
2308 if (show_instr_detail_level
== 2 ) {
2309 proto_tree_add_uint_format(udvm_tree
, hf_udvm_operand_2
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), operand_2
,
2310 "Addr: %u operand_2 %u", operand_address
, operand_2
);
2312 offset
+= (next_operand_address
-operand_address
);
2313 if (show_instr_detail_level
== 1)
2315 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_decompress_instruction
, bytecode_tvb
, start_offset
, offset
-start_offset
,
2316 "Addr: %u ## MULTIPLY (operand_1=%u, operand_2=%u)",
2317 current_address
, operand_1
, operand_2
);
2320 * execute the instruction
2321 * MULTIPLY (m, n) := m * n (modulo 2^16)
2323 if ( operand_2
== 0) {
2325 goto decompression_failure
;
2327 result
= operand_1
* operand_2
;
2328 lsb
= result
& 0xff;
2330 buff
[result_dest
] = msb
;
2331 buff
[(result_dest
+1) & 0xffff] = lsb
;
2332 if (print_level_1
) {
2333 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_loading_result
, bytecode_tvb
, 0, -1,
2334 " Loading result %u at %u", result
, result_dest
);
2336 current_address
= next_operand_address
;
2337 goto execute_next_instruction
;
2340 case SIGCOMP_INSTR_DIVIDE
: /* 9 DIVIDE ($operand_1, %operand_2) */
2341 if (show_instr_detail_level
== 2 ) {
2342 proto_item_append_text(addr_item
, " (operand_1, operand_2)");
2344 start_offset
= offset
;
2346 operand_address
= current_address
+ 1;
2347 next_operand_address
= dissect_udvm_reference_operand_memory(buff
, operand_address
, &operand_1
, &result_dest
);
2348 if (next_operand_address
< 0)
2349 goto decompression_failure
;
2350 if (show_instr_detail_level
== 2 ) {
2351 proto_tree_add_uint_format(udvm_tree
, hf_udvm_operand_1
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), operand_1
,
2352 "Addr: %u operand_1 %u", operand_address
, operand_1
);
2354 offset
+= (next_operand_address
-operand_address
);
2355 operand_address
= next_operand_address
;
2357 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &operand_2
);
2358 if (next_operand_address
< 0)
2359 goto decompression_failure
;
2360 if (show_instr_detail_level
== 2 ) {
2361 proto_tree_add_uint_format(udvm_tree
, hf_udvm_operand_2
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), operand_2
,
2362 "Addr: %u operand_2 %u", operand_address
, operand_2
);
2364 offset
+= (next_operand_address
-operand_address
);
2365 if (show_instr_detail_level
== 1)
2367 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_decompress_instruction
, bytecode_tvb
, start_offset
, offset
-start_offset
,
2368 "Addr: %u ## DIVIDE (operand_1=%u, operand_2=%u)",
2369 current_address
, operand_1
, operand_2
);
2372 * execute the instruction
2373 * DIVIDE (m, n) := floor(m / n)
2374 * Decompression failure occurs if a DIVIDE or REMAINDER instruction
2375 * encounters an operand_2 that is zero.
2377 if ( operand_2
== 0) {
2379 goto decompression_failure
;
2381 result
= operand_1
/ operand_2
;
2382 lsb
= result
& 0xff;
2384 buff
[result_dest
] = msb
;
2385 buff
[(result_dest
+1) & 0xffff] = lsb
;
2386 if (print_level_1
) {
2387 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_loading_result
, bytecode_tvb
, 0, -1,
2388 " Loading result %u at %u", result
, result_dest
);
2390 current_address
= next_operand_address
;
2391 goto execute_next_instruction
;
2394 case SIGCOMP_INSTR_REMAINDER
: /* 10 REMAINDER ($operand_1, %operand_2) */
2395 if (show_instr_detail_level
== 2 ) {
2396 proto_item_append_text(addr_item
, " (operand_1, operand_2)");
2398 start_offset
= offset
;
2400 operand_address
= current_address
+ 1;
2401 next_operand_address
= dissect_udvm_reference_operand_memory(buff
, operand_address
, &operand_1
, &result_dest
);
2402 if (next_operand_address
< 0)
2403 goto decompression_failure
;
2404 if (show_instr_detail_level
== 2 ) {
2405 proto_tree_add_uint_format(udvm_tree
, hf_udvm_operand_1
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), operand_1
,
2406 "Addr: %u operand_1 %u", operand_address
, operand_1
);
2408 offset
+= (next_operand_address
-operand_address
);
2409 operand_address
= next_operand_address
;
2411 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &operand_2
);
2412 if (next_operand_address
< 0)
2413 goto decompression_failure
;
2414 if (show_instr_detail_level
== 2 ) {
2415 proto_tree_add_uint_format(udvm_tree
, hf_udvm_operand_2
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), operand_2
,
2416 "Addr: %u operand_2 %u", operand_address
, operand_2
);
2418 offset
+= (next_operand_address
-operand_address
);
2419 if (show_instr_detail_level
== 1)
2421 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_decompress_instruction
, bytecode_tvb
, start_offset
, offset
-start_offset
,
2422 "Addr: %u ## REMAINDER (operand_1=%u, operand_2=%u)",
2423 current_address
, operand_1
, operand_2
);
2426 * execute the instruction
2427 * REMAINDER (m, n) := m - n * floor(m / n)
2428 * Decompression failure occurs if a DIVIDE or REMAINDER instruction
2429 * encounters an operand_2 that is zero.
2431 if ( operand_2
== 0) {
2433 goto decompression_failure
;
2435 result
= operand_1
- operand_2
* (operand_1
/ operand_2
);
2436 lsb
= result
& 0xff;
2438 buff
[result_dest
] = msb
;
2439 buff
[(result_dest
+1) & 0xffff] = lsb
;
2440 if (print_level_1
) {
2441 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_loading_result
, bytecode_tvb
, 0, -1,
2442 " Loading result %u at %u", result
, result_dest
);
2444 current_address
= next_operand_address
;
2445 goto execute_next_instruction
;
2447 case SIGCOMP_INSTR_SORT_ASCENDING
: /* 11 SORT-ASCENDING (%start, %n, %k) */
2449 * used_udvm_cycles = 1 + k * (ceiling(log2(k)) + n)
2451 if (show_instr_detail_level
== 2 ) {
2452 proto_item_append_text(addr_item
, " (start, n, k))");
2454 proto_tree_add_expert(udvm_tree
, pinfo
, &ei_sigcomp_execution_of_this_instruction_is_not_implemented
, bytecode_tvb
, 0, -1);
2456 * used_udvm_cycles = 1 + k * (ceiling(log2(k)) + n)
2460 case SIGCOMP_INSTR_SORT_DESCENDING
: /* 12 SORT-DESCENDING (%start, %n, %k) */
2461 if (show_instr_detail_level
== 2 ) {
2462 proto_item_append_text(addr_item
, " (start, n, k))");
2464 proto_tree_add_expert(udvm_tree
, pinfo
, &ei_sigcomp_execution_of_this_instruction_is_not_implemented
, bytecode_tvb
, 0, -1);
2466 * used_udvm_cycles = 1 + k * (ceiling(log2(k)) + n)
2469 case SIGCOMP_INSTR_SHA_1
: /* 13 SHA-1 (%position, %length, %destination) */
2470 if (show_instr_detail_level
== 2 ) {
2471 proto_item_append_text(addr_item
, " (position, length, destination)");
2473 operand_address
= current_address
+ 1;
2475 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &position
);
2476 if (next_operand_address
< 0)
2477 goto decompression_failure
;
2478 if (print_level_1
) {
2479 proto_tree_add_uint_format(udvm_tree
, hf_udvm_position
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), position
,
2480 "Addr: %u position %u", operand_address
, position
);
2482 offset
+= (next_operand_address
-operand_address
);
2483 operand_address
= next_operand_address
;
2486 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &length
);
2487 if (next_operand_address
< 0)
2488 goto decompression_failure
;
2489 if (print_level_1
) {
2490 proto_tree_add_uint_format(udvm_tree
, hf_udvm_length
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), length
,
2491 "Addr: %u Length %u", operand_address
, length
);
2493 offset
+= (next_operand_address
-operand_address
);
2494 operand_address
= next_operand_address
;
2497 next_operand_address
= dissect_udvm_reference_operand_memory(buff
, operand_address
, &ref_destination
, &result_dest
);
2498 if (next_operand_address
< 0)
2499 goto decompression_failure
;
2500 if (print_level_1
) {
2501 proto_tree_add_uint_format(udvm_tree
, hf_udvm_ref_dest
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), ref_destination
,
2502 "Addr: %u $destination %u", operand_address
, ref_destination
);
2504 offset
+= (next_operand_address
-operand_address
);
2505 used_udvm_cycles
= used_udvm_cycles
+ length
;
2509 byte_copy_right
= buff
[66] << 8;
2510 byte_copy_right
= byte_copy_right
| buff
[67];
2511 byte_copy_left
= buff
[64] << 8;
2512 byte_copy_left
= byte_copy_left
| buff
[65];
2514 if (print_level_2
) {
2515 proto_tree_add_bytes_format(udvm_tree
, hf_sigcomp_byte_copy
, message_tvb
, 0, -1,
2516 NULL
, "byte_copy_right = %u", byte_copy_right
);
2519 if (gcry_md_open(&sha1_handle
, GCRY_MD_SHA1
, 0)) {
2520 goto decompression_failure
;
2524 uint16_t handle_now
= length
;
2526 if ( k
< byte_copy_right
&& byte_copy_right
<= k
+ (length
-n
) ) {
2527 handle_now
= byte_copy_right
- position
;
2530 if ((k
+ handle_now
>= UDVM_MEMORY_SIZE
) ||
2531 (n
+ handle_now
>= UDVM_MEMORY_SIZE
)) {
2532 gcry_md_close(sha1_handle
);
2533 goto decompression_failure
;
2535 gcry_md_write(sha1_handle
, &buff
[k
], handle_now
);
2537 k
= ( k
+ handle_now
) & 0xffff;
2538 n
= ( n
+ handle_now
) & 0xffff;
2540 if ( k
>= byte_copy_right
) {
2545 memcpy(sha1_digest_buf
, gcry_md_read(sha1_handle
, 0), HASH_SHA1_LENGTH
);
2546 gcry_md_close(sha1_handle
);
2548 k
= ref_destination
;
2550 for ( n
=0; n
< STATE_BUFFER_SIZE
; n
++ ) {
2552 buff
[k
] = sha1_digest_buf
[n
];
2554 k
= ( k
+ 1 ) & 0xffff;
2557 if ( k
== byte_copy_right
) {
2562 if (print_level_2
) {
2563 proto_tree_add_bytes_with_length(udvm_tree
, hf_sigcomp_calculated_sha_1
, message_tvb
, 0, -1,
2564 sha1_digest_buf
, STATE_BUFFER_SIZE
);
2567 current_address
= next_operand_address
;
2568 goto execute_next_instruction
;
2571 case SIGCOMP_INSTR_LOAD
: /* 14 LOAD (%address, %value) */
2572 if (show_instr_detail_level
== 2 ) {
2573 proto_item_append_text(addr_item
, " (%%address, %%value)");
2575 start_offset
= offset
;
2576 operand_address
= current_address
+ 1;
2578 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &addr
);
2579 if (next_operand_address
< 0)
2580 goto decompression_failure
;
2581 if (show_instr_detail_level
== 2 ) {
2582 proto_tree_add_uint_format(udvm_tree
, hf_udvm_address
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), addr
,
2583 "Addr: %u Address %u", operand_address
, addr
);
2585 offset
+= (next_operand_address
-operand_address
);
2586 operand_address
= next_operand_address
;
2588 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &value
);
2589 if (next_operand_address
< 0)
2590 goto decompression_failure
;
2591 if (show_instr_detail_level
== 2)
2593 proto_tree_add_uint_format(udvm_tree
, hf_udvm_value
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), value
,
2594 "Addr: %u Value %u", operand_address
, value
);
2596 offset
+= (next_operand_address
-operand_address
);
2601 buff
[(addr
+ 1) & 0xffff] = lsb
;
2603 if (print_level_1
) {
2604 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_decompress_instruction
, bytecode_tvb
, start_offset
, offset
-start_offset
,
2605 "Addr: %u ## LOAD (%%address=%u, %%value=%u)",
2606 current_address
, addr
, value
);
2607 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_loading_result
, bytecode_tvb
, 0, -1,
2608 " Loading bytes at %u Value %u 0x%x", addr
, value
, value
);
2610 current_address
= next_operand_address
;
2611 goto execute_next_instruction
;
2614 case SIGCOMP_INSTR_MULTILOAD
: /* 15 MULTILOAD (%address, #n, %value_0, ..., %value_n-1) */
2616 * The MULTILOAD instruction sets a contiguous block of 2-byte words in
2617 * the UDVM memory to specified values.
2618 * Hmm what if the value to load only takes one byte ? Chose to always load two bytes.
2620 if (show_instr_detail_level
== 2 ) {
2621 proto_item_append_text(addr_item
, " (%%address, #n, value_0, ..., value_n-1)");
2623 start_offset
= offset
;
2624 operand_address
= current_address
+ 1;
2626 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &addr
);
2627 if (next_operand_address
< 0)
2628 goto decompression_failure
;
2629 if (show_instr_detail_level
== 2 ) {
2630 proto_tree_add_uint_format(udvm_tree
, hf_udvm_address
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), addr
,
2631 "Addr: %u Address %u", operand_address
, addr
);
2633 offset
+= (next_operand_address
-operand_address
);
2634 operand_address
= next_operand_address
;
2637 next_operand_address
= decode_udvm_literal_operand(buff
,operand_address
, &n
);
2638 if (next_operand_address
< 0)
2639 goto decompression_failure
;
2640 if (show_instr_detail_level
== 2 ) {
2641 proto_tree_add_uint_format(udvm_tree
, hf_udvm_literal_num
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), n
,
2642 "Addr: %u n %u", operand_address
, n
);
2644 offset
+= (next_operand_address
-operand_address
);
2645 if (show_instr_detail_level
== 1)
2647 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_decompress_instruction
, bytecode_tvb
, start_offset
, offset
-start_offset
,
2648 "Addr: %u ## MULTILOAD (%%address=%u, #n=%u, value_0, ..., value_%d)",
2649 current_address
, addr
, n
, n
-1);
2651 operand_address
= next_operand_address
;
2652 used_udvm_cycles
= used_udvm_cycles
+ n
;
2656 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &value
);
2657 if (next_operand_address
< 0)
2658 goto decompression_failure
;
2662 if (addr
>= UDVM_MEMORY_SIZE
- 1)
2663 goto decompression_failure
;
2666 buff
[(addr
+ 1) & 0xffff] = lsb
;
2669 length
= next_operand_address
- operand_address
;
2671 if (print_level_1
) {
2672 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_loading_result
, bytecode_tvb
, 0, -1,
2673 "Addr: %u Value %5u - Loading bytes at %5u Value %5u 0x%x", operand_address
, value
, addr
, value
, value
);
2676 operand_address
= next_operand_address
;
2678 current_address
= next_operand_address
;
2679 goto execute_next_instruction
;
2683 case SIGCOMP_INSTR_PUSH
: /* 16 PUSH (%value) */
2684 if (show_instr_detail_level
== 2) {
2685 proto_item_append_text(addr_item
, " (value)");
2687 start_offset
= offset
;
2688 operand_address
= current_address
+ 1;
2690 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &value
);
2691 if (next_operand_address
< 0)
2692 goto decompression_failure
;
2693 if (show_instr_detail_level
== 2) {
2694 proto_tree_add_uint_format(udvm_tree
, hf_udvm_value
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), value
,
2695 "Addr: %u Value %u", operand_address
, value
);
2697 offset
+= (next_operand_address
-operand_address
);
2698 if (show_instr_detail_level
== 1)
2700 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_decompress_instruction
, bytecode_tvb
, start_offset
, offset
-start_offset
,
2701 "Addr: %u ## PUSH (value=%u)",
2702 current_address
, value
);
2704 current_address
= next_operand_address
;
2706 /* Push the value address onto the stack */
2707 stack_location
= (buff
[70] << 8) | buff
[71];
2708 stack_fill
= (buff
[stack_location
] << 8)
2709 | buff
[(stack_location
+1) & 0xFFFF];
2710 addr
= (stack_location
+ stack_fill
* 2 + 2) & 0xFFFF;
2712 if (addr
>= UDVM_MEMORY_SIZE
- 1)
2713 goto decompression_failure
;
2715 buff
[addr
] = (value
>> 8) & 0x00FF;
2716 buff
[(addr
+1) & 0xFFFF] = value
& 0x00FF;
2718 if (stack_location
>= UDVM_MEMORY_SIZE
- 1)
2719 goto decompression_failure
;
2721 stack_fill
= (stack_fill
+ 1) & 0xFFFF;
2722 buff
[stack_location
] = (stack_fill
>> 8) & 0x00FF;
2723 buff
[(stack_location
+1) & 0xFFFF] = stack_fill
& 0x00FF;
2725 goto execute_next_instruction
;
2729 case SIGCOMP_INSTR_POP
: /* 17 POP (%address) */
2730 if (show_instr_detail_level
== 2) {
2731 proto_item_append_text(addr_item
, " (value)");
2733 start_offset
= offset
;
2734 operand_address
= current_address
+ 1;
2736 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &destination
);
2737 if (next_operand_address
< 0)
2738 goto decompression_failure
;
2739 if (show_instr_detail_level
== 2) {
2740 proto_tree_add_uint_format(udvm_tree
, hf_udvm_address
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), destination
,
2741 "Addr: %u Value %u", operand_address
, destination
);
2743 offset
+= (next_operand_address
-operand_address
);
2744 if (show_instr_detail_level
== 1)
2746 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_decompress_instruction
, bytecode_tvb
, start_offset
, offset
-start_offset
,
2747 "Addr: %u ## POP (address=%u)",
2748 current_address
, destination
);
2750 current_address
= next_operand_address
;
2752 /* Pop value from the top of the stack */
2753 stack_location
= (buff
[70] << 8) | buff
[71];
2754 stack_fill
= (buff
[stack_location
] << 8)
2755 | buff
[(stack_location
+1) & 0xFFFF];
2756 if (stack_fill
== 0)
2759 goto decompression_failure
;
2762 if (stack_location
>= UDVM_MEMORY_SIZE
- 1)
2763 goto decompression_failure
;
2765 stack_fill
= (stack_fill
- 1) & 0xFFFF;
2766 buff
[stack_location
] = (stack_fill
>> 8) & 0x00FF;
2767 buff
[(stack_location
+1) & 0xFFFF] = stack_fill
& 0x00FF;
2769 addr
= (stack_location
+ stack_fill
* 2 + 2) & 0xFFFF;
2771 if (addr
>= UDVM_MEMORY_SIZE
- 1)
2772 goto decompression_failure
;
2774 value
= (buff
[addr
] << 8)
2775 | buff
[(addr
+1) & 0xFFFF];
2777 /* ... and store the popped value. */
2778 if (destination
>= UDVM_MEMORY_SIZE
- 1)
2779 goto decompression_failure
;
2780 buff
[destination
] = (value
>> 8) & 0x00FF;
2781 buff
[(destination
+1) & 0xFFFF] = value
& 0x00FF;
2783 goto execute_next_instruction
;
2787 case SIGCOMP_INSTR_COPY
: /* 18 COPY (%position, %length, %destination) */
2788 if (show_instr_detail_level
== 2 ) {
2789 proto_item_append_text(addr_item
, " (position, length, destination)");
2791 start_offset
= offset
;
2792 operand_address
= current_address
+ 1;
2794 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &position
);
2795 if (next_operand_address
< 0)
2796 goto decompression_failure
;
2797 if (show_instr_detail_level
== 2 ) {
2798 proto_tree_add_uint_format(udvm_tree
, hf_udvm_position
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), position
,
2799 "Addr: %u position %u", operand_address
, position
);
2801 offset
+= (next_operand_address
-operand_address
);
2802 operand_address
= next_operand_address
;
2805 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &length
);
2806 if (next_operand_address
< 0)
2807 goto decompression_failure
;
2808 if (show_instr_detail_level
== 2 ) {
2809 proto_tree_add_uint_format(udvm_tree
, hf_udvm_length
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), length
,
2810 "Addr: %u Length %u", operand_address
, length
);
2812 offset
+= (next_operand_address
-operand_address
);
2813 operand_address
= next_operand_address
;
2816 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &destination
);
2817 if (next_operand_address
< 0)
2818 goto decompression_failure
;
2819 if (show_instr_detail_level
== 2 ) {
2820 proto_tree_add_uint_format(udvm_tree
, hf_udvm_ref_dest
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), destination
,
2821 "Addr: %u Destination %u", operand_address
, destination
);
2823 offset
+= (next_operand_address
-operand_address
);
2824 if (show_instr_detail_level
== 1)
2826 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_decompress_instruction
, bytecode_tvb
, start_offset
, offset
-start_offset
,
2827 "Addr: %u ## COPY (position=%u, length=%u, destination=%u)",
2828 current_address
, position
, length
, destination
);
2830 current_address
= next_operand_address
;
2834 * The string of bytes is copied in ascending order of memory address,
2835 * respecting the bounds set by byte_copy_left and byte_copy_right.
2836 * More precisely, if a byte is copied from/to Address m then the next
2837 * byte is copied from/to Address n where n is calculated as follows:
2839 * Set k := m + 1 (modulo 2^16)
2840 * If k = byte_copy_right then set n := byte_copy_left, else set n := k
2846 byte_copy_right
= buff
[66] << 8;
2847 byte_copy_right
= byte_copy_right
| buff
[67];
2848 byte_copy_left
= buff
[64] << 8;
2849 byte_copy_left
= byte_copy_left
| buff
[65];
2850 if (print_level_2
) {
2851 proto_tree_add_bytes_format(udvm_tree
, hf_sigcomp_byte_copy
, message_tvb
, input_address
, 1,
2852 NULL
, " byte_copy_right = %u", byte_copy_right
);
2855 while ( n
< length
) {
2856 buff
[k
] = buff
[position
];
2857 if (print_level_2
) {
2858 proto_tree_add_uint_format(udvm_tree
, hf_sigcomp_copying_value
, message_tvb
, input_address
, 1,
2859 buff
[position
], " Copying value: %u (0x%x) to Addr: %u",
2860 buff
[position
], buff
[position
], k
);
2862 position
= ( position
+ 1 ) & 0xffff;
2863 k
= ( k
+ 1 ) & 0xffff;
2867 * Check for circular buffer wrapping after the positions are
2868 * incremented. If either started at BCR then they should continue
2869 * to increment beyond BCR.
2871 if ( k
== byte_copy_right
) {
2874 if ( position
== byte_copy_right
) {
2875 position
= byte_copy_left
;
2878 used_udvm_cycles
= used_udvm_cycles
+ length
;
2879 goto execute_next_instruction
;
2882 case SIGCOMP_INSTR_COPY_LITERAL
: /* 19 COPY-LITERAL (%position, %length, $destination) */
2883 if (show_instr_detail_level
== 2 ) {
2884 proto_item_append_text(addr_item
, " (position, length, $destination)");
2886 start_offset
= offset
;
2887 operand_address
= current_address
+ 1;
2889 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &position
);
2890 if (next_operand_address
< 0)
2891 goto decompression_failure
;
2892 if (show_instr_detail_level
== 2 ) {
2893 proto_tree_add_uint_format(udvm_tree
, hf_udvm_position
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), position
,
2894 "Addr: %u position %u", operand_address
, position
);
2896 offset
+= (next_operand_address
-operand_address
);
2897 operand_address
= next_operand_address
;
2900 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &length
);
2901 if (next_operand_address
< 0)
2902 goto decompression_failure
;
2903 if (show_instr_detail_level
== 2 ) {
2904 proto_tree_add_uint_format(udvm_tree
, hf_udvm_length
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), length
,
2905 "Addr: %u Length %u", operand_address
, length
);
2907 offset
+= (next_operand_address
-operand_address
);
2908 operand_address
= next_operand_address
;
2912 next_operand_address
= dissect_udvm_reference_operand_memory(buff
, operand_address
, &ref_destination
, &result_dest
);
2913 if (next_operand_address
< 0)
2914 goto decompression_failure
;
2915 if (show_instr_detail_level
== 2 ) {
2916 proto_tree_add_uint_format(udvm_tree
, hf_udvm_ref_dest
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), ref_destination
,
2917 "Addr: %u destination %u", operand_address
, ref_destination
);
2919 offset
+= (next_operand_address
-operand_address
);
2920 if (show_instr_detail_level
== 1)
2922 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_decompress_instruction
, bytecode_tvb
, start_offset
, offset
-start_offset
,
2923 "Addr: %u ## COPY-LITERAL (position=%u, length=%u, $destination=%u)",
2924 current_address
, position
, length
, ref_destination
);
2926 current_address
= next_operand_address
;
2932 * The string of bytes is copied in ascending order of memory address,
2933 * respecting the bounds set by byte_copy_left and byte_copy_right.
2934 * More precisely, if a byte is copied from/to Address m then the next
2935 * byte is copied from/to Address n where n is calculated as follows:
2937 * Set k := m + 1 (modulo 2^16)
2938 * If k = byte_copy_right then set n := byte_copy_left, else set n := k
2943 k
= ref_destination
;
2944 byte_copy_right
= buff
[66] << 8;
2945 byte_copy_right
= byte_copy_right
| buff
[67];
2946 byte_copy_left
= buff
[64] << 8;
2947 byte_copy_left
= byte_copy_left
| buff
[65];
2948 if (print_level_2
) {
2949 proto_tree_add_bytes_format(udvm_tree
, hf_sigcomp_byte_copy
, message_tvb
, input_address
, 1,
2950 NULL
, " byte_copy_right = %u", byte_copy_right
);
2952 while ( n
< length
) {
2954 buff
[k
] = buff
[position
];
2955 if (print_level_2
) {
2956 proto_tree_add_uint_format(udvm_tree
, hf_sigcomp_copying_value
, message_tvb
, input_address
, 1,
2957 buff
[position
], " Copying value: %u (0x%x) to Addr: %u",
2958 buff
[position
], buff
[position
], k
);
2960 position
= ( position
+ 1 ) & 0xffff;
2961 k
= ( k
+ 1 ) & 0xffff;
2965 * Check for circular buffer wrapping after the positions are
2966 * incremented. It is important that k cannot be left set
2967 * to BCR. Also, if either started at BCR then they should continue
2968 * to increment beyond BCR.
2970 if ( k
== byte_copy_right
) {
2973 if ( position
== byte_copy_right
) {
2974 position
= byte_copy_left
;
2977 buff
[result_dest
] = k
>> 8;
2978 buff
[(result_dest
+ 1) & 0xffff] = k
& 0x00ff;
2980 used_udvm_cycles
= used_udvm_cycles
+ length
;
2981 goto execute_next_instruction
;
2984 case SIGCOMP_INSTR_COPY_OFFSET
: /* 20 COPY-OFFSET (%offset, %length, $destination) */
2985 if (show_instr_detail_level
== 2 ) {
2986 proto_item_append_text(addr_item
, " (offset, length, $destination)");
2988 start_offset
= offset
;
2989 operand_address
= current_address
+ 1;
2991 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &multy_offset
);
2992 if (next_operand_address
< 0)
2993 goto decompression_failure
;
2994 if (show_instr_detail_level
== 2 ) {
2995 proto_tree_add_uint_format(udvm_tree
, hf_udvm_offset
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), multy_offset
,
2996 "Addr: %u offset %u", operand_address
, multy_offset
);
2998 offset
+= (next_operand_address
-operand_address
);
2999 operand_address
= next_operand_address
;
3002 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &length
);
3003 if (next_operand_address
< 0)
3004 goto decompression_failure
;
3005 if (show_instr_detail_level
== 2 ) {
3006 proto_tree_add_uint_format(udvm_tree
, hf_udvm_length
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), length
,
3007 "Addr: %u Length %u", operand_address
, length
);
3009 offset
+= (next_operand_address
-operand_address
);
3010 operand_address
= next_operand_address
;
3014 next_operand_address
= dissect_udvm_reference_operand_memory(buff
, operand_address
, &ref_destination
, &result_dest
);
3015 if (next_operand_address
< 0)
3016 goto decompression_failure
;
3017 if (show_instr_detail_level
== 2 ) {
3018 proto_tree_add_uint_format(udvm_tree
, hf_udvm_ref_dest
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), ref_destination
,
3019 "Addr: %u $destination %u", operand_address
, ref_destination
);
3021 offset
+= (next_operand_address
-operand_address
);
3023 if (show_instr_detail_level
== 1)
3025 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_decompress_instruction
, bytecode_tvb
, start_offset
, offset
-start_offset
,
3026 "Addr: %u ## COPY-OFFSET (offset=%u, length=%u, $destination=%u)",
3027 current_address
, multy_offset
, length
, result_dest
);
3029 current_address
= next_operand_address
;
3031 /* Execute the instruction:
3032 * To derive the value of the position operand, starting at the memory
3033 * address specified by destination, the UDVM counts backwards a total
3034 * of offset memory addresses.
3036 * If the memory address specified in byte_copy_left is reached, the
3037 * next memory address is taken to be (byte_copy_right - 1) modulo 2^16.
3039 byte_copy_left
= buff
[64] << 8;
3040 byte_copy_left
= byte_copy_left
| buff
[65];
3041 byte_copy_right
= buff
[66] << 8;
3042 byte_copy_right
= byte_copy_right
| buff
[67];
3045 * In order to work out the position, simple arithmetic is tricky
3046 * to apply because there some nasty corner cases. A simple loop
3047 * is inefficient but the logic is simple.
3049 * FUTURE: This could be optimised.
3051 for (position
= ref_destination
, i
= 0; i
< multy_offset
; i
++)
3053 if ( position
== byte_copy_left
)
3055 position
= (byte_copy_right
- 1) & 0xffff;
3059 position
= (position
- 1) & 0xffff;
3063 if (print_level_2
) {
3064 proto_tree_add_bytes_format(udvm_tree
, hf_sigcomp_byte_copy
, message_tvb
, input_address
, 1,
3065 NULL
, " byte_copy_left = %u byte_copy_right = %u position= %u",
3066 byte_copy_left
, byte_copy_right
, position
);
3068 /* The COPY-OFFSET instruction then behaves as a COPY-LITERAL
3069 * instruction, taking the value of the position operand to be the last
3070 * memory address reached in the above step.
3076 * The string of bytes is copied in ascending order of memory address,
3077 * respecting the bounds set by byte_copy_left and byte_copy_right.
3078 * More precisely, if a byte is copied from/to Address m then the next
3079 * byte is copied from/to Address n where n is calculated as follows:
3081 * Set k := m + 1 (modulo 2^16)
3082 * If k = byte_copy_right then set n := byte_copy_left, else set n := k
3087 k
= ref_destination
;
3088 if (print_level_2
) {
3089 proto_tree_add_bytes_format(udvm_tree
, hf_sigcomp_byte_copy
, message_tvb
, input_address
, 1, NULL
,
3090 " byte_copy_left = %u byte_copy_right = %u", byte_copy_left
, byte_copy_right
);
3092 while ( n
< length
) {
3093 buff
[k
] = buff
[position
];
3094 if (print_level_2
) {
3095 proto_tree_add_uint_format(udvm_tree
, hf_sigcomp_copying_value
, message_tvb
, input_address
, 1,
3096 buff
[position
], " Copying value: %5u (0x%x) from Addr: %u to Addr: %u",
3097 buff
[position
], buff
[position
],(position
), k
);
3100 k
= ( k
+ 1 ) & 0xffff;
3101 position
= ( position
+ 1 ) & 0xffff;
3104 * Check for circular buffer wrapping after the positions are
3105 * incremented. It is important that k cannot be left set
3106 * to BCR. Also, if either started at BCR then they should continue
3107 * to increment beyond BCR.
3109 if ( k
== byte_copy_right
) {
3112 if ( position
== byte_copy_right
) {
3113 position
= byte_copy_left
;
3116 buff
[result_dest
] = k
>> 8;
3117 buff
[result_dest
+ 1] = k
& 0x00ff;
3118 used_udvm_cycles
= used_udvm_cycles
+ length
;
3119 goto execute_next_instruction
;
3122 case SIGCOMP_INSTR_MEMSET
: /* 21 MEMSET (%address, %length, %start_value, %offset) */
3123 if (show_instr_detail_level
== 2 ) {
3124 proto_item_append_text(addr_item
, " (address, length, start_value, offset)");
3126 start_offset
= offset
;
3127 operand_address
= current_address
+ 1;
3130 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &addr
);
3131 if (next_operand_address
< 0)
3132 goto decompression_failure
;
3133 if (show_instr_detail_level
== 2 ) {
3134 proto_tree_add_uint_format(udvm_tree
, hf_udvm_address
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), addr
,
3135 "Addr: %u Address %u", operand_address
, addr
);
3137 offset
+= (next_operand_address
-operand_address
);
3138 operand_address
= next_operand_address
;
3141 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &length
);
3142 if (next_operand_address
< 0)
3143 goto decompression_failure
;
3144 if (show_instr_detail_level
== 2 ) {
3145 proto_tree_add_uint_format(udvm_tree
, hf_udvm_length
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), length
,
3146 "Addr: %u Length %u", operand_address
, length
);
3148 offset
+= (next_operand_address
-operand_address
);
3149 operand_address
= next_operand_address
;
3151 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &start_value
);
3152 if (next_operand_address
< 0)
3153 goto decompression_failure
;
3154 if (show_instr_detail_level
== 2 ) {
3155 proto_tree_add_uint_format(udvm_tree
, hf_udvm_start_value
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), start_value
,
3156 "Addr: %u start_value %u", operand_address
, start_value
);
3158 offset
+= (next_operand_address
-operand_address
);
3159 operand_address
= next_operand_address
;
3162 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &multy_offset
);
3163 if (next_operand_address
< 0)
3164 goto decompression_failure
;
3165 if (show_instr_detail_level
== 2 ) {
3166 proto_tree_add_uint_format(udvm_tree
, hf_udvm_offset
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), multy_offset
,
3167 "Addr: %u offset %u", operand_address
, multy_offset
);
3169 offset
+= (next_operand_address
-operand_address
);
3170 if (show_instr_detail_level
== 1)
3172 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_decompress_instruction
, bytecode_tvb
, start_offset
, offset
-start_offset
,
3173 "Addr: %u ## MEMSET (address=%u, length=%u, start_value=%u, offset=%u)",
3174 current_address
, addr
, length
, start_value
, multy_offset
);
3176 current_address
= next_operand_address
;
3177 /* execute the instruction
3178 * The sequence of values used by the MEMSET instruction is specified by
3179 * the following formula:
3181 * Seq[n] := (start_value + n * offset) modulo 256
3185 byte_copy_right
= buff
[66] << 8;
3186 byte_copy_right
= byte_copy_right
| buff
[67];
3187 byte_copy_left
= buff
[64] << 8;
3188 byte_copy_left
= byte_copy_left
| buff
[65];
3189 if (print_level_2
) {
3190 proto_tree_add_bytes_format(udvm_tree
, hf_sigcomp_byte_copy
, message_tvb
, input_address
, 1, NULL
,
3191 " byte_copy_left = %u byte_copy_right = %u", byte_copy_left
, byte_copy_right
);
3193 while ( n
< length
) {
3194 if ( k
== byte_copy_right
) {
3197 buff
[k
] = (start_value
+ ( n
* multy_offset
)) & 0xff;
3198 if (print_level_2
) {
3199 proto_tree_add_uint_format(udvm_tree
, hf_sigcomp_storing_value
, message_tvb
, input_address
, 1,
3200 buff
[k
], " Storing value: %u (0x%x) at Addr: %u",
3201 buff
[k
], buff
[k
], k
);
3203 k
= ( k
+ 1 ) & 0xffff;
3206 used_udvm_cycles
= used_udvm_cycles
+ length
;
3207 goto execute_next_instruction
;
3211 case SIGCOMP_INSTR_JUMP
: /* 22 JUMP (@address) */
3212 if (show_instr_detail_level
== 2 ) {
3213 proto_item_append_text(addr_item
, " (@address)");
3215 start_offset
= offset
;
3216 operand_address
= current_address
+ 1;
3218 /* operand_value = (memory_address_of_instruction + D) modulo 2^16 */
3219 next_operand_address
= decode_udvm_address_operand(buff
,operand_address
, &at_address
, current_address
);
3220 if (next_operand_address
< 0)
3221 goto decompression_failure
;
3222 if (show_instr_detail_level
== 2 ) {
3223 proto_tree_add_uint_format(udvm_tree
, hf_udvm_at_address
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), at_address
,
3224 "Addr: %u @Address %u", operand_address
, at_address
);
3226 offset
+= (next_operand_address
-operand_address
);
3227 if (show_instr_detail_level
== 1)
3229 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_decompress_instruction
, bytecode_tvb
, start_offset
, offset
-start_offset
,
3230 "Addr: %u ## JUMP (@address=%u)",
3231 current_address
, at_address
);
3233 current_address
= at_address
;
3234 goto execute_next_instruction
;
3237 case SIGCOMP_INSTR_COMPARE
: /* 23 */
3238 /* COMPARE (%value_1, %value_2, @address_1, @address_2, @address_3)
3240 if (show_instr_detail_level
== 2 ) {
3241 proto_item_append_text(addr_item
, " (value_1, value_2, @address_1, @address_2, @address_3)");
3243 start_offset
= offset
;
3244 operand_address
= current_address
+ 1;
3247 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &value_1
);
3248 if (next_operand_address
< 0)
3249 goto decompression_failure
;
3250 if (show_instr_detail_level
== 2 ) {
3251 proto_tree_add_uint_format(udvm_tree
, hf_udvm_value
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), value_1
,
3252 "Addr: %u Value %u", operand_address
, value_1
);
3254 offset
+= (next_operand_address
-operand_address
);
3255 operand_address
= next_operand_address
;
3258 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &value_2
);
3259 if (next_operand_address
< 0)
3260 goto decompression_failure
;
3261 if (show_instr_detail_level
== 2 ) {
3262 proto_tree_add_uint_format(udvm_tree
, hf_udvm_value
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), value_2
,
3263 "Addr: %u Value %u", operand_address
, value_2
);
3265 offset
+= (next_operand_address
-operand_address
);
3266 operand_address
= next_operand_address
;
3269 /* operand_value = (memory_address_of_instruction + D) modulo 2^16 */
3270 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &at_address_1
);
3271 if (next_operand_address
< 0)
3272 goto decompression_failure
;
3273 at_address_1
= ( current_address
+ at_address_1
) & 0xffff;
3274 if (show_instr_detail_level
== 2 ) {
3275 proto_tree_add_uint_format(udvm_tree
, hf_udvm_at_address
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), at_address_1
,
3276 "Addr: %u @Address %u", operand_address
, at_address_1
);
3278 offset
+= (next_operand_address
-operand_address
);
3279 operand_address
= next_operand_address
;
3283 /* operand_value = (memory_address_of_instruction + D) modulo 2^16 */
3284 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &at_address_2
);
3285 if (next_operand_address
< 0)
3286 goto decompression_failure
;
3287 at_address_2
= ( current_address
+ at_address_2
) & 0xffff;
3288 if (show_instr_detail_level
== 2 ) {
3289 proto_tree_add_uint_format(udvm_tree
, hf_udvm_at_address
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), at_address_2
,
3290 "Addr: %u @Address %u", operand_address
, at_address_2
);
3292 offset
+= (next_operand_address
-operand_address
);
3293 operand_address
= next_operand_address
;
3296 /* operand_value = (memory_address_of_instruction + D) modulo 2^16 */
3297 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &at_address_3
);
3298 if (next_operand_address
< 0)
3299 goto decompression_failure
;
3300 at_address_3
= ( current_address
+ at_address_3
) & 0xffff;
3301 if (show_instr_detail_level
== 2 ) {
3302 proto_tree_add_uint_format(udvm_tree
, hf_udvm_at_address
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), at_address_3
,
3303 "Addr: %u @Address %u", operand_address
, at_address_3
);
3305 offset
+= (next_operand_address
-operand_address
);
3306 if (show_instr_detail_level
== 1)
3308 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_decompress_instruction
, bytecode_tvb
, start_offset
, offset
-start_offset
,
3309 "Addr: %u ## COMPARE (value_1=%u, value_2=%u, @address_1=%u, @address_2=%u, @address_3=%u)",
3310 current_address
, value_1
, value_2
, at_address_1
, at_address_2
, at_address_3
);
3312 /* execute the instruction
3313 * If value_1 < value_2 then the UDVM continues instruction execution at
3314 * the memory address specified by address 1. If value_1 = value_2 then
3315 * it jumps to the address specified by address_2. If value_1 > value_2
3316 * then it jumps to the address specified by address_3.
3318 if ( value_1
< value_2
)
3319 current_address
= at_address_1
;
3320 if ( value_1
== value_2
)
3321 current_address
= at_address_2
;
3322 if ( value_1
> value_2
)
3323 current_address
= at_address_3
;
3324 goto execute_next_instruction
;
3327 case SIGCOMP_INSTR_CALL
: /* 24 CALL (@address) (PUSH addr )*/
3328 if (show_instr_detail_level
== 2) {
3329 proto_item_append_text(addr_item
, " (@address) (PUSH addr )");
3331 start_offset
= offset
;
3332 operand_address
= current_address
+ 1;
3334 next_operand_address
= decode_udvm_address_operand(buff
,operand_address
, &at_address
, current_address
);
3335 if (next_operand_address
< 0)
3336 goto decompression_failure
;
3337 if (show_instr_detail_level
== 2 ) {
3338 proto_tree_add_uint_format(udvm_tree
, hf_udvm_at_address
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), at_address
,
3339 "Addr: %u @Address %u", operand_address
, at_address
);
3341 offset
+= (next_operand_address
-operand_address
);
3342 if (show_instr_detail_level
== 1)
3344 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_decompress_instruction
, bytecode_tvb
, start_offset
, offset
-start_offset
,
3345 "Addr: %u ## CALL (@address=%u)",
3346 current_address
, at_address
);
3348 current_address
= next_operand_address
;
3350 /* Push the current address onto the stack */
3351 stack_location
= (buff
[70] << 8) | buff
[71];
3352 stack_fill
= (buff
[stack_location
] << 8)
3353 | buff
[(stack_location
+1) & 0xFFFF];
3354 addr
= (stack_location
+ stack_fill
* 2 + 2) & 0xFFFF;
3355 if (addr
>= UDVM_MEMORY_SIZE
- 1)
3356 goto decompression_failure
;
3357 buff
[addr
] = (current_address
>> 8) & 0x00FF;
3358 buff
[(addr
+1) & 0xFFFF] = current_address
& 0x00FF;
3360 stack_fill
= (stack_fill
+ 1) & 0xFFFF;
3361 if (stack_location
>= UDVM_MEMORY_SIZE
- 1)
3362 goto decompression_failure
;
3363 buff
[stack_location
] = (stack_fill
>> 8) & 0x00FF;
3364 buff
[(stack_location
+1) & 0xFFFF] = stack_fill
& 0x00FF;
3366 /* ... and jump to the destination address */
3367 current_address
= at_address
;
3369 goto execute_next_instruction
;
3373 case SIGCOMP_INSTR_RETURN
: /* 25 POP and return */
3374 /* Pop value from the top of the stack */
3375 stack_location
= (buff
[70] << 8) | buff
[71];
3376 stack_fill
= (buff
[stack_location
] << 8)
3377 | buff
[(stack_location
+1) & 0xFFFF];
3378 if (stack_fill
== 0)
3381 goto decompression_failure
;
3384 stack_fill
= (stack_fill
- 1) & 0xFFFF;
3385 if (stack_location
>= UDVM_MEMORY_SIZE
- 1)
3386 goto decompression_failure
;
3387 buff
[stack_location
] = (stack_fill
>> 8) & 0x00FF;
3388 buff
[(stack_location
+1) & 0xFFFF] = stack_fill
& 0x00FF;
3390 addr
= (stack_location
+ stack_fill
* 2 + 2) & 0xFFFF;
3391 at_address
= (buff
[addr
] << 8)
3392 | buff
[(addr
+1) & 0xFFFF];
3394 /* ... and set the PC to the popped value */
3395 current_address
= at_address
;
3397 goto execute_next_instruction
;
3401 case SIGCOMP_INSTR_SWITCH
: /* 26 SWITCH (#n, %j, @address_0, @address_1, ... , @address_n-1) */
3403 * When a SWITCH instruction is encountered the UDVM reads the value of
3404 * j. It then continues instruction execution at the address specified
3407 * Decompression failure occurs if j specifies a value of n or more, or
3408 * if the address lies beyond the overall UDVM memory size.
3410 instruction_address
= current_address
;
3411 if (show_instr_detail_level
== 2) {
3412 proto_item_append_text(addr_item
, " (#n, j, @address_0, @address_1, ... , @address_n-1))");
3414 operand_address
= current_address
+ 1;
3416 * Number of addresses in the instruction
3418 next_operand_address
= decode_udvm_literal_operand(buff
,operand_address
, &n
);
3419 if (next_operand_address
< 0)
3420 goto decompression_failure
;
3421 if (print_level_2
) {
3422 proto_tree_add_uint_format(udvm_tree
, hf_udvm_literal_num
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), n
,
3423 "Addr: %u n %u", operand_address
, n
);
3425 offset
+= (next_operand_address
-operand_address
);
3426 operand_address
= next_operand_address
;
3428 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &j
);
3429 if (next_operand_address
< 0)
3430 goto decompression_failure
;
3431 if (print_level_2
) {
3432 proto_tree_add_uint_format(udvm_tree
, hf_udvm_j
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), j
,
3433 "Addr: %u j %u", operand_address
, j
);
3435 offset
+= (next_operand_address
-operand_address
);
3436 operand_address
= next_operand_address
;
3440 /* operand_value = (memory_address_of_instruction + D) modulo 2^16 */
3441 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &at_address_1
);
3442 if (next_operand_address
< 0)
3443 goto decompression_failure
;
3444 at_address_1
= ( instruction_address
+ at_address_1
) & 0xffff;
3445 if (print_level_2
) {
3446 proto_tree_add_uint_format(udvm_tree
, hf_udvm_at_address
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), at_address_1
,
3447 "Addr: %u @Address %u", operand_address
, at_address_1
);
3449 offset
+= (next_operand_address
-operand_address
);
3451 current_address
= at_address_1
;
3453 operand_address
= next_operand_address
;
3456 /* Check decompression failure */
3457 if ( ( j
== n
) || ( j
> n
)) {
3459 goto decompression_failure
;
3461 if ( current_address
> UDVM_MEMORY_SIZE
) {
3463 goto decompression_failure
;
3465 used_udvm_cycles
= used_udvm_cycles
+ n
;
3467 goto execute_next_instruction
;
3470 case SIGCOMP_INSTR_CRC
: /* 27 CRC (%value, %position, %length, @address) */
3471 if (show_instr_detail_level
== 2) {
3472 proto_item_append_text(addr_item
, " (value, position, length, @address)");
3474 start_offset
= offset
;
3476 operand_address
= current_address
+ 1;
3479 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &value
);
3480 if (next_operand_address
< 0)
3481 goto decompression_failure
;
3482 if (print_level_2
) {
3483 proto_tree_add_uint_format(udvm_tree
, hf_udvm_value
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), value
,
3484 "Addr: %u Value %u", operand_address
, value
);
3486 offset
+= (next_operand_address
-operand_address
);
3487 operand_address
= next_operand_address
;
3490 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &position
);
3491 if (next_operand_address
< 0)
3492 goto decompression_failure
;
3493 if (print_level_2
) {
3494 proto_tree_add_uint_format(udvm_tree
, hf_udvm_position
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), position
,
3495 "Addr: %u position %u", operand_address
, position
);
3497 offset
+= (next_operand_address
-operand_address
);
3498 operand_address
= next_operand_address
;
3501 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &length
);
3502 if (next_operand_address
< 0)
3503 goto decompression_failure
;
3504 if (print_level_2
) {
3505 proto_tree_add_uint_format(udvm_tree
, hf_udvm_length
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), length
,
3506 "Addr: %u Length %u", operand_address
, length
);
3508 offset
+= (next_operand_address
-operand_address
);
3509 operand_address
= next_operand_address
;
3512 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &at_address
);
3513 if (next_operand_address
< 0)
3514 goto decompression_failure
;
3515 at_address
= ( current_address
+ at_address
) & 0xffff;
3516 if (print_level_2
) {
3517 proto_tree_add_uint_format(udvm_tree
, hf_udvm_at_address
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), at_address
,
3518 "Addr: %u @Address %u", operand_address
, at_address
);
3520 offset
+= (next_operand_address
-operand_address
);
3521 /* operand_value = (memory_address_of_instruction + D) modulo 2^16 */
3522 used_udvm_cycles
= used_udvm_cycles
+ length
;
3526 byte_copy_right
= buff
[66] << 8;
3527 byte_copy_right
= byte_copy_right
| buff
[67];
3528 byte_copy_left
= buff
[64] << 8;
3529 byte_copy_left
= byte_copy_left
| buff
[65];
3532 if (print_level_2
) {
3533 proto_tree_add_bytes_format(udvm_tree
, hf_sigcomp_byte_copy
, message_tvb
, 0, -1,
3534 NULL
, "byte_copy_right = %u", byte_copy_right
);
3539 uint16_t handle_now
= length
- n
;
3541 if ( k
< byte_copy_right
&& byte_copy_right
<= k
+ (length
-n
) ) {
3542 handle_now
= byte_copy_right
- k
;
3545 if (k
+ handle_now
>= UDVM_MEMORY_SIZE
)
3546 goto decompression_failure
;
3547 result
= crc16_ccitt_seed(&buff
[k
], handle_now
, (uint16_t) (result
^ 0xffff));
3549 k
= ( k
+ handle_now
) & 0xffff;
3550 n
= ( n
+ handle_now
) & 0xffff;
3552 if ( k
>= byte_copy_right
) {
3557 result
= result
^ 0xffff;
3559 if (print_level_1
) {
3560 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_decompress_instruction
, bytecode_tvb
, start_offset
, offset
-start_offset
,
3561 "Calculated CRC %u", result
);
3563 if (result
!= value
) {
3564 current_address
= at_address
;
3567 current_address
= next_operand_address
;
3569 goto execute_next_instruction
;
3573 case SIGCOMP_INSTR_INPUT_BYTES
: /* 28 INPUT-BYTES (%length, %destination, @address) */
3574 if (show_instr_detail_level
== 2 ) {
3575 proto_item_append_text(addr_item
, " length, destination, @address)");
3577 start_offset
= offset
;
3578 operand_address
= current_address
+ 1;
3580 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &length
);
3581 if (next_operand_address
< 0)
3582 goto decompression_failure
;
3583 if (show_instr_detail_level
== 2 ) {
3584 proto_tree_add_uint_format(udvm_tree
, hf_udvm_length
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), length
,
3585 "Addr: %u Length %u", operand_address
, length
);
3587 offset
+= (next_operand_address
-operand_address
);
3588 operand_address
= next_operand_address
;
3591 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &destination
);
3592 if (next_operand_address
< 0)
3593 goto decompression_failure
;
3594 if (show_instr_detail_level
== 2 ) {
3595 proto_tree_add_uint_format(udvm_tree
, hf_udvm_destination
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), destination
,
3596 "Addr: %u Destination %u", operand_address
, destination
);
3598 offset
+= (next_operand_address
-operand_address
);
3599 operand_address
= next_operand_address
;
3602 /* operand_value = (memory_address_of_instruction + D) modulo 2^16 */
3603 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &at_address
);
3604 if (next_operand_address
< 0)
3605 goto decompression_failure
;
3606 at_address
= ( current_address
+ at_address
) & 0xffff;
3607 if (show_instr_detail_level
== 2 ) {
3608 proto_tree_add_uint_format(udvm_tree
, hf_udvm_at_address
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), at_address
,
3609 "Addr: %u @Address %u", operand_address
, at_address
);
3611 offset
+= (next_operand_address
-operand_address
);
3612 if (show_instr_detail_level
== 1)
3614 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_decompress_instruction
, bytecode_tvb
, start_offset
, offset
-start_offset
,
3615 "Addr: %u ## INPUT-BYTES length=%u, destination=%u, @address=%u)",
3616 current_address
, length
, destination
, at_address
);
3618 /* execute the instruction TODO insert checks
3622 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3623 * | byte_copy_left | 64 - 65
3624 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3625 * | byte_copy_right | 66 - 67
3626 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3627 * | input_bit_order | 68 - 69
3628 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3629 * | stack_location | 70 - 71
3630 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3632 * Figure 7: Memory addresses of the UDVM registers
3636 * The string of bytes is copied in ascending order of memory address,
3637 * respecting the bounds set by byte_copy_left and byte_copy_right.
3638 * More precisely, if a byte is copied from/to Address m then the next
3639 * byte is copied from/to Address n where n is calculated as follows:
3641 * Set k := m + 1 (modulo 2^16)
3642 * If k = byte_copy_right then set n := byte_copy_left, else set n := k
3648 byte_copy_right
= buff
[66] << 8;
3649 byte_copy_right
= byte_copy_right
| buff
[67];
3650 byte_copy_left
= buff
[64] << 8;
3651 byte_copy_left
= byte_copy_left
| buff
[65];
3652 if (print_level_1
) {
3653 proto_tree_add_bytes_format(udvm_tree
, hf_sigcomp_byte_copy
, message_tvb
, input_address
, 1,
3654 NULL
, " byte_copy_right = %u", byte_copy_right
);
3656 /* clear out remaining bits if any */
3659 /* operand_address used as dummy */
3660 while ( n
< length
) {
3661 if (input_address
> ( msg_end
- 1)) {
3662 current_address
= at_address
;
3664 goto execute_next_instruction
;
3667 if ( k
== byte_copy_right
) {
3670 octet
= tvb_get_uint8(message_tvb
, input_address
);
3672 if (print_level_1
) {
3673 proto_tree_add_uint_format(udvm_tree
, hf_sigcomp_loading_value
, message_tvb
, input_address
, 1,
3674 octet
, " Loading value: %u (0x%x) at Addr: %u", octet
, octet
, k
);
3678 * If the instruction requests data that lies beyond the end of the
3679 * SigComp message, no data is returned. Instead the UDVM moves program
3680 * execution to the address specified by the address operand.
3684 k
= ( k
+ 1 ) & 0xffff;
3687 used_udvm_cycles
= used_udvm_cycles
+ length
;
3688 current_address
= next_operand_address
;
3689 goto execute_next_instruction
;
3691 case SIGCOMP_INSTR_INPUT_BITS
:/* 29 INPUT-BITS (%length, %destination, @address) */
3693 * The length operand indicates the requested number of bits.
3694 * Decompression failure occurs if this operand does not lie between 0
3697 * The destination operand specifies the memory address to which the
3698 * compressed data should be copied. Note that the requested bits are
3699 * interpreted as a 2-byte integer ranging from 0 to 2^length - 1, as
3700 * explained in Section 8.2.
3702 * If the instruction requests data that lies beyond the end of the
3703 * SigComp message, no data is returned. Instead the UDVM moves program
3704 * execution to the address specified by the address operand.
3707 if (show_instr_detail_level
== 2 ) {
3708 proto_item_append_text(addr_item
, " (length, destination, @address)");
3710 start_offset
= offset
;
3711 operand_address
= current_address
+ 1;
3714 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &length
);
3715 if (next_operand_address
< 0)
3716 goto decompression_failure
;
3717 if (show_instr_detail_level
== 2 ) {
3718 proto_tree_add_uint_format(udvm_tree
, hf_udvm_length
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), length
,
3719 "Addr: %u length %u", operand_address
, length
);
3721 offset
+= (next_operand_address
-operand_address
);
3722 operand_address
= next_operand_address
;
3724 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &destination
);
3725 if (next_operand_address
< 0)
3726 goto decompression_failure
;
3727 if (show_instr_detail_level
== 2 ) {
3728 proto_tree_add_uint_format(udvm_tree
, hf_udvm_destination
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), destination
,
3729 "Addr: %u Destination %u", operand_address
, destination
);
3731 offset
+= (next_operand_address
-operand_address
);
3732 operand_address
= next_operand_address
;
3735 /* operand_value = (memory_address_of_instruction + D) modulo 2^16 */
3736 next_operand_address
= decode_udvm_address_operand(buff
,operand_address
, &at_address
, current_address
);
3737 if (next_operand_address
< 0)
3738 goto decompression_failure
;
3739 if (show_instr_detail_level
== 2 ) {
3740 proto_tree_add_uint_format(udvm_tree
, hf_udvm_at_address
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), at_address
,
3741 "Addr: %u @Address %u", operand_address
, at_address
);
3743 offset
+= (next_operand_address
-operand_address
);
3744 if (show_instr_detail_level
== 1)
3746 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_decompress_instruction
, bytecode_tvb
, start_offset
, offset
-start_offset
,
3747 "Addr: %u ## INPUT-BITS length=%u, destination=%u, @address=%u)",
3748 current_address
, length
, destination
, at_address
);
3750 current_address
= next_operand_address
;
3753 * Execute actual instr.
3754 * The input_bit_order register contains the following three flags:
3757 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3758 * | reserved |F|H|P| 68 - 69
3759 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3761 input_bit_order
= buff
[68] << 8;
3762 input_bit_order
= input_bit_order
| buff
[69];
3764 * If the instruction requests data that lies beyond the end of the
3765 * SigComp message, no data is returned. Instead the UDVM moves program
3766 * execution to the address specified by the address operand.
3769 if ( length
> 16 ) {
3771 goto decompression_failure
;
3773 if ( input_bit_order
> 7 ) {
3775 goto decompression_failure
;
3779 * Transfer F bit to bit_order to tell decomp dispatcher which bit order to use
3781 bit_order
= ( input_bit_order
& 0x0004 ) >> 2;
3782 value
= decomp_dispatch_get_bits( message_tvb
, udvm_tree
, bit_order
,
3783 buff
, &old_input_bit_order
, &remaining_bits
,
3784 &input_bits
, &input_address
, length
, &result_code
, msg_end
, print_level_1
);
3785 if ( result_code
== 11 ) {
3786 current_address
= at_address
;
3787 goto execute_next_instruction
;
3790 lsb
= value
& 0x00ff;
3791 if (destination
>= UDVM_MEMORY_SIZE
- 1)
3792 goto decompression_failure
;
3793 buff
[destination
] = msb
;
3794 buff
[(destination
+ 1) & 0xffff]=lsb
;
3795 if (print_level_1
) {
3796 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_loading_result
, message_tvb
, input_address
, 1,
3797 " Loading value: %u (0x%x) at Addr: %u, remaining_bits: %u", value
, value
, destination
, remaining_bits
);
3800 goto execute_next_instruction
;
3802 case SIGCOMP_INSTR_INPUT_HUFFMAN
: /* 30 */
3804 * INPUT-HUFFMAN (%destination, @address, #n, %bits_1, %lower_bound_1,
3805 * %upper_bound_1, %uncompressed_1, ... , %bits_n, %lower_bound_n,
3806 * %upper_bound_n, %uncompressed_n)
3808 if (show_instr_detail_level
== 2 ) {
3809 proto_item_append_text(addr_item
, " (destination, @address, #n, bits_1, lower_bound_1,upper_bound_1, uncompressed_1, ... , bits_n, lower_bound_n,upper_bound_n, uncompressed_n)");
3811 start_offset
= offset
;
3812 operand_address
= current_address
+ 1;
3815 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &destination
);
3816 if (next_operand_address
< 0)
3817 goto decompression_failure
;
3818 if (show_instr_detail_level
== 2 ) {
3819 proto_tree_add_uint_format(udvm_tree
, hf_udvm_destination
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), destination
,
3820 "Addr: %u Destination %u", operand_address
, destination
);
3822 offset
+= (next_operand_address
-operand_address
);
3823 operand_address
= next_operand_address
;
3826 /* operand_value = (memory_address_of_instruction + D) modulo 2^16 */
3827 next_operand_address
= decode_udvm_address_operand(buff
,operand_address
, &at_address
, current_address
);
3828 if (next_operand_address
< 0)
3829 goto decompression_failure
;
3830 if (show_instr_detail_level
== 2 ) {
3831 proto_tree_add_uint_format(udvm_tree
, hf_udvm_at_address
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), at_address
,
3832 "Addr: %u @Address %u", operand_address
, at_address
);
3834 offset
+= (next_operand_address
-operand_address
);
3835 operand_address
= next_operand_address
;
3838 next_operand_address
= decode_udvm_literal_operand(buff
,operand_address
, &n
);
3839 if (next_operand_address
< 0)
3840 goto decompression_failure
;
3841 if (show_instr_detail_level
== 2 ) {
3842 proto_tree_add_uint_format(udvm_tree
, hf_udvm_literal_num
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), n
,
3843 "Addr: %u n %u", operand_address
, n
);
3845 offset
+= (next_operand_address
-operand_address
);
3846 operand_address
= next_operand_address
;
3847 if (show_instr_detail_level
== 1)
3849 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_decompress_instruction
, bytecode_tvb
, start_offset
, offset
-start_offset
,
3850 "Addr: %u ## INPUT-HUFFMAN (destination=%u, @address=%u, #n=%u, bits_1, lower_1,upper_1, unc_1, ... , bits_%d, lower_%d,upper_%d, unc_%d)",
3851 current_address
, destination
, at_address
, n
, n
, n
, n
, n
);
3854 used_udvm_cycles
= used_udvm_cycles
+ n
;
3857 * Note that if n = 0 then the INPUT-HUFFMAN instruction is ignored and
3858 * program execution resumes at the following instruction.
3859 * Decompression failure occurs if (bits_1 + ... + bits_n) > 16.
3861 * In all other cases, the behavior of the INPUT-HUFFMAN instruction is
3864 * 1. Set j := 1 and set H := 0.
3866 * 2. Request bits_j compressed bits. Interpret the returned bits as an
3867 * integer k from 0 to 2^bits_j - 1, as explained in Section 8.2.
3869 * 3. Set H := H * 2^bits_j + k.
3871 * 4. If data is requested that lies beyond the end of the SigComp
3872 * message, terminate the INPUT-HUFFMAN instruction and move program
3873 * execution to the memory address specified by the address operand.
3875 * 5. If (H < lower_bound_j) or (H > upper_bound_j) then set j := j + 1.
3876 * Then go back to Step 2, unless j > n in which case decompression
3879 * 6. Copy (H + uncompressed_j - lower_bound_j) modulo 2^16 to the
3880 * memory address specified by the destination operand.
3884 * The input_bit_order register contains the following three flags:
3887 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3888 * | reserved |F|H|P| 68 - 69
3889 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
3891 * Transfer H bit to bit_order to tell decomp dispatcher which bit order to use
3893 input_bit_order
= buff
[68] << 8;
3894 input_bit_order
= input_bit_order
| buff
[69];
3895 bit_order
= ( input_bit_order
& 0x0002 ) >> 1;
3900 outside_huffman_boundaries
= true;
3901 print_in_loop
= print_level_3
;
3904 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &bits_n
);
3905 if (next_operand_address
< 0)
3906 goto decompression_failure
;
3907 if (print_in_loop
) {
3908 proto_tree_add_uint_format(udvm_tree
, hf_udvm_bits
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), bits_n
,
3909 "Addr: %u bits_n %u", operand_address
, bits_n
);
3914 offset
+= (next_operand_address
-operand_address
);
3915 operand_address
= next_operand_address
;
3917 /* %lower_bound_n */
3918 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &lower_bound_n
);
3919 if (next_operand_address
< 0)
3920 goto decompression_failure
;
3921 if (print_in_loop
) {
3922 proto_tree_add_uint_format(udvm_tree
, hf_udvm_lower_bound
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), lower_bound_n
,
3923 "Addr: %u lower_bound_n %u", operand_address
, lower_bound_n
);
3925 offset
+= (next_operand_address
-operand_address
);
3926 operand_address
= next_operand_address
;
3927 /* %upper_bound_n */
3928 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &upper_bound_n
);
3929 if (next_operand_address
< 0)
3930 goto decompression_failure
;
3931 if (print_in_loop
) {
3932 proto_tree_add_uint_format(udvm_tree
, hf_udvm_upper_bound
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), upper_bound_n
,
3933 "Addr: %u upper_bound_n %u", operand_address
, upper_bound_n
);
3935 offset
+= (next_operand_address
-operand_address
);
3936 operand_address
= next_operand_address
;
3937 /* %uncompressed_n */
3938 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &uncompressed_n
);
3939 if (next_operand_address
< 0)
3940 goto decompression_failure
;
3941 if (print_in_loop
) {
3942 proto_tree_add_uint_format(udvm_tree
, hf_udvm_uncompressed
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), uncompressed_n
,
3943 "Addr: %u uncompressed_n %u", operand_address
, uncompressed_n
);
3945 offset
+= (next_operand_address
-operand_address
);
3946 operand_address
= next_operand_address
;
3947 /* execute instruction */
3948 if ( outside_huffman_boundaries
) {
3950 * 2. Request bits_j compressed bits. Interpret the returned bits as an
3951 * integer k from 0 to 2^bits_j - 1, as explained in Section 8.2.
3953 k
= decomp_dispatch_get_bits( message_tvb
, udvm_tree
, bit_order
,
3954 buff
, &old_input_bit_order
, &remaining_bits
,
3955 &input_bits
, &input_address
, bits_n
, &result_code
, msg_end
, print_level_1
);
3956 if ( result_code
== 11 ) {
3958 * 4. If data is requested that lies beyond the end of the SigComp
3959 * message, terminate the INPUT-HUFFMAN instruction and move program
3960 * execution to the memory address specified by the address operand.
3962 current_address
= at_address
;
3963 goto execute_next_instruction
;
3967 * 3. Set H := H * 2^bits_j + k.
3968 * [In practice is a shift+OR operation.]
3971 H
= (H
<< bits_n
) | k
;
3972 if (print_level_3
) {
3973 proto_tree_add_bytes_format(udvm_tree
, hf_sigcomp_set_hu
, bytecode_tvb
, 0, -1, NULL
,
3974 " Set H(%u) := H(%u) * 2^bits_j(%u) + k(%u)",
3975 H
,oldH
, 1<<bits_n
,k
);
3979 * 5. If (H < lower_bound_j) or (H > upper_bound_j) then set j := j + 1.
3980 * Then go back to Step 2, unless j > n in which case decompression
3983 if ((H
< lower_bound_n
) || (H
> upper_bound_n
)) {
3984 outside_huffman_boundaries
= true;
3986 outside_huffman_boundaries
= false;
3987 print_in_loop
= false;
3989 * 6. Copy (H + uncompressed_j - lower_bound_j) modulo 2^16 to the
3990 * memory address specified by the destination operand.
3992 if (print_level_2
) {
3993 proto_tree_add_bytes_format(udvm_tree
, hf_sigcomp_set_hu
, bytecode_tvb
, 0, -1, NULL
,
3994 " H(%u) = H(%u) + uncompressed_n(%u) - lower_bound_n(%u)",
3995 (H
+ uncompressed_n
- lower_bound_n
),H
, uncompressed_n
, lower_bound_n
);
3997 H
= H
+ uncompressed_n
- lower_bound_n
;
4000 if (destination
>= UDVM_MEMORY_SIZE
- 1)
4001 goto decompression_failure
;
4002 buff
[destination
] = msb
;
4003 buff
[(destination
+ 1) & 0xffff]=lsb
;
4004 if (print_level_1
) {
4005 proto_tree_add_uint_format(udvm_tree
, hf_sigcomp_loading_h
, message_tvb
, input_address
, 1, H
,
4006 " Loading H: %u (0x%x) at Addr: %u,j = %u remaining_bits: %u",
4007 H
, H
, destination
,( n
- m
+ 1 ), remaining_bits
);
4016 if ( outside_huffman_boundaries
) {
4018 goto decompression_failure
;
4021 current_address
= next_operand_address
;
4022 goto execute_next_instruction
;
4025 case SIGCOMP_INSTR_STATE_ACCESS
: /* 31 */
4026 /* STATE-ACCESS (%partial_identifier_start, %partial_identifier_length,
4027 * %state_begin, %state_length, %state_address, %state_instruction)
4029 if (show_instr_detail_level
== 2 ) {
4030 proto_item_append_text(addr_item
, " (partial_identifier_start, partial_identifier_length,state_begin, state_length, state_address, state_instruction)");
4032 start_offset
= offset
;
4033 operand_address
= current_address
+ 1;
4036 * %partial_identifier_start
4038 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &p_id_start
);
4039 if (next_operand_address
< 0)
4040 goto decompression_failure
;
4041 if (show_instr_detail_level
== 2 ) {
4042 proto_tree_add_uint_format(udvm_tree
, hf_partial_identifier_start
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), p_id_start
,
4043 "Addr: %u partial_identifier_start %u", operand_address
, p_id_start
);
4045 offset
+= (next_operand_address
-operand_address
);
4048 * %partial_identifier_length
4050 operand_address
= next_operand_address
;
4051 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &p_id_length
);
4052 if (next_operand_address
< 0)
4053 goto decompression_failure
;
4054 if (show_instr_detail_level
== 2 ) {
4055 proto_tree_add_uint_format(udvm_tree
, hf_partial_identifier_length
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), p_id_length
,
4056 "Addr: %u partial_identifier_length %u", operand_address
, p_id_length
);
4058 offset
+= (next_operand_address
-operand_address
);
4062 operand_address
= next_operand_address
;
4063 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &state_begin
);
4064 if (next_operand_address
< 0)
4065 goto decompression_failure
;
4066 if (show_instr_detail_level
== 2 ) {
4067 proto_tree_add_uint_format(udvm_tree
, hf_state_begin
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), state_begin
,
4068 "Addr: %u state_begin %u", operand_address
, state_begin
);
4070 offset
+= (next_operand_address
-operand_address
);
4074 operand_address
= next_operand_address
;
4075 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &state_length
);
4076 if (next_operand_address
< 0)
4077 goto decompression_failure
;
4078 if (show_instr_detail_level
== 2 ) {
4079 proto_tree_add_uint_format(udvm_tree
, hf_udvm_state_length
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), state_length
,
4080 "Addr: %u state_length %u", operand_address
, state_length
);
4082 offset
+= (next_operand_address
-operand_address
);
4086 operand_address
= next_operand_address
;
4087 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &state_address
);
4088 if (next_operand_address
< 0)
4089 goto decompression_failure
;
4090 if (show_instr_detail_level
== 2 ) {
4091 proto_tree_add_uint_format(udvm_tree
, hf_udvm_state_address
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), state_address
,
4092 "Addr: %u state_address %u", operand_address
, state_address
);
4094 offset
+= (next_operand_address
-operand_address
);
4096 * %state_instruction
4098 operand_address
= next_operand_address
;
4099 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &state_instruction
);
4100 if (next_operand_address
< 0)
4101 goto decompression_failure
;
4102 if (show_instr_detail_level
== 2 ) {
4103 proto_tree_add_uint_format(udvm_tree
, hf_udvm_state_instr
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), state_instruction
,
4104 "Addr: %u state_instruction %u", operand_address
, state_instruction
);
4106 offset
+= (next_operand_address
-operand_address
);
4107 if (show_instr_detail_level
== 1)
4109 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_decompress_instruction
, bytecode_tvb
, start_offset
, offset
-start_offset
,
4110 "Addr: %u ## STATE-ACCESS(31) (partial_identifier_start=%u, partial_identifier_length=%u,state_begin=%u, state_length=%u, state_address=%u, state_instruction=%u)",
4111 current_address
, p_id_start
, p_id_length
, state_begin
, state_length
, state_address
, state_instruction
);
4113 current_address
= next_operand_address
;
4114 byte_copy_right
= buff
[66] << 8;
4115 byte_copy_right
= byte_copy_right
| buff
[67];
4116 byte_copy_left
= buff
[64] << 8;
4117 byte_copy_left
= byte_copy_left
| buff
[65];
4118 if (print_level_2
) {
4119 proto_tree_add_bytes_format(udvm_tree
, hf_sigcomp_byte_copy
, message_tvb
, input_address
, 1, NULL
,
4120 " byte_copy_right = %u, byte_copy_left = %u", byte_copy_right
,byte_copy_left
);
4123 result_code
= udvm_state_access(message_tvb
, pinfo
, udvm_tree
, buff
, p_id_start
, p_id_length
, state_begin
, &state_length
,
4124 &state_address
, &state_instruction
, hf_id
);
4125 if ( result_code
!= 0 ) {
4126 goto decompression_failure
;
4128 used_udvm_cycles
= used_udvm_cycles
+ state_length
;
4129 goto execute_next_instruction
;
4131 case SIGCOMP_INSTR_STATE_CREATE
: /* 32 */
4133 * STATE-CREATE (%state_length, %state_address, %state_instruction,
4134 * %minimum_access_length, %state_retention_priority)
4136 if (show_instr_detail_level
== 2 ) {
4137 proto_item_append_text(addr_item
, " (state_length, state_address, state_instruction,minimum_access_length, state_retention_priority)");
4139 start_offset
= offset
;
4140 operand_address
= current_address
+ 1;
4145 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &state_length
);
4146 if (next_operand_address
< 0)
4147 goto decompression_failure
;
4148 if (show_instr_detail_level
== 2 ) {
4149 proto_tree_add_uint_format(udvm_tree
, hf_udvm_state_length
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), state_length
,
4150 "Addr: %u state_length %u", operand_address
, state_length
);
4152 offset
+= (next_operand_address
-operand_address
);
4156 operand_address
= next_operand_address
;
4157 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &state_address
);
4158 if (next_operand_address
< 0)
4159 goto decompression_failure
;
4160 if (show_instr_detail_level
== 2 ) {
4161 proto_tree_add_uint_format(udvm_tree
, hf_udvm_state_address
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), state_address
,
4162 "Addr: %u state_address %u", operand_address
, state_address
);
4164 offset
+= (next_operand_address
-operand_address
);
4166 * %state_instruction
4168 operand_address
= next_operand_address
;
4169 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &state_instruction
);
4170 if (next_operand_address
< 0)
4171 goto decompression_failure
;
4172 if (show_instr_detail_level
== 2 ) {
4173 proto_tree_add_uint_format(udvm_tree
, hf_udvm_state_instr
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), state_instruction
,
4174 "Addr: %u state_instruction %u", operand_address
, state_instruction
);
4176 offset
+= (next_operand_address
-operand_address
);
4178 * %minimum_access_length
4180 operand_address
= next_operand_address
;
4181 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &minimum_access_length
);
4182 if (next_operand_address
< 0)
4183 goto decompression_failure
;
4184 if (show_instr_detail_level
== 2 ) {
4185 proto_tree_add_uint_format(udvm_tree
, hf_udvm_min_acc_len
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), minimum_access_length
,
4186 "Addr: %u minimum_access_length %u", operand_address
, minimum_access_length
);
4188 offset
+= (next_operand_address
-operand_address
);
4190 * %state_retention_priority
4192 operand_address
= next_operand_address
;
4193 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &state_retention_priority
);
4194 if (next_operand_address
< 0)
4195 goto decompression_failure
;
4196 if (show_instr_detail_level
== 2 ) {
4197 proto_tree_add_uint_format(udvm_tree
, hf_udvm_state_ret_pri
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), state_retention_priority
,
4198 "Addr: %u state_retention_priority %u", operand_address
, state_retention_priority
);
4200 offset
+= (next_operand_address
-operand_address
);
4201 if (show_instr_detail_level
== 1)
4203 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_decompress_instruction
, bytecode_tvb
, start_offset
, offset
-start_offset
,
4204 "Addr: %u ## STATE-CREATE(32) (state_length=%u, state_address=%u, state_instruction=%u,minimum_access_length=%u, state_retention_priority=%u)",
4205 current_address
, state_length
, state_address
, state_instruction
,minimum_access_length
, state_retention_priority
);
4207 current_address
= next_operand_address
;
4208 /* Execute the instruction
4209 * TODO Implement the instruction
4211 * Note that the new state item cannot be created until a valid
4212 * compartment identifier has been returned by the application.
4213 * Consequently, when a STATE-CREATE instruction is encountered the UDVM
4214 * simply buffers the five supplied operands until the END-MESSAGE
4215 * instruction is reached. The steps taken at this point are described
4218 * Decompression failure MUST occur if more than four state creation
4219 * requests are made before the END-MESSAGE instruction is encountered.
4220 * Decompression failure also occurs if the minimum_access_length does
4221 * not lie between 6 and 20 inclusive, or if the
4222 * state_retention_priority is 65535.
4224 no_of_state_create
++;
4225 if ( no_of_state_create
> 4 ) {
4227 goto decompression_failure
;
4229 if (( minimum_access_length
< 6 ) || ( minimum_access_length
> STATE_BUFFER_SIZE
)) {
4231 goto decompression_failure
;
4233 if ( state_retention_priority
== 65535 ) {
4235 goto decompression_failure
;
4237 state_length_buff
[no_of_state_create
] = state_length
;
4238 state_address_buff
[no_of_state_create
] = state_address
;
4239 state_instruction_buff
[no_of_state_create
] = state_instruction
;
4240 state_minimum_access_length_buff
[no_of_state_create
] = minimum_access_length
;
4241 /* state_state_retention_priority_buff[no_of_state_create] = state_retention_priority; */
4242 used_udvm_cycles
= used_udvm_cycles
+ state_length
;
4244 byte_copy_right
= buff
[66] << 8;
4245 byte_copy_right
= byte_copy_right
| buff
[67];
4246 byte_copy_left
= buff
[64] << 8;
4247 byte_copy_left
= byte_copy_left
| buff
[65];
4250 while ( n
< state_length
) {
4251 if ( k
== byte_copy_right
) {
4256 if (print_level_3
) {
4257 proto_tree_add_uint_format(udvm_tree
, hf_sigcomp_state_value
, bytecode_tvb
, 0, 0, buff
[k
],
4258 " Addr: %5u State value: %u (0x%x) ASCII(%s)",
4259 k
,buff
[k
],buff
[k
],format_text(pinfo
->pool
, string
, 1));
4261 k
= ( k
+ 1 ) & 0xffff;
4266 goto execute_next_instruction
;
4268 case SIGCOMP_INSTR_STATE_FREE
: /* 33 */
4270 * STATE-FREE (%partial_identifier_start, %partial_identifier_length)
4272 if (show_instr_detail_level
== 2 ) {
4273 proto_item_append_text(addr_item
, " (partial_identifier_start, partial_identifier_length)");
4275 start_offset
= offset
;
4276 operand_address
= current_address
+ 1;
4278 * %partial_identifier_start
4280 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &p_id_start
);
4281 if (next_operand_address
< 0)
4282 goto decompression_failure
;
4283 if (show_instr_detail_level
== 2 ) {
4284 proto_tree_add_uint_format(udvm_tree
, hf_partial_identifier_start
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), p_id_start
,
4285 "Addr: %u partial_identifier_start %u", operand_address
, p_id_start
);
4287 offset
+= (next_operand_address
-operand_address
);
4288 operand_address
= next_operand_address
;
4291 * %partial_identifier_length
4293 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &p_id_length
);
4294 if (next_operand_address
< 0)
4295 goto decompression_failure
;
4296 if (show_instr_detail_level
== 2 ) {
4297 proto_tree_add_uint_format(udvm_tree
, hf_partial_identifier_length
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), p_id_length
,
4298 "Addr: %u partial_identifier_length %u", operand_address
, p_id_length
);
4300 offset
+= (next_operand_address
-operand_address
);
4301 if (show_instr_detail_level
== 1)
4303 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_decompress_instruction
, bytecode_tvb
, start_offset
, offset
-start_offset
,
4304 "Addr: %u ## STATE-FREE (partial_identifier_start=%u, partial_identifier_length=%u)",
4305 current_address
, p_id_start
, p_id_length
);
4307 current_address
= next_operand_address
;
4309 /* Execute the instruction:
4312 udvm_state_free(buff
,p_id_start
,p_id_length
);
4314 goto execute_next_instruction
;
4316 case SIGCOMP_INSTR_OUTPUT
: /* 34 OUTPUT (%output_start, %output_length) */
4317 if (show_instr_detail_level
== 2 ) {
4318 proto_item_append_text(addr_item
, " (output_start, output_length)");
4320 start_offset
= offset
;
4321 operand_address
= current_address
+ 1;
4325 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &output_start
);
4326 if (next_operand_address
< 0)
4327 goto decompression_failure
;
4328 if (show_instr_detail_level
== 2 ) {
4329 proto_tree_add_uint_format(udvm_tree
, hf_udvm_output_start
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), output_start
,
4330 "Addr: %u output_start %u", operand_address
, output_start
);
4332 offset
+= (next_operand_address
-operand_address
);
4333 operand_address
= next_operand_address
;
4337 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &output_length
);
4338 if (next_operand_address
< 0)
4339 goto decompression_failure
;
4340 if (show_instr_detail_level
== 2 ) {
4341 proto_tree_add_uint_format(udvm_tree
, hf_udvm_output_length
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), output_length
,
4342 "Addr: %u output_length %u", operand_address
, output_length
);
4344 offset
+= (next_operand_address
-operand_address
);
4345 if (show_instr_detail_level
== 1)
4347 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_decompress_instruction
, bytecode_tvb
, start_offset
, offset
-start_offset
,
4348 "Addr: %u ## OUTPUT (output_start=%u, output_length=%u)",
4349 current_address
, output_start
, output_length
);
4351 current_address
= next_operand_address
;
4354 * Execute instruction
4357 * The string of bytes is copied in ascending order of memory address,
4358 * respecting the bounds set by byte_copy_left and byte_copy_right.
4359 * More precisely, if a byte is copied from/to Address m then the next
4360 * byte is copied from/to Address n where n is calculated as follows:
4362 * Set k := m + 1 (modulo 2^16)
4363 * If k = byte_copy_right then set n := byte_copy_left, else set n := k
4369 byte_copy_right
= buff
[66] << 8;
4370 byte_copy_right
= byte_copy_right
| buff
[67];
4371 byte_copy_left
= buff
[64] << 8;
4372 byte_copy_left
= byte_copy_left
| buff
[65];
4373 if (print_level_3
) {
4374 proto_tree_add_bytes_format(udvm_tree
, hf_sigcomp_byte_copy
, bytecode_tvb
, 0, -1,
4375 NULL
, " byte_copy_right = %u", byte_copy_right
);
4377 while ( n
< output_length
) {
4379 if ( k
== byte_copy_right
) {
4382 out_buff
[output_address
] = buff
[k
];
4385 if (print_level_3
) {
4386 proto_tree_add_uint_format(udvm_tree
, hf_sigcomp_output_value
, bytecode_tvb
, 0, -1, buff
[k
],
4387 " Output value: %u (0x%x) ASCII(%s) from Addr: %u ,output to dispatcher position %u",
4388 buff
[k
],buff
[k
],format_text(pinfo
->pool
, string
,1), k
,output_address
);
4390 k
= ( k
+ 1 ) & 0xffff;
4394 used_udvm_cycles
= used_udvm_cycles
+ output_length
;
4395 goto execute_next_instruction
;
4397 case SIGCOMP_INSTR_END_MESSAGE
: /* 35 */
4399 * END-MESSAGE (%requested_feedback_location,
4400 * %returned_parameters_location, %state_length, %state_address,
4401 * %state_instruction, %minimum_access_length,
4402 * %state_retention_priority)
4404 if (show_instr_detail_level
== 2 ) {
4405 proto_item_append_text(addr_item
, " (requested_feedback_location,state_instruction, minimum_access_length,state_retention_priority)");
4407 start_offset
= offset
;
4408 operand_address
= current_address
+ 1;
4410 /* %requested_feedback_location */
4411 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &requested_feedback_location
);
4412 if (next_operand_address
< 0)
4413 goto decompression_failure
;
4414 if (show_instr_detail_level
== 2 ) {
4415 proto_tree_add_uint_format(udvm_tree
, hf_udvm_req_feedback_loc
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), requested_feedback_location
,
4416 "Addr: %u requested_feedback_location %u",
4417 operand_address
, requested_feedback_location
);
4419 offset
+= (next_operand_address
-operand_address
);
4420 operand_address
= next_operand_address
;
4421 /* returned_parameters_location */
4422 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &returned_parameters_location
);
4423 if (next_operand_address
< 0)
4424 goto decompression_failure
;
4425 if (show_instr_detail_level
== 2 ) {
4426 proto_tree_add_uint_format(udvm_tree
, hf_udvm_ret_param_loc
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), returned_parameters_location
,
4427 "Addr: %u returned_parameters_location %u", operand_address
, returned_parameters_location
);
4429 offset
+= (next_operand_address
-operand_address
);
4433 operand_address
= next_operand_address
;
4434 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &state_length
);
4435 if (next_operand_address
< 0)
4436 goto decompression_failure
;
4437 if (show_instr_detail_level
== 2 ) {
4438 proto_tree_add_uint_format(udvm_tree
, hf_udvm_state_length
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), state_length
,
4439 "Addr: %u state_length %u", operand_address
, state_length
);
4441 offset
+= (next_operand_address
-operand_address
);
4445 operand_address
= next_operand_address
;
4446 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &state_address
);
4447 if (next_operand_address
< 0)
4448 goto decompression_failure
;
4449 if (show_instr_detail_level
== 2 ) {
4450 proto_tree_add_uint_format(udvm_tree
, hf_udvm_state_address
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), state_address
,
4451 "Addr: %u state_address %u", operand_address
, state_address
);
4453 offset
+= (next_operand_address
-operand_address
);
4455 * %state_instruction
4457 operand_address
= next_operand_address
;
4458 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &state_instruction
);
4459 if (next_operand_address
< 0)
4460 goto decompression_failure
;
4461 if (show_instr_detail_level
== 2 ) {
4462 proto_tree_add_uint_format(udvm_tree
, hf_udvm_state_instr
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), state_instruction
,
4463 "Addr: %u state_instruction %u", operand_address
, state_instruction
);
4465 offset
+= (next_operand_address
-operand_address
);
4468 * %minimum_access_length
4470 operand_address
= next_operand_address
;
4471 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &minimum_access_length
);
4472 if (next_operand_address
< 0)
4473 goto decompression_failure
;
4474 if (show_instr_detail_level
== 2 ) {
4475 proto_tree_add_uint_format(udvm_tree
, hf_udvm_min_acc_len
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), minimum_access_length
,
4476 "Addr: %u minimum_access_length %u", operand_address
, minimum_access_length
);
4478 offset
+= (next_operand_address
-operand_address
);
4481 * %state_retention_priority
4483 operand_address
= next_operand_address
;
4484 next_operand_address
= decode_udvm_multitype_operand(buff
, operand_address
, &state_retention_priority
);
4485 if (next_operand_address
< 0)
4486 goto decompression_failure
;
4487 if (show_instr_detail_level
== 2 ) {
4488 proto_tree_add_uint_format(udvm_tree
, hf_udvm_state_ret_pri
, bytecode_tvb
, offset
, (next_operand_address
-operand_address
), state_retention_priority
,
4489 "Addr: %u state_retention_priority %u", operand_address
, state_retention_priority
);
4491 offset
+= (next_operand_address
-operand_address
);
4492 if (show_instr_detail_level
== 1)
4494 proto_tree_add_none_format(udvm_tree
, hf_sigcomp_decompress_instruction
, bytecode_tvb
, start_offset
, offset
-start_offset
,
4495 "Addr: %u ## END-MESSAGE (requested_feedback_location=%u, returned_parameters_location=%u, state_length=%u, state_address=%u, state_instruction=%u, minimum_access_length=%u, state_retention_priority=%u)",
4496 current_address
, requested_feedback_location
, returned_parameters_location
, state_length
, state_address
, state_instruction
, minimum_access_length
,state_retention_priority
);
4498 /* TODO: This isn't currently totally correct as END_INSTRUCTION might not create state */
4499 no_of_state_create
++;
4500 if ( no_of_state_create
> 4 ) {
4502 goto decompression_failure
;
4504 state_length_buff
[no_of_state_create
] = state_length
;
4505 state_address_buff
[no_of_state_create
] = state_address
;
4506 state_instruction_buff
[no_of_state_create
] = state_instruction
;
4508 state_minimum_access_length_buff
[no_of_state_create
] = minimum_access_length
;
4509 /* state_state_retention_priority_buff[no_of_state_create] = state_retention_priority; */
4511 /* Execute the instruction
4513 proto_tree_add_uint(udvm_tree
, hf_sigcomp_num_state_create
, bytecode_tvb
, 0, 0, no_of_state_create
);
4514 if ( no_of_state_create
!= 0 ) {
4515 memset(sha1_digest_buf
, 0, STATE_BUFFER_SIZE
);
4517 byte_copy_right
= buff
[66] << 8;
4518 byte_copy_right
= byte_copy_right
| buff
[67];
4519 byte_copy_left
= buff
[64] << 8;
4520 byte_copy_left
= byte_copy_left
| buff
[65];
4521 while ( n
< no_of_state_create
+ 1 ) {
4522 sha1buff
= (uint8_t *)g_malloc(state_length_buff
[n
]+8);
4523 sha1buff
[0] = state_length_buff
[n
] >> 8;
4524 sha1buff
[1] = state_length_buff
[n
] & 0xff;
4525 sha1buff
[2] = state_address_buff
[n
] >> 8;
4526 sha1buff
[3] = state_address_buff
[n
] & 0xff;
4527 sha1buff
[4] = state_instruction_buff
[n
] >> 8;
4528 sha1buff
[5] = state_instruction_buff
[n
] & 0xff;
4529 sha1buff
[6] = state_minimum_access_length_buff
[n
] >> 8;
4530 sha1buff
[7] = state_minimum_access_length_buff
[n
] & 0xff;
4531 if (print_level_3
) {
4532 proto_tree_add_bytes_with_length(udvm_tree
, hf_sigcomp_sha1buff
, bytecode_tvb
, 0, -1, sha1buff
, 8);
4534 k
= state_address_buff
[n
];
4535 for ( x
=0; x
< state_length_buff
[n
]; x
++)
4537 if ( k
== byte_copy_right
) {
4540 sha1buff
[8+x
] = buff
[k
];
4541 k
= ( k
+ 1 ) & 0xffff;
4544 gcry_md_hash_buffer(GCRY_MD_SHA1
, sha1_digest_buf
, (uint8_t *) sha1buff
, state_length_buff
[n
] + 8);
4545 if (print_level_3
) {
4546 proto_tree_add_bytes_with_length(udvm_tree
, hf_sigcomp_sha1_digest
, bytecode_tvb
, 0, -1, sha1_digest_buf
, STATE_BUFFER_SIZE
);
4548 /* begin partial state-id change cco@iptel.org */
4550 udvm_state_create(sha1buff
, sha1_digest_buf
, state_minimum_access_length_buff
[n
]);
4552 udvm_state_create(sha1buff
, sha1_digest_buf
, STATE_MIN_ACCESS_LEN
);
4553 /* end partial state-id change cco@iptel.org */
4554 proto_tree_add_item(udvm_tree
, hf_sigcomp_creating_state
, bytecode_tvb
, 0, -1, ENC_NA
);
4555 proto_tree_add_string(udvm_tree
,hf_id
, bytecode_tvb
, 0, 0, bytes_to_str(pinfo
->pool
, sha1_digest_buf
, STATE_MIN_ACCESS_LEN
));
4564 /* At least something got decompressed, show it */
4565 decomp_tvb
= tvb_new_child_real_data(message_tvb
, out_buff
,output_address
,output_address
);
4567 add_new_data_source(pinfo
, decomp_tvb
, "Decompressed SigComp message");
4568 proto_tree_add_item(udvm_tree
, hf_sigcomp_sigcomp_message_decompressed
, decomp_tvb
, 0, -1, ENC_NA
);
4570 used_udvm_cycles
+= state_length
;
4571 proto_tree_add_uint(udvm_tree
, hf_sigcomp_max_udvm_cycles
, bytecode_tvb
, 0, 0, maximum_UDVM_cycles
);
4572 proto_tree_add_uint(udvm_tree
, hf_sigcomp_used_udvm_cycles
, bytecode_tvb
, 0, 0, used_udvm_cycles
);
4576 expert_add_info_format(pinfo
, addr_item
, &ei_sigcomp_invalid_instruction
,
4577 "Addr %u Invalid instruction: %u (0x%x)", current_address
,current_instruction
,current_instruction
);
4581 decompression_failure
:
4583 proto_tree_add_expert_format(udvm_tree
, pinfo
, &ei_sigcomp_decompression_failure
, bytecode_tvb
, 0, -1,
4584 "DECOMPRESSION FAILURE: %s", val_to_str(result_code
, result_code_vals
,"Unknown (%u)"));
4589 /**********************************************************************************************
4593 **********************************************************************************************/
4596 /* Sigcomp over TCP record marking used
4598 * 4.2.2. Record Marking
4600 * For a stream-based transport, the dispatcher delimits messages by
4601 * parsing the compressed data stream for instances of 0xFF and taking
4602 * the following actions:
4603 * Occurs in data stream: Action:
4605 * 0xFF 00 one 0xFF byte in the data stream
4606 * 0xFF 01 same, but the next byte is quoted (could
4609 * 0xFF 7F same, but the next 127 bytes are quoted
4610 * 0xFF 80 to 0xFF FE (reserved for future standardization)
4611 * 0xFF FF end of SigComp message
4613 * In UDVM version 0x01, any occurrence of the combinations 0xFF80 to
4614 * 0xFFFE that are not protected by quoting causes decompression
4615 * failure; the decompressor SHOULD close the stream-based transport in
4620 * TODO: Reassembly, handle more than one message in a tcp segment.
4624 dissect_sigcomp_tcp(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *_data _U_
)
4627 proto_tree
*sigcomp_tree
;
4628 tvbuff_t
*unescaped_tvb
;
4637 bool end_off_message
;
4641 /* Is this SIGCOMP ? */
4642 data
= tvb_get_ntohs(tvb
, offset
);
4643 if (data
== 0xffff) {
4645 offset
= offset
+ 2;
4646 octet
= tvb_get_uint8(tvb
,offset
);
4648 octet
= tvb_get_uint8(tvb
,offset
);
4650 if ((octet
& 0xf8) != 0xf8)
4653 /* Search for delimiter 0xffff in the remain tvb buffer */
4654 length
= tvb_reported_length_remaining(tvb
, offset
);
4655 for (i
=0; i
<(length
-1); ++i
) {
4656 /* Loop end criteria is (length-1) because we take 2 bytes each loop */
4657 data
= tvb_get_ntohs(tvb
, offset
+i
);
4658 if (0xffff == data
) break;
4660 if (i
>= (length
-1)) {
4661 /* SIGCOMP may be subdissector of SIP, so we use
4662 * pinfo->saved_can_desegment to determine whether do desegment
4663 * as well as pinfo->can_desegment */
4664 if (pinfo
->can_desegment
|| pinfo
->saved_can_desegment
) {
4665 /* Delimiter oxffff was not found, not a complete SIGCOMP PDU */
4666 pinfo
->desegment_offset
= offset
;
4667 pinfo
->desegment_len
=DESEGMENT_ONE_MORE_SEGMENT
;
4672 /* Make entries in Protocol column and Info column on summary display */
4673 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "SIGCOMP");
4675 col_clear(pinfo
->cinfo
, COL_INFO
);
4677 length
= tvb_reported_length(tvb
);
4680 /* create display subtree for the protocol */
4681 ti
= proto_tree_add_item(tree
, proto_sigcomp
, tvb
, 0, -1, ENC_NA
);
4682 sigcomp_tree
= proto_item_add_subtree(ti
, ett_sigcomp
);
4684 end_off_message
= false;
4685 buff
= (uint8_t *)wmem_alloc(pinfo
->pool
, length
-offset
);
4686 if (udvm_print_detail_level
>2)
4687 proto_tree_add_item(sigcomp_tree
, hf_sigcomp_starting_to_remove_escape_digits
, tvb
, offset
, -1, ENC_NA
);
4688 while ((offset
< length
) && (end_off_message
== false)) {
4689 octet
= tvb_get_uint8(tvb
,offset
);
4690 if ( octet
== 0xff ) {
4691 if ( offset
+1 >= length
) {
4692 /* if the tvb is short don't check for the second escape digit */
4696 if (udvm_print_detail_level
>2)
4697 proto_tree_add_none_format(sigcomp_tree
, hf_sigcomp_escape_digit_found
, tvb
, offset
, 2,
4698 " Escape digit found (0xFF)");
4699 octet
= tvb_get_uint8(tvb
, offset
+1);
4706 if ((octet
> 0x7f) && (octet
< 0xff )) {
4707 if (udvm_print_detail_level
>2)
4708 proto_tree_add_none_format(sigcomp_tree
, hf_sigcomp_illegal_escape_code
, tvb
, offset
, 2,
4709 " Illegal escape code");
4710 offset
+= tvb_captured_length_remaining(tvb
,offset
);
4713 if ( octet
== 0xff) {
4714 if (udvm_print_detail_level
>2)
4715 proto_tree_add_none_format(sigcomp_tree
, hf_sigcomp_end_of_sigcomp_message_indication_found
, tvb
, offset
, 2,
4716 " End of SigComp message indication found (0xFFFF)");
4717 end_off_message
= true;
4722 if (udvm_print_detail_level
>2)
4723 proto_tree_add_uint_format(sigcomp_tree
, hf_sigcomp_addr_value
, tvb
, offset
, 1, buff
[i
],
4724 " Addr: %u tvb value(0x%0x) ", i
, buff
[i
]);
4727 if (udvm_print_detail_level
>2)
4728 proto_tree_add_bytes_format(sigcomp_tree
, hf_sigcomp_copying_bytes_literally
, tvb
, offset
, octet
,
4729 NULL
, " Copying %u bytes literally",octet
);
4730 if ( offset
+octet
>= length
)
4731 /* if the tvb is short don't copy further than the end */
4732 octet
= length
- offset
;
4733 for ( n
=0; n
< octet
; n
++ ) {
4734 buff
[i
] = tvb_get_uint8(tvb
, offset
);
4735 if (udvm_print_detail_level
>2)
4736 proto_tree_add_uint_format(sigcomp_tree
, hf_sigcomp_addr_value
, tvb
, offset
, 1, buff
[i
],
4737 " Addr: %u tvb value(0x%0x) ", i
, buff
[i
]);
4744 if (udvm_print_detail_level
>2)
4745 proto_tree_add_uint_format(sigcomp_tree
, hf_sigcomp_addr_value
, tvb
, offset
, 1, buff
[i
],
4746 " Addr: %u tvb value(0x%0x) ", i
, buff
[i
]);
4751 unescaped_tvb
= tvb_new_child_real_data(tvb
, buff
,i
,i
);
4753 add_new_data_source(pinfo
, unescaped_tvb
, "Unescaped Data handed to the SigComp dissector");
4755 proto_tree_add_item(sigcomp_tree
, hf_sigcomp_data_for_sigcomp_dissector
, unescaped_tvb
, 0, -1, ENC_NA
);
4756 if (end_off_message
== true) {
4757 dissect_sigcomp_common(unescaped_tvb
, pinfo
, sigcomp_tree
);
4759 proto_tree_add_expert(sigcomp_tree
, pinfo
, &ei_sigcomp_tcp_fragment
, unescaped_tvb
, 0, -1);
4761 if ( offset
< length
) {
4767 /* Code to actually dissect the packets */
4769 dissect_sigcomp(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data _U_
)
4772 proto_tree
*sigcomp_tree
;
4776 /* If we got called from SIP this might be over TCP */
4777 if ( pinfo
->ptype
== PT_TCP
)
4778 return dissect_sigcomp_tcp(tvb
, pinfo
, tree
, NULL
);
4780 /* Is this a SigComp message or not ? */
4781 octet
= tvb_get_uint8(tvb
, offset
);
4782 if ((octet
& 0xf8) != 0xf8)
4785 /* Make entries in Protocol column and Info column on summary display */
4786 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "SIGCOMP");
4788 col_clear(pinfo
->cinfo
, COL_INFO
);
4792 /* create display subtree for the protocol */
4793 ti
= proto_tree_add_item(tree
, proto_sigcomp
, tvb
, 0, -1, ENC_NA
);
4794 sigcomp_tree
= proto_item_add_subtree(ti
, ett_sigcomp
);
4796 return dissect_sigcomp_common(tvb
, pinfo
, sigcomp_tree
);
4798 /* Code to actually dissect the packets */
4800 dissect_sigcomp_common(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*sigcomp_tree
)
4803 /* Set up structures needed to add the protocol subtree and manage it */
4804 tvbuff_t
*udvm_tvb
, *msg_tvb
, *udvm2_tvb
;
4805 tvbuff_t
*decomp_tvb
= NULL
;
4806 proto_item
*udvm_bytecode_item
, *udvm_exe_item
;
4807 proto_tree
*sigcomp_udvm_tree
, *sigcomp_udvm_exe_tree
;
4809 int bytecode_offset
;
4810 uint16_t partial_state_len
;
4812 uint8_t returned_feedback_field
[128];
4813 uint8_t partial_state
[12];
4816 uint16_t bytecode_len
= 0;
4817 unsigned destination
;
4820 uint16_t p_id_start
;
4822 uint16_t state_begin
;
4823 uint16_t state_length
;
4824 uint16_t state_address
;
4825 uint16_t state_instruction
;
4826 uint16_t result_code
;
4827 char *partial_state_str
;
4828 uint8_t nack_version
;
4832 /* add an item to the subtree, see section 1.6 for more information */
4833 octet
= tvb_get_uint8(tvb
, offset
);
4835 /* A SigComp message takes one of two forms depending on whether it
4836 * accesses a state item at the receiving endpoint. The two variants of
4837 * a SigComp message are given in Figure 3. (The T-bit controls the
4838 * format of the returned feedback item and is defined in Section 7.1.)
4840 * 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
4841 * +---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+
4842 * | 1 1 1 1 1 | T | len | | 1 1 1 1 1 | T | 0 |
4843 * +---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+
4845 * : returned feedback item : : returned feedback item :
4847 * +---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+
4849 * : partial state identifier : +---+---+---+---+---+---+---+---+
4851 * | | | code_len | destination |
4852 * +---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+
4854 * : remaining SigComp message : : uploaded UDVM bytecode :
4856 * +---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+
4858 * : remaining SigComp message :
4860 * +---+---+---+---+---+---+---+---+
4863 * The format of the NACK message and the use of the fields within it
4864 * are shown in Figure 1.
4867 * +---+---+---+---+---+---+---+---+
4868 * | 1 1 1 1 1 | T | 0 |
4869 * +---+---+---+---+---+---+---+---+
4871 * : returned feedback item :
4873 * +---+---+---+---+---+---+---+---+
4875 * +---+---+---+---+---+---+---+---+
4876 * | code_len = 0 | version = 1 |
4877 * +---+---+---+---+---+---+---+---+
4879 * +---+---+---+---+---+---+---+---+
4880 * | OPCODE of failed instruction |
4881 * +---+---+---+---+---+---+---+---+
4882 * | PC of failed instruction |
4884 * +---+---+---+---+---+---+---+---+
4886 * : SHA-1 Hash of failed message :
4888 * +---+---+---+---+---+---+---+---+
4892 * +---+---+---+---+---+---+---+---+
4893 * Figure 1: SigComp NACK Message Format
4896 proto_tree_add_item(sigcomp_tree
,hf_sigcomp_t_bit
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4897 proto_tree_add_item(sigcomp_tree
,hf_sigcomp_len
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4898 tbit
= ( octet
& 0x04)>>2;
4899 partial_state_len
= octet
& 0x03;
4901 if ( partial_state_len
!= 0 ) {
4903 * The len field encodes the number of transmitted bytes as follows:
4905 * Encoding: Length of partial state identifier
4912 partial_state_len
= partial_state_len
* 3 + 3;
4917 col_set_str(pinfo
->cinfo
, COL_INFO
, "Msg format 1");
4921 * Returned feedback item exists
4924 octet
= tvb_get_uint8(tvb
, offset
);
4925 /* 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
4926 * +---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+
4927 * | 0 | returned_feedback_field | | 1 | returned_feedback_length |
4928 * +---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+
4930 * : returned_feedback_field :
4932 * +---+---+---+---+---+---+---+---+
4933 * Figure 4: Format of returned feedback item
4936 if ( (octet
& 0x80) != 0 ) {
4938 proto_tree_add_item(sigcomp_tree
,hf_sigcomp_returned_feedback_item_len
,
4939 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
4941 tvb_memcpy(tvb
,returned_feedback_field
,offset
, len
);
4943 returned_feedback_field
[0] = tvb_get_uint8(tvb
, offset
) & 0x7f;
4945 proto_tree_add_bytes(sigcomp_tree
,hf_sigcomp_returned_feedback_item
,
4946 tvb
, offset
, len
, returned_feedback_field
);
4947 offset
= offset
+ len
;
4949 tvb_memcpy(tvb
, partial_state
, offset
, partial_state_len
);
4950 partial_state_str
= bytes_to_str(pinfo
->pool
, partial_state
, partial_state_len
);
4951 proto_tree_add_string(sigcomp_tree
,hf_sigcomp_partial_state
,
4952 tvb
, offset
, partial_state_len
, partial_state_str
);
4953 offset
= offset
+ partial_state_len
;
4954 msg_len
= tvb_reported_length_remaining(tvb
, offset
);
4958 ti
= proto_tree_add_uint(sigcomp_tree
, hf_sigcomp_remaining_message_bytes
, tvb
,
4959 offset
, 0, msg_len
);
4960 proto_item_set_generated(ti
);
4964 msg_tvb
= tvb_new_subset_length(tvb
, offset
, msg_len
);
4966 * buff = Where "state" will be stored
4967 * p_id_start = Partial state identifier start pos in the buffer(buff)
4968 * partial_state_len = Partial state identifier length
4969 * state_begin = Where to start to read state from
4970 * state_length = Length of state
4971 * state_address = Address where to store the state in the buffer(buff)
4972 * state_instruction =
4973 * true = Indicates that state_* is in the stored state
4976 * Note: The allocated buffer must be zeroed or some strange effects might occur.
4978 buff
= (uint8_t *)wmem_alloc0(pinfo
->pool
, UDVM_MEMORY_SIZE
);
4983 /* These values will be loaded from the buffered state in sigcomp_state_hdlr
4987 state_instruction
=0;
4990 while ( i
< partial_state_len
) {
4991 buff
[i
] = partial_state
[i
];
4995 /* begin partial state-id change cco@iptel.org */
4997 result_code
= udvm_state_access(tvb
, pinfo
, sigcomp_tree
, buff
, p_id_start
, partial_state_len
, state_begin
, &state_length
,
4998 &state_address
, &state_instruction
, hf_sigcomp_partial_state
);
5000 result_code
= udvm_state_access(tvb
, pinfo
, sigcomp_tree
, buff
, p_id_start
, STATE_MIN_ACCESS_LEN
, state_begin
, &state_length
,
5001 &state_address
, &state_instruction
, hf_sigcomp_partial_state
);
5003 /* end partial state-id change cco@iptel.org */
5004 if ( result_code
!= 0 ) {
5005 proto_tree_add_expert_format(sigcomp_tree
, pinfo
, &ei_sigcomp_failed_to_access_state_wireshark_udvm_diagnostic
, tvb
, 0, -1,
5006 "Failed to Access state Wireshark UDVM diagnostic: %s", val_to_str(result_code
, result_code_vals
,"Unknown (%u)"));
5007 return tvb_captured_length(tvb
);
5010 udvm_tvb
= tvb_new_child_real_data(tvb
, buff
,state_length
+state_address
,state_length
+state_address
);
5011 add_new_data_source(pinfo
, udvm_tvb
, "State/ExecutionTrace");
5013 udvm2_tvb
= tvb_new_subset_length(udvm_tvb
, state_address
, state_length
);
5014 udvm_exe_item
= proto_tree_add_item(sigcomp_tree
, hf_udvm_execution_trace
,
5015 udvm2_tvb
, 0, state_length
,
5017 sigcomp_udvm_exe_tree
= proto_item_add_subtree( udvm_exe_item
, ett_sigcomp_udvm_exe
);
5019 decomp_tvb
= decompress_sigcomp_message(udvm2_tvb
, msg_tvb
, pinfo
,
5020 sigcomp_udvm_exe_tree
, state_address
,
5021 udvm_print_detail_level
, hf_sigcomp_partial_state
,
5022 offset
, state_length
, partial_state_len
, state_instruction
);
5027 uint32_t compression_ratio
=
5028 (uint32_t)(((float)tvb_reported_length(decomp_tvb
) / (float)tvb_reported_length(tvb
)) * 100);
5030 /* Show compression ratio achieved */
5031 ti
= proto_tree_add_uint(sigcomp_tree
, hf_sigcomp_compression_ratio
, decomp_tvb
,
5032 0, 0, compression_ratio
);
5033 proto_item_set_generated(ti
);
5035 if ( display_raw_txt
)
5036 tvb_raw_text_add(decomp_tvb
, top_tree
);
5038 col_append_str(pinfo
->cinfo
, COL_PROTOCOL
, "/");
5039 col_set_fence(pinfo
->cinfo
,COL_PROTOCOL
);
5040 call_dissector(sip_handle
, decomp_tvb
, pinfo
, top_tree
);
5042 }/* if decompress */
5049 col_set_str(pinfo
->cinfo
, COL_INFO
, "Msg format 2");
5052 * Returned feedback item exists
5055 octet
= tvb_get_uint8(tvb
, offset
);
5056 if ( (octet
& 0x80) != 0 ) {
5058 proto_tree_add_item(sigcomp_tree
,hf_sigcomp_returned_feedback_item_len
,
5059 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5062 tvb_memcpy(tvb
,returned_feedback_field
,offset
, len
);
5063 proto_tree_add_bytes(sigcomp_tree
,hf_sigcomp_returned_feedback_item
,
5064 tvb
, offset
, len
, returned_feedback_field
);
5065 offset
= offset
+ len
;
5067 len
= tvb_get_ntohs(tvb
, offset
) >> 4;
5068 nack_version
= tvb_get_uint8(tvb
, offset
+1) & 0x0f;
5069 if ((len
== 0) && (nack_version
== 1)) {
5071 proto_item
*reason_ti
;
5074 proto_tree_add_item(sigcomp_tree
,hf_sigcomp_nack_ver
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5076 octet
= tvb_get_uint8(tvb
, offset
);
5077 reason_ti
= proto_tree_add_item(sigcomp_tree
,hf_sigcomp_nack_reason_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5079 opcode
= tvb_get_uint8(tvb
, offset
);
5080 proto_tree_add_item(sigcomp_tree
,hf_sigcomp_nack_failed_op_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5083 /* Add expert item for NACK */
5084 expert_add_info_format(pinfo
, reason_ti
, &ei_sigcomp_nack_failed_op_code
,
5085 "SigComp NACK (reason=%s, opcode=%s)",
5086 val_to_str_ext_const(octet
, &sigcomp_nack_reason_code_vals_ext
, "Unknown"),
5087 val_to_str_ext_const(opcode
, &udvm_instruction_code_vals_ext
, "Unknown"));
5089 proto_tree_add_item(sigcomp_tree
,hf_sigcomp_nack_pc
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
5091 proto_tree_add_item(sigcomp_tree
,hf_sigcomp_nack_sha1
, tvb
, offset
, HASH_SHA1_LENGTH
, ENC_NA
);
5092 offset
= offset
+ HASH_SHA1_LENGTH
;
5094 /* Add NACK info to info column */
5095 col_append_fstr(pinfo
->cinfo
, COL_INFO
, " NACK reason=%s, opcode=%s",
5096 val_to_str_ext_const(octet
, &sigcomp_nack_reason_code_vals_ext
, "Unknown"),
5097 val_to_str_ext_const(opcode
, &udvm_instruction_code_vals_ext
, "Unknown"));
5100 case SIGCOMP_NACK_STATE_NOT_FOUND
:
5101 case SIGCOMP_NACK_ID_NOT_UNIQUE
:
5102 case SIGCOMP_NACK_STATE_TOO_SHORT
:
5103 /* State ID (6 - 20 bytes) */
5104 proto_tree_add_item(sigcomp_tree
,hf_sigcomp_nack_state_id
, tvb
, offset
, -1, ENC_NA
);
5106 case SIGCOMP_NACK_CYCLES_EXHAUSTED
:
5107 /* Cycles Per Bit (1 byte) */
5108 proto_tree_add_item(sigcomp_tree
,hf_sigcomp_nack_cycles_per_bit
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5110 case SIGCOMP_NACK_BYTECODES_TOO_LARGE
:
5111 /* Memory size (2 bytes) */
5112 proto_tree_add_item(sigcomp_tree
,hf_sigcomp_nack_memory_size
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
5118 octet
= tvb_get_uint8(tvb
, (offset
+ 1));
5119 destination
= (octet
& 0x0f);
5120 if ( destination
!= 0 )
5121 destination
= 64 + ( destination
* 64 );
5122 proto_tree_add_item(sigcomp_tree
,hf_sigcomp_code_len
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
5123 proto_tree_add_item(sigcomp_tree
,hf_sigcomp_destination
, tvb
, (offset
+ 1), 1, ENC_BIG_ENDIAN
);
5127 bytecode_offset
= offset
;
5128 udvm_bytecode_item
= proto_tree_add_item(sigcomp_tree
, hf_sigcomp_udvm_bytecode
, tvb
,
5129 bytecode_offset
, bytecode_len
, ENC_NA
);
5130 proto_item_append_text(udvm_bytecode_item
,
5131 " %u (0x%x) bytes", bytecode_len
, bytecode_len
);
5132 sigcomp_udvm_tree
= proto_item_add_subtree( udvm_bytecode_item
, ett_sigcomp_udvm
);
5134 udvm_tvb
= tvb_new_subset_length(tvb
, offset
, len
);
5135 if ( dissect_udvm_code
)
5136 dissect_udvm_bytecode(udvm_tvb
, pinfo
, sigcomp_udvm_tree
, destination
);
5138 offset
= offset
+ len
;
5139 msg_len
= tvb_reported_length_remaining(tvb
, offset
);
5141 proto_item
*ti
= proto_tree_add_item(sigcomp_tree
, hf_sigcomp_remaining_sigcomp_message
, tvb
, offset
, -1, ENC_NA
);
5142 proto_item_set_generated(ti
);
5146 msg_tvb
= tvb_new_subset_length(tvb
, offset
, msg_len
);
5148 udvm_exe_item
= proto_tree_add_item(sigcomp_tree
, hf_udvm_execution_trace
,
5149 tvb
, bytecode_offset
, bytecode_len
,
5151 sigcomp_udvm_exe_tree
= proto_item_add_subtree( udvm_exe_item
, ett_sigcomp_udvm_exe
);
5152 decomp_tvb
= decompress_sigcomp_message(udvm_tvb
, msg_tvb
, pinfo
,
5153 sigcomp_udvm_exe_tree
, destination
,
5154 udvm_print_detail_level
, hf_sigcomp_partial_state
,
5155 offset
, 0, 0, destination
);
5158 uint32_t compression_ratio
=
5159 (uint32_t)(((float)tvb_reported_length(decomp_tvb
) / (float)tvb_reported_length(tvb
)) * 100);
5161 /* Show compression ratio achieved */
5162 ti
= proto_tree_add_uint(sigcomp_tree
, hf_sigcomp_compression_ratio
, decomp_tvb
,
5163 0, 0, compression_ratio
);
5164 proto_item_set_generated(ti
);
5166 if ( display_raw_txt
)
5167 tvb_raw_text_add(decomp_tvb
, top_tree
);
5169 col_append_str(pinfo
->cinfo
, COL_PROTOCOL
, "/");
5170 col_set_fence(pinfo
->cinfo
,COL_PROTOCOL
);
5171 call_dissector(sip_handle
, decomp_tvb
, pinfo
, top_tree
);
5173 } /* if decompress */
5177 return tvb_captured_length(tvb
);
5181 dissect_udvm_bytecode(tvbuff_t
*udvm_tvb
, packet_info
* pinfo
, proto_tree
*sigcomp_udvm_tree
,unsigned start_address
)
5183 unsigned instruction
;
5185 int start_offset
= 0;
5188 unsigned instruction_no
= 0;
5190 proto_item
*item
, *item2
;
5191 unsigned UDVM_address
= start_address
;
5192 bool is_memory_address
;
5193 uint16_t msg_length
= tvb_reported_length_remaining(udvm_tvb
, offset
);
5196 while (msg_length
> offset
) {
5197 instruction
= tvb_get_uint8(udvm_tvb
, offset
);
5199 UDVM_address
= start_address
+ offset
;
5201 item
= proto_tree_add_uint_format(sigcomp_udvm_tree
, hf_sigcomp_udvm_instruction
, udvm_tvb
, offset
, 1,
5202 instruction_no
, "######### UDVM instruction %u at UDVM-address %u (0x%x) #########",
5203 instruction_no
,UDVM_address
,UDVM_address
);
5204 proto_item_set_generated(item
);
5205 proto_tree_add_item(sigcomp_udvm_tree
, hf_sigcomp_udvm_instr
, udvm_tvb
, offset
, 1, ENC_BIG_ENDIAN
);
5207 switch ( instruction
) {
5209 case SIGCOMP_INSTR_AND
: /* 1 AND ($operand_1, %operand_2) */
5211 offset
= dissect_udvm_reference_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, &start_offset
, &value
);
5212 len
= offset
- start_offset
;
5213 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_operand_1
,
5214 udvm_tvb
, start_offset
, len
, value
);
5216 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, false,&start_offset
, &value
, &is_memory_address
);
5217 len
= offset
- start_offset
;
5218 if ( is_memory_address
) {
5219 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_operand_2_addr
,
5220 udvm_tvb
, start_offset
, len
, value
);
5222 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_operand_2
,
5223 udvm_tvb
, start_offset
, len
, value
);
5227 case SIGCOMP_INSTR_OR
: /* 2 OR ($operand_1, %operand_2) */
5229 offset
= dissect_udvm_reference_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, &start_offset
, &value
);
5230 len
= offset
- start_offset
;
5231 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_operand_1
,
5232 udvm_tvb
, start_offset
, len
, value
);
5234 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, false,&start_offset
, &value
, &is_memory_address
);
5235 len
= offset
- start_offset
;
5236 if ( is_memory_address
) {
5237 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_operand_2_addr
,
5238 udvm_tvb
, start_offset
, len
, value
);
5240 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_operand_2
,
5241 udvm_tvb
, start_offset
, len
, value
);
5245 case SIGCOMP_INSTR_NOT
: /* 3 NOT ($operand_1) */
5247 offset
= dissect_udvm_reference_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, &start_offset
, &value
);
5248 len
= offset
- start_offset
;
5249 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_operand_1
,
5250 udvm_tvb
, start_offset
, len
, value
);
5253 case SIGCOMP_INSTR_LSHIFT
: /* 4 LSHIFT ($operand_1, %operand_2) */
5255 offset
= dissect_udvm_reference_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, &start_offset
, &value
);
5256 len
= offset
- start_offset
;
5257 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_operand_1
,
5258 udvm_tvb
, start_offset
, len
, value
);
5260 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, false,&start_offset
, &value
, &is_memory_address
);
5261 len
= offset
- start_offset
;
5262 if ( is_memory_address
) {
5263 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_operand_2_addr
,
5264 udvm_tvb
, start_offset
, len
, value
);
5266 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_operand_2
,
5267 udvm_tvb
, start_offset
, len
, value
);
5271 case SIGCOMP_INSTR_RSHIFT
: /* 5 RSHIFT ($operand_1, %operand_2) */
5273 offset
= dissect_udvm_reference_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, &start_offset
, &value
);
5274 len
= offset
- start_offset
;
5275 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_operand_1
,
5276 udvm_tvb
, start_offset
, len
, value
);
5278 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, false,&start_offset
, &value
, &is_memory_address
);
5279 len
= offset
- start_offset
;
5280 if ( is_memory_address
) {
5281 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_operand_2_addr
,
5282 udvm_tvb
, start_offset
, len
, value
);
5284 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_operand_2
,
5285 udvm_tvb
, start_offset
, len
, value
);
5289 case SIGCOMP_INSTR_ADD
: /* 6 ADD ($operand_1, %operand_2) */
5291 offset
= dissect_udvm_reference_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, &start_offset
, &value
);
5292 len
= offset
- start_offset
;
5293 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_operand_1
,
5294 udvm_tvb
, start_offset
, len
, value
);
5296 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, false,&start_offset
, &value
, &is_memory_address
);
5297 len
= offset
- start_offset
;
5298 if ( is_memory_address
) {
5299 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_operand_2_addr
,
5300 udvm_tvb
, start_offset
, len
, value
);
5302 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_operand_2
,
5303 udvm_tvb
, start_offset
, len
, value
);
5307 case SIGCOMP_INSTR_SUBTRACT
: /* 7 SUBTRACT ($operand_1, %operand_2) */
5309 offset
= dissect_udvm_reference_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, &start_offset
, &value
);
5310 len
= offset
- start_offset
;
5311 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_operand_1
,
5312 udvm_tvb
, start_offset
, len
, value
);
5314 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, false,&start_offset
, &value
, &is_memory_address
);
5315 len
= offset
- start_offset
;
5316 if ( is_memory_address
) {
5317 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_operand_2_addr
,
5318 udvm_tvb
, start_offset
, len
, value
);
5320 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_operand_2
,
5321 udvm_tvb
, start_offset
, len
, value
);
5325 case SIGCOMP_INSTR_MULTIPLY
: /* 8 MULTIPLY ($operand_1, %operand_2) */
5327 offset
= dissect_udvm_reference_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, &start_offset
, &value
);
5328 len
= offset
- start_offset
;
5329 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_operand_1
,
5330 udvm_tvb
, start_offset
, len
, value
);
5332 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, false,&start_offset
, &value
, &is_memory_address
);
5333 len
= offset
- start_offset
;
5334 if ( is_memory_address
) {
5335 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_operand_2_addr
,
5336 udvm_tvb
, start_offset
, len
, value
);
5338 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_operand_2
,
5339 udvm_tvb
, start_offset
, len
, value
);
5343 case SIGCOMP_INSTR_DIVIDE
: /* 9 DIVIDE ($operand_1, %operand_2) */
5345 offset
= dissect_udvm_reference_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, &start_offset
, &value
);
5346 len
= offset
- start_offset
;
5347 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_operand_1
,
5348 udvm_tvb
, start_offset
, len
, value
);
5350 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, false,&start_offset
, &value
, &is_memory_address
);
5351 len
= offset
- start_offset
;
5352 if ( is_memory_address
) {
5353 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_operand_2_addr
,
5354 udvm_tvb
, start_offset
, len
, value
);
5356 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_operand_2
,
5357 udvm_tvb
, start_offset
, len
, value
);
5361 case SIGCOMP_INSTR_REMAINDER
: /* 10 REMAINDER ($operand_1, %operand_2) */
5363 offset
= dissect_udvm_reference_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, &start_offset
, &value
);
5364 len
= offset
- start_offset
;
5365 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_operand_1
,
5366 udvm_tvb
, start_offset
, len
, value
);
5368 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, false,&start_offset
, &value
, &is_memory_address
);
5369 len
= offset
- start_offset
;
5370 if ( is_memory_address
) {
5371 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_operand_2_addr
,
5372 udvm_tvb
, start_offset
, len
, value
);
5374 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_operand_2
,
5375 udvm_tvb
, start_offset
, len
, value
);
5378 case SIGCOMP_INSTR_SORT_ASCENDING
: /* 11 SORT-ASCENDING (%start, %n, %k) */
5379 /* while programming stop while loop */
5380 offset
= offset
+ tvb_reported_length_remaining(udvm_tvb
, offset
);
5383 case SIGCOMP_INSTR_SORT_DESCENDING
: /* 12 SORT-DESCENDING (%start, %n, %k) */
5384 offset
= offset
+ tvb_reported_length_remaining(udvm_tvb
, offset
);
5386 case SIGCOMP_INSTR_SHA_1
: /* 13 SHA-1 (%position, %length, %destination) */
5388 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, false,&start_offset
, &value
, &is_memory_address
);
5389 len
= offset
- start_offset
;
5390 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_position
,
5391 udvm_tvb
, start_offset
, len
, value
);
5394 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, false,&start_offset
, &value
, &is_memory_address
);
5395 len
= offset
- start_offset
;
5396 if ( is_memory_address
) {
5397 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_addr_length
,
5398 udvm_tvb
, start_offset
, len
, value
);
5400 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_length
,
5401 udvm_tvb
, start_offset
, len
, value
);
5405 offset
= dissect_udvm_reference_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, &start_offset
, &value
);
5406 len
= offset
- start_offset
;
5407 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_ref_dest
,
5408 udvm_tvb
, start_offset
, len
, value
);
5411 case SIGCOMP_INSTR_LOAD
: /* 14 LOAD (%address, %value) */
5413 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, true,&start_offset
, &value
, &is_memory_address
);
5414 len
= offset
- start_offset
;
5415 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_address
,
5416 udvm_tvb
, start_offset
, len
, value
);
5418 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, false,&start_offset
, &value
, &is_memory_address
);
5419 len
= offset
- start_offset
;
5420 if ( is_memory_address
) {
5421 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_addr_value
,
5422 udvm_tvb
, start_offset
, len
, value
);
5424 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_value
,
5425 udvm_tvb
, start_offset
, len
, value
);
5429 case SIGCOMP_INSTR_MULTILOAD
: /* 15 MULTILOAD (%address, #n, %value_0, ..., %value_n-1) */
5431 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, true, &start_offset
, &value
, &is_memory_address
);
5432 len
= offset
- start_offset
;
5433 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_address
,
5434 udvm_tvb
, start_offset
, len
, value
);
5436 offset
= dissect_udvm_literal_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, &start_offset
, &value
);
5437 len
= offset
- start_offset
;
5438 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_literal_num
,
5439 udvm_tvb
, start_offset
, len
, value
);
5444 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, false,&start_offset
, &value
, &is_memory_address
);
5445 len
= offset
- start_offset
;
5446 if ( is_memory_address
) {
5447 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_addr_value
,
5448 udvm_tvb
, start_offset
, len
, value
);
5450 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_value
,
5451 udvm_tvb
, start_offset
, len
, value
);
5456 case SIGCOMP_INSTR_PUSH
: /* 16 PUSH (%value) */
5458 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, false,&start_offset
, &value
, &is_memory_address
);
5459 len
= offset
- start_offset
;
5460 if ( is_memory_address
) {
5461 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_addr_value
,
5462 udvm_tvb
, start_offset
, len
, value
);
5464 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_value
,
5465 udvm_tvb
, start_offset
, len
, value
);
5469 case SIGCOMP_INSTR_POP
: /* 17 POP (%address) */
5471 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, true, &start_offset
, &value
, &is_memory_address
);
5473 len
= offset
- start_offset
;
5474 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_address
,
5475 udvm_tvb
, start_offset
, len
, value
);
5478 case SIGCOMP_INSTR_COPY
: /* 18 COPY (%position, %length, %destination) */
5480 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, false,&start_offset
, &value
, &is_memory_address
);
5481 len
= offset
- start_offset
;
5482 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_position
,
5483 udvm_tvb
, start_offset
, len
, value
);
5486 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, false,&start_offset
, &value
, &is_memory_address
);
5487 len
= offset
- start_offset
;
5488 if ( is_memory_address
) {
5489 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_addr_length
,
5490 udvm_tvb
, start_offset
, len
, value
);
5492 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_length
,
5493 udvm_tvb
, start_offset
, len
, value
);
5497 offset
= dissect_udvm_reference_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, &start_offset
, &value
);
5498 len
= offset
- start_offset
;
5499 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_ref_dest
,
5500 udvm_tvb
, start_offset
, len
, value
);
5503 case SIGCOMP_INSTR_COPY_LITERAL
: /* 19 COPY-LITERAL (%position, %length, $destination) */
5505 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, false,&start_offset
, &value
, &is_memory_address
);
5506 len
= offset
- start_offset
;
5507 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_position
,
5508 udvm_tvb
, start_offset
, len
, value
);
5511 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, false,&start_offset
, &value
, &is_memory_address
);
5512 len
= offset
- start_offset
;
5513 if ( is_memory_address
) {
5514 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_addr_length
,
5515 udvm_tvb
, start_offset
, len
, value
);
5517 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_length
,
5518 udvm_tvb
, start_offset
, len
, value
);
5522 offset
= dissect_udvm_reference_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, &start_offset
, &value
);
5523 len
= offset
- start_offset
;
5524 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_ref_dest
,
5525 udvm_tvb
, start_offset
, len
, value
);
5528 case SIGCOMP_INSTR_COPY_OFFSET
: /* 20 COPY-OFFSET (%offset, %length, $destination) */
5530 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, false,&start_offset
, &value
, &is_memory_address
);
5531 len
= offset
- start_offset
;
5532 if ( is_memory_address
) {
5533 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_addr_offset
,
5534 udvm_tvb
, start_offset
, len
, value
);
5536 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_offset
,
5537 udvm_tvb
, start_offset
, len
, value
);
5541 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, false,&start_offset
, &value
, &is_memory_address
);
5542 len
= offset
- start_offset
;
5543 if ( is_memory_address
) {
5544 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_addr_length
,
5545 udvm_tvb
, start_offset
, len
, value
);
5547 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_length
,
5548 udvm_tvb
, start_offset
, len
, value
);
5552 offset
= dissect_udvm_reference_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, &start_offset
, &value
);
5553 len
= offset
- start_offset
;
5554 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_ref_dest
,
5555 udvm_tvb
, start_offset
, len
, value
);
5557 case SIGCOMP_INSTR_MEMSET
: /* 21 MEMSET (%address, %length, %start_value, %offset) */
5560 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, true, &start_offset
, &value
, &is_memory_address
);
5561 len
= offset
- start_offset
;
5562 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_address
,
5563 udvm_tvb
, start_offset
, len
, value
);
5566 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, false, &start_offset
, &value
, &is_memory_address
);
5567 len
= offset
- start_offset
;
5568 if ( is_memory_address
) {
5569 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_addr_length
,
5570 udvm_tvb
, start_offset
, len
, value
);
5572 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_length
,
5573 udvm_tvb
, start_offset
, len
, value
);
5577 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, false,&start_offset
, &value
, &is_memory_address
);
5578 len
= offset
- start_offset
;
5579 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_start_value
,
5580 udvm_tvb
, start_offset
, len
, value
);
5583 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, false,&start_offset
, &value
, &is_memory_address
);
5584 len
= offset
- start_offset
;
5585 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_offset
,
5586 udvm_tvb
, start_offset
, len
, value
);
5590 case SIGCOMP_INSTR_JUMP
: /* 22 JUMP (@address) */
5592 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, true, &start_offset
, &value
, &is_memory_address
);
5593 len
= offset
- start_offset
;
5594 /* operand_value = (memory_address_of_instruction + D) modulo 2^16 */
5595 value
= ( value
+ UDVM_address
) & 0xffff;
5596 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_at_address
,
5597 udvm_tvb
, start_offset
, len
, value
);
5600 case SIGCOMP_INSTR_COMPARE
: /* 23 */
5601 /* COMPARE (%value_1, %value_2, @address_1, @address_2, @address_3)
5604 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, false,&start_offset
, &value
, &is_memory_address
);
5605 len
= offset
- start_offset
;
5606 if ( is_memory_address
) {
5607 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_addr_value
,
5608 udvm_tvb
, start_offset
, len
, value
);
5610 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_value
,
5611 udvm_tvb
, start_offset
, len
, value
);
5615 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, false,&start_offset
, &value
, &is_memory_address
);
5616 len
= offset
- start_offset
;
5617 if ( is_memory_address
) {
5618 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_addr_value
,
5619 udvm_tvb
, start_offset
, len
, value
);
5621 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_value
,
5622 udvm_tvb
, start_offset
, len
, value
);
5626 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, true, &start_offset
, &value
, &is_memory_address
);
5627 len
= offset
- start_offset
;
5628 /* operand_value = (memory_address_of_instruction + D) modulo 2^16 */
5629 value
= ( value
+ UDVM_address
) & 0xffff;
5630 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_at_address
,
5631 udvm_tvb
, start_offset
, len
, value
);
5634 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, true, &start_offset
, &value
, &is_memory_address
);
5635 len
= offset
- start_offset
;
5636 /* operand_value = (memory_address_of_instruction + D) modulo 2^16 */
5637 value
= ( value
+ UDVM_address
) & 0xffff;
5638 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_at_address
,
5639 udvm_tvb
, start_offset
, len
, value
);
5642 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, true, &start_offset
, &value
, &is_memory_address
);
5643 len
= offset
- start_offset
;
5644 /* operand_value = (memory_address_of_instruction + D) modulo 2^16 */
5645 value
= ( value
+ UDVM_address
) & 0xffff;
5646 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_at_address
,
5647 udvm_tvb
, start_offset
, len
, value
);
5650 case SIGCOMP_INSTR_CALL
: /* 24 CALL (@address) (PUSH addr )*/
5652 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, true, &start_offset
, &value
, &is_memory_address
);
5653 len
= offset
- start_offset
;
5654 /* operand_value = (memory_address_of_instruction + D) modulo 2^16 */
5655 value
= ( value
+ UDVM_address
) & 0xffff;
5656 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_at_address
,
5657 udvm_tvb
, start_offset
, len
, value
);
5659 case SIGCOMP_INSTR_RETURN
: /* 25 POP and return */
5663 case SIGCOMP_INSTR_SWITCH
: /* 26 SWITCH (#n, %j, @address_0, @address_1, ... , @address_n-1) */
5665 offset
= dissect_udvm_literal_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, &start_offset
, &value
);
5666 len
= offset
- start_offset
;
5667 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_literal_num
,
5668 udvm_tvb
, start_offset
, len
, value
);
5670 /* Number of addresses in the instruction */
5673 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, false,&start_offset
, &value
, &is_memory_address
);
5674 len
= offset
- start_offset
;
5675 if ( is_memory_address
) {
5676 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_addr_j
,
5677 udvm_tvb
, start_offset
, len
, value
);
5679 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_j
,
5680 udvm_tvb
, start_offset
, len
, value
);
5686 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, true,&start_offset
, &value
, &is_memory_address
);
5687 len
= offset
- start_offset
;
5688 /* operand_value = (memory_address_of_instruction + D) modulo 2^16 */
5689 value
= ( value
+ UDVM_address
) & 0xffff;
5690 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_at_address
,
5691 udvm_tvb
, start_offset
, len
, value
);
5694 case SIGCOMP_INSTR_CRC
: /* 27 CRC (%value, %position, %length, @address) */
5696 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, false,&start_offset
, &value
, &is_memory_address
);
5697 len
= offset
- start_offset
;
5698 if ( is_memory_address
) {
5699 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_addr_value
,
5700 udvm_tvb
, start_offset
, len
, value
);
5702 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_value
,
5703 udvm_tvb
, start_offset
, len
, value
);
5707 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, false,&start_offset
, &value
, &is_memory_address
);
5708 len
= offset
- start_offset
;
5709 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_position
,
5710 udvm_tvb
, start_offset
, len
, value
);
5713 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, false,&start_offset
, &value
, &is_memory_address
);
5714 len
= offset
- start_offset
;
5715 if ( is_memory_address
) {
5716 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_addr_length
,
5717 udvm_tvb
, start_offset
, len
, value
);
5719 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_length
,
5720 udvm_tvb
, start_offset
, len
, value
);
5724 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, true, &start_offset
, &value
, &is_memory_address
);
5725 len
= offset
- start_offset
;
5726 /* operand_value = (memory_address_of_instruction + D) modulo 2^16 */
5727 value
= ( value
+ UDVM_address
) & 0xffff;
5728 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_at_address
,
5729 udvm_tvb
, start_offset
, len
, value
);
5733 case SIGCOMP_INSTR_INPUT_BYTES
: /* 28 INPUT-BYTES (%length, %destination, @address) */
5735 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, false,&start_offset
, &value
, &is_memory_address
);
5736 len
= offset
- start_offset
;
5737 if ( is_memory_address
) {
5738 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_addr_length
,
5739 udvm_tvb
, start_offset
, len
, value
);
5741 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_length
,
5742 udvm_tvb
, start_offset
, len
, value
);
5746 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, false,&start_offset
, &value
, &is_memory_address
);
5747 len
= offset
- start_offset
;
5748 if ( is_memory_address
) {
5749 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_addr_destination
,
5750 udvm_tvb
, start_offset
, len
, value
);
5752 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_destination
,
5753 udvm_tvb
, start_offset
, len
, value
);
5757 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, true, &start_offset
, &value
, &is_memory_address
);
5758 len
= offset
- start_offset
;
5759 /* operand_value = (memory_address_of_instruction + D) modulo 2^16 */
5760 value
= ( value
+ UDVM_address
) & 0xffff;
5761 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_at_address
,
5762 udvm_tvb
, start_offset
, len
, value
);
5764 case SIGCOMP_INSTR_INPUT_BITS
:/* 29 INPUT-BITS (%length, %destination, @address) */
5766 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, false,&start_offset
, &value
, &is_memory_address
);
5767 len
= offset
- start_offset
;
5768 if ( is_memory_address
) {
5769 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_addr_length
,
5770 udvm_tvb
, start_offset
, len
, value
);
5772 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_length
,
5773 udvm_tvb
, start_offset
, len
, value
);
5777 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, false,&start_offset
, &value
, &is_memory_address
);
5778 len
= offset
- start_offset
;
5779 if ( is_memory_address
) {
5780 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_addr_destination
,
5781 udvm_tvb
, start_offset
, len
, value
);
5783 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_destination
,
5784 udvm_tvb
, start_offset
, len
, value
);
5788 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, true, &start_offset
, &value
, &is_memory_address
);
5789 len
= offset
- start_offset
;
5790 /* operand_value = (memory_address_of_instruction + D) modulo 2^16 */
5791 value
= ( value
+ UDVM_address
) & 0xffff;
5792 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_at_address
,
5793 udvm_tvb
, start_offset
, len
, value
);
5795 case SIGCOMP_INSTR_INPUT_HUFFMAN
: /* 30 */
5797 * INPUT-HUFFMAN (%destination, @address, #n, %bits_1, %lower_bound_1,
5798 * %upper_bound_1, %uncompressed_1, ... , %bits_n, %lower_bound_n,
5799 * %upper_bound_n, %uncompressed_n)
5802 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, false,&start_offset
, &value
, &is_memory_address
);
5803 len
= offset
- start_offset
;
5804 if ( is_memory_address
) {
5805 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_addr_destination
,
5806 udvm_tvb
, start_offset
, len
, value
);
5808 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_destination
,
5809 udvm_tvb
, start_offset
, len
, value
);
5812 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, true, &start_offset
, &value
, &is_memory_address
);
5813 len
= offset
- start_offset
;
5814 /* operand_value = (memory_address_of_instruction + D) modulo 2^16 */
5815 value
= ( value
+ UDVM_address
) & 0xffff;
5816 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_at_address
,
5817 udvm_tvb
, start_offset
, len
, value
);
5819 offset
= dissect_udvm_literal_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, &start_offset
, &value
);
5820 len
= offset
- start_offset
;
5821 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_literal_num
,
5822 udvm_tvb
, start_offset
, len
, value
);
5827 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, false,&start_offset
, &value
, &is_memory_address
);
5828 len
= offset
- start_offset
;
5829 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_bits
,
5830 udvm_tvb
, start_offset
, len
, value
);
5832 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, false,&start_offset
, &value
, &is_memory_address
);
5833 len
= offset
- start_offset
;
5834 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_lower_bound
,
5835 udvm_tvb
, start_offset
, len
, value
);
5836 /* %upper_bound_n */
5837 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, false,&start_offset
, &value
, &is_memory_address
);
5838 len
= offset
- start_offset
;
5839 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_upper_bound
,
5840 udvm_tvb
, start_offset
, len
, value
);
5841 /* %uncompressed_n */
5842 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, false,&start_offset
, &value
, &is_memory_address
);
5843 len
= offset
- start_offset
;
5844 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_uncompressed
,
5845 udvm_tvb
, start_offset
, len
, value
);
5849 case SIGCOMP_INSTR_STATE_ACCESS
: /* 31 */
5850 /* STATE-ACCESS (%partial_identifier_start, %partial_identifier_length,
5851 * %state_begin, %state_length, %state_address, %state_instruction)
5855 * %partial_identifier_start
5857 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, true, &start_offset
, &value
,&is_memory_address
);
5858 len
= offset
- start_offset
;
5859 proto_tree_add_uint(sigcomp_udvm_tree
, hf_partial_identifier_start
,
5860 udvm_tvb
, start_offset
, len
, value
);
5863 * %partial_identifier_length
5865 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, true, &start_offset
, &value
,&is_memory_address
);
5866 len
= offset
- start_offset
;
5867 proto_tree_add_uint(sigcomp_udvm_tree
, hf_partial_identifier_length
,
5868 udvm_tvb
, start_offset
, len
, value
);
5872 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, true, &start_offset
, &value
, &is_memory_address
);
5873 len
= offset
- start_offset
;
5874 proto_tree_add_uint(sigcomp_udvm_tree
, hf_state_begin
,
5875 udvm_tvb
, start_offset
, len
, value
);
5880 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, true, &start_offset
, &value
, &is_memory_address
);
5881 len
= offset
- start_offset
;
5882 if ( is_memory_address
) {
5883 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_state_length_addr
,
5884 udvm_tvb
, start_offset
, len
, value
);
5886 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_state_length
,
5887 udvm_tvb
, start_offset
, len
, value
);
5892 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, true, &start_offset
, &value
,&is_memory_address
);
5893 len
= offset
- start_offset
;
5894 if ( is_memory_address
) {
5895 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_state_address_addr
,
5896 udvm_tvb
, start_offset
, len
, value
);
5898 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_state_address
,
5899 udvm_tvb
, start_offset
, len
, value
);
5902 * %state_instruction
5904 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, true, &start_offset
, &value
, &is_memory_address
);
5905 len
= offset
- start_offset
;
5906 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_state_instr
,
5907 udvm_tvb
, start_offset
, len
, value
);
5909 case SIGCOMP_INSTR_STATE_CREATE
: /* 32 */
5911 * STATE-CREATE (%state_length, %state_address, %state_instruction,
5912 * %minimum_access_length, %state_retention_priority)
5918 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, true, &start_offset
, &value
, &is_memory_address
);
5919 len
= offset
- start_offset
;
5920 if ( is_memory_address
) {
5921 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_state_length_addr
,
5922 udvm_tvb
, start_offset
, len
, value
);
5924 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_state_length
,
5925 udvm_tvb
, start_offset
, len
, value
);
5930 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, true, &start_offset
, &value
, &is_memory_address
);
5931 len
= offset
- start_offset
;
5932 if ( is_memory_address
) {
5933 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_state_address_addr
,
5934 udvm_tvb
, start_offset
, len
, value
);
5936 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_state_address
,
5937 udvm_tvb
, start_offset
, len
, value
);
5940 * %state_instruction
5942 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, true, &start_offset
, &value
, &is_memory_address
);
5943 len
= offset
- start_offset
;
5944 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_state_instr
,
5945 udvm_tvb
, start_offset
, len
, value
);
5947 * %minimum_access_length
5949 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, true, &start_offset
, &value
, &is_memory_address
);
5950 len
= offset
- start_offset
;
5951 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_min_acc_len
,
5952 udvm_tvb
, start_offset
, len
, value
);
5954 * %state_retention_priority
5956 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, true, &start_offset
, &value
, &is_memory_address
);
5957 len
= offset
- start_offset
;
5958 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_state_ret_pri
,
5959 udvm_tvb
, start_offset
, len
, value
);
5962 case SIGCOMP_INSTR_STATE_FREE
: /* 33 */
5964 * STATE-FREE (%partial_identifier_start, %partial_identifier_length)
5967 * %partial_identifier_start
5969 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, true, &start_offset
, &value
, &is_memory_address
);
5970 len
= offset
- start_offset
;
5971 proto_tree_add_uint(sigcomp_udvm_tree
, hf_partial_identifier_start
,
5972 udvm_tvb
, start_offset
, len
, value
);
5975 * %partial_identifier_length
5977 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, true, &start_offset
, &value
, &is_memory_address
);
5978 len
= offset
- start_offset
;
5979 proto_tree_add_uint(sigcomp_udvm_tree
, hf_partial_identifier_length
,
5980 udvm_tvb
, start_offset
, len
, value
);
5982 case SIGCOMP_INSTR_OUTPUT
: /* 34 OUTPUT (%output_start, %output_length) */
5986 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, true, &start_offset
, &value
, &is_memory_address
);
5987 len
= offset
- start_offset
;
5988 if ( is_memory_address
) {
5989 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_addr_output_start
,
5990 udvm_tvb
, start_offset
, len
, value
);
5992 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_output_start
,
5993 udvm_tvb
, start_offset
, len
, value
);
5998 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, true, &start_offset
, &value
, &is_memory_address
);
5999 len
= offset
- start_offset
;
6000 if ( is_memory_address
) {
6001 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_output_length_addr
,
6002 udvm_tvb
, start_offset
, len
, value
);
6004 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_output_length
,
6005 udvm_tvb
, start_offset
, len
, value
);
6008 case SIGCOMP_INSTR_END_MESSAGE
: /* 35 */
6010 * END-MESSAGE (%requested_feedback_location,
6011 * %returned_parameters_location, %state_length, %state_address,
6012 * %state_instruction, %minimum_access_length,
6013 * %state_retention_priority)
6015 /* %requested_feedback_location */
6016 if ((msg_length
-1) < offset
) {
6017 proto_tree_add_expert(sigcomp_udvm_tree
, pinfo
, &ei_sigcomp_all_remaining_parameters_zero
, udvm_tvb
, 0, -1);
6020 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, true, &start_offset
, &value
, &is_memory_address
);
6021 len
= offset
- start_offset
;
6022 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_req_feedback_loc
,
6023 udvm_tvb
, start_offset
, len
, value
);
6024 /* returned_parameters_location */
6025 if ((msg_length
-1) < offset
) {
6026 proto_tree_add_expert(sigcomp_udvm_tree
, pinfo
, &ei_sigcomp_all_remaining_parameters_zero
, udvm_tvb
, offset
-1, -1);
6029 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, true, &start_offset
, &value
, &is_memory_address
);
6030 len
= offset
- start_offset
;
6031 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_ret_param_loc
,
6032 udvm_tvb
, start_offset
, len
, value
);
6036 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, true, &start_offset
, &value
, &is_memory_address
);
6037 len
= offset
- start_offset
;
6038 if ( is_memory_address
) {
6039 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_state_length_addr
,
6040 udvm_tvb
, start_offset
, len
, value
);
6042 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_state_length
,
6043 udvm_tvb
, start_offset
, len
, value
);
6048 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, true, &start_offset
, &value
, &is_memory_address
);
6049 len
= offset
- start_offset
;
6050 if ( is_memory_address
) {
6051 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_state_address_addr
,
6052 udvm_tvb
, start_offset
, len
, value
);
6054 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_state_address
,
6055 udvm_tvb
, start_offset
, len
, value
);
6058 * %state_instruction
6060 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, true, &start_offset
, &value
, &is_memory_address
);
6061 len
= offset
- start_offset
;
6062 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_state_instr
,
6063 udvm_tvb
, start_offset
, len
, value
);
6065 * %minimum_access_length
6067 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, true, &start_offset
, &value
, &is_memory_address
);
6068 len
= offset
- start_offset
;
6069 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_min_acc_len
,
6070 udvm_tvb
, start_offset
, len
, value
);
6072 * %state_retention_priority
6074 if ( tvb_reported_length_remaining(udvm_tvb
, offset
) != 0 ) {
6075 offset
= dissect_udvm_multitype_operand(udvm_tvb
, sigcomp_udvm_tree
, offset
, true, &start_offset
, &value
, &is_memory_address
);
6076 len
= offset
- start_offset
;
6077 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_state_ret_pri
,
6078 udvm_tvb
, start_offset
, len
, value
);
6080 item2
= proto_tree_add_uint_format_value(sigcomp_udvm_tree
, hf_udvm_state_ret_pri
, udvm_tvb
, offset
, 1, 0,
6081 "0 (Not in the uploaded code as UDVM buffer initialized to Zero");
6082 proto_item_set_generated(item2
);
6084 if ( tvb_reported_length_remaining(udvm_tvb
, offset
) != 0 ) {
6085 len
= tvb_reported_length_remaining(udvm_tvb
, offset
);
6086 UDVM_address
= start_address
+ offset
;
6087 proto_tree_add_bytes_format(sigcomp_udvm_tree
, hf_sigcomp_remaining_bytes
, udvm_tvb
, offset
, len
, NULL
,
6088 "Remaining %u bytes starting at UDVM addr %u (0x%x)- State information ?",len
, UDVM_address
, UDVM_address
);
6090 offset
= offset
+ tvb_reported_length_remaining(udvm_tvb
, offset
);
6094 offset
= offset
+ tvb_reported_length_remaining(udvm_tvb
, offset
);
6102 /* The simplest operand type is the literal (#), which encodes a
6103 * constant integer from 0 to 65535 inclusive. A literal operand may
6104 * require between 1 and 3 bytes depending on its value.
6105 * Bytecode: Operand value: Range:
6106 * 0nnnnnnn N 0 - 127
6107 * 10nnnnnn nnnnnnnn N 0 - 16383
6108 * 11000000 nnnnnnnn nnnnnnnn N 0 - 65535
6110 * Figure 8: Bytecode for a literal (#) operand
6114 dissect_udvm_literal_operand(tvbuff_t
*udvm_tvb
, proto_tree
*sigcomp_udvm_tree
,
6115 int offset
, int *start_offset
, uint16_t *value
)
6120 unsigned display_bytecode
;
6122 bytecode
= tvb_get_uint8(udvm_tvb
, offset
);
6123 test_bits
= bytecode
>> 7;
6124 if (test_bits
== 1) {
6125 test_bits
= bytecode
>> 6;
6126 if (test_bits
== 2) {
6128 * 10nnnnnn nnnnnnnn N 0 - 16383
6130 display_bytecode
= bytecode
& 0xc0;
6131 if ( display_udvm_bytecode
)
6132 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_literal_bytecode
,
6133 udvm_tvb
, offset
, 1, display_bytecode
);
6134 operand
= tvb_get_ntohs(udvm_tvb
, offset
) & 0x3fff;
6136 *start_offset
= offset
;
6137 offset
= offset
+ 2;
6141 * 111000000 nnnnnnnn nnnnnnnn N 0 - 65535
6143 display_bytecode
= bytecode
& 0xc0;
6144 if ( display_udvm_bytecode
)
6145 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_literal_bytecode
,
6146 udvm_tvb
, offset
, 1, display_bytecode
);
6148 operand
= tvb_get_ntohs(udvm_tvb
, offset
);
6150 *start_offset
= offset
;
6151 offset
= offset
+ 2;
6156 * 0nnnnnnn N 0 - 127
6158 display_bytecode
= bytecode
& 0xc0;
6159 if ( display_udvm_bytecode
)
6160 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_literal_bytecode
,
6161 udvm_tvb
, offset
, 1, display_bytecode
);
6162 operand
= ( bytecode
& 0x7f);
6164 *start_offset
= offset
;
6172 * The second operand type is the reference ($), which is always used to
6173 * access a 2-byte value located elsewhere in the UDVM memory. The
6174 * bytecode for a reference operand is decoded to be a constant integer
6175 * from 0 to 65535 inclusive, which is interpreted as the memory address
6176 * containing the actual value of the operand.
6177 * Bytecode: Operand value: Range:
6179 * 0nnnnnnn memory[2 * N] 0 - 65535
6180 * 10nnnnnn nnnnnnnn memory[2 * N] 0 - 65535
6181 * 11000000 nnnnnnnn nnnnnnnn memory[N] 0 - 65535
6183 * Figure 9: Bytecode for a reference ($) operand
6186 dissect_udvm_reference_operand(tvbuff_t
*udvm_tvb
, proto_tree
*sigcomp_udvm_tree
,
6187 int offset
, int *start_offset
, uint16_t *value
)
6192 unsigned display_bytecode
;
6194 bytecode
= tvb_get_uint8(udvm_tvb
, offset
);
6195 test_bits
= bytecode
>> 7;
6196 if (test_bits
== 1) {
6197 test_bits
= bytecode
>> 6;
6198 if (test_bits
== 2) {
6200 * 10nnnnnn nnnnnnnn memory[2 * N] 0 - 65535
6202 display_bytecode
= bytecode
& 0xc0;
6203 if ( display_udvm_bytecode
)
6204 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_reference_bytecode
,
6205 udvm_tvb
, offset
, 1, display_bytecode
);
6206 operand
= tvb_get_ntohs(udvm_tvb
, offset
) & 0x3fff;
6207 *value
= (operand
* 2);
6208 *start_offset
= offset
;
6209 offset
= offset
+ 2;
6213 * 11000000 nnnnnnnn nnnnnnnn memory[N] 0 - 65535
6215 display_bytecode
= bytecode
& 0xc0;
6216 if ( display_udvm_bytecode
)
6217 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_reference_bytecode
,
6218 udvm_tvb
, offset
, 1, display_bytecode
);
6220 operand
= tvb_get_ntohs(udvm_tvb
, offset
);
6222 *start_offset
= offset
;
6223 offset
= offset
+ 2;
6228 * 0nnnnnnn memory[2 * N] 0 - 65535
6230 display_bytecode
= bytecode
& 0xc0;
6231 if ( display_udvm_bytecode
)
6232 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_reference_bytecode
,
6233 udvm_tvb
, offset
, 1, display_bytecode
);
6234 operand
= ( bytecode
& 0x7f);
6235 *value
= (operand
* 2);
6236 *start_offset
= offset
;
6244 *The fourth operand type is the address (@). This operand is decoded
6245 * as a multitype operand followed by a further step: the memory address
6246 * of the UDVM instruction containing the address operand is added to
6247 * obtain the correct operand value. So if the operand value from
6248 * Figure 10 is D then the actual operand value of an address is
6249 * calculated as follows:
6251 * operand_value = (is_memory_address_of_instruction + D) modulo 2^16
6252 * TODO calculate correct value for operand in case of ADDR
6255 dissect_udvm_multitype_operand(tvbuff_t
*udvm_tvb
, proto_tree
*sigcomp_udvm_tree
,
6256 int offset
, bool is_addr _U_
, int *start_offset
, uint16_t *value
, bool *is_memory_address
)
6259 unsigned display_bytecode
;
6264 * Figure 10: Bytecode for a multitype (%) operand
6265 * Bytecode: Operand value: Range: HEX val
6266 * 00nnnnnn N 0 - 63 0x00
6267 * 01nnnnnn memory[2 * N] 0 - 65535 0x40
6268 * 1000011n 2 ^ (N + 6) 64 , 128 0x86
6269 * 10001nnn 2 ^ (N + 8) 256 , ... , 32768 0x88
6270 * 111nnnnn N + 65504 65504 - 65535 0xe0
6271 * 1001nnnn nnnnnnnn N + 61440 61440 - 65535 0x90
6272 * 101nnnnn nnnnnnnn N 0 - 8191 0xa0
6273 * 110nnnnn nnnnnnnn memory[N] 0 - 65535 0xc0
6274 * 10000000 nnnnnnnn nnnnnnnn N 0 - 65535 0x80
6275 * 10000001 nnnnnnnn nnnnnnnn memory[N] 0 - 65535 0x81
6277 *is_memory_address
= false;
6278 bytecode
= tvb_get_uint8(udvm_tvb
, offset
);
6279 test_bits
= ( bytecode
& 0xc0 ) >> 6;
6280 switch (test_bits
) {
6285 display_bytecode
= bytecode
& 0xc0;
6286 if ( display_udvm_bytecode
)
6287 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_multitype_bytecode
,
6288 udvm_tvb
, offset
, 1, display_bytecode
);
6289 operand
= ( bytecode
& 0x3f);
6291 *start_offset
= offset
;
6296 * 01nnnnnn memory[2 * N] 0 - 65535
6298 display_bytecode
= bytecode
& 0xc0;
6299 if ( display_udvm_bytecode
)
6300 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_multitype_bytecode
,
6301 udvm_tvb
, offset
, 1, display_bytecode
);
6302 operand
= ( bytecode
& 0x3f) * 2;
6303 *is_memory_address
= true;
6305 *start_offset
= offset
;
6309 /* Check tree most significant bits */
6310 test_bits
= ( bytecode
& 0xe0 ) >> 5;
6311 if ( test_bits
== 5 ) {
6313 * 101nnnnn nnnnnnnn N 0 - 8191
6315 display_bytecode
= bytecode
& 0xe0;
6316 if ( display_udvm_bytecode
)
6317 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_multitype_bytecode
,
6318 udvm_tvb
, offset
, 1, display_bytecode
);
6319 operand
= tvb_get_ntohs(udvm_tvb
, offset
) & 0x1fff;
6321 *start_offset
= offset
;
6322 offset
= offset
+ 2;
6324 test_bits
= ( bytecode
& 0xf0 ) >> 4;
6325 if ( test_bits
== 9 ) {
6327 * 1001nnnn nnnnnnnn N + 61440 61440 - 65535
6329 display_bytecode
= bytecode
& 0xf0;
6330 if ( display_udvm_bytecode
)
6331 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_multitype_bytecode
,
6332 udvm_tvb
, offset
, 1, display_bytecode
);
6333 operand
= (tvb_get_ntohs(udvm_tvb
, offset
) & 0x0fff) + 61440;
6334 *start_offset
= offset
;
6336 offset
= offset
+ 2;
6338 test_bits
= ( bytecode
& 0x08 ) >> 3;
6339 if ( test_bits
== 1) {
6341 * 10001nnn 2 ^ (N + 8) 256 , ... , 32768
6343 display_bytecode
= bytecode
& 0xf8;
6344 if ( display_udvm_bytecode
)
6345 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_multitype_bytecode
,
6346 udvm_tvb
, offset
, 1, display_bytecode
);
6347 result
= pow2(uint32_t, (bytecode
& 0x07) + 8);
6348 operand
= result
& 0xffff;
6349 *start_offset
= offset
;
6353 test_bits
= ( bytecode
& 0x0e ) >> 1;
6354 if ( test_bits
== 3 ) {
6356 * 1000 011n 2 ^ (N + 6) 64 , 128
6358 display_bytecode
= bytecode
& 0xfe;
6359 if ( display_udvm_bytecode
)
6360 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_multitype_bytecode
,
6361 udvm_tvb
, offset
, 1, display_bytecode
);
6362 result
= pow2(uint32_t, (bytecode
& 0x01) + 6);
6363 operand
= result
& 0xffff;
6364 *start_offset
= offset
;
6369 * 1000 0000 nnnnnnnn nnnnnnnn N 0 - 65535
6370 * 1000 0001 nnnnnnnn nnnnnnnn memory[N] 0 - 65535
6372 display_bytecode
= bytecode
;
6373 if ( display_udvm_bytecode
)
6374 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_multitype_bytecode
,
6375 udvm_tvb
, offset
, 1, display_bytecode
);
6376 if ( (bytecode
& 0x01) == 1 )
6377 *is_memory_address
= true;
6379 operand
= tvb_get_ntohs(udvm_tvb
, offset
);
6381 *start_offset
= offset
;
6392 test_bits
= ( bytecode
& 0x20 ) >> 5;
6393 if ( test_bits
== 1 ) {
6395 * 111nnnnn N + 65504 65504 - 65535
6397 display_bytecode
= bytecode
& 0xe0;
6398 if ( display_udvm_bytecode
)
6399 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_multitype_bytecode
,
6400 udvm_tvb
, offset
, 1, display_bytecode
);
6401 operand
= ( bytecode
& 0x1f) + 65504;
6402 *start_offset
= offset
;
6407 * 110nnnnn nnnnnnnn memory[N] 0 - 65535
6409 display_bytecode
= bytecode
& 0xe0;
6410 if ( display_udvm_bytecode
)
6411 proto_tree_add_uint(sigcomp_udvm_tree
, hf_udvm_multitype_bytecode
,
6412 udvm_tvb
, offset
, 1, display_bytecode
);
6413 operand
= (tvb_get_ntohs(udvm_tvb
, offset
) & 0x1fff);
6414 *is_memory_address
= true;
6415 *start_offset
= offset
;
6427 tvb_raw_text_add(tvbuff_t
*tvb
, proto_tree
*tree
)
6429 proto_tree
*raw_tree
= NULL
;
6430 proto_item
*ti
= NULL
;
6431 int offset
, next_offset
, linelen
;
6434 ti
= proto_tree_add_item(tree
, proto_raw_sigcomp
, tvb
, 0, -1, ENC_NA
);
6435 raw_tree
= proto_item_add_subtree(ti
, ett_raw_text
);
6440 while (tvb_offset_exists(tvb
, offset
)) {
6441 tvb_find_line_end(tvb
, offset
, -1, &next_offset
, false);
6442 linelen
= next_offset
- offset
;
6443 proto_tree_add_format_text(raw_tree
, tvb
, offset
, linelen
);
6444 offset
= next_offset
;
6448 /* Register the protocol with Wireshark */
6451 proto_register_sigcomp(void)
6453 /* Setup list of header fields See Section 1.6.1 for details*/
6454 static hf_register_info hf
[] = {
6455 { &hf_sigcomp_t_bit
,
6456 { "T bit", "sigcomp.t.bit",
6457 FT_UINT8
, BASE_DEC
, NULL
, 0x04,
6458 "Sigcomp T bit", HFILL
}
6461 { "Partial state id length","sigcomp.length",
6462 FT_UINT8
, BASE_HEX
, VALS(length_encoding_vals
), 0x03,
6463 "Sigcomp length", HFILL
}
6465 { &hf_sigcomp_returned_feedback_item
,
6466 { "Returned_feedback item", "sigcomp.returned.feedback.item",
6467 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
6468 "Returned feedback item", HFILL
}
6470 { &hf_sigcomp_partial_state
,
6471 { "Partial state identifier", "sigcomp.partial.state.identifier",
6472 FT_STRING
, BASE_NONE
, NULL
, 0x0,
6475 { &hf_sigcomp_remaining_message_bytes
,
6476 { "Remaining SigComp message bytes", "sigcomp.remaining-bytes",
6477 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
6478 "Number of bytes remaining in message", HFILL
}
6480 { &hf_sigcomp_compression_ratio
,
6481 { "Compression ratio (%)", "sigcomp.compression-ratio",
6482 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
6483 "Compression ratio (decompressed / compressed) %", HFILL
}
6485 { &hf_sigcomp_returned_feedback_item_len
,
6486 { "Returned feedback item length", "sigcomp.returned.feedback.item.len",
6487 FT_UINT8
, BASE_DEC
, NULL
, 0x7f,
6490 { &hf_sigcomp_code_len
,
6491 { "Code length","sigcomp.code.len",
6492 FT_UINT16
, BASE_HEX
, NULL
, 0xfff0,
6495 { &hf_sigcomp_destination
,
6496 { "Destination","sigcomp.destination",
6497 FT_UINT8
, BASE_HEX
| BASE_EXT_STRING
, &destination_address_encoding_vals_ext
, 0xf,
6500 { &hf_sigcomp_udvm_bytecode
,
6501 { "Uploaded UDVM bytecode","sigcomp.udvm.byte-code",
6502 FT_NONE
, BASE_NONE
, NULL
, 0x0,
6505 { &hf_sigcomp_udvm_instr
,
6506 { "UDVM instruction code","sigcomp.udvm.instr",
6507 FT_UINT8
, BASE_DEC
| BASE_EXT_STRING
, &udvm_instruction_code_vals_ext
, 0x0,
6510 { &hf_udvm_execution_trace
,
6511 { "UDVM execution trace","sigcomp.udvm.execution-trace",
6512 FT_NONE
, BASE_NONE
, NULL
, 0x0,
6515 { &hf_udvm_multitype_bytecode
,
6516 { "UDVM bytecode", "sigcomp.udvm.multyt.bytecode",
6517 FT_UINT8
, BASE_HEX
, VALS(display_bytecode_vals
), 0x0,
6520 { &hf_udvm_reference_bytecode
,
6521 { "UDVM bytecode", "sigcomp.udvm.ref.bytecode",
6522 FT_UINT8
, BASE_HEX
, VALS(display_ref_bytecode_vals
), 0x0,
6525 { &hf_udvm_literal_bytecode
,
6526 { "UDVM bytecode", "sigcomp.udvm.lit.bytecode",
6527 FT_UINT8
, BASE_HEX
, VALS(display_lit_bytecode_vals
), 0x0,
6532 { "UDVM operand", "sigcomp.udvm.operand",
6533 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6538 { "%Length", "sigcomp.udvm.length",
6539 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6542 { &hf_udvm_addr_length
,
6543 { "%Length[memory address]", "sigcomp.udvm.addr.length",
6544 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6547 { &hf_udvm_destination
,
6548 { "%Destination", "sigcomp.udvm.destination",
6549 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6550 "Destination", HFILL
}
6552 { &hf_udvm_addr_destination
,
6553 { "%Destination[memory address]", "sigcomp.udvm.addr.destination",
6554 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6555 "Destination", HFILL
}
6557 { &hf_udvm_at_address
,
6558 { "@Address(mem_add_of_inst + D) mod 2^16)", "sigcomp.udvm.at.address",
6559 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6563 { "%Address", "sigcomp.udvm.address",
6564 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6567 { &hf_udvm_literal_num
,
6568 { "#n", "sigcomp.udvm.literal-num",
6569 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6570 "Literal number", HFILL
}
6573 { "%Value", "sigcomp.udvm.value",
6574 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6577 { &hf_udvm_addr_value
,
6578 { "%Value[memory address]", "sigcomp.udvm.value",
6579 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6582 { &hf_partial_identifier_start
,
6583 { "%Partial identifier start", "sigcomp.udvm.partial.identifier.start",
6584 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6585 "Partial identifier start", HFILL
}
6587 { &hf_partial_identifier_length
,
6588 { "%Partial identifier length", "sigcomp.udvm.partial.identifier.length",
6589 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6590 "Partial identifier length", HFILL
}
6593 { "%State begin", "sigcomp.udvm.state.begin",
6594 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6595 "State begin", HFILL
}
6597 { &hf_udvm_state_length
,
6598 { "%State length", "sigcomp.udvm.state.length",
6599 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6600 "State length", HFILL
}
6603 { &hf_udvm_state_length_addr
,
6604 { "%State length[memory address]", "sigcomp.udvm.state.length.addr",
6605 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6606 "State length", HFILL
}
6608 { &hf_udvm_state_address
,
6609 { "%State address", "sigcomp.udvm.start.address",
6610 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6611 "State address", HFILL
}
6613 { &hf_udvm_state_address_addr
,
6614 { "%State address[memory address]", "sigcomp.udvm.start.address.addr",
6615 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6616 "State address", HFILL
}
6618 { &hf_udvm_state_instr
,
6619 { "%State instruction", "sigcomp.udvm.start.instr",
6620 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6621 "State instruction", HFILL
}
6623 { &hf_udvm_operand_1
,
6624 { "$Operand 1[memory address]", "sigcomp.udvm.operand.1",
6625 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6626 "Reference $ Operand 1", HFILL
}
6628 { &hf_udvm_operand_2
,
6629 { "%Operand 2", "sigcomp.udvm.operand.2",
6630 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6631 "Operand 2", HFILL
}
6633 { &hf_udvm_operand_2_addr
,
6634 { "%Operand 2[memory address]", "sigcomp.udvm.operand.2.addr",
6635 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6636 "Operand 2", HFILL
}
6639 { "%j", "sigcomp.udvm.j",
6640 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6644 { "%j[memory address]", "sigcomp.udvm.addr.j",
6645 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6648 { &hf_udvm_output_start
,
6649 { "%Output_start", "sigcomp.output.start",
6650 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6651 "Output start", HFILL
}
6653 { &hf_udvm_addr_output_start
,
6654 { "%Output_start[memory address]", "sigcomp.addr.output.start",
6655 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6656 "Output start", HFILL
}
6658 { &hf_udvm_output_length
,
6659 { "%Output_length", "sigcomp.output.length",
6660 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6661 "Output length", HFILL
}
6663 { &hf_udvm_output_length_addr
,
6664 { "%Output_length[memory address]", "sigcomp.output.length.addr",
6665 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6666 "Output length", HFILL
}
6668 { &hf_udvm_req_feedback_loc
,
6669 { "%Requested feedback location", "sigcomp.req.feedback.loc",
6670 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6671 "Requested feedback location", HFILL
}
6673 { &hf_udvm_min_acc_len
,
6674 { "%Minimum access length", "sigcomp.min.acc.len",
6675 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6676 "Minimum access length", HFILL
}
6678 { &hf_udvm_state_ret_pri
,
6679 { "%State retention priority", "sigcomp.udvm.state.ret.pri",
6680 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6681 "State retention priority", HFILL
}
6683 { &hf_udvm_ret_param_loc
,
6684 { "%Returned parameters location", "sigcomp.ret.param.loc",
6685 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6686 "Returned parameters location", HFILL
}
6688 { &hf_udvm_position
,
6689 { "%Position", "sigcomp.udvm.position",
6690 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6693 { &hf_udvm_ref_dest
,
6694 { "$Destination[memory address]", "sigcomp.udvm.ref.destination",
6695 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6696 "(reference)Destination", HFILL
}
6699 { "%Bits", "sigcomp.udvm.bits",
6700 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6703 { &hf_udvm_lower_bound
,
6704 { "%Lower bound", "sigcomp.udvm.lower.bound",
6705 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6706 "Lower_bound", HFILL
}
6708 { &hf_udvm_upper_bound
,
6709 { "%Upper bound", "sigcomp.udvm.upper.bound",
6710 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6711 "Upper bound", HFILL
}
6713 { &hf_udvm_uncompressed
,
6714 { "%Uncompressed", "sigcomp.udvm.uncompressed",
6715 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6716 "Uncompressed", HFILL
}
6718 { &hf_udvm_start_value
,
6719 { "%Start value", "sigcomp.udvm.start.value",
6720 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6721 "Start value", HFILL
}
6724 { "%Offset", "sigcomp.udvm.offset",
6725 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6728 { &hf_udvm_addr_offset
,
6729 { "%Offset[memory address]", "sigcomp.udvm.addr.offset",
6730 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6733 { &hf_sigcomp_nack_ver
,
6734 { "NACK Version", "sigcomp.nack.ver",
6735 FT_UINT8
, BASE_DEC
, NULL
, 0x0f,
6738 { &hf_sigcomp_nack_reason_code
,
6739 { "Reason Code", "sigcomp.nack.reason",
6740 FT_UINT8
, BASE_DEC
| BASE_EXT_STRING
, &sigcomp_nack_reason_code_vals_ext
, 0x0,
6741 "NACK Reason Code", HFILL
}
6743 { &hf_sigcomp_nack_failed_op_code
,
6744 { "OPCODE of failed instruction", "sigcomp.nack.failed_op_code",
6745 FT_UINT8
, BASE_DEC
| BASE_EXT_STRING
, &udvm_instruction_code_vals_ext
, 0x0,
6746 "NACK OPCODE of failed instruction", HFILL
}
6748 { &hf_sigcomp_nack_pc
,
6749 { "PC of failed instruction", "sigcomp.nack.pc",
6750 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6751 "NACK PC of failed instruction", HFILL
}
6753 { &hf_sigcomp_nack_sha1
,
6754 { "SHA-1 Hash of failed message", "sigcomp.nack.sha1",
6755 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
6756 "NACK SHA-1 Hash of failed message", HFILL
}
6758 { &hf_sigcomp_nack_state_id
,
6759 { "State ID (6 - 20 bytes)", "sigcomp.nack.state_id",
6760 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
6761 "NACK State ID (6 - 20 bytes)", HFILL
}
6763 { &hf_sigcomp_nack_cycles_per_bit
,
6764 { "Cycles Per Bit", "sigcomp.nack.cycles_per_bit",
6765 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
6766 "NACK Cycles Per Bit", HFILL
}
6768 { &hf_sigcomp_nack_memory_size
,
6769 { "Memory size", "sigcomp.memory_size",
6770 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
6773 { &hf_sigcomp_decompress_instruction
,
6774 { "Instruction", "sigcomp.decompress_instruction",
6775 FT_NONE
, BASE_NONE
, NULL
, 0x0,
6778 { &hf_sigcomp_loading_result
,
6779 { "Loading result", "sigcomp.loading_result",
6780 FT_NONE
, BASE_NONE
, NULL
, 0x0,
6783 { &hf_sigcomp_byte_copy
,
6784 { "byte copy", "sigcomp.byte_copy",
6785 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
6788 /* Generated from convert_proto_tree_add_text.pl */
6789 { &hf_sigcomp_accessing_state
, { "### Accessing state ###", "sigcomp.accessing_state", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
6790 { &hf_sigcomp_getting_value
, { "Getting value", "sigcomp.getting_value", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
6791 { &hf_sigcomp_load_bytecode_into_udvm_start
, { "Load bytecode into UDVM starting at", "sigcomp.load_bytecode_into_udvm_start", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
6792 { &hf_sigcomp_instruction_code
, { "Instruction code", "sigcomp.instruction_code", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
6793 { &hf_sigcomp_current_instruction
, { "Addr", "sigcomp.current_instruction", FT_UINT8
, BASE_DEC
|BASE_EXT_STRING
, &udvm_instruction_code_vals_ext
, 0x0, NULL
, HFILL
}},
6794 { &hf_sigcomp_decompression_failure
, { "DECOMPRESSION-FAILURE", "sigcomp.decompression_failure", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
6795 { &hf_sigcomp_wireshark_udvm_diagnostic
, { "Wireshark UDVM diagnostic", "sigcomp.wireshark_udvm_diagnostic", FT_UINT32
, BASE_DEC
, VALS(result_code_vals
), 0x0, NULL
, HFILL
}},
6796 { &hf_sigcomp_calculated_sha_1
, { "Calculated SHA-1", "sigcomp.calculated_sha_1", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
6797 { &hf_sigcomp_copying_value
, { "Copying value", "sigcomp.copying_value", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
6798 { &hf_sigcomp_storing_value
, { "Storing value", "sigcomp.storing_value", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
6799 { &hf_sigcomp_loading_value
, { "Loading value", "sigcomp.loading_value", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
6800 { &hf_sigcomp_set_hu
, { "Set Hu", "sigcomp.set_hu", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
6801 { &hf_sigcomp_loading_h
, { "Loading H", "sigcomp.loading_h", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
6802 { &hf_sigcomp_state_value
, { "Addr", "sigcomp.state_value", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
6803 { &hf_sigcomp_output_value
, { "Output value", "sigcomp.output_value", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
6804 { &hf_sigcomp_num_state_create
, { "no_of_state_create", "sigcomp.num_state_create", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
6805 { &hf_sigcomp_sha1_digest
, { "SHA1 digest", "sigcomp.sha1_digest", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
6806 { &hf_sigcomp_creating_state
, { "### Creating state ###", "sigcomp.creating_state", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
6807 { &hf_sigcomp_sigcomp_message_decompressed
, { "SigComp message Decompressed", "sigcomp.message_decompressed", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
6808 { &hf_sigcomp_starting_to_remove_escape_digits
, { "Starting to remove escape digits", "sigcomp.starting_to_remove_escape_digits", FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
6809 { &hf_sigcomp_escape_digit_found
, { "Escape digit found", "sigcomp.escape_digit_found", FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
6810 { &hf_sigcomp_illegal_escape_code
, { "Illegal escape code", "sigcomp.illegal_escape_code", FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
6811 { &hf_sigcomp_end_of_sigcomp_message_indication_found
, { "End of SigComp message indication found", "sigcomp.end_of_sigcomp_message_indication_found", FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
6812 { &hf_sigcomp_addr_value
, { "Addr", "sigcomp.addr", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
6813 { &hf_sigcomp_copying_bytes_literally
, { "Copying bytes literally", "sigcomp.copying_bytes_literally", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
6814 { &hf_sigcomp_data_for_sigcomp_dissector
, { "Data handed to the Sigcomp dissector", "sigcomp.data_for_sigcomp_dissector", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
6815 { &hf_sigcomp_remaining_sigcomp_message
, { "Remaining SigComp message", "sigcomp.remaining_sigcomp_message", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
6816 { &hf_sigcomp_sha1buff
, { "sha1buff", "sigcomp.sha1buff", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
6817 { &hf_sigcomp_udvm_instruction
, { "UDVM instruction", "sigcomp.udvm_instruction", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}},
6818 { &hf_sigcomp_remaining_bytes
, { "Remaining bytes", "sigcomp.remaining_bytes", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
6819 { &hf_sigcomp_max_udvm_cycles
, { "maximum_UDVM_cycles", "sigcomp.max_udvm_cycles", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
6820 { &hf_sigcomp_used_udvm_cycles
, { "used_udvm_cycles", "sigcomp.used_udvm_cycles", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
6821 { &hf_sigcomp_udvm_execution_stated
, { "UDVM EXECUTION STARTED", "sigcomp.udvm_execution_stated", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
6822 { &hf_sigcomp_message_length
, { "Message Length", "sigcomp.message_length", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
6823 { &hf_sigcomp_byte_code_length
, { "Byte code length", "sigcomp.byte_code_length", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
6826 /* Setup protocol subtree array */
6827 static int *ett
[] = {
6830 &ett_sigcomp_udvm_exe
,
6832 static int *ett_raw
[] = {
6836 static ei_register_info ei
[] = {
6837 { &ei_sigcomp_nack_failed_op_code
, { "sigcomp.nack.failed_op_code.expert", PI_SEQUENCE
, PI_WARN
, "SigComp NACK", EXPFILL
}},
6838 { &ei_sigcomp_invalid_instruction
, { "sigcomp.invalid_instruction", PI_PROTOCOL
, PI_WARN
, "Invalid instruction", EXPFILL
}},
6839 { &ei_sigcomp_invalid_shift_value
, { "sigcomp.invalid_shift_value", PI_PROTOCOL
, PI_WARN
, "Invalid shift value", EXPFILL
}},
6840 /* Generated from convert_proto_tree_add_text.pl */
6841 { &ei_sigcomp_sigcomp_message_decompression_failure
, { "sigcomp.message_decompression_failure", PI_PROTOCOL
, PI_WARN
, "SigComp message Decompression failure", EXPFILL
}},
6842 { &ei_sigcomp_execution_of_this_instruction_is_not_implemented
, { "sigcomp.execution_of_this_instruction_is_not_implemented", PI_UNDECODED
, PI_WARN
, "Execution of this instruction is NOT implemented", EXPFILL
}},
6843 { &ei_sigcomp_decompression_failure
, { "sigcomp.decompression_failure_expert", PI_PROTOCOL
, PI_WARN
, "DECOMPRESSION FAILURE", EXPFILL
}},
6844 { &ei_sigcomp_tcp_fragment
, { "sigcomp.tcp_fragment", PI_MALFORMED
, PI_ERROR
, "TCP Fragment", EXPFILL
}},
6845 { &ei_sigcomp_failed_to_access_state_wireshark_udvm_diagnostic
, { "sigcomp.failed_to_access_state_wireshark_udvm_diagnostic", PI_PROTOCOL
, PI_WARN
, "Failed to Access state Wireshark UDVM diagnostic", EXPFILL
}},
6846 { &ei_sigcomp_all_remaining_parameters_zero
, { "sigcomp.all_remaining_parameters", PI_PROTOCOL
, PI_NOTE
, "All remaining parameters = 0(Not in the uploaded code as UDVM buffer initialized to Zero", EXPFILL
}},
6849 module_t
*sigcomp_module
;
6850 expert_module_t
* expert_sigcomp
;
6852 static const enum_val_t udvm_detail_vals
[] = {
6853 {"no-printout", "No-Printout", 0},
6854 {"low-detail", "Low-detail", 1},
6855 {"medium-detail", "Medium-detail", 2},
6856 {"high-detail", "High-detail", 3},
6861 /* Register the protocol name and description */
6862 proto_sigcomp
= proto_register_protocol("Signaling Compression", "SIGCOMP", "sigcomp");
6863 proto_raw_sigcomp
= proto_register_protocol("Decompressed SigComp message as raw text", "Raw_SigComp", "raw_sigcomp");
6865 sigcomp_handle
= register_dissector("sigcomp", dissect_sigcomp
, proto_sigcomp
);
6866 sigcomp_tcp_handle
= register_dissector("sigcomp_tcp", dissect_sigcomp_tcp
,proto_sigcomp
);
6868 /* Required function calls to register the header fields and subtrees used */
6869 proto_register_field_array(proto_sigcomp
, hf
, array_length(hf
));
6870 proto_register_subtree_array(ett
, array_length(ett
));
6871 proto_register_subtree_array(ett_raw
, array_length(ett_raw
));
6872 expert_sigcomp
= expert_register_protocol(proto_sigcomp
);
6873 expert_register_field_array(expert_sigcomp
, ei
, array_length(ei
));
6875 /* Register a configuration option for port */
6876 sigcomp_module
= prefs_register_protocol(proto_sigcomp
, NULL
);
6878 prefs_register_bool_preference(sigcomp_module
, "display.udvm.code",
6879 "Dissect the UDVM code",
6880 "Preference whether to Dissect the UDVM code or not",
6881 &dissect_udvm_code
);
6883 prefs_register_bool_preference(sigcomp_module
, "display.bytecode",
6884 "Display the bytecode of operands",
6885 "preference whether to display the bytecode in "
6886 "UDVM operands or not",
6887 &display_udvm_bytecode
);
6888 prefs_register_bool_preference(sigcomp_module
, "decomp.msg",
6889 "Decompress message",
6890 "preference whether to decompress message or not",
6892 prefs_register_bool_preference(sigcomp_module
, "display.decomp.msg.as.txt",
6893 "Displays the decompressed message as text",
6894 "preference whether to display the decompressed message "
6895 "as raw text or not",
6897 prefs_register_enum_preference(sigcomp_module
, "show.udvm.execution",
6898 "Level of detail of UDVM execution:",
6899 "'No-Printout' = UDVM executes silently, then increasing detail "
6900 "about execution of UDVM instructions; "
6901 "Warning! CPU intense at high detail",
6902 &udvm_print_detail_level
, udvm_detail_vals
, false);
6904 register_init_routine(&sigcomp_init_udvm
);
6905 register_cleanup_routine(&sigcomp_cleanup_udvm
);
6912 proto_reg_handoff_sigcomp(void)
6914 sip_handle
= find_dissector_add_dependency("sip",proto_sigcomp
);
6915 dissector_add_uint_range_with_preference("tcp.port", SIGCOMP_TCP_PORT_RANGE
, sigcomp_tcp_handle
);
6916 dissector_add_uint_range_with_preference("udp.port", SIGCOMP_TCP_PORT_RANGE
, sigcomp_handle
);
6920 * Editor modelines - https://www.wireshark.org/tools/modelines.html
6925 * indent-tabs-mode: nil
6928 * vi: set shiftwidth=4 tabstop=8 expandtab:
6929 * :indentSize=4:tabSize=8:noTabs=true: