HACK: pinfo->private_data points to smb_info again
[wireshark-wip.git] / epan / dissectors / packet-yami.c
blobe0e9dd979de0179d3a7e5989d96934eb3f2318b8
1 /* packet-yami.c
2 * Routines for YAMI dissection
3 * Copyright 2010, Pawel Korbut
4 * Copyright 2012, Jakub Zawadzki <darkjames-ws@darkjames.pl>
6 * $Id$
8 * Protocol documentation available at http://www.inspirel.com/yami4/book/B-2.html
10 * Wireshark - Network traffic analyzer
11 * By Gerald Combs <gerald@wireshark.org>
12 * Copyright 1998 Gerald Combs
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
29 #define NEW_PROTO_TREE_API
31 #include "config.h"
33 #include <epan/packet.h>
34 #include <epan/prefs.h>
35 #include <epan/strutil.h>
36 #include <epan/dissectors/packet-tcp.h>
38 void proto_reg_handoff_yami(void);
39 void proto_register_yami(void);
41 static gboolean yami_desegment = TRUE;
42 static guint global_yami_config_tcp_port = 0;
43 static guint global_yami_config_udp_port = 0;
45 static dissector_handle_t yami_handle;
47 #define YAMI_TYPE_BOOLEAN 1
48 #define YAMI_TYPE_INTEGER 2
49 #define YAMI_TYPE_LONGLONG 3
50 #define YAMI_TYPE_DOUBLE 4
51 #define YAMI_TYPE_STRING 5
52 #define YAMI_TYPE_BINARY 6
53 #define YAMI_TYPE_BOOLEAN_ARRAY 7
54 #define YAMI_TYPE_INTEGER_ARRAY 8
55 #define YAMI_TYPE_LONGLONG_ARRAY 9
56 #define YAMI_TYPE_DOUBLE_ARRAY 10
57 #define YAMI_TYPE_STRING_ARRAY 11
58 #define YAMI_TYPE_BINARY_ARRAY 12
59 #define YAMI_TYPE_NESTED 13
61 static const value_string yami_param_type_vals[] = {
62 { YAMI_TYPE_BOOLEAN, "boolean" },
63 { YAMI_TYPE_INTEGER, "integer" },
64 { YAMI_TYPE_LONGLONG, "long long" },
65 { YAMI_TYPE_DOUBLE, "double" },
66 { YAMI_TYPE_STRING, "string" },
67 { YAMI_TYPE_BINARY, "binary" },
68 { YAMI_TYPE_BOOLEAN_ARRAY, "boolean array" },
69 { YAMI_TYPE_INTEGER_ARRAY, "integer array" },
70 { YAMI_TYPE_LONGLONG_ARRAY, "long long array" },
71 { YAMI_TYPE_DOUBLE_ARRAY, "double array" },
72 { YAMI_TYPE_STRING_ARRAY, "string array" },
73 { YAMI_TYPE_BINARY_ARRAY, "binary array" },
74 { YAMI_TYPE_NESTED, "nested parameters" },
75 { 0, NULL }
78 static header_field_info *hfi_yami = NULL;
80 #define YAMI_HFI_INIT HFI_INIT(proto_yami)
82 /* Header */
83 static header_field_info hfi_yami_message_id YAMI_HFI_INIT =
84 { "Message ID", "yami.message_id", FT_INT32, BASE_DEC, NULL, 0x00, NULL, HFILL };
86 static header_field_info hfi_yami_frame_number YAMI_HFI_INIT =
87 { "Frame Number", "yami.frame_number", FT_INT32, BASE_DEC, NULL, 0x00, NULL, HFILL };
89 static header_field_info hfi_yami_message_header_size YAMI_HFI_INIT =
90 { "Message Header Size", "yami.message_header_size", FT_INT32, BASE_DEC, NULL, 0x00, NULL, HFILL };
92 static header_field_info hfi_yami_frame_payload_size YAMI_HFI_INIT =
93 { "Frame Payload Size", "yami.frame_payload_size", FT_INT32, BASE_DEC, NULL, 0x00, NULL, HFILL };
95 static header_field_info hfi_yami_message_hdr YAMI_HFI_INIT =
96 { "Header message", "yami.msg_hdr", FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL };
98 static header_field_info hfi_yami_message_data YAMI_HFI_INIT =
99 { "Data message", "yami.msg_data", FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL };
101 /* Parameter */
102 static header_field_info hfi_yami_param YAMI_HFI_INIT =
103 { "Parameter", "yami.param", FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL };
105 static header_field_info hfi_yami_param_name YAMI_HFI_INIT =
106 { "Name", "yami.param.name", FT_STRING, BASE_NONE, NULL, 0x00, "Parameter name", HFILL };
108 static header_field_info hfi_yami_param_type YAMI_HFI_INIT =
109 { "Type", "yami.param.type", FT_INT32, BASE_DEC, VALS(yami_param_type_vals), 0x00, "Parameter type", HFILL };
111 static header_field_info hfi_yami_param_value_bool YAMI_HFI_INIT =
112 { "Value", "yami.param.value_bool", FT_BOOLEAN, BASE_NONE, NULL, 0x00, "Parameter value (bool)", HFILL };
114 static header_field_info hfi_yami_param_value_int YAMI_HFI_INIT =
115 { "Value", "yami.param.value_int", FT_INT32, BASE_DEC, NULL, 0x00, "Parameter value (int)", HFILL };
117 static header_field_info hfi_yami_param_value_long YAMI_HFI_INIT =
118 { "Value", "yami.param.value_long", FT_INT64, BASE_DEC, NULL, 0x00, "Parameter value (long)", HFILL };
120 static header_field_info hfi_yami_param_value_double YAMI_HFI_INIT =
121 { "Value", "yami.param.value_double", FT_DOUBLE, BASE_NONE, NULL, 0x00, "Parameter value (double)", HFILL };
123 static header_field_info hfi_yami_param_value_str YAMI_HFI_INIT =
124 { "Value", "yami.param.value_str", FT_STRING, BASE_NONE, NULL, 0x00, "Parameter value (string)", HFILL };
126 static header_field_info hfi_yami_param_value_bin YAMI_HFI_INIT =
127 { "Value", "yami.param.value_bin", FT_BYTES, BASE_NONE, NULL, 0x00, "Parameter value (binary)", HFILL };
129 static header_field_info hfi_yami_params_count YAMI_HFI_INIT =
130 { "Parameters count", "yami.params_count", FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL };
132 static header_field_info hfi_yami_items_count YAMI_HFI_INIT =
133 { "Items count", "yami.items_count", FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL };
135 static int ett_yami = -1;
136 static int ett_yami_msg_hdr = -1;
137 static int ett_yami_msg_data = -1;
138 static int ett_yami_param = -1;
140 static int
141 dissect_yami_parameter(tvbuff_t *tvb, proto_tree *tree, int offset, proto_item *par_ti)
143 const int orig_offset = offset;
145 proto_tree *yami_param;
146 proto_item *ti;
148 char *name;
149 int name_offset;
150 guint32 name_len;
152 guint32 type;
154 ti = proto_tree_add_item(tree, &hfi_yami_param, tvb, offset, 0, ENC_NA);
155 yami_param = proto_item_add_subtree(ti, ett_yami_param);
157 name_offset = offset;
158 name_len = tvb_get_letohl(tvb, offset);
159 offset += 4;
161 name = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, name_len, ENC_ASCII | ENC_NA);
162 proto_item_append_text(ti, ": %s", name);
163 proto_item_append_text(par_ti, "%s, ", name);
164 offset += (name_len + 3) & ~3;
165 proto_tree_add_string(yami_param, &hfi_yami_param_name, tvb, name_offset, offset - name_offset, name);
167 type = tvb_get_letohl(tvb, offset);
168 proto_tree_add_item(yami_param, &hfi_yami_param_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
169 offset += 4;
171 switch (type) {
172 case YAMI_TYPE_BOOLEAN:
174 guint32 val = tvb_get_letohl(tvb, offset);
175 proto_item_append_text(ti, ", Type: boolean, Value: %s", val ? "True" : "False");
176 proto_tree_add_item(yami_param, &hfi_yami_param_value_bool, tvb, offset, 4, ENC_LITTLE_ENDIAN);
177 offset += 4;
178 break;
181 case YAMI_TYPE_INTEGER:
183 gint32 val = tvb_get_letohl(tvb, offset);
184 proto_item_append_text(ti, ", Type: integer, Value: %d", val);
185 proto_tree_add_item(yami_param, &hfi_yami_param_value_int, tvb, offset, 4, ENC_LITTLE_ENDIAN);
186 offset += 4;
187 break;
190 case YAMI_TYPE_LONGLONG:
192 gint64 val = tvb_get_letoh64(tvb, offset);
193 proto_item_append_text(ti, ", Type: long, Value: %" G_GINT64_MODIFIER "d", val);
194 proto_tree_add_item(yami_param, &hfi_yami_param_value_long, tvb, offset, 8, ENC_LITTLE_ENDIAN);
195 offset += 8;
196 break;
199 case YAMI_TYPE_DOUBLE:
201 gdouble val = tvb_get_letohieee_double(tvb, offset);
202 proto_item_append_text(ti, ", Type: double, Value: %g", val);
203 proto_tree_add_item(yami_param, &hfi_yami_param_value_double, tvb, offset, 8, ENC_LITTLE_ENDIAN);
204 offset += 8;
205 break;
208 case YAMI_TYPE_STRING:
210 const int val_offset = offset;
211 guint32 val_len;
212 char *val;
214 val_len = tvb_get_letohl(tvb, offset);
215 offset += 4;
217 val = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, val_len, ENC_ASCII | ENC_NA);
219 proto_item_append_text(ti, ", Type: string, Value: \"%s\"", val);
220 offset += (val_len + 3) & ~3;
221 proto_tree_add_string(yami_param, &hfi_yami_param_value_str, tvb, val_offset, offset - val_offset, val);
222 break;
225 case YAMI_TYPE_BINARY:
227 const int val_offset = offset;
228 guint32 val_len;
229 const guint8 *val;
230 char *repr;
232 val_len = tvb_get_letohl(tvb, offset);
233 offset += 4;
235 val = tvb_get_ptr(tvb, offset, val_len);
236 repr = bytes_to_str(val, val_len);
238 proto_item_append_text(ti, ", Type: binary, Value: %s", repr);
239 offset += (val_len + 3) & ~3;
240 proto_tree_add_bytes_format_value(yami_param, hfi_yami_param_value_bin.id, tvb, val_offset, offset - val_offset, val, "%s", repr);
241 break;
244 case YAMI_TYPE_BOOLEAN_ARRAY:
246 guint32 count;
247 guint i;
248 int j;
250 count = tvb_get_letohl(tvb, offset);
251 proto_tree_add_item(yami_param, &hfi_yami_items_count, tvb, offset, 4, ENC_LITTLE_ENDIAN);
252 offset += 4;
254 proto_item_append_text(ti, ", Type: boolean[], %u items: {", count);
256 for (i = 0; i < count/32; i++) {
257 guint32 val = tvb_get_letohl(tvb, offset);
259 for (j = 0; j < 32; j++) {
260 int r = !!(val & (1 << j));
262 proto_item_append_text(ti, "%s, ", r ? "T" : "F");
263 proto_tree_add_boolean(yami_param, &hfi_yami_param_value_bool, tvb, offset+(j/8), 1, r);
265 offset += 4;
268 if (count % 32) {
269 guint32 val = tvb_get_letohl(tvb, offset);
270 int tmp = count % 32;
272 for (j = 0; j < tmp; j++) {
273 int r = !!(val & (1 << j));
275 proto_item_append_text(ti, "%s, ", r ? "T" : "F");
276 proto_tree_add_boolean(yami_param, &hfi_yami_param_value_bool, tvb, offset+(j/8), 1, r);
278 offset += 4;
281 proto_item_append_text(ti, "}");
282 break;
285 case YAMI_TYPE_INTEGER_ARRAY:
287 guint32 count;
288 guint i;
290 count = tvb_get_letohl(tvb, offset);
291 proto_tree_add_item(yami_param, &hfi_yami_items_count, tvb, offset, 4, ENC_LITTLE_ENDIAN);
292 offset += 4;
294 proto_item_append_text(ti, ", Type: integer[], %u items: {", count);
295 for (i = 0; i < count; i++) {
296 gint32 val = tvb_get_letohl(tvb, offset);
298 proto_item_append_text(ti, "%d, ", val);
299 proto_tree_add_item(yami_param, &hfi_yami_param_value_int, tvb, offset, 4, ENC_LITTLE_ENDIAN);
300 offset += 4;
302 proto_item_append_text(ti, "}");
303 break;
306 case YAMI_TYPE_LONGLONG_ARRAY:
308 guint32 count;
309 guint i;
311 count = tvb_get_letohl(tvb, offset);
312 proto_tree_add_item(yami_param, &hfi_yami_items_count, tvb, offset, 4, ENC_LITTLE_ENDIAN);
313 offset += 4;
315 proto_item_append_text(ti, ", Type: long long[], %u items: {", count);
317 for (i = 0; i < count; i++) {
318 gint64 val = tvb_get_letoh64(tvb, offset);
320 proto_item_append_text(ti, "%" G_GINT64_MODIFIER "d, ", val);
321 proto_tree_add_item(yami_param, &hfi_yami_param_value_long, tvb, offset, 8, ENC_LITTLE_ENDIAN);
322 offset += 8;
324 proto_item_append_text(ti, "}");
325 break;
328 case YAMI_TYPE_DOUBLE_ARRAY:
330 guint32 count;
331 guint i;
333 count = tvb_get_letohl(tvb, offset);
334 proto_tree_add_item(yami_param, &hfi_yami_items_count, tvb, offset, 4, ENC_LITTLE_ENDIAN);
335 offset += 4;
337 proto_item_append_text(ti, ", Type: double[], %u items: {", count);
339 for (i = 0; i < count; i++) {
340 gdouble val = tvb_get_letohieee_double(tvb, offset);
342 proto_item_append_text(ti, "%g, ", val);
343 proto_tree_add_item(yami_param, &hfi_yami_param_value_double, tvb, offset, 8, ENC_LITTLE_ENDIAN);
344 offset += 8;
346 proto_item_append_text(ti, "}");
347 break;
350 case YAMI_TYPE_STRING_ARRAY:
352 guint32 count;
353 guint i;
355 count = tvb_get_letohl(tvb, offset);
356 proto_tree_add_item(yami_param, &hfi_yami_items_count, tvb, offset, 4, ENC_LITTLE_ENDIAN);
357 offset += 4;
359 proto_item_append_text(ti, ", Type: string[], %u items: {", count);
361 for (i = 0; i < count; i++) {
362 const int val_offset = offset;
363 guint32 val_len;
364 char *val;
366 val_len = tvb_get_letohl(tvb, offset);
367 offset += 4;
369 val = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, val_len, ENC_ASCII | ENC_NA);
371 proto_item_append_text(ti, "\"%s\", ", val);
372 proto_tree_add_string(yami_param, &hfi_yami_param_value_str, tvb, val_offset, offset - val_offset, val);
373 offset += (val_len + 3) & ~3;
375 proto_item_append_text(ti, "}");
376 break;
379 case YAMI_TYPE_BINARY_ARRAY:
381 guint32 count;
382 guint i;
384 count = tvb_get_letohl(tvb, offset);
385 proto_tree_add_item(yami_param, &hfi_yami_items_count, tvb, offset, 4, ENC_LITTLE_ENDIAN);
386 offset += 4;
388 proto_item_append_text(ti, ", Type: binary[], %u items: {", count);
390 for (i = 0; i < count; i++) {
391 const int val_offset = offset;
392 guint32 val_len;
393 const guint8 *val;
394 char *repr;
396 val_len = tvb_get_letohl(tvb, offset);
397 offset += 4;
399 val = tvb_get_ptr(tvb, offset, val_len);
400 repr = bytes_to_str(val, val_len);
402 proto_item_append_text(ti, "%s, ", repr);
403 offset += (val_len + 3) & ~3;
404 proto_tree_add_bytes_format_value(yami_param, hfi_yami_param_value_bin.id, tvb, val_offset, offset - val_offset, val, "%s", repr);
406 proto_item_append_text(ti, "}");
407 break;
410 case YAMI_TYPE_NESTED:
412 guint32 count;
413 guint i;
415 count = tvb_get_letohl(tvb, offset);
416 proto_tree_add_item(yami_param, &hfi_yami_params_count, tvb, offset, 4, ENC_LITTLE_ENDIAN);
417 offset += 4;
419 proto_item_append_text(ti, ", Type: nested, %u parameters: ", count);
421 for (i = 0; i < count; i++) {
422 offset = dissect_yami_parameter(tvb, yami_param, offset, ti);
423 /* smth went wrong */
424 if (offset == -1)
425 return -1;
427 break;
430 default:
431 proto_item_append_text(ti, ", Type: unknown (%d)!", type);
432 return -1;
435 proto_item_set_len(ti, offset - orig_offset);
436 return offset;
439 static int
440 dissect_yami_data(tvbuff_t *tvb, gboolean data, proto_tree *tree, int offset)
442 const int orig_offset = offset;
444 proto_tree *yami_data_tree;
445 proto_item *ti;
447 guint32 count;
448 guint i;
450 ti = proto_tree_add_item(tree, (data) ? &hfi_yami_message_data : &hfi_yami_message_hdr, tvb, offset, 0, ENC_NA);
451 yami_data_tree = proto_item_add_subtree(ti, (data) ? ett_yami_msg_data : ett_yami_msg_hdr);
453 count = tvb_get_letohl(tvb, offset);
454 proto_tree_add_item(yami_data_tree, &hfi_yami_params_count, tvb, offset, 4, ENC_LITTLE_ENDIAN);
455 offset += 4;
457 proto_item_append_text(ti, ", %u parameters: ", count);
459 for (i = 0; i < count; i++) {
460 offset = dissect_yami_parameter(tvb, yami_data_tree, offset, ti);
461 /* smth went wrong */
462 if (offset == -1)
463 return -1;
466 proto_item_set_len(ti, offset - orig_offset);
468 return offset;
471 static int
472 dissect_yami_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
474 proto_tree *yami_tree;
475 proto_item *ti;
477 gint frame_number;
478 gint message_header_size;
479 gint frame_payload_size;
480 gint frame_size;
481 int offset;
483 col_set_str(pinfo->cinfo, COL_PROTOCOL, "YAMI");
484 col_clear(pinfo->cinfo, COL_INFO);
486 ti = proto_tree_add_item(tree, hfi_yami, tvb, 0, -1, ENC_NA);
487 yami_tree = proto_item_add_subtree(ti, ett_yami);
489 offset = 0;
491 proto_tree_add_item(yami_tree, &hfi_yami_message_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
492 offset += 4;
494 frame_number = tvb_get_letohl(tvb, offset);
495 ti = proto_tree_add_item(yami_tree, &hfi_yami_frame_number, tvb, offset, 4, ENC_LITTLE_ENDIAN);
496 if(frame_number < 0)
497 proto_item_append_text(ti, "%s", " (last frame)");
498 offset += 4;
500 message_header_size = tvb_get_letohl(tvb, offset);
501 proto_tree_add_item(yami_tree, &hfi_yami_message_header_size, tvb, offset, 4, ENC_LITTLE_ENDIAN);
502 if (message_header_size < 4) {
503 /* XXX, expert info */
505 offset += 4;
507 frame_payload_size = tvb_get_letohl(tvb, offset);
508 ti = proto_tree_add_item(yami_tree, &hfi_yami_frame_payload_size, tvb, offset, 4, ENC_LITTLE_ENDIAN);
509 frame_size = frame_payload_size + 16;
510 proto_item_append_text(ti, ", (YAMI Frame Size: %d)", frame_size);
511 offset += 4;
513 if (frame_number == 1 || frame_number == -1) {
514 if (message_header_size <= frame_payload_size) {
515 const int orig_offset = offset;
517 offset = dissect_yami_data(tvb, FALSE, yami_tree, offset);
518 if (offset != orig_offset + message_header_size) {
519 /* XXX, expert info */
520 offset = orig_offset + message_header_size;
523 dissect_yami_data(tvb, TRUE, yami_tree, offset);
527 return tvb_length(tvb);
530 #define FRAME_HEADER_LEN 16
532 static guint
533 get_yami_message_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset)
535 guint32 len = tvb_get_letohl(tvb, offset + 12);
537 return len + FRAME_HEADER_LEN;
540 static int
541 dissect_yami(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
543 tcp_dissect_pdus(tvb, pinfo, tree, yami_desegment, FRAME_HEADER_LEN, get_yami_message_len, dissect_yami_pdu, data);
544 return tvb_length(tvb);
547 void
548 proto_register_yami(void)
550 #ifndef HAVE_HFI_SECTION_INIT
551 static header_field_info *hfi[] = {
552 /* Header */
553 &hfi_yami_message_id,
554 &hfi_yami_frame_number,
555 &hfi_yami_message_header_size,
556 &hfi_yami_frame_payload_size,
557 &hfi_yami_message_hdr,
558 &hfi_yami_message_data,
559 /* Parameter */
560 &hfi_yami_param,
561 &hfi_yami_param_name,
562 &hfi_yami_param_type,
563 &hfi_yami_param_value_bool,
564 &hfi_yami_param_value_int,
565 &hfi_yami_param_value_long,
566 &hfi_yami_param_value_double,
567 &hfi_yami_param_value_str,
568 &hfi_yami_param_value_bin,
569 &hfi_yami_params_count,
570 &hfi_yami_items_count,
572 #endif
574 static gint *ett[] = {
575 &ett_yami,
576 &ett_yami_msg_hdr,
577 &ett_yami_msg_data,
578 &ett_yami_param
581 module_t *yami_module;
583 int proto_yami;
585 proto_yami = proto_register_protocol("YAMI Protocol", "YAMI", "yami");
586 hfi_yami = proto_registrar_get_nth(proto_yami);
588 proto_register_fields(proto_yami, hfi, array_length(hfi));
589 proto_register_subtree_array(ett, array_length(ett));
591 yami_module = prefs_register_protocol(proto_yami, proto_reg_handoff_yami);
592 prefs_register_uint_preference(yami_module, "tcp.port", "YAMI TCP Port", "The TCP port on which YAMI messages will be read(3000)", 10, &global_yami_config_tcp_port);
593 prefs_register_uint_preference(yami_module, "udp.port", "YAMI UDP Port", "The UDP port on which YAMI messages will be read(5000)", 10, &global_yami_config_udp_port);
594 prefs_register_bool_preference(yami_module, "desegment",
595 "Reassemble YAMI messages spanning multiple TCP segments",
596 "Whether the YAMI dissector should reassemble messages spanning multiple TCP segments."
597 "To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.",
598 &yami_desegment);
600 yami_handle = new_create_dissector_handle(dissect_yami, proto_yami);
603 void
604 proto_reg_handoff_yami(void)
606 static int yami_prefs_initialized = FALSE;
607 static guint yami_tcp_port, yami_udp_port;
609 if(yami_prefs_initialized == FALSE){
610 yami_prefs_initialized = TRUE;
611 yami_tcp_port = global_yami_config_tcp_port;
612 yami_udp_port = global_yami_config_udp_port;
613 }else{
614 dissector_delete_uint("tcp.port", yami_tcp_port, yami_handle);
615 dissector_delete_uint("udp.port", yami_udp_port, yami_handle);
618 yami_tcp_port = global_yami_config_tcp_port;
619 yami_udp_port = global_yami_config_udp_port;
621 dissector_add_uint("tcp.port", yami_tcp_port, yami_handle);
622 dissector_add_uint("udp.port", yami_udp_port, yami_handle);