Revert "In get_unicode_or_ascii_string(), check if the length is odd/even, not the...
[wireshark-wip.git] / plugins / unistim / packet-unistim.c
blob9c67106fd69c3ab3028c268465b02d19a5f434e4
1 /* packet-unistim.c
2 * Routines for unistim packet dissection
3 * Copyright 2007 Don Newton <dnewton@cypresscom.net>
5 * $Id$
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
27 #include "config.h"
29 #include <glib.h>
30 #include <epan/packet.h>
31 #include <epan/tap.h>
32 #include <epan/wmem/wmem.h>
33 #include <epan/expert.h>
34 #include <epan/address.h>
35 #include <epan/prefs.h>
36 #include <epan/dissectors/packet-rtp.h>
37 #include <epan/dissectors/packet-rtcp.h>
38 #include <string.h>
39 #include "packet-unistim.h"
40 #include "defines.h"
41 #include "audio.h"
42 #include "basic.h"
43 #include "display.h"
44 #include "network.h"
45 #include "key.h"
46 #include "broadcast.h"
47 #include "uftp.h"
48 #include "expansion.h"
50 /* Don't set this to 5000 until this dissector is made a heuristic one!
51 It collides (at least) with tapa.
52 static guint global_unistim_port = 5000; */
53 static guint global_unistim_port = 0;
55 static unistim_info_t *uinfo;
56 static int unistim_tap = -1;
58 void proto_reg_handoff_unistim(void);
59 static void dissect_payload(proto_tree *unistim_tree,tvbuff_t *tvb,gint offset, packet_info *pinfo);
61 static gint dissect_broadcast_switch(proto_tree *msg_tree,
62 tvbuff_t *tvb,gint offset,guint msg_len);
63 static gint dissect_audio_switch(proto_tree *msg_tree,packet_info *pinfo,
64 tvbuff_t *tvb,gint offset,guint msg_len);
65 static gint dissect_expansion_switch(proto_tree *msg_tree,
66 tvbuff_t *tvb,gint offset,guint msg_len);
67 static gint dissect_display_switch(proto_tree *msg_tree,
68 tvbuff_t *tvb,gint offset,guint msg_len);
69 static gint dissect_key_indicator_switch(proto_tree *msg_tree,
70 tvbuff_t *tvb,gint offset,guint msg_len);
71 static gint dissect_basic_switch(proto_tree *msg_tree,
72 tvbuff_t *tvb,gint offset,guint msg_len);
73 static gint dissect_network_switch(proto_tree *msg_tree,
74 tvbuff_t *tvb,gint offset,guint msg_len);
75 static gint dissect_broadcast_phone(proto_tree *msg_tree,
76 tvbuff_t *tvb,gint offset,guint msg_len);
77 static gint dissect_audio_phone(proto_tree *msg_tree,
78 tvbuff_t *tvb,gint offset,guint msg_len);
79 static gint dissect_expansion_phone(proto_tree *msg_tree,
80 tvbuff_t *tvb,gint offset,guint msg_len);
81 static gint dissect_display_phone(proto_tree *msg_tree,
82 tvbuff_t *tvb,gint offset,guint msg_len);
83 static gint dissect_key_indicator_phone(proto_tree *msg_tree,
84 tvbuff_t *tvb,gint offset,guint msg_len);
85 static gint dissect_basic_phone(proto_tree *msg_tree,
86 tvbuff_t *tvb,gint offset,guint msg_len);
87 static gint dissect_network_phone(proto_tree *msg_tree,
88 tvbuff_t *tvb,gint offset,guint msg_len);
89 static gint dissect_unistim_message(proto_tree *unistim_tree, packet_info *pinfo,
90 tvbuff_t *tvb,gint offset);
91 static gint dissect_uftp_message(proto_tree *unistim_tree, packet_info *pinfo,
92 tvbuff_t *tvb,gint offset);
95 static void set_ascii_item(proto_tree *unistim_tree, tvbuff_t *tvb,
96 gint offset,guint msg_len);
99 static int proto_unistim = -1;
100 static int hf_unistim_seq_nu = -1;
101 static int hf_unistim_packet_type = -1;
102 static int hf_unistim_payload = -1;
103 static int hf_unistim_cmd_add = -1;
104 static int hf_unistim_len =-1;
105 static int hf_terminal_id=-1;
106 static int hf_basic_bit_field=-1;
107 static const true_false_string basic_bit_yn={
108 "For Following Byte",
109 "For Following Byte"
112 static int hf_basic_switch_cmd=-1;
113 static int hf_basic_phone_cmd=-1;
114 static int hf_broadcast_switch_cmd=-1;
115 /* static int hf_broadcast_phone_cmd=-1; */
116 static int hf_audio_switch_cmd=-1;
117 static int hf_audio_phone_cmd=-1;
118 static int hf_display_switch_cmd=-1;
119 static int hf_display_phone_cmd=-1;
120 static int hf_key_switch_cmd=-1;
121 static int hf_key_phone_cmd=-1;
122 static int hf_network_switch_cmd=-1;
123 static int hf_network_phone_cmd=-1;
124 static int hf_expansion_switch_cmd=-1;
125 static int hf_expansion_phone_cmd=-1;
127 static int hf_generic_data=-1;
128 static int hf_generic_string=-1;
130 static gint ett_unistim = -1;
132 static expert_field ei_unistim_len = EI_INIT;
134 static const value_string packet_names[]={
135 {0,"NAK"},
136 {1,"ACK"},
137 {2,"Payload"},
138 {0,NULL}
141 static const value_string payload_names[]={
142 {0x00,"NULL Protocol"},
143 {0x01,"Aggregate Unistim"},
144 {0x02,"Aggregate Unistim with Terminal ID"},
145 {0x03,"UFTP"},
146 {0xff,"Free Form Protocol"},
147 {0,NULL}
150 static const range_string sequence_numbers[]={
151 {0x00,0xFFFFFFFE,"Normal Sequence Number"},
152 {0xFFFFFFFF,0xFFFFFFFF, "RESET Sequence Number"},
153 {0,0,NULL}
156 static const value_string command_address[]={
157 {0x09,"Expansion Module-1 Manager Switch"},
158 {0x0A,"Expansion Module-2 Manager Switch"},
159 {0x0B,"Expansion Module-3 Manager Switch"},
160 {0x0C,"Expansion Module-4 Manager Switch"},
161 {0x0D,"Expansion Module-5 Manager Switch"},
162 {0x0E,"Expansion Module-6 Manager Switch"},
163 {0x10,"Expansion Module Manager Phone"},
164 {0x11,"Broadcast Manager Switch"},
165 {0x16,"Audio Manager Switch"},
166 {0x17,"Display Manager Switch"},
167 {0x19,"Key/Indicator Manager Switch"},
168 {0x1a,"Basic Manager Switch"},
169 {0x1e,"Network Manager Switch"},
170 {0x89,"Expansion Module-1 Manager Phone"},
171 {0x8A,"Expansion Module-2 Manager Phone"},
172 {0x8B,"Expansion Module-3 Manager Phone"},
173 {0x8C,"Expansion Module-4 Manager Phone"},
174 {0x8D,"Expansion Module-5 Manager Phone"},
175 {0x8E,"Expansion Module-6 Manager Phone"},
176 {0x91,"Broadcast Manager Phone"},
177 {0x96,"Audio Manager Phone"},
178 {0x97,"Display Manager Phone"},
179 {0x99,"Key/Indicator Manager Phone"},
180 {0x9a,"Basic Manager Phone"},
181 {0x9e,"Network Manager Phone"},
182 {0,NULL}
185 static int
186 dissect_unistim(tvbuff_t *tvb,packet_info *pinfo,proto_tree *tree,void *data _U_){
187 gint offset=0;
188 proto_item *ti= NULL;
189 proto_item *ti1= NULL;
190 proto_tree *overall_unistim_tree = NULL;
191 proto_tree *rudpm_tree=NULL;
192 gint size;
194 /* heuristic*/
195 switch(tvb_get_guint8(tvb,offset+4)) {/*rudp packet type 0,1,2 only */
196 case 0x0:/*NAK*/
197 case 0x1:/*ACK*/
198 break;
199 case 0x2:/*PAYLOAD*/
200 switch(tvb_get_guint8(tvb,offset+5)){/*payload type 0,1,2,3,ff only */
201 case 0x0: /*NULL*/
202 case 0x1: /*UNISTIM*/
203 case 0x2: /*UNISTIM WITH TERM ID*/
204 case 0x3: /*UFTP*/
205 case 0xff:/*UNKNOWN BUT VALID*/
206 break;
207 default:
208 return 0;
210 break;
211 default:
212 return 0;
216 size=tvb_length_remaining(tvb, offset);
217 col_set_str(pinfo->cinfo, COL_PROTOCOL, "UNISTIM");
218 /* Clear out stuff in the info column */
219 col_clear(pinfo->cinfo, COL_INFO);
220 ti = proto_tree_add_item(tree,proto_unistim,tvb,offset,-1,ENC_NA);
221 overall_unistim_tree = proto_item_add_subtree(ti,ett_unistim);
222 ti1=proto_tree_add_text(overall_unistim_tree,tvb,offset,5,"Reliable UDP");
223 rudpm_tree=proto_item_add_subtree(ti1,ett_unistim);
225 proto_tree_add_item(rudpm_tree,hf_unistim_seq_nu,tvb,offset,4,ENC_BIG_ENDIAN);
227 /* Allocate new mem for queueing */
228 uinfo = (unistim_info_t *)wmem_alloc(wmem_packet_scope(), sizeof(unistim_info_t));
230 /* Clear tap struct */
231 uinfo->rudp_type = 0;
232 uinfo->payload_type = 0;
233 uinfo->sequence = tvb_get_ntohl(tvb,offset);
234 uinfo->termid = 0;
235 uinfo->key_val = -1;
236 uinfo->key_state = -1;
237 uinfo->hook_state = -1;
238 uinfo->stream_connect = -1;
239 uinfo->trans_connect = -1;
240 uinfo->set_termid = -1;
241 uinfo->string_data = NULL;
242 uinfo->key_buffer = NULL;
243 SET_ADDRESS(&uinfo->it_ip, AT_NONE, 0, NULL);
244 SET_ADDRESS(&uinfo->ni_ip, AT_NONE, 0, NULL);
245 uinfo->it_port = 0;
247 offset+=4;
248 proto_tree_add_item(rudpm_tree,hf_unistim_packet_type,tvb,offset,1,ENC_BIG_ENDIAN);
249 uinfo->rudp_type = tvb_get_guint8(tvb,offset);
251 switch(tvb_get_guint8(tvb,offset)) {
252 case 0x00:
253 /*NAK*/
254 col_add_fstr(pinfo->cinfo, COL_INFO, "NAK for seq - 0x%X",
255 tvb_get_ntohl(tvb, offset-4));
256 break;
257 case 0x01:
258 /*ACK*/
259 col_add_fstr(pinfo->cinfo, COL_INFO, "ACK for seq - 0x%X",
260 tvb_get_ntohl(tvb, offset-4));
261 break;
262 case 0x02:
263 col_add_fstr(pinfo->cinfo, COL_INFO, "Payload seq - 0x%X",
264 tvb_get_ntohl(tvb, offset-4));
265 offset+=1;
266 dissect_payload(overall_unistim_tree,tvb,offset,pinfo);
267 break;
268 default:
269 return 0;
270 break;
273 /* Queue packet for tap */
274 tap_queue_packet(unistim_tap, pinfo, uinfo);
275 return size;
278 static void
279 dissect_payload(proto_tree *overall_unistim_tree,tvbuff_t *tvb, gint offset, packet_info *pinfo){
280 proto_item *ti;
281 proto_tree *unistim_tree;
282 guint payload_proto=tvb_get_guint8(tvb,offset);
284 /* Payload type for tap */
285 uinfo->payload_type = payload_proto;
287 ti=proto_tree_add_item(overall_unistim_tree,hf_unistim_payload,
288 tvb,offset,1,ENC_BIG_ENDIAN);
289 offset+=1;
290 unistim_tree=proto_item_add_subtree(ti,ett_unistim);
292 switch(payload_proto){
293 case 0x00:
294 /*NULL PROTO - NOTHING LEFT TO DO*/
295 return;
296 case 0x01:
297 /*UNISTIM only so no term id but further payload work*/
298 /* Collect info for tap */
299 /* If no term id then packet sourced from NI */
300 COPY_ADDRESS(&(uinfo->ni_ip), &(pinfo->src));
301 COPY_ADDRESS(&(uinfo->it_ip), &(pinfo->dst));
302 uinfo->it_port = pinfo->destport;
303 break;
304 case 0x02:
305 /*UNISTIM with term id*/
306 /* Termid packs are always sourced from the it, so collect relevant infos */
307 COPY_ADDRESS(&(uinfo->ni_ip),&(pinfo->dst));
308 COPY_ADDRESS(&(uinfo->it_ip),&(pinfo->src));
309 uinfo->it_port = pinfo->srcport;
310 uinfo->termid = tvb_get_ntohl(tvb,offset);
312 proto_tree_add_item(unistim_tree,hf_terminal_id,tvb,offset,4,ENC_BIG_ENDIAN);
313 offset+=4;
314 break;
315 case 0x03:
316 /* UFTP */
317 offset = dissect_uftp_message(unistim_tree,pinfo,tvb,offset);
318 break;
319 case 0xff:
320 /*TODO flesh this out probably only for init*/
321 break;
324 /* Handle UFTP seperately because it is significantly different
325 than standard UNISTIM */
326 while (tvb_length_remaining(tvb, offset) > 0)
327 offset = dissect_unistim_message(unistim_tree,pinfo,tvb,offset);
331 static gint
332 dissect_uftp_message(proto_tree *unistim_tree,packet_info *pinfo _U_,tvbuff_t *tvb,gint offset){
334 guint command;
335 guint str_len;
336 guint dat_len;
337 proto_item *ti;
338 proto_tree *msg_tree;
340 ti = proto_tree_add_text(unistim_tree,tvb,offset,-1,"UFTP CMD");
342 msg_tree = proto_item_add_subtree(ti,ett_unistim);
344 command=tvb_get_guint8(tvb,offset);
346 proto_tree_add_item(msg_tree,hf_uftp_command,tvb,offset,1,ENC_BIG_ENDIAN);
348 offset += 1;
350 switch(command)
352 case 0x80:
353 /* Connection request */
354 /* Nothing to do */
355 break;
357 case 0x81:
358 /* Connection Details */
359 /* Get datablock size */
360 proto_tree_add_item(msg_tree,hf_uftp_datablock_size,tvb,offset,2,ENC_BIG_ENDIAN);
361 offset+=2;
362 /* Get datablock limit b4 flow control */
363 proto_tree_add_item(msg_tree,hf_uftp_datablock_limit,tvb,offset,1,ENC_BIG_ENDIAN);
364 offset+=1;
365 /* Get filename */
366 str_len = tvb_length_remaining(tvb, offset);
367 proto_tree_add_item(msg_tree,hf_uftp_filename,tvb,offset,str_len,ENC_ASCII|ENC_NA);
368 offset += str_len;
369 break;
371 case 0x82:
372 /* Flow Control off */
373 /* Nothing to do */
374 break;
376 case 0x00:
377 /* Connection Granted */
378 /* Nothing to do */
379 break;
381 case 0x01:
382 /* Connection Denied */
383 /* Nothing to do */
384 break;
386 case 0x02:
387 /* File Data Block */
388 /* Raw Data.. */
389 dat_len = tvb_length_remaining(tvb, offset);
390 proto_tree_add_item(msg_tree,hf_uftp_datablock,tvb,offset,dat_len,ENC_NA);
391 offset += dat_len;
392 break;
395 return offset;
400 static gint
401 dissect_unistim_message(proto_tree *unistim_tree,packet_info *pinfo,tvbuff_t *tvb,gint offset){
402 guint addr;
403 guint msg_len;
404 proto_item *ti;
405 proto_tree *msg_tree;
407 ti = proto_tree_add_text(unistim_tree,tvb,offset,-1,"Unistim CMD");
409 msg_tree = proto_item_add_subtree(ti,ett_unistim);
411 addr=tvb_get_guint8(tvb,offset);
413 proto_tree_add_item(msg_tree,hf_unistim_cmd_add,tvb,offset,1,ENC_BIG_ENDIAN);
415 offset+=1;
416 msg_len=tvb_get_guint8(tvb,offset);
418 if (msg_len<=2)
420 ti=proto_tree_add_item(msg_tree,hf_unistim_len,tvb,offset,1,ENC_BIG_ENDIAN);
421 expert_add_info(pinfo,ti,&ei_unistim_len);
422 return tvb_length(tvb);
423 } else {
424 proto_item_set_len(ti,msg_len);
425 proto_tree_add_item(msg_tree,hf_unistim_len,tvb,offset,1,ENC_BIG_ENDIAN);
428 offset+=1;
429 /*from switch*/
430 switch(addr){
431 case 0x00:
432 /*Nothing*/
433 break;
434 /*Expansion Manager Switch*/
435 case 0x09:
436 case 0x0A:
437 case 0x0B:
438 case 0x0C:
439 case 0x0D:
440 case 0x0E:
441 offset = dissect_expansion_switch(msg_tree,tvb,offset,msg_len-2);
442 break;
444 case 0x11:
445 /*Broadcast Manager Switch*/
446 offset = dissect_broadcast_switch(msg_tree,tvb,offset,msg_len-2);
447 break;
448 case 0x16:
449 /*Audio Manager Switch*/
450 offset = dissect_audio_switch(msg_tree,pinfo,tvb,offset,msg_len-2);
451 break;
452 case 0x17:
453 /*Display Manager Switch*/
454 offset = dissect_display_switch(msg_tree,tvb,offset,msg_len-2);
455 break;
456 case 0x19:
457 /*Key Indicator Manager Switch*/
458 offset = dissect_key_indicator_switch(msg_tree,tvb,offset,msg_len-2);
459 break;
460 case 0x1a:
461 /*Basic Manager Switch*/
462 offset = dissect_basic_switch(msg_tree,tvb,offset,msg_len-2);
463 break;
464 case 0x1e:
465 /*Network Manager Switch*/
466 offset = dissect_network_switch(msg_tree,tvb,offset,msg_len-2);
467 break;
468 case 0x89:
469 case 0x8A:
470 case 0x8B:
471 case 0x8C:
472 case 0x8D:
473 case 0x8E:
474 /*Expansion Manager Phone*/
475 offset = dissect_expansion_phone(msg_tree,tvb,offset,msg_len-2);
476 break;
478 case 0x91:
479 /*Broadcast Manager phone*/
480 offset = dissect_broadcast_phone(msg_tree,tvb,offset,msg_len-2);
481 break;
482 case 0x96:
483 /*Audio Manager phone*/
484 offset = dissect_audio_phone(msg_tree,tvb,offset,msg_len-2);
485 break;
486 case 0x97:
487 /*Display Manager phone*/
488 offset = dissect_display_phone(msg_tree,tvb,offset,msg_len-2);
489 break;
490 case 0x99:
491 /*Key/Indicator Manager phone*/
492 offset = dissect_key_indicator_phone(msg_tree,tvb,offset,msg_len-2);
493 break;
494 case 0x9a:
495 /*Basic Manager phone*/
496 offset = dissect_basic_phone(msg_tree,tvb,offset,msg_len-2);
497 break;
498 case 0x9e:
499 /*Network Manager Switch*/
500 offset = dissect_network_phone(msg_tree,tvb,offset,msg_len-2);
501 break;
502 default:
503 /*See some undocumented messages. Don't want to miss the ones we understand*/
504 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len-2,ENC_NA);
506 offset+=(msg_len-2);
508 if(msg_len){
509 /* TODO: add Expert info to indicate there is unknown data !
510 For the moment, this code only remove Clang Warnings about not used msg_len... */
512 return offset;
516 /*DONE*/
517 static gint
518 dissect_basic_phone(proto_tree *msg_tree,
519 tvbuff_t *tvb,gint offset, guint msg_len){
520 guint basic_cmd;
522 basic_cmd=tvb_get_guint8(tvb,offset);
524 proto_tree_add_item(msg_tree,hf_basic_phone_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
526 offset+=1;msg_len-=1;
527 switch(basic_cmd){
529 case 0x00:
530 /*Basic Manager Attributes Info*/
531 proto_tree_add_item(msg_tree,hf_basic_phone_eeprom_stat_cksum,
532 tvb,offset,1,ENC_BIG_ENDIAN);
533 offset+=1;
534 proto_tree_add_item(msg_tree,hf_basic_phone_eeprom_dynam,
535 tvb,offset,1,ENC_BIG_ENDIAN);
536 offset+=1;
537 proto_tree_add_item(msg_tree,hf_basic_phone_eeprom_net_config_cksum,
538 tvb,offset,1,ENC_BIG_ENDIAN);
539 offset+=1;
540 break;
541 case 0x01:
542 /*Basic Manager Options Report*/
543 proto_tree_add_item(msg_tree,hf_basic_switch_options_secure,
544 tvb,offset,1,ENC_BIG_ENDIAN);
545 offset+=1;
546 break;
547 case 0x02:
548 /*Firmware Version*/
549 proto_tree_add_item(msg_tree,hf_basic_phone_fw_ver,
550 tvb,offset,msg_len,ENC_ASCII|ENC_NA);
551 offset+=msg_len;
552 break;
553 case 0x03:
554 /*IT Type*/
555 proto_tree_add_item(msg_tree,hf_basic_it_type,tvb,offset,1,ENC_BIG_ENDIAN);
556 offset+=1;
557 break;
558 case 0x07:
559 /*Hardware ID*/
560 proto_tree_add_item(msg_tree,hf_basic_phone_hw_id,
561 tvb,offset,msg_len,ENC_NA);
562 offset+=msg_len;
563 break;
564 case 0x08:
565 /*Product Engineering Code*/
566 proto_tree_add_item(msg_tree,hf_basic_prod_eng_code,
567 tvb,offset,msg_len,ENC_ASCII|ENC_NA);
568 offset+=msg_len;
569 break;
570 case 0x09:
571 /*Grey Market Info*/
572 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
573 offset+=msg_len;
574 break;
575 case 0x0a:
576 /*Encapsulate Command*/
577 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
578 offset+=msg_len;
579 break;
580 case 0x11:
581 /*Phone Ethernet address*/
582 proto_tree_add_item(msg_tree,hf_basic_ether_address,
583 tvb,offset,msg_len,ENC_NA);
584 offset+=msg_len;
585 break;
586 case 0x0b:
587 /*not in pdf but get them*/
588 set_ascii_item(msg_tree,tvb,offset,msg_len);
589 offset+=msg_len;
590 break;
591 case 0xff:
592 /*Reserved*/
593 break;
594 default:
595 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
596 offset+=msg_len;
599 if(msg_len){
600 /* TODO: add Expert info to indicate there is unknown data !
601 For the moment, this code only remove Clang Warnings about not used msg_len... */
604 return offset;
606 /*DONE*/
607 static gint
608 dissect_basic_switch(proto_tree *msg_tree,
609 tvbuff_t *tvb,gint offset,guint msg_len){
610 guint basic_cmd;
611 basic_cmd=tvb_get_guint8(tvb,offset);
612 proto_tree_add_item(msg_tree,hf_basic_switch_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
613 offset+=1;msg_len-=1;
614 switch(basic_cmd){
615 case 0x01:
616 /*Query Basic Manager*/
617 proto_tree_add_item(msg_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
618 proto_tree_add_item(msg_tree,hf_basic_switch_query_attr,
619 tvb,offset,1,ENC_BIG_ENDIAN);
620 proto_tree_add_item(msg_tree,hf_basic_switch_query_opts,
621 tvb,offset,1,ENC_BIG_ENDIAN);
622 proto_tree_add_item(msg_tree,hf_basic_switch_query_fw,
623 tvb,offset,1,ENC_BIG_ENDIAN);
624 proto_tree_add_item(msg_tree,hf_basic_switch_query_hw_id,
625 tvb,offset,1,ENC_BIG_ENDIAN);
626 proto_tree_add_item(msg_tree,hf_basic_switch_query_it_type,
627 tvb,offset,1,ENC_BIG_ENDIAN);
628 proto_tree_add_item(msg_tree,hf_basic_switch_query_prod_eng_code,
629 tvb,offset,1,ENC_BIG_ENDIAN);
630 proto_tree_add_item(msg_tree,hf_basic_switch_query_gray_mkt_info,
631 tvb,offset,1,ENC_BIG_ENDIAN);
632 offset+=1;
633 break;
634 case 0x02:
635 /*Basic Manager Options*/
636 proto_tree_add_item(msg_tree,hf_basic_switch_options_secure,
637 tvb,offset,1,ENC_BIG_ENDIAN);
638 offset+=1;
639 break;
640 case 0x06:
641 /*EEprom Write*/
642 proto_tree_add_item(msg_tree,hf_basic_switch_element_id,
643 tvb,offset,1,ENC_BIG_ENDIAN);
644 offset+=1;
645 proto_tree_add_item(msg_tree,hf_basic_switch_eeprom_data,
646 tvb,offset,msg_len,ENC_NA);
647 offset+=1;
648 break;
649 case 0x07:
650 /*Assign Terminal ID*/
651 /* Set tap info */
652 uinfo->set_termid = 1;
654 proto_tree_add_item(msg_tree,hf_basic_switch_terminal_id,
655 tvb,offset,msg_len,ENC_BIG_ENDIAN);
656 offset+=msg_len;
657 break;
658 case 0x08:
659 /*Encapsulate Command*/
660 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
661 offset+=msg_len;
662 break;
663 case 0x0f:
664 /*showing up in captures but not in pdf*/
665 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
666 offset+=msg_len;
667 case 0xff:
668 /*Reserved*/
669 break;
670 default:
671 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
672 offset+=msg_len;
676 if(msg_len){
677 /* TODO: add Expert info to indicate there is unknown data !
678 For the moment, this code only remove Clang Warnings about not used msg_len... */
681 return offset;
685 /*DONE*/
686 static gint
687 dissect_broadcast_switch(proto_tree *msg_tree,
688 tvbuff_t *tvb,gint offset, guint msg_len){
689 guint bcast_cmd;
690 guint year,month,day,hour,minute,second;
691 proto_item *date_label;
692 proto_item *time_label;
693 proto_tree *date_tree;
694 proto_tree *time_tree;
695 bcast_cmd=tvb_get_guint8(tvb,offset);
696 proto_tree_add_item(msg_tree,hf_broadcast_switch_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
697 offset+=1;msg_len-=1;
698 switch(bcast_cmd){
699 case 0x00:
700 /*Accessory Sync Update - len=3 */
701 break;
702 case 0x01:
703 /*Logical Icon Update*/
704 proto_tree_add_item(msg_tree,hf_basic_bit_field,
705 tvb,offset,1,ENC_BIG_ENDIAN);
706 proto_tree_add_item(msg_tree,hf_broadcast_icon_state,
707 tvb,offset,1,ENC_BIG_ENDIAN);
708 proto_tree_add_item(msg_tree,hf_broadcast_icon_cadence,
709 tvb,offset,1,ENC_BIG_ENDIAN);
710 offset+=1;
711 break;
712 case 0x02:
713 /*Time and Date Download*/
714 year=tvb_get_guint8(tvb,offset);
715 month=tvb_get_guint8(tvb,offset+1);
716 day=tvb_get_guint8(tvb,offset+2);
717 hour=tvb_get_guint8(tvb,offset+3);
718 minute=tvb_get_guint8(tvb,offset+4);
719 second=tvb_get_guint8(tvb,offset+5);
720 date_label=proto_tree_add_text(msg_tree,tvb,offset,3,
721 "Date %i/%i/%i",month,day,year%100);
722 date_tree=proto_item_add_subtree(date_label,ett_unistim);
723 proto_tree_add_item(date_tree,hf_broadcast_year,tvb,offset,1,ENC_BIG_ENDIAN);
724 offset+=1;
725 proto_tree_add_item(date_tree,hf_broadcast_month,tvb,offset,1,ENC_BIG_ENDIAN);
726 offset+=1;
727 proto_tree_add_item(date_tree,hf_broadcast_day,tvb,offset,1,ENC_BIG_ENDIAN);
728 offset+=1;
730 time_label=proto_tree_add_text(msg_tree,tvb,offset,3,
731 "Time %i:%i:%i",hour,minute,second);
732 time_tree=proto_item_add_subtree(time_label,ett_unistim);
733 proto_tree_add_item(time_tree,hf_broadcast_hour,tvb,offset,1,ENC_BIG_ENDIAN);
734 offset+=1;
735 proto_tree_add_item(time_tree,hf_broadcast_minute,tvb,offset,1,ENC_BIG_ENDIAN);
736 offset+=1;
737 proto_tree_add_item(time_tree,hf_broadcast_second,tvb,offset,1,ENC_BIG_ENDIAN);
738 offset+=1;
739 break;
740 case 0x03:
741 /*Set Default Character Table Config */
742 /* UGLY may work may not*/
743 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
744 offset+=msg_len;
745 break;
746 case 0xff:
747 /*Reserved*/
748 break;
749 default:
750 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
751 offset+=msg_len;
754 if(msg_len){
755 /* TODO: add Expert info to indicate there is unknown data !
756 For the moment, this code only remove Clang Warnings about not used msg_len... */
759 return offset;
761 /*DONE Haven't seen any phone broadcasts, wouldn't expect to*/
762 static gint
763 dissect_broadcast_phone(proto_tree *msg_tree,
764 tvbuff_t *tvb, gint offset,guint msg_len){
766 proto_tree_add_item(msg_tree,hf_generic_data, tvb,offset,msg_len,ENC_NA);
767 offset+=msg_len;
769 return offset;
772 /*DONE*/
773 static gint
774 dissect_display_switch(proto_tree *msg_tree,
775 tvbuff_t *tvb, gint offset,guint msg_len){
776 guint clear_mask;
777 guint highlight_cmd;
778 guint time_date_mask;
779 guint display_cmd;
780 guint address_byte;
781 guint movement_byte;
782 proto_tree *address_tree;
783 proto_item *tmp_ti;
784 display_cmd=tvb_get_guint8(tvb,offset);
785 proto_tree_add_item(msg_tree,hf_display_switch_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
786 offset+=1;msg_len-=1;
788 switch(display_cmd){
789 case 0x01:
790 /*Restore Default Character Table Configuration length = 3*/
791 break;
792 case 0x04:
793 /*Arrow*/
794 proto_tree_add_item(msg_tree,hf_display_arrow,tvb,offset,1,ENC_BIG_ENDIAN);
795 offset+=1;
796 break;
797 case 0x05:
798 /*Query Status Bar Icon*/
799 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
800 offset+=msg_len;
801 break;
802 case 0x06:
803 /*Highlight Off length = 3*/
804 break;
805 case 0x07:
806 /*Highlight On length = 3*/
807 break;
808 case 0x09:
809 /*Restore Time and Date length = 3*/
810 break;
811 case 0x0a:
812 /*Clear Time and Date length = 3*/
813 break;
814 case 0x0b:
815 /*Call Duration Timer*/
816 proto_tree_add_item(msg_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
817 proto_tree_add_item(msg_tree,hf_display_call_timer_mode,tvb,offset,
818 1,ENC_BIG_ENDIAN);
819 proto_tree_add_item(msg_tree,hf_display_call_timer_reset,tvb,offset,
820 1,ENC_BIG_ENDIAN);
821 proto_tree_add_item(msg_tree,hf_display_call_timer_display,tvb,offset,
822 1,ENC_BIG_ENDIAN);
823 proto_tree_add_item(msg_tree,hf_display_call_timer_delay,tvb,offset,
824 1,ENC_BIG_ENDIAN);
825 offset+=1;msg_len-=1;
826 proto_tree_add_item(msg_tree,hf_display_call_timer_id,tvb,offset,
827 1,ENC_BIG_ENDIAN);
828 offset+=1;msg_len-=1;
829 break;
830 case 0x0c:
831 /*Query Display Manager*/
832 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
833 offset+=msg_len;
834 break;
835 case 0x0d:
836 /*Download Call Duration Timer Delay*/
837 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
838 offset+=msg_len;
839 break;
840 case 0x0e:
841 /*Disable Display Field*/
842 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
843 offset+=msg_len;
844 break;
845 case 0x0f:
846 /*Clear Field*/
847 clear_mask=tvb_get_guint8(tvb,offset);
848 /*need to know which paths to take*/
849 proto_tree_add_item(msg_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
850 proto_tree_add_item(msg_tree,hf_display_clear_numeric,
851 tvb,offset,1,ENC_BIG_ENDIAN);
852 proto_tree_add_item(msg_tree,hf_display_clear_context,
853 tvb,offset,1,ENC_BIG_ENDIAN);
854 proto_tree_add_item(msg_tree,hf_display_clear_date,
855 tvb,offset,1,ENC_BIG_ENDIAN);
857 proto_tree_add_item(msg_tree,hf_display_clear_time,
858 tvb,offset,1,ENC_BIG_ENDIAN);
859 proto_tree_add_item(msg_tree,hf_display_clear_line,
860 tvb,offset,1,ENC_BIG_ENDIAN);
861 proto_tree_add_item(msg_tree,hf_display_clear_status_bar_icon,
862 tvb,offset,1,ENC_BIG_ENDIAN);
863 proto_tree_add_item(msg_tree,hf_display_clear_softkey,
864 tvb,offset,1,ENC_BIG_ENDIAN);
865 proto_tree_add_item(msg_tree,hf_display_clear_softkey_label,
866 tvb,offset,1,ENC_BIG_ENDIAN);
867 offset+=1;msg_len-=1;
868 if((clear_mask&DISPLAY_CLEAR_LINE)==DISPLAY_CLEAR_LINE){
869 proto_tree_add_item(msg_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
870 proto_tree_add_item(msg_tree,hf_display_clear_line_1,
871 tvb,offset,1,ENC_BIG_ENDIAN);
872 proto_tree_add_item(msg_tree,hf_display_clear_line_2,
873 tvb,offset,1,ENC_BIG_ENDIAN);
874 proto_tree_add_item(msg_tree,hf_display_clear_line_3,
875 tvb,offset,1,ENC_BIG_ENDIAN);
876 proto_tree_add_item(msg_tree,hf_display_clear_line_4,
877 tvb,offset,1,ENC_BIG_ENDIAN);
878 proto_tree_add_item(msg_tree,hf_display_clear_line_5,
879 tvb,offset,1,ENC_BIG_ENDIAN);
880 proto_tree_add_item(msg_tree,hf_display_clear_line_6,
881 tvb,offset,1,ENC_BIG_ENDIAN);
882 proto_tree_add_item(msg_tree,hf_display_clear_line_7,
883 tvb,offset,1,ENC_BIG_ENDIAN);
884 proto_tree_add_item(msg_tree,hf_display_clear_line_8,
885 tvb,offset,1,ENC_BIG_ENDIAN);
886 offset+=1;msg_len-=1;
888 if((clear_mask&DISPLAY_CLEAR_STATUS_BAR_ICON)==
889 DISPLAY_CLEAR_STATUS_BAR_ICON){
890 proto_tree_add_item(msg_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
891 proto_tree_add_item(msg_tree,hf_display_clear_status_bar_icon_1,
892 tvb,offset,1,ENC_BIG_ENDIAN);
893 proto_tree_add_item(msg_tree,hf_display_clear_status_bar_icon_2,
894 tvb,offset,1,ENC_BIG_ENDIAN);
895 proto_tree_add_item(msg_tree,hf_display_clear_status_bar_icon_3,
896 tvb,offset,1,ENC_BIG_ENDIAN);
897 proto_tree_add_item(msg_tree,hf_display_clear_status_bar_icon_4,
898 tvb,offset,1,ENC_BIG_ENDIAN);
899 proto_tree_add_item(msg_tree,hf_display_clear_status_bar_icon_5,
900 tvb,offset,1,ENC_BIG_ENDIAN);
901 proto_tree_add_item(msg_tree,hf_display_clear_status_bar_icon_6,
902 tvb,offset,1,ENC_BIG_ENDIAN);
903 proto_tree_add_item(msg_tree,hf_display_clear_status_bar_icon_7,
904 tvb,offset,1,ENC_BIG_ENDIAN);
905 proto_tree_add_item(msg_tree,hf_display_clear_status_bar_icon_8,
906 tvb,offset,1,ENC_BIG_ENDIAN);
907 offset+=1;msg_len-=1;
909 if((clear_mask&DISPLAY_CLEAR_SOFTKEY)==DISPLAY_CLEAR_SOFTKEY){
910 proto_tree_add_item(msg_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
911 proto_tree_add_item(msg_tree,hf_display_clear_soft_key_1,
912 tvb,offset,1,ENC_BIG_ENDIAN);
913 proto_tree_add_item(msg_tree,hf_display_clear_soft_key_2,
914 tvb,offset,1,ENC_BIG_ENDIAN);
915 proto_tree_add_item(msg_tree,hf_display_clear_soft_key_3,
916 tvb,offset,1,ENC_BIG_ENDIAN);
917 proto_tree_add_item(msg_tree,hf_display_clear_soft_key_4,
918 tvb,offset,1,ENC_BIG_ENDIAN);
919 proto_tree_add_item(msg_tree,hf_display_clear_soft_key_5,
920 tvb,offset,1,ENC_BIG_ENDIAN);
921 proto_tree_add_item(msg_tree,hf_display_clear_soft_key_6,
922 tvb,offset,1,ENC_BIG_ENDIAN);
923 proto_tree_add_item(msg_tree,hf_display_clear_soft_key_7,
924 tvb,offset,1,ENC_BIG_ENDIAN);
925 proto_tree_add_item(msg_tree,hf_display_clear_soft_key_8,
926 tvb,offset,1,ENC_BIG_ENDIAN);
927 offset+=1;msg_len-=1;
929 if((clear_mask&DISPLAY_CLEAR_SOFTKEY_LABEL)==DISPLAY_CLEAR_SOFTKEY_LABEL){
930 proto_tree_add_item(msg_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
931 proto_tree_add_item(msg_tree,hf_display_clear_sk_label_key_id,tvb,offset,1,ENC_BIG_ENDIAN);
932 proto_tree_add_item(msg_tree,hf_display_clear_all_slks,tvb,offset,1,ENC_BIG_ENDIAN);
933 offset+=1;msg_len-=1;
935 break;
936 case 0x10:
937 /*Cursor Control*/
938 movement_byte=tvb_get_guint8(tvb,offset);
939 proto_tree_add_item(msg_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
940 proto_tree_add_item(msg_tree,hf_display_cursor_move_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
941 proto_tree_add_item(msg_tree,hf_display_cursor_blink,tvb,offset,1,ENC_BIG_ENDIAN);
942 offset+=1;msg_len-=1;
943 if(msg_len==0){
944 /*turn cursor off*/
945 break;
947 if((movement_byte&0x01)==0x01){
948 address_byte=tvb_get_guint8(tvb,offset);
949 proto_tree_add_item(msg_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
950 proto_tree_add_item(msg_tree,hf_display_write_address_numeric,
951 tvb,offset,1,ENC_BIG_ENDIAN);
952 proto_tree_add_item(msg_tree,hf_display_write_address_context,
953 tvb,offset,1,ENC_BIG_ENDIAN);
954 proto_tree_add_item(msg_tree,hf_display_write_address_line,
955 tvb,offset,1,ENC_BIG_ENDIAN);
956 proto_tree_add_item(msg_tree,hf_display_write_address_soft_key,
957 tvb,offset,1,ENC_BIG_ENDIAN);
958 if((address_byte&DISPLAY_WRITE_ADDRESS_SOFT_KEY_FLAG)==
959 DISPLAY_WRITE_ADDRESS_SOFT_KEY_FLAG)
960 proto_tree_add_item(msg_tree,
961 hf_display_write_address_softkey_id,
962 tvb,offset,1,ENC_BIG_ENDIAN);
963 offset+=1;msg_len-=1;
964 if(msg_len==0){
965 /*turn cursor off*/
966 break;
969 proto_tree_add_item(msg_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
970 proto_tree_add_item(msg_tree,hf_display_write_address_char_pos,
971 tvb,offset,1,ENC_BIG_ENDIAN);
972 proto_tree_add_item(msg_tree,hf_display_write_address_line_number,
973 tvb,offset,1,ENC_BIG_ENDIAN);
974 offset+=1;msg_len-=1;
975 break;
976 case 0x12:
977 /*Display Scroll with Data (before)*/
978 set_ascii_item(msg_tree,tvb,offset,msg_len);
979 offset+=msg_len;
980 break;
981 case 0x13:
982 /*Display Scroll with Data (after)*/
983 set_ascii_item(msg_tree,tvb,offset,msg_len);
984 offset+=msg_len;
985 break;
986 case 0x14:
987 /*Status Bar Icon Update*/
988 proto_tree_add_item(msg_tree,hf_basic_bit_field, tvb,offset,1,ENC_BIG_ENDIAN);
989 proto_tree_add_item(msg_tree,hf_icon_id,tvb,offset,1,ENC_BIG_ENDIAN);
990 offset+=1;
991 proto_tree_add_item(msg_tree,hf_basic_bit_field, tvb,offset,1,ENC_BIG_ENDIAN);
992 proto_tree_add_item(msg_tree,hf_broadcast_icon_state,
993 tvb,offset,1,ENC_BIG_ENDIAN);
994 proto_tree_add_item(msg_tree,hf_broadcast_icon_cadence,
995 tvb,offset,1,ENC_BIG_ENDIAN);
996 offset+=1;
997 break;
998 case 0x15:
999 /*Month Labels Download*/
1000 set_ascii_item(msg_tree,tvb,offset,msg_len);
1001 offset+=msg_len;
1002 break;
1003 case 0x16:
1004 /*Call Duration Timer Label Download*/
1005 set_ascii_item(msg_tree,tvb,offset,msg_len);
1006 offset+=1;msg_len-=1;
1007 break;
1008 case 0x17:
1009 /*Time and Date Format*/
1010 time_date_mask=tvb_get_guint8(tvb,offset);
1011 if((time_date_mask&DISPLAY_USE_TIME_FORMAT)==DISPLAY_USE_TIME_FORMAT){
1012 proto_tree_add_item(msg_tree,hf_display_time_format,tvb,offset,1,ENC_BIG_ENDIAN);
1014 if((time_date_mask&DISPLAY_USE_DATE_FORMAT)==DISPLAY_USE_DATE_FORMAT){
1015 proto_tree_add_item(msg_tree,hf_display_date_format,tvb,offset,1,ENC_BIG_ENDIAN);
1017 proto_tree_add_item(msg_tree,hf_display_use_time_format,tvb,offset,1,ENC_BIG_ENDIAN);
1018 proto_tree_add_item(msg_tree,hf_display_use_date_format,tvb,offset,1,ENC_BIG_ENDIAN);
1019 offset+=1;msg_len-=1;
1020 break;
1021 case 0x18:
1022 /*address|no control|no tag|no*/
1023 set_ascii_item(msg_tree,tvb,offset,msg_len);
1024 offset+=msg_len;
1025 break;
1026 case 0x19:
1027 /*address|yes control|no tag|no*/
1028 tmp_ti=proto_tree_add_text(msg_tree,tvb,offset,0,"Address");
1030 address_tree=proto_item_add_subtree(tmp_ti,ett_unistim);
1031 address_byte=tvb_get_guint8(tvb,offset);
1032 proto_tree_add_item(address_tree,hf_basic_bit_field,
1033 tvb,offset,1,ENC_BIG_ENDIAN);
1034 proto_tree_add_item(address_tree,hf_display_write_address_numeric,
1035 tvb,offset,1,ENC_BIG_ENDIAN);
1036 proto_tree_add_item(address_tree,hf_display_write_address_context,
1037 tvb,offset,1,ENC_BIG_ENDIAN);
1038 proto_tree_add_item(address_tree,hf_display_write_address_line,
1039 tvb,offset,1,ENC_BIG_ENDIAN);
1040 proto_tree_add_item(address_tree,hf_display_write_address_soft_key,
1041 tvb,offset,1,ENC_BIG_ENDIAN);
1042 proto_tree_add_item(address_tree,hf_display_write_address_soft_label,
1043 tvb,offset,1,ENC_BIG_ENDIAN);
1045 if((address_byte&DISPLAY_WRITE_ADDRESS_SOFT_KEY_FLAG)==
1046 DISPLAY_WRITE_ADDRESS_SOFT_KEY_FLAG){
1047 proto_tree_add_item(address_tree,
1048 hf_display_write_address_softkey_id,
1049 tvb,offset,1,ENC_BIG_ENDIAN);
1051 offset+=1;msg_len-=1;
1052 if((address_byte&DISPLAY_WRITE_ADDRESS_SOFT_LABEL_FLAG)==
1053 DISPLAY_WRITE_ADDRESS_SOFT_LABEL_FLAG){
1054 proto_tree_add_item(address_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
1055 proto_tree_add_item(address_tree,
1056 hf_display_write_address_char_pos,
1057 tvb,offset,1,ENC_BIG_ENDIAN);
1058 if((address_byte&DISPLAY_WRITE_ADDRESS_LINE_FLAG)!=
1059 DISPLAY_WRITE_ADDRESS_LINE_FLAG){
1060 offset+=1;msg_len-=1;
1063 if((address_byte&DISPLAY_WRITE_ADDRESS_LINE_FLAG)==
1064 DISPLAY_WRITE_ADDRESS_LINE_FLAG){
1065 proto_tree_add_item(address_tree,
1066 hf_display_write_address_line_number,
1067 tvb,offset,1,ENC_BIG_ENDIAN);
1068 offset+=1;msg_len-=1;
1070 if(msg_len>0){
1071 /* I'm guessing this will work flakily at best */
1072 uinfo->string_data = tvb_get_string(wmem_packet_scope(), tvb,offset,msg_len);
1073 set_ascii_item(msg_tree,tvb,offset,msg_len);
1076 offset+=msg_len;
1077 break;
1078 case 0x1a:
1079 /*address|no control|yes tag|no*/
1080 proto_tree_add_item(msg_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
1081 proto_tree_add_item(msg_tree,hf_display_write_cursor_move,
1082 tvb,offset,1,ENC_BIG_ENDIAN);
1083 proto_tree_add_item(msg_tree,hf_display_write_clear_left,
1084 tvb,offset,1,ENC_BIG_ENDIAN);
1085 proto_tree_add_item(msg_tree,hf_display_write_clear_right,
1086 tvb,offset,1,ENC_BIG_ENDIAN);
1087 proto_tree_add_item(msg_tree,hf_display_write_shift_left,
1088 tvb,offset,1,ENC_BIG_ENDIAN);
1089 proto_tree_add_item(msg_tree,hf_display_write_shift_right,
1090 tvb,offset,1,ENC_BIG_ENDIAN);
1091 proto_tree_add_item(msg_tree,hf_display_write_highlight,
1092 tvb,offset,1,ENC_BIG_ENDIAN);
1093 offset+=1;msg_len-=1;
1094 set_ascii_item(msg_tree,tvb,offset,msg_len);
1095 offset+=msg_len;
1096 proto_tree_add_item(msg_tree,hf_generic_string,
1097 tvb,offset,msg_len,ENC_ASCII|ENC_NA);
1098 offset+=msg_len;
1099 break;
1100 case 0x1b:
1101 /*address|yes control|yes tag|no*/
1102 tmp_ti=proto_tree_add_text(msg_tree,tvb,offset,0,"Address Data");
1103 address_tree=proto_item_add_subtree(tmp_ti,ett_unistim);
1104 address_byte=tvb_get_guint8(tvb,offset);
1105 proto_tree_add_item(address_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
1106 proto_tree_add_item(address_tree,
1107 hf_display_write_address_numeric,
1108 tvb,offset,1,ENC_BIG_ENDIAN);
1109 proto_tree_add_item(address_tree,
1110 hf_display_write_address_context,
1111 tvb,offset,1,ENC_BIG_ENDIAN);
1112 proto_tree_add_item(address_tree,
1113 hf_display_write_address_line,
1114 tvb,offset,1,ENC_BIG_ENDIAN);
1115 proto_tree_add_item(address_tree,
1116 hf_display_write_address_soft_key,
1117 tvb,offset,1,ENC_BIG_ENDIAN);
1118 proto_tree_add_item(address_tree,
1119 hf_display_write_address_soft_label,
1120 tvb,offset,1,ENC_BIG_ENDIAN);
1121 if((address_byte&DISPLAY_WRITE_ADDRESS_SOFT_KEY_FLAG)==
1122 DISPLAY_WRITE_ADDRESS_SOFT_KEY_FLAG){
1123 proto_tree_add_item(address_tree,hf_display_write_address_softkey_id,
1124 tvb,offset,1,ENC_BIG_ENDIAN);
1125 offset+=1; msg_len-=1;
1127 if((address_byte&DISPLAY_WRITE_ADDRESS_SOFT_LABEL_FLAG)==
1128 DISPLAY_WRITE_ADDRESS_SOFT_LABEL_FLAG){
1129 proto_tree_add_item(address_tree,
1130 hf_display_write_address_char_pos,
1131 tvb,offset,1,ENC_BIG_ENDIAN);
1132 if((address_byte&DISPLAY_WRITE_ADDRESS_LINE_FLAG)!=
1133 DISPLAY_WRITE_ADDRESS_LINE_FLAG)
1134 offset+=1;msg_len-=1;
1136 if((address_byte&DISPLAY_WRITE_ADDRESS_LINE_FLAG)==
1137 DISPLAY_WRITE_ADDRESS_LINE_FLAG){
1138 proto_tree_add_item(address_tree,
1139 hf_display_write_address_line_number,
1140 tvb,offset,1,ENC_BIG_ENDIAN);
1141 offset+=1;msg_len-=1;
1143 proto_tree_add_item(msg_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
1144 proto_tree_add_item(msg_tree,hf_display_write_cursor_move,
1145 tvb,offset,1,ENC_BIG_ENDIAN);
1146 proto_tree_add_item(msg_tree,hf_display_write_clear_left,
1147 tvb,offset,1,ENC_BIG_ENDIAN);
1148 proto_tree_add_item(msg_tree,hf_display_write_clear_right,
1149 tvb,offset,1,ENC_BIG_ENDIAN);
1150 proto_tree_add_item(msg_tree,hf_display_write_shift_left,
1151 tvb,offset,1,ENC_BIG_ENDIAN);
1152 proto_tree_add_item(msg_tree,hf_display_write_shift_right,
1153 tvb,offset,1,ENC_BIG_ENDIAN);
1154 proto_tree_add_item(msg_tree,hf_display_write_highlight,
1155 tvb,offset,1,ENC_BIG_ENDIAN);
1156 offset+=1;msg_len-=1;
1157 set_ascii_item(msg_tree,tvb,offset,msg_len);
1158 offset+=msg_len;
1159 break;
1160 case 0x1c:
1161 /*address|no control|no tag|yes*/
1162 proto_tree_add_item(msg_tree,hf_display_write_tag,tvb,offset,1,ENC_BIG_ENDIAN);
1163 offset+=1;msg_len-=1;
1164 set_ascii_item(msg_tree,tvb,offset,msg_len);
1165 offset+=msg_len;
1166 break;
1167 case 0x1d:
1168 /*address|yes control|no tag|yes*/
1169 tmp_ti=proto_tree_add_text(msg_tree,tvb,offset,0,"Address Data");
1170 address_tree=proto_item_add_subtree(tmp_ti,ett_unistim);
1171 address_byte=tvb_get_guint8(tvb,offset);
1172 proto_tree_add_item(address_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
1173 proto_tree_add_item(address_tree,hf_display_write_address_numeric,tvb,
1174 offset,1,ENC_BIG_ENDIAN);
1175 proto_tree_add_item(address_tree,hf_display_write_address_context,
1176 tvb,offset,1,ENC_BIG_ENDIAN);
1177 proto_tree_add_item(address_tree,hf_display_write_address_line,
1178 tvb,offset,1,ENC_BIG_ENDIAN);
1179 proto_tree_add_item(address_tree,hf_display_write_address_soft_key,
1180 tvb,offset,1,ENC_BIG_ENDIAN);
1181 proto_tree_add_item(address_tree,hf_display_write_address_soft_label,
1182 tvb,offset,1,ENC_BIG_ENDIAN);
1183 if((address_byte&DISPLAY_WRITE_ADDRESS_SOFT_KEY_FLAG)==
1184 DISPLAY_WRITE_ADDRESS_SOFT_KEY_FLAG)
1185 proto_tree_add_item(address_tree,
1186 hf_display_write_address_softkey_id,
1187 tvb,offset,1,ENC_BIG_ENDIAN);
1188 offset+=1; msg_len-=1;
1189 if((address_byte&DISPLAY_WRITE_ADDRESS_SOFT_LABEL_FLAG)==
1190 DISPLAY_WRITE_ADDRESS_SOFT_LABEL_FLAG){
1191 proto_tree_add_item(address_tree,
1192 hf_display_write_address_char_pos,
1193 tvb,offset,1,ENC_BIG_ENDIAN);
1194 if((address_byte&DISPLAY_WRITE_ADDRESS_LINE_FLAG)!=
1195 DISPLAY_WRITE_ADDRESS_LINE_FLAG)
1196 offset+=1;msg_len-=1;
1198 if((address_byte&DISPLAY_WRITE_ADDRESS_LINE_FLAG)==
1199 DISPLAY_WRITE_ADDRESS_LINE_FLAG){
1200 proto_tree_add_item(address_tree,hf_display_write_address_line_number,
1201 tvb,offset,1,ENC_BIG_ENDIAN);
1202 offset+=1;msg_len-=1;
1204 set_ascii_item(msg_tree,tvb,offset,msg_len);
1205 offset+=msg_len;
1206 break;
1207 case 0x1e:
1208 /*address|no control|yes tag|yes*/
1209 proto_tree_add_item(msg_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
1210 proto_tree_add_item(msg_tree,hf_display_write_cursor_move,
1211 tvb,offset,1,ENC_BIG_ENDIAN);
1212 proto_tree_add_item(msg_tree,hf_display_write_clear_left,
1213 tvb,offset,1,ENC_BIG_ENDIAN);
1214 proto_tree_add_item(msg_tree,hf_display_write_clear_right,
1215 tvb,offset,1,ENC_BIG_ENDIAN);
1216 proto_tree_add_item(msg_tree,hf_display_write_shift_left,
1217 tvb,offset,1,ENC_BIG_ENDIAN);
1218 proto_tree_add_item(msg_tree,hf_display_write_shift_right,
1219 tvb,offset,1,ENC_BIG_ENDIAN);
1220 proto_tree_add_item(msg_tree,hf_display_write_highlight,
1221 tvb,offset,1,ENC_BIG_ENDIAN);
1222 offset+=1;msg_len-=1;
1224 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
1225 offset+=msg_len;
1226 proto_tree_add_item(msg_tree,hf_display_write_tag,tvb,offset,1,ENC_BIG_ENDIAN);
1227 offset+=1;msg_len-=1;
1228 set_ascii_item(msg_tree,tvb,offset,msg_len);
1229 offset+=msg_len;
1230 break;
1231 case 0x1f:
1232 /*address|yes control|yes tag|yes*/
1233 tmp_ti=proto_tree_add_text(msg_tree,tvb,offset,0,"Address");
1234 address_tree=proto_item_add_subtree(tmp_ti,ett_unistim);
1235 address_byte=tvb_get_guint8(tvb,offset);
1236 proto_tree_add_item(address_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
1237 proto_tree_add_item(address_tree,hf_display_write_address_numeric,
1238 tvb,offset,1,ENC_BIG_ENDIAN);
1239 proto_tree_add_item(address_tree,hf_display_write_address_context,
1240 tvb,offset,1,ENC_BIG_ENDIAN);
1241 proto_tree_add_item(address_tree,hf_display_write_address_line,
1242 tvb,offset,1,ENC_BIG_ENDIAN);
1243 proto_tree_add_item(address_tree,hf_display_write_address_soft_key,
1244 tvb,offset,1,ENC_BIG_ENDIAN);
1245 proto_tree_add_item(address_tree,hf_display_write_address_soft_label,
1246 tvb,offset,1,ENC_BIG_ENDIAN);
1247 if((address_byte&DISPLAY_WRITE_ADDRESS_SOFT_KEY_FLAG)==
1248 DISPLAY_WRITE_ADDRESS_SOFT_KEY_FLAG)
1249 proto_tree_add_item(address_tree,hf_display_write_address_softkey_id,
1250 tvb,offset,1,ENC_BIG_ENDIAN);
1251 offset+=1; msg_len-=1;
1252 proto_tree_add_item(msg_tree,hf_generic_string,
1253 tvb,offset,msg_len,ENC_ASCII|ENC_NA);
1254 offset+=msg_len;
1255 if((address_byte&DISPLAY_WRITE_ADDRESS_SOFT_LABEL_FLAG)==
1256 DISPLAY_WRITE_ADDRESS_SOFT_LABEL_FLAG){
1257 proto_tree_add_item(address_tree,hf_display_write_address_char_pos,
1258 tvb,offset,1,ENC_BIG_ENDIAN);
1259 if((address_byte&DISPLAY_WRITE_ADDRESS_SOFT_LABEL_FLAG)!=
1260 DISPLAY_WRITE_ADDRESS_SOFT_LABEL_FLAG)
1261 offset+=1;msg_len-=1;
1263 if((address_byte&DISPLAY_WRITE_ADDRESS_LINE_FLAG)==
1264 DISPLAY_WRITE_ADDRESS_LINE_FLAG){
1265 proto_tree_add_item(address_tree,
1266 hf_display_write_address_line_number,
1267 tvb,offset,1,ENC_BIG_ENDIAN);
1268 offset+=1;msg_len-=1;
1270 proto_tree_add_item(msg_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
1271 proto_tree_add_item(msg_tree,hf_display_write_cursor_move,
1272 tvb,offset,1,ENC_BIG_ENDIAN);
1273 proto_tree_add_item(msg_tree,hf_display_write_clear_left,
1274 tvb,offset,1,ENC_BIG_ENDIAN);
1275 proto_tree_add_item(msg_tree,hf_display_write_clear_right,
1276 tvb,offset,1,ENC_BIG_ENDIAN);
1277 proto_tree_add_item(msg_tree,hf_display_write_shift_left,
1278 tvb,offset,1,ENC_BIG_ENDIAN);
1279 proto_tree_add_item(msg_tree,hf_display_write_shift_right,
1280 tvb,offset,1,ENC_BIG_ENDIAN);
1281 proto_tree_add_item(msg_tree,hf_display_write_highlight,
1282 tvb,offset,1,ENC_BIG_ENDIAN);
1283 offset+=1;msg_len-=1;
1284 proto_tree_add_item(msg_tree,hf_display_write_tag,
1285 tvb,offset,1,ENC_BIG_ENDIAN);
1286 offset+=1;msg_len-=1;
1287 set_ascii_item(msg_tree,tvb,offset,msg_len);
1288 offset+=msg_len;
1289 break;
1290 case 0x20:
1291 /*Context Info Bar Format*/
1292 while(msg_len>0){
1293 proto_tree_add_item(msg_tree,hf_display_context_format,tvb,offset,1,ENC_BIG_ENDIAN);
1294 proto_tree_add_item(msg_tree,hf_display_context_field,tvb,offset,1,ENC_BIG_ENDIAN);
1295 offset+=1;msg_len-=1;
1297 break;
1298 case 0x21:
1299 /*Set Default Character Table Configuration VERY UGLY*/
1300 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
1301 offset+=msg_len;
1302 break;
1303 case 0x22:
1304 /*Special Character Download*/
1305 proto_tree_add_item(msg_tree,hf_display_char_address,tvb,offset,1,ENC_BIG_ENDIAN);
1306 offset+=1;msg_len-=1;
1307 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
1308 offset+=msg_len;
1309 break;
1310 case 0x23:
1311 /*Highlighted Field Definition*/
1312 highlight_cmd=tvb_get_guint8(tvb,offset);
1313 proto_tree_add_item(msg_tree,hf_display_cursor_numeric,tvb,offset,1,ENC_BIG_ENDIAN);
1314 proto_tree_add_item(msg_tree,hf_display_cursor_context ,tvb,offset,1,ENC_BIG_ENDIAN);
1315 proto_tree_add_item(msg_tree,hf_display_cursor_line,tvb,offset,1,ENC_BIG_ENDIAN);
1316 proto_tree_add_item(msg_tree,hf_display_cursor_softkey,tvb,offset,1,ENC_BIG_ENDIAN);
1317 proto_tree_add_item(msg_tree,hf_display_cursor_softkey_id,tvb,offset,1,ENC_BIG_ENDIAN);
1318 offset+=1;msg_len-=1;proto_tree_add_item(msg_tree,hf_display_hlight_start,tvb,offset,1,ENC_BIG_ENDIAN);
1319 offset+=1;msg_len-=1;
1320 proto_tree_add_item(msg_tree,hf_display_hlight_end,tvb,offset,1,ENC_BIG_ENDIAN);
1321 offset+=1;msg_len-=1;
1322 if(msg_len==0)
1323 break;
1324 if((highlight_cmd&DISPLAY_CURSOR_LINE)==DISPLAY_CURSOR_LINE){
1325 proto_tree_add_item(msg_tree,hf_display_cursor_char_pos,tvb,offset,1,ENC_BIG_ENDIAN);
1326 proto_tree_add_item(msg_tree,hf_display_cursor_line_number,tvb,offset,1,ENC_BIG_ENDIAN);
1327 offset+=1;msg_len-=1;
1329 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
1330 offset+=msg_len;
1331 break;
1332 case 0x24:
1333 /*Contrast*/
1334 proto_tree_add_item(msg_tree,hf_display_contrast,tvb,offset,1,ENC_BIG_ENDIAN);
1335 offset+=1;msg_len-=1;
1336 break;
1337 case 0x25:
1338 /*Caller Log Download*/
1339 proto_tree_add_item(msg_tree,hf_broadcast_hour,tvb,offset,msg_len,ENC_BIG_ENDIAN);
1340 offset+=1;msg_len-=1;
1341 proto_tree_add_item(msg_tree,hf_broadcast_minute,tvb,offset,msg_len,ENC_BIG_ENDIAN);
1342 offset+=1;msg_len-=1;
1343 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
1344 offset+=msg_len;
1345 break;
1346 case 0x30:
1347 /*Layered Softkey Text Download*/
1348 proto_tree_add_item(msg_tree,hf_display_layer_skey_id,tvb,offset,1,ENC_BIG_ENDIAN);
1349 offset+=1;msg_len-=1;
1350 proto_tree_add_item(msg_tree,hf_display_layer_number,tvb,offset,1,ENC_BIG_ENDIAN);
1351 offset+=1;msg_len-=1;
1352 set_ascii_item(msg_tree,tvb,offset,msg_len);
1353 offset+=msg_len;
1354 break;
1355 case 0x31:
1356 /*Layered Softkey Clear*/
1357 proto_tree_add_item(msg_tree,hf_display_layer_skey_id,tvb,offset,1,ENC_BIG_ENDIAN);
1358 proto_tree_add_item(msg_tree,hf_display_layer_all_skeys,tvb,offset,msg_len,ENC_BIG_ENDIAN);
1359 offset+=1;msg_len-=1;
1360 proto_tree_add_item(msg_tree,hf_display_layer_number,tvb,offset,1,ENC_BIG_ENDIAN);
1361 offset+=1;msg_len-=1;
1362 break;
1363 case 0x32:
1364 /*Set Visible Softkey Layer*/
1365 proto_tree_add_item(msg_tree,hf_display_layer_skey_id,tvb,offset,1,ENC_BIG_ENDIAN);
1366 proto_tree_add_item(msg_tree,hf_display_layer_all_skeys,tvb,offset,msg_len,ENC_BIG_ENDIAN);
1367 offset+=1;msg_len-=1;
1368 proto_tree_add_item(msg_tree,hf_display_layer_number,tvb,offset,1,ENC_BIG_ENDIAN);
1369 offset+=1;msg_len-=1;
1370 break;
1371 case 0x33:
1372 /*Layered Softkey Cadence Download*/
1373 proto_tree_add_item(msg_tree,hf_display_layer_skey_id,tvb,offset,1,ENC_BIG_ENDIAN);
1374 proto_tree_add_item(msg_tree,hf_display_once_or_cyclic,tvb,offset,msg_len,ENC_BIG_ENDIAN);
1375 offset+=1;msg_len-=1;
1376 while(msg_len>0){
1377 proto_tree_add_item(msg_tree,hf_display_layer_number,tvb,offset,1,ENC_BIG_ENDIAN);
1378 offset+=1;msg_len-=1;
1379 proto_tree_add_item(msg_tree,hf_display_layer_duration,tvb,offset,1,ENC_BIG_ENDIAN);
1380 offset+=1;msg_len-=1;
1382 break;
1383 case 0x34:
1384 /*Layered Softkey Cadencing On*/
1385 proto_tree_add_item(msg_tree,hf_display_layer_skey_id,tvb,offset,1,ENC_BIG_ENDIAN);
1386 offset+=1;msg_len-=1;
1387 break;
1388 case 0x35:
1389 /*Layered Softkey Cadencing Off*/
1390 proto_tree_add_item(msg_tree,hf_display_layer_skey_id,tvb,offset,1,ENC_BIG_ENDIAN);
1391 offset+=1;msg_len-=1;
1392 break;
1393 case 0xff:
1394 /*Reserved*/
1395 break;
1396 default:
1397 proto_tree_add_item(msg_tree,hf_generic_data,
1398 tvb,offset,msg_len,ENC_NA);
1399 offset+=msg_len;
1402 if(msg_len){
1403 /* TODO: add Expert info to indicate there is unknown data !
1404 For the moment, this code only remove Clang Warnings about not used msg_len... */
1407 return offset;
1409 /*DONE*/
1410 static gint
1411 dissect_display_phone(proto_tree *msg_tree,
1412 tvbuff_t *tvb,gint offset,guint msg_len){
1413 guint display_cmd;
1414 guint highlight_cmd;
1415 display_cmd=tvb_get_guint8(tvb,offset);
1416 proto_tree_add_item(msg_tree,hf_display_phone_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
1417 offset+=1;msg_len-=1;
1418 switch(display_cmd){
1419 case 0x00:
1420 /*Display Manager Attributes Info*/
1421 proto_tree_add_item(msg_tree,hf_display_line_width,tvb,offset,1,ENC_BIG_ENDIAN);
1422 proto_tree_add_item(msg_tree,hf_display_lines,tvb,offset,1,ENC_BIG_ENDIAN);
1423 offset+=1;msg_len-=1;
1424 proto_tree_add_item(msg_tree,hf_display_softkey_width,tvb,offset,1,ENC_BIG_ENDIAN);
1425 proto_tree_add_item(msg_tree,hf_display_softkeys,tvb,offset,1,ENC_BIG_ENDIAN);
1426 proto_tree_add_item(msg_tree,hf_display_icon,tvb,offset,1,ENC_BIG_ENDIAN);
1427 offset+=1;msg_len-=1;
1428 proto_tree_add_item(msg_tree,hf_display_softlabel_key_width,tvb,offset,1,ENC_BIG_ENDIAN);
1429 proto_tree_add_item(msg_tree,hf_display_context_width,tvb,offset,1,ENC_BIG_ENDIAN);
1430 offset+=1;msg_len-=1;
1431 proto_tree_add_item(msg_tree,hf_display_numeric_width,tvb,offset,1,ENC_BIG_ENDIAN);
1432 proto_tree_add_item(msg_tree,hf_display_time_width,tvb,offset,1,ENC_BIG_ENDIAN);
1433 proto_tree_add_item(msg_tree,hf_display_date_width,tvb,offset,1,ENC_BIG_ENDIAN);
1434 offset+=1;msg_len-=1;
1435 proto_tree_add_item(msg_tree,hf_display_char_dload,tvb,offset,1,ENC_BIG_ENDIAN);
1436 proto_tree_add_item(msg_tree,hf_display_freeform_icon_dload,tvb,offset,1,ENC_BIG_ENDIAN);
1437 proto_tree_add_item(msg_tree,hf_display_icon_type,tvb,offset,1,ENC_BIG_ENDIAN);
1438 offset+=1;msg_len-=1;
1439 proto_tree_add_item(msg_tree,hf_display_charsets,tvb,offset,1,ENC_BIG_ENDIAN);
1440 offset+=1;msg_len-=1;
1442 break;
1443 case 0x01:
1444 /*Contrast Level Report*/
1445 proto_tree_add_item(msg_tree,hf_display_contrast,tvb,offset,1,ENC_BIG_ENDIAN);
1446 offset+=1;msg_len-=1;
1447 break;
1448 case 0x02:
1449 /*Cursor Location Report*/
1450 proto_tree_add_item(msg_tree,hf_display_cursor_numeric,tvb,offset,1,ENC_BIG_ENDIAN);
1451 proto_tree_add_item(msg_tree,hf_display_cursor_context ,tvb,offset,1,ENC_BIG_ENDIAN);
1452 proto_tree_add_item(msg_tree,hf_display_cursor_line,tvb,offset,1,ENC_BIG_ENDIAN);
1453 proto_tree_add_item(msg_tree,hf_display_cursor_softkey,tvb,offset,1,ENC_BIG_ENDIAN);
1454 proto_tree_add_item(msg_tree,hf_display_cursor_softkey_id,tvb,offset,1,ENC_BIG_ENDIAN);
1455 offset+=1;msg_len-=1;
1456 proto_tree_add_item(msg_tree,hf_display_cursor_char_pos,tvb,offset,1,ENC_BIG_ENDIAN);
1457 proto_tree_add_item(msg_tree,hf_display_cursor_line_number,tvb,offset,1,ENC_BIG_ENDIAN);
1458 offset+=1;msg_len-=1;
1459 break;
1460 case 0x03:
1461 /*Highlight Status On*/
1462 highlight_cmd=tvb_get_guint8(tvb,offset);
1463 proto_tree_add_item(msg_tree,hf_display_cursor_numeric,tvb,offset,1,ENC_BIG_ENDIAN);
1464 proto_tree_add_item(msg_tree,hf_display_cursor_context ,tvb,offset,1,ENC_BIG_ENDIAN);
1465 proto_tree_add_item(msg_tree,hf_display_cursor_line,tvb,offset,1,ENC_BIG_ENDIAN);
1466 proto_tree_add_item(msg_tree,hf_display_cursor_softkey,tvb,offset,1,ENC_BIG_ENDIAN);
1467 proto_tree_add_item(msg_tree,hf_display_cursor_softkey_id,tvb,offset,1,ENC_BIG_ENDIAN);
1468 offset+=1;msg_len-=1;proto_tree_add_item(msg_tree,hf_display_hlight_start,tvb,offset,1,ENC_BIG_ENDIAN);
1469 offset+=1;msg_len-=1;
1470 proto_tree_add_item(msg_tree,hf_display_hlight_end,tvb,offset,1,ENC_BIG_ENDIAN);
1471 offset+=1;msg_len-=1;
1472 if((highlight_cmd&DISPLAY_CURSOR_LINE)==DISPLAY_CURSOR_LINE){
1473 proto_tree_add_item(msg_tree,hf_display_cursor_char_pos,tvb,offset,1,ENC_BIG_ENDIAN);
1474 proto_tree_add_item(msg_tree,hf_display_cursor_line_number,tvb,offset,1,ENC_BIG_ENDIAN);
1475 offset+=1;msg_len-=1;
1477 break;
1478 case 0x04:
1479 /*Current Character Table Configuration Status VERY UGLY*/
1480 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
1481 offset+=msg_len;
1482 break;
1483 case 0x05:
1484 /*Default Character Table Configuration Status VERY UGLY*/
1485 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
1486 offset+=msg_len;
1487 break;
1488 case 0x06:
1489 /*Timer And Date Format Report*/
1490 proto_tree_add_item(msg_tree,hf_display_time_format,tvb,offset,1,ENC_BIG_ENDIAN);
1491 proto_tree_add_item(msg_tree,hf_display_date_format,tvb,offset,1,ENC_BIG_ENDIAN);
1492 offset+=1;msg_len-=1;
1493 break;
1494 case 0x07:
1495 /*Status Bar Icon State Report*/
1496 proto_tree_add_item(msg_tree,hf_icon_id,tvb,offset,msg_len,ENC_BIG_ENDIAN);
1497 offset+=1;msg_len-=1;
1498 proto_tree_add_item(msg_tree,hf_broadcast_icon_state,tvb,offset,msg_len,ENC_BIG_ENDIAN);
1499 proto_tree_add_item(msg_tree,hf_broadcast_icon_cadence,tvb,offset,msg_len,ENC_BIG_ENDIAN);
1500 offset+=1;msg_len-=1;
1501 break;
1502 case 0x0a:
1503 /*Highlight Status Off length = 3*/
1504 break;
1505 case 0xff:
1506 /*Reserved*/
1507 break;
1508 default:
1509 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
1510 offset+=msg_len;
1513 if(msg_len){
1514 /* TODO: add Expert info to indicate there is unknown data !
1515 For the moment, this code only remove Clang Warnings about not used msg_len... */
1518 return offset;
1522 static gint
1523 dissect_key_indicator_switch(proto_tree *msg_tree,
1524 tvbuff_t *tvb, gint offset,guint msg_len){
1525 guint key_cmd;
1526 key_cmd=tvb_get_guint8(tvb,offset);
1527 proto_tree_add_item(msg_tree,hf_key_switch_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
1528 offset+=1;msg_len-=1;
1529 switch(key_cmd){
1530 case 0x00:
1531 /*LED Update*/
1532 proto_tree_add_item(msg_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
1533 proto_tree_add_item(msg_tree,hf_key_led_cadence,tvb,offset,1,ENC_BIG_ENDIAN);
1534 proto_tree_add_item(msg_tree,hf_key_led_id,tvb,offset,1,ENC_BIG_ENDIAN);
1535 offset+=1;msg_len-=1;
1536 break;
1537 case 0x01:
1538 /*Query Hookswitch length = 3 */
1539 break;
1540 case 0x02:
1541 /*User Activity Timer Stop length = 3*/
1542 break;
1543 case 0x03:
1544 /*User Activity Timer Start length = 3*/
1545 break;
1546 case 0x04:
1547 /*Downloadable Free Form Icon Access (Hardcoded) length of 3*/
1548 break;
1549 case 0x05:
1550 /*Downloadable Free Form Icon Access (Downloadable) length of 3*/
1551 break;
1552 case 0x06:
1553 /*Query Key/Indicator Manager*/
1554 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
1555 offset+=msg_len;
1556 break;
1557 case 0x07:
1558 /*Key/Indicator Manager Options*/
1559 proto_tree_add_item(msg_tree,hf_keys_send_key_rel,tvb,offset,1,ENC_BIG_ENDIAN);
1560 proto_tree_add_item(msg_tree,hf_keys_enable_vol,tvb,offset,1,ENC_BIG_ENDIAN);
1561 proto_tree_add_item(msg_tree,hf_keys_conspic_prog_key,tvb,offset,1,ENC_BIG_ENDIAN);
1562 proto_tree_add_item(msg_tree,hf_keys_acd_super_control,tvb,offset,1,ENC_BIG_ENDIAN);
1563 proto_tree_add_item(msg_tree,hf_keys_local_dial_feedback,tvb,offset,1,ENC_BIG_ENDIAN);
1564 offset+=1;msg_len-=1;
1565 break;
1566 case 0x08:
1567 /*Logical Icon Mapping*/
1568 proto_tree_add_item(msg_tree,hf_key_icon_id,tvb,offset,1,ENC_BIG_ENDIAN);
1569 proto_tree_add_item(msg_tree,hf_keys_admin_command,tvb,offset,1,ENC_BIG_ENDIAN);
1570 offset+=1;msg_len-=1;
1571 proto_tree_add_item(msg_tree,hf_keys_logical_icon_id,tvb,offset,2,ENC_BIG_ENDIAN);
1572 offset+=2;msg_len-=2;
1573 break;
1574 case 0x09:
1575 /*Key Repeat Timer Download*/
1576 proto_tree_add_item(msg_tree,hf_keys_repeat_timer_one,tvb,offset,1,ENC_BIG_ENDIAN);
1577 offset+=1;msg_len-=1;
1578 proto_tree_add_item(msg_tree,hf_keys_repeat_timer_two,tvb,offset,1,ENC_BIG_ENDIAN);
1579 offset+=1;msg_len-=1;
1580 break;
1581 case 0x0a:
1582 /*Query LED State*/
1583 proto_tree_add_item(msg_tree,hf_keys_led_id,tvb,offset,1,ENC_BIG_ENDIAN);
1584 offset+=1;msg_len-=1;
1585 break;
1586 case 0x0b:
1587 /*Query Phone Icon State*/
1588 proto_tree_add_item(msg_tree,hf_keys_phone_icon_id,tvb,offset,1,ENC_BIG_ENDIAN);
1589 offset+=1;msg_len-=1;
1590 break;
1591 case 0x0c:
1592 /*Indicator Cadence Download*/
1593 while(msg_len>0){
1594 proto_tree_add_item(msg_tree,hf_keys_cadence_on_time,tvb,offset,1,ENC_BIG_ENDIAN);
1595 offset+=1;msg_len-=1;
1596 proto_tree_add_item(msg_tree,hf_keys_cadence_off_time,tvb,offset,1,ENC_BIG_ENDIAN);
1597 offset+=1;msg_len-=1;
1599 break;
1600 case 0x0d:
1601 /*User Activity Timer Download*/
1602 proto_tree_add_item(msg_tree,hf_keys_user_activity_timeout,tvb,offset,1,ENC_BIG_ENDIAN);
1603 offset+=1;msg_len-=1;
1604 break;
1605 case 0x0e:
1606 /*Free Form Icon Download*/
1607 proto_tree_add_item(msg_tree,hf_key_icon_id,tvb,offset,1,ENC_BIG_ENDIAN);
1608 offset+=1;msg_len-=1;
1609 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
1610 offset+=msg_len;
1611 break;
1612 case 0x0f:
1613 /*Phone Icon Update*/
1614 proto_tree_add_item(msg_tree,hf_key_icon_id,tvb,offset,1,ENC_BIG_ENDIAN);
1615 offset+=1;msg_len-=1;
1616 proto_tree_add_item(msg_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
1617 proto_tree_add_item(msg_tree,hf_broadcast_icon_state,tvb,offset,1,ENC_BIG_ENDIAN);
1618 proto_tree_add_item(msg_tree,hf_broadcast_icon_cadence,tvb,offset,1,ENC_BIG_ENDIAN);
1619 offset+=1;msg_len-=1;
1620 break;
1621 case 0xff:
1622 /*Reserved*/
1623 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
1624 offset+=msg_len;
1625 break;
1626 default:
1627 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
1628 offset+=msg_len;
1631 if(msg_len){
1632 /* TODO: add Expert info to indicate there is unknown data !
1633 For the moment, this code only remove Clang Warnings about not used msg_len... */
1636 return offset;
1639 /*DONE*/
1640 static gint
1641 dissect_key_indicator_phone(proto_tree *msg_tree,
1642 tvbuff_t *tvb,gint offset, guint msg_len){
1643 guint key_cmd;
1644 key_cmd=tvb_get_guint8(tvb,offset);
1645 proto_tree_add_item(msg_tree,hf_key_phone_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
1646 offset+=1;msg_len-=1;
1647 switch(key_cmd){
1648 case 0x00:
1649 /*Key Event*/
1650 /* Set the tap info */
1651 uinfo->key_state = tvb_get_guint8(tvb,offset);
1652 uinfo->key_state >>= 6;
1653 /* Extract the key code */
1654 uinfo->key_val = (tvb_get_guint8(tvb,offset) & 0x3F);
1656 proto_tree_add_item(msg_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
1657 proto_tree_add_item(msg_tree,hf_key_code,tvb,offset,1,ENC_BIG_ENDIAN);
1658 proto_tree_add_item(msg_tree,hf_key_command,tvb,offset,1,ENC_BIG_ENDIAN);
1659 offset+=1;
1660 break;
1661 case 0x01:
1662 /*LED Status Report*/
1663 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
1664 offset+=msg_len;
1665 break;
1666 case 0x03:
1667 /*On Hook length = 3*/
1668 /* Set tap info.. */
1669 uinfo->hook_state = 0;
1671 break;
1672 case 0x04:
1673 /*Off Hook length = 3*/
1674 /* Set tap info.. */
1675 uinfo->hook_state = 1;
1677 break;
1678 case 0x05:
1679 /*User Activity Timer Expired length = 3*/
1680 break;
1681 case 0x06:
1682 /*Hookswitch State (on hook) length = 3*/
1683 break;
1684 case 0x07:
1685 /*Hookswitch State (off hook) length = 3*/
1686 break;
1687 case 0x08:
1688 /*Key/Indicator Manager Attributes Info*/
1689 proto_tree_add_item(msg_tree,hf_key_programmable_keys,tvb,offset,1,ENC_BIG_ENDIAN);
1690 proto_tree_add_item(msg_tree,hf_keys_soft_keys,tvb,offset,1,ENC_BIG_ENDIAN);
1691 offset+=1;msg_len-=1;
1692 proto_tree_add_item(msg_tree,hf_keys_hd_key,tvb,offset,1,ENC_BIG_ENDIAN);
1693 proto_tree_add_item(msg_tree,hf_keys_mute_key,tvb,offset,1,ENC_BIG_ENDIAN);
1694 proto_tree_add_item(msg_tree,hf_keys_quit_key,tvb,offset,1,ENC_BIG_ENDIAN);
1695 proto_tree_add_item(msg_tree,hf_keys_copy_key,tvb,offset,1,ENC_BIG_ENDIAN);
1696 proto_tree_add_item(msg_tree,hf_keys_mwi_key,tvb,offset,1,ENC_BIG_ENDIAN);
1697 offset+=1;msg_len-=1;
1698 proto_tree_add_item(msg_tree,hf_keys_num_nav_keys,tvb,offset,1,ENC_BIG_ENDIAN);
1699 proto_tree_add_item(msg_tree,hf_keys_num_conspic_keys,tvb,offset,1,ENC_BIG_ENDIAN);
1700 offset+=1;msg_len-=1;
1702 break;
1703 case 0x09:
1704 /*Key/Indicator Manager Options Report*/
1705 proto_tree_add_item(msg_tree,hf_keys_send_key_rel,tvb,offset,1,ENC_BIG_ENDIAN);
1706 proto_tree_add_item(msg_tree,hf_keys_enable_vol,tvb,offset,1,ENC_BIG_ENDIAN);
1707 proto_tree_add_item(msg_tree,hf_keys_conspic_prog_key,tvb,offset,1,ENC_BIG_ENDIAN);
1708 proto_tree_add_item(msg_tree,hf_keys_acd_super_control,tvb,offset,1,ENC_BIG_ENDIAN);
1709 proto_tree_add_item(msg_tree,hf_keys_local_dial_feedback,tvb,offset,1,ENC_BIG_ENDIAN);
1710 offset+=1;msg_len-=1;
1711 break;
1712 case 0x0a:
1713 /*Phone Icon Status Report*/
1714 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
1715 offset+=msg_len;
1716 break;
1717 case 0xff:
1718 /*Reserved*/
1719 break;
1720 default:
1721 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
1722 offset+=msg_len;
1725 if(msg_len){
1726 /* TODO: add Expert info to indicate there is unknown data !
1727 For the moment, this code only remove Clang Warnings about not used msg_len... */
1730 return offset;
1734 /*Done*/
1735 static gint
1736 dissect_network_switch(proto_tree *msg_tree,
1737 tvbuff_t *tvb,gint offset, guint msg_len){
1738 guint network_cmd;
1739 guint string_len;
1741 network_cmd=tvb_get_guint8(tvb,offset);
1742 proto_tree_add_item(msg_tree,hf_network_switch_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
1743 offset+=1;msg_len-=1;
1744 switch(network_cmd){
1745 case 0x02:
1746 /*Soft Reset done*/
1747 break;
1748 case 0x03:
1749 /*Hard Reset done*/
1750 break;
1751 case 0x04:
1752 /*Query Network Manager*/
1753 proto_tree_add_item(msg_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
1754 proto_tree_add_item(msg_tree,hf_net_diag_flag,tvb,offset,1,ENC_BIG_ENDIAN);
1755 proto_tree_add_item(msg_tree,hf_net_managers_flag,tvb,offset,1,ENC_BIG_ENDIAN);
1756 proto_tree_add_item(msg_tree,hf_net_attributes_flag,tvb,offset,1,ENC_BIG_ENDIAN);
1757 proto_tree_add_item(msg_tree,hf_net_serv_info_flag,tvb,offset,1,ENC_BIG_ENDIAN);
1758 proto_tree_add_item(msg_tree,hf_net_options_flag,tvb,offset,1,ENC_BIG_ENDIAN);
1759 proto_tree_add_item(msg_tree,hf_net_sanity_flag,tvb,offset,1,ENC_BIG_ENDIAN);
1760 offset+=1;
1761 break;
1762 case 0x05:
1763 /*Network Manager Options*/
1764 proto_tree_add_item(msg_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
1765 proto_tree_add_item(msg_tree,hf_net_enable_diag,tvb,offset,1,ENC_BIG_ENDIAN);
1766 proto_tree_add_item(msg_tree,hf_net_enable_rudp,tvb,offset,1,ENC_BIG_ENDIAN);
1767 offset+=1;
1768 break;
1769 case 0x06:
1770 /*QoS Configuration*/
1771 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
1772 offset+=msg_len;
1773 break;
1774 case 0x09:
1775 /*Set RTCP Source Description Item*/
1776 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
1777 offset+=msg_len;
1778 break;
1779 case 0x0b:
1780 /*Download Server Information*/
1781 proto_tree_add_item(msg_tree,hf_net_server_id,tvb,offset,1,ENC_BIG_ENDIAN);
1782 offset+=1;
1783 proto_tree_add_item(msg_tree,hf_net_server_port,tvb,offset,2,ENC_BIG_ENDIAN);
1784 offset+=2;
1785 proto_tree_add_item(msg_tree,hf_net_server_action,tvb,offset,1,ENC_BIG_ENDIAN);
1786 offset+=1;
1787 proto_tree_add_item(msg_tree,hf_net_server_retry_count,tvb,offset,1,ENC_BIG_ENDIAN);
1788 offset+=1;
1789 proto_tree_add_item(msg_tree,hf_net_server_failover_id,tvb,offset,1,ENC_BIG_ENDIAN);
1790 offset+=1;
1791 proto_tree_add_item(msg_tree,hf_net_server_ip_address,tvb,offset,4,ENC_BIG_ENDIAN);
1792 offset+=4;
1793 break;
1794 case 0x0c:
1795 /*Server Switch*/
1796 proto_tree_add_item(msg_tree,hf_net_server_id,tvb,offset,1,ENC_BIG_ENDIAN);
1797 offset+=1;
1798 break;
1799 case 0x0d:
1800 /*Query Network Configuration Element*/
1801 proto_tree_add_item(msg_tree,hf_net_server_config_element,
1802 tvb,offset-1,1,ENC_BIG_ENDIAN);
1803 offset+=1;
1804 break;
1805 case 0x0e:
1806 /*Download Software Upgrade*/
1807 proto_tree_add_item(msg_tree,hf_net_file_xfer_mode,tvb,offset,1,ENC_BIG_ENDIAN);
1808 proto_tree_add_item(msg_tree,hf_net_force_download,tvb,offset,1,ENC_BIG_ENDIAN);
1809 proto_tree_add_item(msg_tree,hf_net_use_file_server_port,tvb,offset,1,ENC_BIG_ENDIAN);
1810 proto_tree_add_item(msg_tree,hf_net_use_local_port,tvb,offset,1,ENC_BIG_ENDIAN);
1811 offset+=1;msg_len-=1;
1812 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,1,ENC_NA);
1813 offset+=1;msg_len-=1;
1814 string_len=tvb_strsize(tvb,offset);
1815 proto_tree_add_item(msg_tree,hf_net_full_pathname,tvb,offset,string_len,ENC_ASCII|ENC_NA);
1816 offset+=string_len;msg_len-=string_len;
1817 string_len=tvb_strsize(tvb,offset);
1818 proto_tree_add_item(msg_tree,hf_net_file_identifier,tvb,offset,string_len,ENC_ASCII|ENC_NA);
1819 offset+=string_len;msg_len-=string_len;
1820 proto_tree_add_item(msg_tree,hf_net_file_server_port,tvb,offset,2,ENC_BIG_ENDIAN);
1821 offset+=2;msg_len-=2;
1822 proto_tree_add_item(msg_tree,hf_net_local_port,tvb,offset,2,ENC_BIG_ENDIAN);
1823 offset+=2;msg_len-=2;
1824 proto_tree_add_item(msg_tree,hf_net_file_server_address,tvb,offset,4,ENC_BIG_ENDIAN);
1825 offset+=4;msg_len-=4;
1826 break;
1827 case 0x0f:
1828 /*Set RTCP Report Interval*/
1829 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
1830 offset+=msg_len;
1831 break;
1832 case 0x10:
1833 /*Set Primary Server*/
1834 proto_tree_add_item(msg_tree,hf_net_server_id,tvb,offset,1,ENC_BIG_ENDIAN);
1835 offset+=1;
1836 break;
1837 case 0x12:
1838 /*Reset Watchdog*/
1839 proto_tree_add_item(msg_tree,hf_net_server_time_out,
1840 tvb,offset,2,ENC_BIG_ENDIAN);
1841 offset+=2;
1842 break;
1843 case 0x13:
1844 /*Set Recovery Procedure Time Interval*/
1845 proto_tree_add_item(msg_tree,hf_net_server_recovery_time_low,
1846 tvb,offset,2,ENC_BIG_ENDIAN);
1847 offset+=2;
1848 proto_tree_add_item(msg_tree,hf_net_server_recovery_time_high,
1849 tvb,offset,2,ENC_BIG_ENDIAN);
1850 offset+=2;
1851 break;
1852 case 0x14:
1853 /*Transport Reliability Layer Parameters Download*/
1854 proto_tree_add_item(msg_tree,hf_generic_data,
1855 tvb,offset,msg_len,ENC_NA);
1856 offset+=msg_len;
1857 break;
1858 case 0xff:
1859 /*Reserved*/
1860 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
1861 offset+=msg_len;
1862 break;
1863 default:
1864 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
1865 offset+=msg_len;
1869 if(msg_len){
1870 /* TODO: add Expert info to indicate there is unknown data !
1871 For the moment, this code only remove Clang Warnings about not used msg_len... */
1874 return offset;
1877 /*DONE*/
1878 static gint
1879 dissect_expansion_switch(proto_tree *msg_tree,
1880 tvbuff_t *tvb,gint offset, guint msg_len){
1881 guint expansion_cmd;
1884 expansion_cmd=tvb_get_guint8(tvb,offset);
1885 proto_tree_add_item(msg_tree,hf_expansion_switch_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
1886 offset+=1; msg_len-=1;
1887 switch(expansion_cmd){
1888 case 0x17:
1889 break;
1890 case 0x57:
1891 /*skip a byte for now, not sure what it means*/
1892 offset+=1;
1893 msg_len-=1;
1896 proto_tree_add_item(msg_tree,hf_expansion_softlabel_number,tvb,
1897 offset,1,ENC_BIG_ENDIAN);
1898 offset+=1;
1899 msg_len-=1;
1901 set_ascii_item(msg_tree,tvb,offset,msg_len);
1902 break;
1903 case 0x59:
1904 /*skip a byte for now, not sure what it means*/
1905 offset+=1;
1906 msg_len-=1;
1907 proto_tree_add_item(msg_tree,hf_expansion_softlabel_number,tvb,
1908 offset,1,ENC_BIG_ENDIAN);
1909 offset+=1;
1910 msg_len-=1;
1911 proto_tree_add_item(msg_tree,hf_basic_bit_field,
1912 tvb,offset,1,ENC_BIG_ENDIAN);
1913 proto_tree_add_item(msg_tree,hf_broadcast_icon_state,
1914 tvb,offset,1,ENC_BIG_ENDIAN);
1915 proto_tree_add_item(msg_tree,hf_broadcast_icon_cadence,
1916 tvb,offset,1,ENC_BIG_ENDIAN);
1917 offset+=1;
1918 msg_len-=1;
1919 break;
1921 offset+=msg_len;
1922 return offset;
1925 static gint
1926 dissect_expansion_phone(proto_tree *msg_tree,
1927 tvbuff_t *tvb,gint offset, guint msg_len){
1928 guint expansion_cmd;
1929 guint key_number;
1931 expansion_cmd=tvb_get_guint8(tvb,offset);
1932 proto_tree_add_item(msg_tree,hf_expansion_phone_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
1933 offset+=1; msg_len-=1;
1934 key_number=(tvb_get_guint8(tvb,offset))-64;
1936 switch(expansion_cmd){
1937 case 0x59:
1938 proto_tree_add_text(msg_tree,tvb,offset,msg_len,"Module Key Number: %i",key_number);
1939 offset+=1;
1940 msg_len-=1;
1941 break;
1943 offset+=msg_len;
1944 return offset;
1947 static gint
1948 dissect_network_phone(proto_tree *msg_tree,
1949 tvbuff_t *tvb,gint offset, guint msg_len){
1950 guint network_cmd;
1951 proto_tree *server_tree;
1952 proto_item *server;
1953 guint i;
1954 network_cmd=tvb_get_guint8(tvb,offset);
1955 proto_tree_add_item(msg_tree,hf_network_phone_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
1956 offset+=1;msg_len-=1;
1957 switch(network_cmd){
1958 case 0x00:
1959 /*Soft Reset Ack done length = 3*/
1960 break;
1961 case 0x01:
1962 /*Sanity OK done length = 3*/
1963 break;
1964 case 0x02:
1965 /*Network Manager Attributes Info*/
1966 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
1967 offset+=msg_len;
1968 break;
1969 case 0x03:
1970 /*Network Manager Diagnostic Info*/
1971 proto_tree_add_item(msg_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
1972 proto_tree_add_item(msg_tree,hf_net_phone_rx_ovr_flag,
1973 tvb,offset,1,ENC_BIG_ENDIAN);
1974 proto_tree_add_item(msg_tree,hf_net_phone_tx_ovr_flag,
1975 tvb,offset,1,ENC_BIG_ENDIAN);
1976 proto_tree_add_item(msg_tree,hf_net_phone_rx_empty_flag,
1977 tvb,offset,1,ENC_BIG_ENDIAN);
1978 proto_tree_add_item(msg_tree,hf_net_phone_invalid_msg_flag,
1979 tvb,offset,1,ENC_BIG_ENDIAN);
1980 proto_tree_add_item(msg_tree,hf_net_phone_eeprom_insane_flag,
1981 tvb,offset,1,ENC_BIG_ENDIAN);
1982 proto_tree_add_item(msg_tree,hf_net_phone_eeprom_unsafe_flag,
1983 tvb,offset,1,ENC_BIG_ENDIAN);
1984 offset+=1;
1985 break;
1986 case 0x04:
1987 /*Manager IDs*/
1988 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
1989 offset+=msg_len;
1990 break;
1991 case 0x05:
1992 /*Network Manager Options Report*/
1993 proto_tree_add_boolean(msg_tree,hf_net_phone_diag,tvb,offset,1,FALSE);
1994 proto_tree_add_item(msg_tree,hf_net_phone_rudp,tvb,offset,1,ENC_BIG_ENDIAN);
1995 offset+=1;
1996 break;
1997 case 0x08:
1998 /*Resume Connection with Server done*/
1999 break;
2000 case 0x09:
2001 /*Suspend Connection with Server done*/
2002 break;
2003 case 0x0b:
2004 /*Network Configuration Element Report*/
2005 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
2006 offset+=msg_len;
2007 break;
2008 case 0x0c:
2009 /*Server Information Report*/
2010 proto_tree_add_item(msg_tree,hf_net_phone_primary_server_id,
2011 tvb,offset,1,ENC_BIG_ENDIAN);
2012 offset+=1;msg_len-=1;
2013 for (i=1; msg_len>8; i++){
2014 /*if less than 9 not full report so punt*/
2015 /* guint16 port_num;
2016 port_num=tvb_get_ntohs(tvb,offset);
2017 if(port_num<1064)
2018 break;
2020 server=proto_tree_add_text(msg_tree,tvb,offset,9,
2021 "Server (S%d) Server ID: %X",i,i-1);
2022 server_tree=proto_item_add_subtree(server,ett_unistim);
2023 proto_tree_add_item(server_tree,
2024 hf_net_phone_server_port,
2025 tvb,offset,2,ENC_BIG_ENDIAN);
2026 offset+=2;msg_len-=2;
2027 proto_tree_add_item(server_tree,
2028 hf_net_phone_server_action,
2029 tvb,offset,1,ENC_BIG_ENDIAN);
2030 offset+=1;msg_len-=1;
2031 proto_tree_add_item(server_tree,
2032 hf_net_phone_server_retry_count,
2033 tvb,offset,1,ENC_BIG_ENDIAN);
2034 offset+=1;msg_len-=1;
2035 proto_tree_add_item(server_tree,
2036 hf_net_phone_server_failover_id,
2037 tvb,offset,1,ENC_BIG_ENDIAN);
2038 offset+=1;msg_len-=1;
2039 proto_tree_add_item(server_tree,hf_net_phone_server_ip,
2040 tvb,offset,4,ENC_BIG_ENDIAN);
2041 offset+=4;msg_len-=4;
2043 break;
2044 case 0xff:
2045 /*Reserved*/
2046 break;
2047 default:
2048 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
2049 offset+=msg_len;
2052 if(msg_len){
2053 /* TODO: add Expert info to indicate there is unknown data !
2054 For the moment, this code only remove Clang Warnings about not used msg_len... */
2057 return offset;
2059 /*DONE*/
2060 static gint
2061 dissect_audio_switch(proto_tree *msg_tree,packet_info *pinfo,
2062 tvbuff_t *tvb,gint offset,guint msg_len){
2063 proto_tree *param_tree;
2064 proto_item *param;
2065 guint audio_cmd;
2066 guint apb_op_code;
2067 guint apb_data_len;
2068 guint vocoder_param;
2069 audio_cmd=tvb_get_guint8(tvb,offset);
2070 proto_tree_add_item(msg_tree,hf_audio_switch_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
2071 offset+=1;msg_len-=1;
2072 switch(audio_cmd){
2073 case 0x00:
2074 /*Query Audio Manager*/
2075 proto_tree_add_item(msg_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
2076 proto_tree_add_item(msg_tree,hf_audio_mgr_attr,tvb,offset,1,ENC_BIG_ENDIAN);
2077 proto_tree_add_item(msg_tree,hf_audio_mgr_opts,tvb,offset,1,ENC_BIG_ENDIAN);
2078 proto_tree_add_item(msg_tree,hf_audio_mgr_alert,tvb,offset,1,ENC_BIG_ENDIAN);
2079 proto_tree_add_item(msg_tree,hf_audio_mgr_adj_rx_vol,tvb,offset,1,ENC_BIG_ENDIAN);
2080 proto_tree_add_item(msg_tree,hf_audio_mgr_def_rx_vol,tvb,offset,1,ENC_BIG_ENDIAN);
2081 proto_tree_add_item(msg_tree,hf_audio_mgr_handset,tvb,offset,1,ENC_BIG_ENDIAN);
2082 proto_tree_add_item(msg_tree,hf_audio_mgr_headset,tvb,offset,1,ENC_BIG_ENDIAN);
2083 offset+=1;
2084 proto_tree_add_item(msg_tree,hf_audio_default_rx_vol_id,
2085 tvb,offset,1,ENC_BIG_ENDIAN);
2086 offset+=1;
2087 break;
2088 case 0x01:
2089 /*Query Supervisor Headset Status*/
2090 /*done*/
2091 break;
2092 case 0x02:
2093 /*Audio Manager Options*/
2094 proto_tree_add_item(msg_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
2095 proto_tree_add_item(msg_tree,hf_audio_mgr_opt_max_vol,
2096 tvb,offset,1,ENC_BIG_ENDIAN);
2097 proto_tree_add_item(msg_tree,hf_audio_mgr_opt_adj_vol,
2098 tvb,offset,1,ENC_BIG_ENDIAN);
2099 proto_tree_add_item(msg_tree,hf_audio_mgr_opt_aa_rx_vol_rpt,
2100 tvb,offset,1,ENC_BIG_ENDIAN);
2101 proto_tree_add_item(msg_tree,hf_audio_mgr_opt_hs_on_air,
2102 tvb,offset,1,ENC_BIG_ENDIAN);
2103 proto_tree_add_item(msg_tree,hf_audio_mgr_opt_hd_on_air,
2104 tvb,offset,1,ENC_BIG_ENDIAN);
2105 proto_tree_add_item(msg_tree,hf_audio_mgr_opt_noise_squelch,
2106 tvb,offset,1,ENC_BIG_ENDIAN);
2107 offset+=1;
2108 break;
2109 case 0x04:
2110 /*Mute/Unmute*/
2111 while(msg_len>0){
2112 proto_tree_add_item(msg_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
2113 proto_tree_add_item(msg_tree,hf_audio_mgr_mute,tvb,offset,1,ENC_BIG_ENDIAN);
2114 proto_tree_add_item(msg_tree,hf_audio_mgr_tx_rx,tvb,offset,1,ENC_BIG_ENDIAN);
2115 offset+=1;msg_len-=1;
2116 proto_tree_add_item(msg_tree,hf_audio_mgr_stream_id,
2117 tvb,offset,1,ENC_BIG_ENDIAN);
2118 offset+=1;msg_len-=1;
2120 break;
2121 case 0x10:
2122 /*Transducer Based Tone On*/
2123 proto_tree_add_item(msg_tree,
2124 hf_audio_mgr_transducer_based_tone_id,
2125 tvb,offset,1,ENC_BIG_ENDIAN);
2126 proto_tree_add_item(msg_tree,hf_audio_mgr_attenuated,
2127 tvb,offset,1,ENC_BIG_ENDIAN);
2128 offset+=1;
2129 break;
2130 case 0x11:
2131 /*Transducer Based Tone Off*/
2132 proto_tree_add_item(msg_tree,hf_audio_mgr_transducer_based_tone_id,
2133 tvb,offset,1,ENC_BIG_ENDIAN);
2134 offset+=1;
2135 break;
2136 case 0x12:
2137 /*Alerting Tone Configuration*/
2138 proto_tree_add_item(msg_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
2139 proto_tree_add_item(msg_tree,hf_audio_mgr_warbler_select,
2140 tvb,offset,1,ENC_BIG_ENDIAN);
2141 proto_tree_add_item(msg_tree,hf_audio_mgr_transducer_routing,
2142 tvb,offset,1,ENC_BIG_ENDIAN);
2143 offset+=1;
2144 proto_tree_add_item(msg_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
2145 proto_tree_add_item(msg_tree,hf_audio_mgr_tone_vol_range,
2146 tvb,offset,1,ENC_BIG_ENDIAN);
2147 proto_tree_add_item(msg_tree,hf_audio_mgr_cadence_select,
2148 tvb,offset,1,ENC_BIG_ENDIAN);
2149 offset+=1;
2150 break;
2151 case 0x13:
2152 /*Special Tone Configuration*/
2153 proto_tree_add_item(msg_tree,hf_audio_mgr_transducer_routing,
2154 tvb,offset,1,ENC_BIG_ENDIAN);
2155 offset+=1;
2156 proto_tree_add_item(msg_tree,hf_audio_mgr_tone_vol_range,
2157 tvb,offset,1,ENC_BIG_ENDIAN);
2158 offset+=1;
2159 proto_tree_add_item(msg_tree,hf_audio_special_tone,tvb,offset,1,ENC_BIG_ENDIAN);
2160 offset+=1;
2161 break;
2162 case 0x14:
2163 /*Paging Tone Configuration*/
2164 proto_tree_add_item(msg_tree,hf_audio_mgr_transducer_routing,
2165 tvb,offset,1,ENC_BIG_ENDIAN);
2166 offset+=1;
2167 proto_tree_add_item(msg_tree,hf_audio_mgr_tone_vol_range,
2168 tvb,offset,1,ENC_BIG_ENDIAN);
2169 proto_tree_add_item(msg_tree,hf_audio_mgr_cadence_select,
2170 tvb,offset,1,ENC_BIG_ENDIAN);
2171 offset+=1;
2172 break;
2173 case 0x15:
2174 /*Alerting Tone Cadence Download*/
2175 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
2176 offset+=msg_len;
2177 break;
2178 /*TODO UGLY*/
2179 case 0x17:
2180 /*Paging Tone Cadence Download*/
2181 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
2182 offset+=msg_len;
2183 break;
2184 /*TODO UGLY*/
2185 case 0x18:
2186 /*Transducer Based Tone Volume Level*/
2187 proto_tree_add_item(msg_tree,hf_basic_bit_field,
2188 tvb,offset,1,ENC_BIG_ENDIAN);
2189 proto_tree_add_item(msg_tree,
2190 hf_audio_mgr_transducer_based_tone_id,
2191 tvb,offset,1,ENC_BIG_ENDIAN);
2192 proto_tree_add_item(msg_tree,hf_audio_tone_level,tvb,offset,1,ENC_BIG_ENDIAN);
2193 offset+=1;
2194 break;
2195 case 0x1a:
2196 /*Visual Transducer Based Tone Enable*/
2197 proto_tree_add_item(msg_tree,hf_audio_visual_tones,
2198 tvb,offset,1,ENC_BIG_ENDIAN);
2199 offset+=1;
2200 break;
2201 case 0x1b:
2202 /*Stream Based Tone On*/
2203 proto_tree_add_item(msg_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
2204 proto_tree_add_item(msg_tree,hf_audio_stream_based_tone_id,
2205 tvb,offset,1,ENC_BIG_ENDIAN);
2206 proto_tree_add_item(msg_tree,hf_audio_stream_based_tone_rx_tx,
2207 tvb,offset,1,ENC_BIG_ENDIAN);
2208 proto_tree_add_item(msg_tree,hf_audio_stream_based_tone_mute,
2209 tvb,offset,1,ENC_BIG_ENDIAN);
2210 offset+=1;
2211 proto_tree_add_item(msg_tree,hf_audio_stream_id,tvb,offset,1,ENC_BIG_ENDIAN);
2212 offset+=1;
2213 proto_tree_add_item(msg_tree,hf_audio_stream_based_volume,tvb,offset,1,ENC_BIG_ENDIAN);
2214 offset+=1;
2215 break;
2216 case 0x1c:
2217 /*Stream Based Tone Off*/
2218 proto_tree_add_item(msg_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
2219 proto_tree_add_item(msg_tree,hf_audio_stream_based_tone_id,
2220 tvb,offset,1,ENC_BIG_ENDIAN);
2221 proto_tree_add_item(msg_tree,hf_audio_stream_based_tone_rx_tx,
2222 tvb,offset,1,ENC_BIG_ENDIAN);
2223 offset+=1;
2224 proto_tree_add_item(msg_tree,hf_audio_stream_id,tvb,offset,1,ENC_BIG_ENDIAN);
2225 offset+=1;
2226 break;
2227 case 0x1d:
2228 /*Stream Based Tone Frequency Component List Download*/
2229 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
2230 offset+=msg_len;
2231 break;
2232 case 0x1e:
2233 /*Stream Based Tone Cadence Download*/
2234 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
2235 offset+=msg_len;
2236 break;
2237 case 0x20:
2238 /*Select Adjustable Rx Volume*/
2239 proto_tree_add_item(msg_tree,hf_audio_default_rx_vol_id,
2240 tvb,offset,1,ENC_BIG_ENDIAN);
2241 break;
2242 case 0x21:
2243 /*Set APB's Rx Volume Level*/
2244 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
2245 offset+=msg_len;
2246 break;
2247 case 0x22:
2248 /*Change Adjustable Rx Volume (quieter) DONE*/
2249 proto_tree_add_item(msg_tree,hf_generic_data,
2250 tvb,offset,msg_len,ENC_NA);
2251 offset+=msg_len;
2252 break;
2253 case 0x23:
2254 /*Change Adjustable Rx Volume (louder) DONE*/
2255 proto_tree_add_item(msg_tree,hf_generic_data,
2256 tvb,offset,msg_len,ENC_NA);
2257 offset+=msg_len;
2258 break;
2259 case 0x24:
2260 /*Adjust Default Rx Volume(quieter)*/
2261 proto_tree_add_item(msg_tree,hf_audio_default_rx_vol_id,
2262 tvb,offset,1,ENC_BIG_ENDIAN);
2263 break;
2264 case 0x25:
2265 /*Adjust Default Rx Volume(louder)*/
2266 proto_tree_add_item(msg_tree,hf_audio_default_rx_vol_id,
2267 tvb,offset,1,ENC_BIG_ENDIAN);
2268 break;
2269 case 0x28:
2270 /*APB Download*/
2271 proto_tree_add_item(msg_tree,hf_audio_apb_number,tvb,offset,1,ENC_BIG_ENDIAN);
2272 offset+=1;msg_len-=1;
2273 while(msg_len>0){
2274 apb_op_code=tvb_get_guint8(tvb,offset);
2275 proto_tree_add_item(msg_tree,hf_audio_apb_op_code,tvb,
2276 offset,1,ENC_BIG_ENDIAN);
2277 offset+=1;msg_len-=1;
2278 if(apb_op_code>0x39){
2279 /*should have a len + data*/
2280 apb_data_len=tvb_get_guint8(tvb,offset);
2281 proto_tree_add_item(msg_tree,hf_audio_apb_param_len,tvb,
2282 offset,1,ENC_BIG_ENDIAN);
2283 offset+=1;msg_len-=1;
2284 proto_tree_add_item(msg_tree,hf_audio_apb_data,tvb,
2285 offset,apb_data_len,ENC_NA);
2286 offset+=apb_data_len;msg_len-=apb_data_len;
2289 break;
2290 case 0x30:
2291 /*Open Audio Stream*/
2292 /* Set the tap info */
2293 uinfo->stream_connect = 1;
2295 proto_tree_add_item(msg_tree,hf_audio_rx_stream_id,tvb,offset,1,ENC_BIG_ENDIAN);
2296 offset+=1;msg_len-=1;
2297 proto_tree_add_item(msg_tree,hf_audio_tx_stream_id,tvb,offset,1,ENC_BIG_ENDIAN);
2298 offset+=1;msg_len-=1;
2299 proto_tree_add_item(msg_tree,hf_rx_vocoder_type,tvb,offset,1,ENC_BIG_ENDIAN);
2300 offset+=1;msg_len-=1;
2301 proto_tree_add_item(msg_tree,hf_tx_vocoder_type,tvb,offset,1,ENC_BIG_ENDIAN);
2302 offset+=1;msg_len-=1;
2303 proto_tree_add_item(msg_tree,hf_frames_per_packet,tvb,offset,1,ENC_BIG_ENDIAN);
2304 offset+=1;msg_len-=1;
2305 proto_tree_add_item(msg_tree,hf_audio_tos,tvb,offset,1,ENC_BIG_ENDIAN);
2306 proto_tree_add_item(msg_tree,hf_audio_precedence,tvb,offset,1,ENC_BIG_ENDIAN);
2307 proto_tree_add_item(msg_tree,hf_audio_frf_11,tvb,offset,1,ENC_BIG_ENDIAN);
2308 offset+=1;msg_len-=1;
2309 proto_tree_add_item(msg_tree,hf_rtcp_bucket_id,
2310 tvb,offset,1,ENC_BIG_ENDIAN);
2311 offset+=1;msg_len-=1;
2312 proto_tree_add_item(msg_tree,hf_generic_data,
2313 tvb,offset,4,ENC_NA);
2314 offset+=4;msg_len-=4;
2315 proto_tree_add_item(msg_tree,hf_audio_lcl_rtp_port,
2316 tvb,offset,2,ENC_BIG_ENDIAN);
2317 offset+=2;msg_len-=2;
2318 proto_tree_add_item(msg_tree,hf_audio_lcl_rtcp_port,
2319 tvb,offset,2,ENC_BIG_ENDIAN);
2320 offset+=2;msg_len-=2;
2322 proto_tree_add_item(msg_tree,hf_audio_far_rtp_port,
2323 tvb,offset,2,ENC_BIG_ENDIAN);
2324 offset+=2;msg_len-=2;
2325 proto_tree_add_item(msg_tree,hf_audio_far_rtcp_port,
2326 tvb,offset,2,ENC_BIG_ENDIAN);
2327 offset+=2;msg_len-=2;
2329 /* Sometimes the open stream does not specify an endpoint */
2330 /* In this circumstance the packet is truncated at the far end */
2331 /* rtp port */
2332 if(msg_len > 0){
2333 proto_tree_add_item(msg_tree,hf_audio_far_ip_add,tvb,offset,4,ENC_BIG_ENDIAN);
2334 offset+=4;msg_len-=4;
2336 guint32 far_ip_addr;
2337 address far_addr;
2338 guint16 far_port;
2340 far_ip_addr = tvb_get_ipv4(tvb, offset-4);
2341 SET_ADDRESS(&far_addr, AT_IPv4, 4, &far_ip_addr);
2343 far_port = tvb_get_ntohs(tvb, offset-8);
2344 rtp_add_address(pinfo, &far_addr, far_port, 0, "UNISTIM", pinfo->fd->num, FALSE, NULL);
2346 far_port = tvb_get_ntohs(tvb, offset-6);
2347 rtcp_add_address(pinfo, &far_addr, far_port, 0, "UNISTIM", pinfo->fd->num);
2350 break;
2351 case 0x31:
2352 /*Close Audio Stream*/
2353 /* Set the tap info */
2354 uinfo->stream_connect = 0;
2356 proto_tree_add_item(msg_tree,hf_audio_rx_stream_id,tvb,offset,1,ENC_BIG_ENDIAN);
2357 offset+=1;msg_len-=1;
2358 proto_tree_add_item(msg_tree,hf_audio_tx_stream_id,tvb,offset,1,ENC_BIG_ENDIAN);
2359 offset+=1;msg_len-=1;
2360 break;
2361 case 0x32:
2362 /*Connect Transducer*/
2363 /* Tap info again */
2364 uinfo->trans_connect = 1;
2366 proto_tree_add_item(msg_tree,hf_basic_bit_field, tvb,offset,1,ENC_BIG_ENDIAN);
2367 proto_tree_add_item(msg_tree,hf_audio_transducer_pair,tvb,offset,1,ENC_BIG_ENDIAN);
2368 proto_tree_add_item(msg_tree,hf_audio_rx_enable,tvb,offset,1,ENC_BIG_ENDIAN);
2369 proto_tree_add_item(msg_tree,hf_audio_tx_enable,tvb,offset,1,ENC_BIG_ENDIAN);
2370 offset+=1;msg_len-=1;
2371 proto_tree_add_item(msg_tree,hf_basic_bit_field, tvb,offset,1,ENC_BIG_ENDIAN);
2372 proto_tree_add_item(msg_tree,hf_audio_apb_number,tvb,offset,1,ENC_BIG_ENDIAN);
2373 proto_tree_add_item(msg_tree,hf_audio_sidetone_disable,tvb,offset,1,ENC_BIG_ENDIAN);
2374 proto_tree_add_item(msg_tree,hf_audio_destruct_additive,tvb,offset,1,ENC_BIG_ENDIAN);
2375 proto_tree_add_item(msg_tree,hf_audio_dont_force_active,tvb,offset,1,ENC_BIG_ENDIAN);
2376 offset+=1;msg_len-=1;
2377 while(msg_len>0){
2378 proto_tree_add_item(msg_tree,hf_audio_mgr_stream_id,tvb,offset,1,ENC_LITTLE_ENDIAN);
2379 offset+=1;msg_len-=1;
2381 break;
2382 case 0x34:
2383 /*Filter Block Download*/
2384 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
2385 offset+=msg_len;
2386 break;
2387 case 0x37:
2388 /*Query RTCP Statistics*/
2389 proto_tree_add_item(msg_tree,hf_audio_rtcp_bucket_id,tvb,offset,1,ENC_BIG_ENDIAN);
2390 proto_tree_add_item(msg_tree,hf_audio_clear_bucket,tvb,offset,1,ENC_BIG_ENDIAN);
2392 offset+=1;msg_len-=1;
2393 break;
2394 case 0x38:
2395 /*Configure Vocoder Parameters*/
2396 proto_tree_add_item(msg_tree,hf_audio_mgr_stream_id,tvb,offset,1,ENC_LITTLE_ENDIAN);
2397 offset+=1;msg_len-=1;
2398 proto_tree_add_item(msg_tree,hf_audio_vocoder_id,tvb,offset,1,ENC_BIG_ENDIAN),
2399 offset+=1;msg_len-=1;
2400 while(msg_len>0){
2401 param=proto_tree_add_text(msg_tree,tvb,offset,0,"Param");
2402 param_tree=proto_item_add_subtree(param,ett_unistim);
2403 vocoder_param=tvb_get_guint8(tvb,offset);
2404 proto_tree_add_item(param_tree,hf_basic_bit_field,
2405 tvb,offset,1,ENC_BIG_ENDIAN);
2406 proto_tree_add_item(param_tree,hf_audio_vocoder_param,
2407 tvb,offset,1,ENC_BIG_ENDIAN);
2408 proto_tree_add_item(param_tree,hf_audio_vocoder_entity,
2409 tvb,offset,1,ENC_BIG_ENDIAN);
2410 offset+=1;msg_len-=1;
2411 if((vocoder_param&0x0a)==0x0a){
2412 proto_tree_add_item(param_tree,hf_audio_vocoder_annexa,
2413 tvb,offset,1,ENC_BIG_ENDIAN);
2414 proto_tree_add_item(param_tree,hf_audio_vocoder_annexb,
2415 tvb,offset,1,ENC_BIG_ENDIAN);
2416 offset+=1;msg_len-=1;
2418 else if((vocoder_param&0x0b)==0x0b){
2419 proto_tree_add_item(param_tree,hf_audio_sample_rate,
2420 tvb,offset,1,ENC_BIG_ENDIAN);
2421 offset+=1;msg_len-=1;
2423 else if((vocoder_param&0x0c)==0x0c){
2424 proto_tree_add_item(param_tree,hf_audio_rtp_type,
2425 tvb,offset,1,ENC_BIG_ENDIAN);
2426 offset+=1;msg_len-=1;
2428 else if((vocoder_param&0x20)==0x20){
2429 proto_tree_add_item(param_tree,hf_audio_bytes_per_frame,
2430 tvb,offset,2,ENC_BIG_ENDIAN);
2431 offset+=2;msg_len-=2;
2434 break;
2435 case 0x39:
2436 /*Query RTCP Bucket's SDES Information*/
2437 proto_tree_add_item(msg_tree,hf_audio_source_descr,tvb,offset,msg_len,ENC_BIG_ENDIAN);
2438 proto_tree_add_item(msg_tree,hf_audio_sdes_rtcp_bucket,tvb,offset,msg_len,ENC_BIG_ENDIAN);
2439 offset+=1;msg_len-=1;
2440 break;
2441 case 0x3a:
2442 /*Jitter Buffer Parameters Configuration*/
2443 proto_tree_add_item(msg_tree,hf_audio_rx_stream_id,tvb,offset,1,ENC_BIG_ENDIAN);
2444 offset+=1;msg_len-=1;
2445 proto_tree_add_item(msg_tree,hf_audio_desired_jitter,tvb,offset,1,ENC_BIG_ENDIAN);
2446 offset+=1;msg_len-=1;
2447 proto_tree_add_item(msg_tree,hf_audio_high_water_mark,tvb,offset,1,ENC_BIG_ENDIAN);
2448 offset+=1;msg_len-=1;
2449 proto_tree_add_item(msg_tree,hf_audio_early_packet_resync_thresh,tvb,
2450 offset,4,ENC_BIG_ENDIAN);
2451 offset+=4;msg_len-=4;
2452 proto_tree_add_item(msg_tree,hf_audio_late_packet_resync_thresh,tvb,
2453 offset,4,ENC_BIG_ENDIAN);
2454 offset+=4;msg_len-=4;
2455 break;
2456 case 0x3b:
2457 /*Resolve Port Mapping*/
2458 proto_tree_add_item(msg_tree,hf_audio_resolve_phone_port,tvb,offset,2,ENC_BIG_ENDIAN);
2459 offset+=2;msg_len-=2;
2460 proto_tree_add_item(msg_tree,hf_audio_far_end_echo_port,tvb,offset,2,ENC_BIG_ENDIAN);
2461 offset+=2;msg_len-=2;
2462 proto_tree_add_item(msg_tree,hf_audio_far_end_ip_address,tvb,offset,4,ENC_BIG_ENDIAN);
2463 offset+=4;msg_len-=4;
2464 break;
2465 case 0x3c:
2466 /*Port Mapping Discovery Ack*/
2467 proto_tree_add_item(msg_tree,hf_audio_nat_port,tvb,offset,2,ENC_BIG_ENDIAN);
2468 offset+=2;msg_len-=2;
2469 proto_tree_add_item(msg_tree,hf_audio_nat_ip_address,tvb,offset,4,ENC_BIG_ENDIAN);
2470 offset+=4;msg_len-=4;
2471 break;
2472 case 0x3d:
2473 /*Query Audio Stream Status*/
2474 proto_tree_add_item(msg_tree,hf_audio_direction_code,tvb,offset,1,ENC_BIG_ENDIAN);
2475 offset+=1;msg_len-=1;
2476 proto_tree_add_item(msg_tree,hf_audio_mgr_stream_id,tvb,offset,1,ENC_BIG_ENDIAN);
2477 offset+=1;msg_len-=1;
2478 break;
2479 case 0xff:
2480 /*Reserved*/
2481 default:
2482 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
2483 offset+=msg_len;
2486 if(msg_len){
2487 /* TODO: add Expert info to indicate there is unknown data !
2488 For the moment, this code only remove Clang Warnings about not used msg_len... */
2491 return offset;
2494 /*DONE*/
2495 static gint
2496 dissect_audio_phone(proto_tree *msg_tree,
2497 tvbuff_t *tvb,gint offset,guint msg_len){
2498 guint audio_cmd;
2499 guint apb_op_code;
2500 guint apb_data_len;
2501 guint stream_dir;
2502 guint stream_state;
2503 audio_cmd=tvb_get_guint8(tvb,offset);
2504 proto_tree_add_item(msg_tree,hf_audio_phone_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
2505 offset+=1;msg_len-=1;
2506 switch(audio_cmd){
2507 case 0x00:
2508 /*Handset Connected length =3*/
2509 /* Set the tap info */
2510 uinfo->hook_state = 1;
2511 break;
2512 case 0x01:
2513 /*Handset Disconnected length =3*/
2514 /* Set the tap info */
2515 uinfo->hook_state = 0;
2516 break;
2517 case 0x02:
2518 /*Headset Connected length =3*/
2519 /* Set the tap info */
2520 uinfo->hook_state = 1;
2521 break;
2522 case 0x03:
2523 /*Headset Disconnected length =3*/
2524 /* Set the tap info */
2525 uinfo->hook_state = 0;
2526 break;
2527 case 0x04:
2528 /*Supervisor Headset Connected length =3*/
2529 /* Set the tap info */
2530 uinfo->hook_state = 1;
2531 break;
2532 case 0x05:
2533 /*Supervisor Headset Disconnected length =3*/
2534 /* Set the tap info */
2535 uinfo->hook_state = 0;
2536 break;
2537 case 0x07:
2538 /*Audio Manager Attributes Info*/
2539 proto_tree_add_item(msg_tree,hf_audio_hf_support,tvb,offset,1,ENC_BIG_ENDIAN);
2540 offset+=1;msg_len-=1;
2541 while(msg_len>0){
2542 proto_tree_add_item(msg_tree,hf_rx_vocoder_type,tvb,offset,1,ENC_BIG_ENDIAN);
2543 offset+=1;msg_len-=1;
2545 break;
2546 case 0x08:
2547 /*Audio Manager Options Report*/
2548 proto_tree_add_item(msg_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
2549 proto_tree_add_item(msg_tree,hf_audio_opt_rpt_max,tvb,offset,1,ENC_BIG_ENDIAN);
2550 proto_tree_add_item(msg_tree,hf_audio_opt_rpt_adj_vol,tvb,offset,1,ENC_BIG_ENDIAN);
2551 proto_tree_add_item(msg_tree,hf_audio_opt_rpt_auto_adj_vol,tvb,offset,1,ENC_BIG_ENDIAN);
2552 proto_tree_add_item(msg_tree,hf_audio_opt_rpt_hs_on_air,tvb,offset,1,ENC_BIG_ENDIAN);
2553 proto_tree_add_item(msg_tree,hf_audio_opt_rpt_hd_on_air,tvb,offset,1,ENC_BIG_ENDIAN);
2554 proto_tree_add_item(msg_tree,hf_audio_opt_rpt_noise_squelch,tvb,offset,1,ENC_BIG_ENDIAN);
2555 offset+=1;msg_len-=1;
2556 break;
2557 case 0x09:
2558 /*Adjustable Rx Volume Report*/
2559 proto_tree_add_item(msg_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
2560 proto_tree_add_item(msg_tree,hf_audio_rx_vol_apb_rpt,tvb,offset,1,ENC_BIG_ENDIAN);
2561 proto_tree_add_item(msg_tree,hf_audio_rx_vol_vol_up,tvb,offset,1,ENC_BIG_ENDIAN);
2562 proto_tree_add_item(msg_tree,hf_audio_rx_vol_vol_floor,tvb,offset,1,ENC_BIG_ENDIAN);
2563 proto_tree_add_item(msg_tree,hf_audio_rx_vol_vol_ceiling,tvb,offset,1,ENC_BIG_ENDIAN);
2564 offset+=1;msg_len-=1;
2565 break;
2566 case 0x0a:
2567 /*Adjustable Rx Volume Information*/
2568 proto_tree_add_item(msg_tree,hf_audio_current_adj_vol_id,tvb,offset,1,ENC_BIG_ENDIAN);
2569 proto_tree_add_item(msg_tree,hf_audio_rx_vol_apb_rpt,tvb,offset,1,ENC_BIG_ENDIAN);
2570 proto_tree_add_item(msg_tree,hf_audio_rx_vol_vol_up,tvb,offset,1,ENC_BIG_ENDIAN);
2571 proto_tree_add_item(msg_tree,hf_audio_rx_vol_vol_floor,tvb,offset,1,ENC_BIG_ENDIAN);
2572 proto_tree_add_item(msg_tree,hf_audio_rx_vol_vol_ceiling,tvb,offset,1,ENC_BIG_ENDIAN);
2573 offset+=1;msg_len-=1;
2574 proto_tree_add_item(msg_tree,hf_audio_current_rx_level,tvb,offset,1,ENC_BIG_ENDIAN);
2575 offset+=1;msg_len-=1;
2576 proto_tree_add_item(msg_tree,hf_audio_current_rx_range,tvb,offset,1,ENC_BIG_ENDIAN);
2577 offset+=1;msg_len-=1;
2578 break;
2579 case 0x0b:
2580 /*APB's Default Rx Volume Value*/
2581 proto_tree_add_item(msg_tree,hf_audio_current_adj_vol_id,tvb,offset,1,ENC_BIG_ENDIAN);
2582 proto_tree_add_item(msg_tree,hf_audio_rx_vol_apb_rpt,tvb,offset,1,ENC_BIG_ENDIAN);
2583 proto_tree_add_item(msg_tree,hf_audio_rx_vol_vol_up,tvb,offset,1,ENC_BIG_ENDIAN);
2584 proto_tree_add_item(msg_tree,hf_audio_rx_vol_vol_floor,tvb,offset,1,ENC_BIG_ENDIAN);
2585 proto_tree_add_item(msg_tree,hf_audio_rx_vol_vol_ceiling,tvb,offset,1,ENC_BIG_ENDIAN);
2586 offset+=1;msg_len-=1;
2587 proto_tree_add_item(msg_tree,hf_audio_current_rx_level,tvb,offset,1,ENC_BIG_ENDIAN);
2588 offset+=1;msg_len-=1;
2589 proto_tree_add_item(msg_tree,hf_audio_current_rx_range,tvb,offset,1,ENC_BIG_ENDIAN);
2590 offset+=1;msg_len-=1;
2591 break;
2592 case 0x0c:
2593 /*Alerting Tone Select*/
2594 proto_tree_add_item(msg_tree,hf_audio_cadence_select,tvb,offset,1,ENC_BIG_ENDIAN);
2595 proto_tree_add_item(msg_tree,hf_audio_warbler_select,tvb,offset,1,ENC_BIG_ENDIAN);
2596 offset+=1;msg_len-=1;
2597 break;
2598 case 0x0e:
2599 /*RTCP Statistics Report UGLY*/
2600 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
2601 offset+=msg_len;
2602 break;
2603 case 0x0f:
2604 /*Open Audio Stream Report*/
2605 proto_tree_add_item(msg_tree,hf_audio_open_stream_rpt,tvb,offset,1,ENC_BIG_ENDIAN);
2606 offset+=1;msg_len-=1;
2607 break;
2608 case 0x10:
2609 /*RTCP Bucket SDES Information Report*/
2610 proto_tree_add_item(msg_tree,hf_audio_sdes_rpt_source_desc,tvb,offset,1,ENC_BIG_ENDIAN);
2611 proto_tree_add_item(msg_tree,hf_audio_sdes_rpt_buk_id,tvb,offset,1,ENC_BIG_ENDIAN);
2612 offset+=1;msg_len-=1;
2613 set_ascii_item(msg_tree,tvb,offset,msg_len);
2614 offset+=msg_len;
2615 break;
2616 case 0x11:
2617 /*Port Mapping Discovery*/
2618 proto_tree_add_item(msg_tree,hf_audio_phone_port,tvb,offset,2,ENC_BIG_ENDIAN);
2619 offset+=2;msg_len-=2;
2620 proto_tree_add_item(msg_tree,hf_audio_phone_ip,tvb,offset,4,ENC_BIG_ENDIAN);
2621 offset+=4;msg_len-=4;
2622 break;
2623 case 0x12:
2624 /*Resolve Port Mapping*/
2625 proto_tree_add_item(msg_tree,hf_audio_nat_listen_port,tvb,offset,2,ENC_BIG_ENDIAN);
2626 offset+=2;msg_len-=2;
2627 proto_tree_add_item(msg_tree,hf_audio_nat_ip,tvb,offset,4,ENC_BIG_ENDIAN);
2628 offset+=4;msg_len-=4;
2629 proto_tree_add_item(msg_tree,hf_audio_nat_add_len,tvb,offset,1,ENC_BIG_ENDIAN);
2630 offset+=1;msg_len-=1;
2631 proto_tree_add_item(msg_tree,hf_audio_phone_port,tvb,offset,2,ENC_BIG_ENDIAN);
2632 offset+=2;msg_len-=2;
2633 proto_tree_add_item(msg_tree,hf_audio_phone_ip,tvb,offset,4,ENC_BIG_ENDIAN);
2634 offset+=4;msg_len-=4;
2635 proto_tree_add_item(msg_tree,hf_audio_phone_add_len,tvb,offset,1,ENC_BIG_ENDIAN);
2636 offset+=1;msg_len-=1;
2637 break;
2638 case 0x13:
2639 /*Audio Stream Status Report*/
2640 stream_dir=tvb_get_guint8(tvb,offset);
2641 proto_tree_add_item(msg_tree,hf_audio_stream_direction_code,tvb,offset,1,ENC_BIG_ENDIAN);
2642 offset+=1;msg_len-=1;
2643 proto_tree_add_item(msg_tree,hf_audio_mgr_stream_id,tvb,offset,1,ENC_BIG_ENDIAN);
2644 offset+=1;msg_len-=1;
2645 stream_state=tvb_get_guint8(tvb,offset);
2646 proto_tree_add_item(msg_tree,hf_audio_stream_state,tvb,offset,1,ENC_BIG_ENDIAN);
2647 offset+=1;msg_len-=1;
2648 if((AUDIO_STREAM_STATE&stream_state)!=AUDIO_STREAM_STATE)
2649 break;
2650 if((AUDIO_STREAM_DIRECTION_RX&stream_dir)==AUDIO_STREAM_DIRECTION_RX)
2651 proto_tree_add_item(msg_tree,hf_rx_vocoder_type,tvb,offset,1,ENC_BIG_ENDIAN);
2652 else if((AUDIO_STREAM_DIRECTION_TX&stream_dir)==AUDIO_STREAM_DIRECTION_TX)
2653 proto_tree_add_item(msg_tree,hf_tx_vocoder_type,tvb,offset,1,ENC_BIG_ENDIAN);
2654 else
2655 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,1,ENC_NA);
2656 offset+=1;msg_len-=1;
2657 proto_tree_add_item(msg_tree,hf_frames_per_packet,tvb,offset,1,ENC_BIG_ENDIAN);
2658 offset+=1;msg_len-=1;
2659 proto_tree_add_item(msg_tree,hf_audio_tos,tvb,offset,1,ENC_BIG_ENDIAN);
2660 proto_tree_add_item(msg_tree,hf_audio_precedence,tvb,offset,1,ENC_BIG_ENDIAN);
2661 proto_tree_add_item(msg_tree,hf_audio_frf_11,tvb,offset,1,ENC_BIG_ENDIAN);
2662 offset+=1;msg_len-=1;
2663 proto_tree_add_item(msg_tree,hf_rtcp_bucket_id,tvb,offset,1,ENC_BIG_ENDIAN);
2664 offset+=1;msg_len-=1;
2665 proto_tree_add_item(msg_tree,hf_audio_lcl_rtp_port,tvb,offset,2,ENC_BIG_ENDIAN);
2666 offset+=2;msg_len-=2;
2667 proto_tree_add_item(msg_tree,hf_audio_lcl_rtcp_port,tvb,offset,2,ENC_BIG_ENDIAN);
2668 offset+=2;msg_len-=2;
2669 proto_tree_add_item(msg_tree,hf_audio_far_rtp_port,tvb,offset,2,ENC_BIG_ENDIAN);
2670 offset+=2;msg_len-=2;
2671 proto_tree_add_item(msg_tree,hf_audio_far_rtcp_port,tvb,offset,2,ENC_BIG_ENDIAN);
2672 offset+=2;msg_len-=2;
2673 proto_tree_add_item(msg_tree,hf_audio_far_ip_add,tvb,offset,4,ENC_BIG_ENDIAN);
2674 offset+=4;msg_len-=4;
2675 proto_tree_add_item(msg_tree,hf_audio_transducer_list_length,tvb,offset,1,ENC_BIG_ENDIAN);
2676 offset+=1;msg_len-=1;
2677 while(msg_len>0){
2678 proto_tree_add_item(msg_tree,hf_audio_transducer_pair,tvb,offset,1,ENC_BIG_ENDIAN);
2679 offset+=1;msg_len-=1;
2681 case 0x14:
2682 /*Query APB Response*/
2683 proto_tree_add_item(msg_tree,hf_audio_apb_number,tvb,offset,1,ENC_BIG_ENDIAN);
2684 offset+=1;msg_len-=1;
2685 while(msg_len>0){
2686 apb_op_code=tvb_get_guint8(tvb,offset);
2687 proto_tree_add_item(msg_tree,hf_audio_apb_op_code,tvb,
2688 offset,1,ENC_BIG_ENDIAN);
2689 offset+=1;msg_len-=1;
2690 if(apb_op_code>0x39){
2691 /*should have a len + data*/
2692 apb_data_len=tvb_get_guint8(tvb,offset);
2693 proto_tree_add_item(msg_tree,hf_audio_apb_param_len,tvb,
2694 offset,1,ENC_BIG_ENDIAN);
2695 offset+=1;msg_len-=1;
2696 proto_tree_add_item(msg_tree,hf_audio_apb_data,tvb,
2697 offset,apb_data_len,ENC_NA);
2698 offset+=apb_data_len;msg_len-=apb_data_len;
2701 break;
2702 case 0xff:
2703 /*Reserved*/
2704 break;
2705 default:
2706 proto_tree_add_item(msg_tree,hf_generic_data,tvb,offset,msg_len,ENC_NA);
2707 offset+=msg_len;
2710 if(msg_len){
2711 /* TODO: add Expert info to indicate there is unknown data !
2712 For the moment, this code only remove Clang Warnings about not used msg_len... */
2715 return offset;
2718 static void
2719 set_ascii_item(proto_tree *msg_tree,tvbuff_t *tvb, gint offset,guint msg_len){
2720 proto_tree_add_text(msg_tree,tvb,offset,msg_len,"DATA: %s",
2721 tvb_format_text(tvb,offset,msg_len));
2724 void
2725 proto_register_unistim(void){
2727 module_t* unistim_module;
2729 static hf_register_info hf[] = {
2730 { &hf_unistim_seq_nu,
2731 { "RUDP Seq Num","unistim.num",FT_UINT32,
2732 BASE_HEX|BASE_RANGE_STRING, RVALS(sequence_numbers), 0x0, NULL, HFILL}
2734 { &hf_unistim_cmd_add,
2735 { "UNISTIM CMD Address","unistim.add",FT_UINT8,
2736 BASE_HEX,VALS(command_address),0x0,NULL,HFILL}
2738 { &hf_uftp_command,
2739 { "UFTP CMD","uftp.cmd",FT_UINT8,
2740 BASE_HEX,VALS(uftp_commands),0x0,NULL,HFILL}
2742 { &hf_uftp_datablock_size,
2743 { "UFTP Datablock Size","uftp.blocksize",FT_UINT32,
2744 BASE_DEC,NULL,0x0,NULL,HFILL}
2746 { &hf_uftp_datablock_limit,
2747 { "UFTP Datablock Limit","uftp.limit",FT_UINT8,
2748 BASE_DEC,NULL,0x0,NULL,HFILL}
2750 { &hf_uftp_filename,
2751 { "UFTP Filename","uftp.filename",FT_STRINGZ,
2752 BASE_NONE,NULL,0x0,NULL,HFILL}
2754 { &hf_uftp_datablock,
2755 { "UFTP Data Block","uftp.datablock",FT_BYTES,
2756 BASE_NONE,NULL,0x0,NULL,HFILL}
2758 { &hf_unistim_packet_type,
2759 { "RUDP Pkt type","unistim.type",FT_UINT8,
2760 BASE_DEC, VALS(packet_names),0x0,NULL,HFILL}
2762 { &hf_unistim_payload,
2763 { "UNISTIM Payload","unistim.pay",FT_UINT8,
2764 BASE_HEX, VALS(payload_names),0x0,NULL,HFILL}
2766 { &hf_unistim_len ,
2767 { "UNISTIM CMD Length","unistim.len",FT_UINT8,
2768 BASE_DEC,NULL,0x0,NULL,HFILL}
2770 { &hf_basic_bit_field,
2771 {"FLAGS","unistim.bit.fields",FT_BOOLEAN,
2772 8,TFS(&basic_bit_yn),0xff,NULL,HFILL}
2774 { &hf_basic_switch_cmd ,
2775 {"Basic Cmd (switch)","unistim.basic.switch",FT_UINT8,
2776 BASE_HEX,VALS(basic_switch_msgs),0x0,NULL,HFILL}
2778 { &hf_basic_phone_cmd ,
2779 {"Basic Cmd (phone)","unistim.basic.phone",FT_UINT8,
2780 BASE_HEX,VALS(basic_phone_msgs),0x0,NULL,HFILL}
2782 { &hf_broadcast_switch_cmd ,
2783 {"Broadcast Cmd (switch)","unistim.broadcast.switch",FT_UINT8,
2784 BASE_HEX,VALS(broadcast_switch_msgs),0x0,NULL,HFILL}
2786 #if 0
2787 { &hf_broadcast_phone_cmd ,
2788 {"Broadcast Cmd (phone)","unistim.broadcast.phone",FT_UINT8,
2789 BASE_HEX,VALS(broadcast_phone_msgs),0x0,NULL,HFILL}
2791 #endif
2792 { &hf_audio_switch_cmd ,
2793 {"Audio Cmd (switch)","unistim.audio.switch",FT_UINT8,
2794 BASE_HEX,VALS(audio_switch_msgs),0x0,NULL,HFILL}
2796 { &hf_audio_phone_cmd ,
2797 {"Audio Cmd (phone)","unistim.audio.phone",FT_UINT8,
2798 BASE_HEX,VALS(audio_phone_msgs),0x0,NULL,HFILL}
2800 { &hf_display_switch_cmd ,
2801 {"Display Cmd (switch)","unistim.display.switch",FT_UINT8,
2802 BASE_HEX,VALS(display_switch_msgs),0x0,NULL,HFILL}
2804 { &hf_display_phone_cmd ,
2805 {"Display Cmd (phone)","unistim.display.phone",FT_UINT8,
2806 BASE_HEX,VALS(display_phone_msgs),0x0,NULL,HFILL}
2808 { &hf_key_switch_cmd ,
2809 {"Key Cmd (switch)","unistim.key.switch",FT_UINT8,
2810 BASE_HEX,VALS(key_switch_msgs),0x0,NULL,HFILL}
2812 { &hf_key_phone_cmd ,
2813 {"Key Cmd (phone)","unistim.key.phone",FT_UINT8,
2814 BASE_HEX,VALS(key_phone_msgs),0x0,NULL,HFILL}
2816 { &hf_network_switch_cmd ,
2817 {"Network Cmd (switch)","unistim.network.switch",FT_UINT8,
2818 BASE_HEX,VALS(network_switch_msgs),0x0,NULL,HFILL}
2820 { &hf_network_phone_cmd ,
2821 {"Network Cmd (phone)","unistim.network.phone",FT_UINT8,
2822 BASE_HEX,VALS(network_phone_msgs),0x0,NULL,HFILL}
2824 { &hf_terminal_id,
2825 {"Terminal ID","unistim.terminal.id",FT_IPv4,
2826 BASE_NONE,NULL,0x0,NULL,HFILL}
2828 { &hf_broadcast_year,
2829 {"Year","unistim.broadcast.year",FT_UINT8,
2830 BASE_DEC,NULL,0x7f,NULL,HFILL}
2832 { &hf_broadcast_month,
2833 {"Month","unistim.broadcast.month",FT_UINT8,
2834 BASE_DEC,NULL,0x0,NULL,HFILL}
2836 { &hf_broadcast_day,
2837 {"Day","unistim.broadcast.day",FT_UINT8,
2838 BASE_DEC,NULL,0x0,NULL,HFILL}
2840 { &hf_broadcast_hour,
2841 {"Hour","unistim.broadcast.hour",FT_UINT8,
2842 BASE_DEC,NULL,0x0,NULL,HFILL}
2844 { &hf_broadcast_minute,
2845 {"Minute","unistim.broadcast.minute",FT_UINT8,
2846 BASE_DEC,NULL,0x0,NULL,HFILL}
2848 { &hf_broadcast_second,
2849 {"Second","unistim.broadcast.second",FT_UINT8,
2850 BASE_DEC,NULL,0x0,NULL,HFILL}
2852 { &hf_net_diag_flag,
2853 {"Query Network Manager Diagnostic","unistim.query.diagnostic",
2854 FT_BOOLEAN,8, NULL,
2855 QUERY_NETWORK_MANAGER_DIAGNOSTIC, NULL,HFILL}
2857 { &hf_net_managers_flag,
2858 {"Query Network Manager Managers","unistim.query.managers",
2859 FT_BOOLEAN,8, NULL,
2860 QUERY_NETWORK_MANAGER_MANAGERS, NULL,HFILL}
2862 { &hf_net_attributes_flag,
2863 {"Query Network Manager Attributes","unistim.query.attributes",
2864 FT_BOOLEAN, 8,NULL,
2865 QUERY_NETWORK_MANAGER_ATTRIBUTES,NULL,HFILL}
2867 { &hf_net_serv_info_flag,
2868 {"Query Network Manager Server Info","unistim.query.serverInfo",
2869 FT_BOOLEAN, 8,NULL,
2870 QUERY_NETWORK_MANAGER_SERVER_INFO,NULL,HFILL}
2872 { &hf_net_options_flag,
2873 {"Query Network Manager Options","unistim.query.options",
2874 FT_BOOLEAN, 8,NULL,
2875 QUERY_NETWORK_MANAGER_OPTIONS,NULL,HFILL}
2877 { &hf_net_sanity_flag,
2878 {"Query Network Manager Sanity","unistim.query.sanity",
2879 FT_BOOLEAN, 8,NULL,
2880 QUERY_NETWORK_MANAGER_SANITY,NULL,HFILL}
2882 { &hf_net_enable_diag,
2883 {"Network Manager Enable DIAG","unistim.enable.diag",
2884 FT_BOOLEAN, 8,NULL,
2885 NETWORK_MANAGER_ENABLE_DIAG,NULL,HFILL}
2887 { &hf_net_enable_rudp,
2888 {"Network Manager Enable RUDP","unistim.enable.network.rel.udp",
2889 FT_BOOLEAN, 8,NULL,
2890 NETWORK_MANAGER_ENABLE_RUDP,NULL,HFILL}
2892 { &hf_net_server_id,
2893 {"Download Server ID","unistim.download.id",FT_UINT8,
2894 BASE_HEX, VALS(network_server_id),0x00,NULL,HFILL}
2896 { &hf_net_server_port,
2897 {"Download Server Port","unistim.download.port",FT_UINT16,
2898 BASE_DEC, NULL,0x00,NULL,HFILL}
2900 { &hf_net_server_action,
2901 {"Download Server Action","unistim.download.action",FT_UINT8,
2902 BASE_HEX, VALS(server_action),0x00,NULL,HFILL}
2904 { &hf_net_server_retry_count,
2905 {"Download Retry Count","unistim.download.retry",FT_UINT8,
2906 BASE_DEC, NULL,0x00,NULL,HFILL}
2908 { &hf_net_server_failover_id,
2909 {"Download Failover Server ID","unistim.download.failover",FT_UINT8,
2910 BASE_HEX, VALS(network_server_id),0x00,NULL,HFILL}
2912 { &hf_net_server_ip_address,
2913 {"Download Server Address","unistim.download.address",FT_UINT32,
2914 BASE_HEX, NULL,0x00,NULL,HFILL}
2916 { &hf_net_server_time_out,
2917 {"Watchdog Timeout","unistim.watchdog.timeout",FT_UINT16,
2918 BASE_DEC, NULL,0x00,NULL,HFILL}
2920 { &hf_net_server_config_element,
2921 {"Configure Network Element","unistim.config.element",FT_UINT8,
2922 BASE_HEX, VALS(network_elements),0x00,NULL,HFILL}
2924 { &hf_net_server_recovery_time_low,
2925 {"Recovery Procedure Idle Low Boundary","unistim.recovery.low",FT_UINT16,
2926 BASE_DEC, NULL,0x00,NULL,HFILL}
2928 { &hf_net_server_recovery_time_high,
2929 {"Recovery Procedure Idle High Boundary","unistim.recovery.high",FT_UINT16,
2930 BASE_DEC, NULL,0x00,NULL,HFILL}
2932 { &hf_net_phone_rx_ovr_flag,
2933 {"Receive Buffer Overflow","unistim.receive.overflow",
2934 FT_BOOLEAN, 8,NULL,
2935 RX_BUFFER_OVERFLOW,NULL,HFILL}
2937 { &hf_net_phone_tx_ovr_flag,
2938 {"Transmit Buffer Overflow","unistim.trans.overflow",
2939 FT_BOOLEAN, 8,NULL,
2940 TX_BUFFER_OVERFLOW,NULL,HFILL}
2942 { &hf_net_phone_rx_empty_flag,
2943 {"Receive Buffer Unexpectedly Empty","unistim.receive.empty",
2944 FT_BOOLEAN, 8,NULL,
2945 RX_UNEXPECT_EMPTY,NULL,HFILL}
2947 { &hf_net_phone_invalid_msg_flag,
2948 {"Received Invalid MSG","unistim.invalid.msg",
2949 FT_BOOLEAN, 8,NULL,
2950 INVALID_MSG,NULL,HFILL}
2952 { &hf_net_phone_eeprom_insane_flag,
2953 {"EEProm Insane","unistim.eeprom.insane",
2954 FT_BOOLEAN, 8,NULL,
2955 EEPROM_INSANE,NULL,HFILL}
2957 { &hf_net_phone_eeprom_unsafe_flag,
2958 {"EEProm Unsafe","unistim.eeprom.unsafe",
2959 FT_BOOLEAN, 8,NULL,
2960 EEPROM_UNSAFE,NULL,HFILL}
2962 { &hf_net_phone_diag,
2963 {"Diagnostic Command Enabled","unistim.diag.enabled",FT_BOOLEAN,
2964 8,NULL,NETWORK_MGR_REPORT_DIAG,NULL,HFILL}
2966 { &hf_net_phone_rudp,
2967 {"Reliable UDP Active","unistim.rudp.active",FT_BOOLEAN,
2968 8,NULL,NETWORK_MGR_REPORT_RUDP,NULL,HFILL}
2970 { &hf_basic_switch_query_flags,
2971 {"Query Basic Manager","unistim.basic.query",FT_UINT8,
2972 BASE_HEX, NULL,0x00,"INITIAL PHONE QUERY",HFILL}
2974 { &hf_basic_switch_query_attr,
2975 {"Query Basic Manager Attributes","unistim.basic.attrs",FT_BOOLEAN,
2976 8,NULL,BASIC_QUERY_ATTRIBUTES,"Basic Query Attributes",HFILL}
2978 { &hf_basic_switch_query_opts,
2979 {"Query Basic Manager Options","unistim.basic.opts",FT_BOOLEAN,
2980 8,NULL,BASIC_QUERY_OPTIONS,"Basic Query Options",HFILL}
2982 { &hf_basic_switch_query_fw,
2983 {"Query Basic Switch Firmware","unistim.basic.fw",FT_BOOLEAN,
2984 8,NULL,BASIC_QUERY_FW,"Basic Query Firmware",HFILL}
2986 { &hf_basic_switch_query_hw_id,
2987 {"Query Basic Manager Hardware ID","unistim.basic.hwid",FT_BOOLEAN,
2988 8,NULL,BASIC_QUERY_HW_ID,"Basic Query Hardware ID",HFILL}
2990 { &hf_basic_switch_query_it_type,
2991 {"Query Basic Manager Phone Type","unistim.basic.type",FT_BOOLEAN,
2992 8,NULL,BASIC_QUERY_IT_TYPE,"Basic Query Phone Type",HFILL}
2994 { &hf_basic_switch_query_prod_eng_code,
2995 {"Query Basic Manager Prod Eng Code","unistim.basic.code",FT_BOOLEAN,
2996 8,NULL,BASIC_QUERY_PROD_ENG_CODE,"Basic Query Production Engineering Code",HFILL}
2998 { &hf_basic_switch_query_gray_mkt_info,
2999 {"Query Basic Manager Gray Mkt Info","unistim.basic.gray",FT_BOOLEAN,
3000 8,NULL,BASIC_QUERY_GRAY_MKT_INFO,"Basic Query Gray Market Info",HFILL}
3002 { &hf_basic_switch_options_secure,
3003 {"Basic Switch Options Secure Code","unistim.basic.secure",FT_BOOLEAN,
3004 8,NULL,BASIC_OPTION_SECURE,NULL,HFILL}
3006 { &hf_basic_switch_element_id,
3007 {"Basic Element ID","unistim.basic.element.id",FT_UINT8,
3008 BASE_HEX,NULL,0x00,NULL,HFILL}
3010 { &hf_basic_switch_eeprom_data,
3011 {"EEProm Data","unistim.basic.eeprom.data",FT_BYTES,
3012 BASE_NONE,NULL,0x00,NULL,HFILL}
3014 { &hf_basic_phone_eeprom_stat_cksum,
3015 {"Basic Phone EEProm Static Checksum","unistim.static.cksum",FT_UINT8,
3016 BASE_HEX,NULL,0x0,NULL,HFILL}
3018 { &hf_basic_phone_eeprom_dynam,
3019 {"Basic Phone EEProm Dynamic Checksum","unistim.dynam.cksum",FT_UINT8,
3020 BASE_HEX,NULL,0x00,NULL,HFILL}
3022 { &hf_basic_phone_eeprom_net_config_cksum,
3023 {"Basic Phone EEProm Net Config Checksum","unistim.netconfig.cksum",FT_UINT8,
3024 BASE_HEX,NULL,0x00,NULL,HFILL}
3026 { &hf_basic_phone_hw_id,
3027 {"Basic Phone Hardware ID","unistim.basic.hw.id",FT_BYTES,
3028 BASE_NONE,NULL,0x00,NULL,HFILL}
3030 { &hf_basic_phone_fw_ver,
3031 {"Basic Phone Firmware Version","unistim.basic.fw.ver",FT_STRING,
3032 BASE_NONE,NULL,0x00,NULL,HFILL}
3034 { &hf_key_code,
3035 {"Key Name","unistim.key.name",FT_UINT8,
3036 BASE_HEX,VALS(key_names),0x3f,NULL,HFILL}
3038 { &hf_key_command,
3039 {"Key Action","unistim.key.action",FT_UINT8,
3040 BASE_HEX,VALS(key_cmds),0xc0,NULL,HFILL}
3042 { &hf_icon_id,
3043 {"Icon ID","unistim.icon.id",FT_UINT8,
3044 BASE_HEX,NULL, DISPLAY_ICON_ID,NULL,HFILL}
3046 { &hf_broadcast_icon_state,
3047 {"Icon State","unistim.icon.state",FT_UINT8,
3048 BASE_HEX,VALS(bcast_icon_states),0x1f,NULL,HFILL}
3050 { &hf_broadcast_icon_cadence,
3051 {"Icon Cadence","unistim.icon.cadence",FT_UINT8,
3052 BASE_HEX,VALS(bcast_icon_cadence),0xe0,NULL,HFILL}
3054 { &hf_audio_mgr_attr,
3055 {"Query Audio Manager Attributes","unistim.audio.attr",FT_BOOLEAN,
3056 8,NULL,QUERY_AUDIO_MGR_ATTRIBUTES,NULL,HFILL}
3058 { &hf_audio_mgr_opts,
3059 {"Query Audio Manager Options","unistim.audio.options",FT_BOOLEAN,
3060 8,NULL,QUERY_AUDIO_MGR_OPTIONS,NULL,HFILL}
3062 { &hf_audio_mgr_alert,
3063 {"Query Audio Manager Alerting","unistim.audio.alerting",FT_BOOLEAN,
3064 8,NULL,QUERY_AUDIO_MGR_ALERTING ,NULL,HFILL}
3066 { &hf_audio_mgr_adj_rx_vol,
3067 {"Query Audio Manager Adjustable Receive Volume","unistim.audio.adj.volume",FT_BOOLEAN,
3068 8,NULL,QUERY_AUDIO_MGR_ADJ_RX_VOL,NULL,HFILL}
3070 { &hf_audio_mgr_def_rx_vol,
3071 {"Query Audio Manager Default Receive Volume","unistim.audio.def.volume",FT_BOOLEAN,
3072 8,NULL,QUERY_AUDIO_MGR_DEF_RX_VOL,NULL,HFILL}
3074 { &hf_audio_mgr_handset,
3075 {"Query Audio Manager Handset","unistim.audio.handset",FT_BOOLEAN,
3076 8,NULL,QUERY_AUDIO_MGR_HANDSET,NULL,HFILL}
3078 { &hf_audio_mgr_headset,
3079 {"Query Audio Manager Headset","unistim.audio.headset",FT_BOOLEAN,
3080 8,NULL,QUERY_AUDIO_MGR_HEADSET,NULL,HFILL}
3082 { &hf_audio_default_rx_vol_id,
3083 {"Audio Manager Default Receive Volume ID","unistim.audio.volume.id",FT_UINT8,
3084 BASE_HEX,VALS(default_rx_vol_id),0x00,NULL,HFILL}
3086 { &hf_audio_mgr_opt_max_vol,
3087 {"Audio Manager Enable Max Tone Volume","unistim.audio.max.tone",FT_BOOLEAN,
3088 8,TFS(&audio_opts_enable_max_tone_vol),AUDIO_MGR_OPTS_MAX_VOL,NULL,HFILL}
3090 { &hf_audio_mgr_opt_adj_vol,
3091 {"Audio Manager Adjust Volume","unistim.audio.opts.adj.vol",FT_BOOLEAN,
3092 8,TFS(&audio_opts_adjust_volume),AUDIO_MGR_ADJ_VOL,NULL,HFILL}
3094 { &hf_audio_mgr_opt_aa_rx_vol_rpt,
3095 {"Audio Manager Auto Adjust Volume RPT","unistim.audio.aa.vol.rpt",FT_BOOLEAN,
3096 8,TFS(&audio_opts_automatic_adjustable),AUDIO_MGR_AUTO_RX_VOL_RPT,NULL,HFILL}
3098 { &hf_audio_mgr_opt_hs_on_air,
3099 {"Audio Manager Handset","unistim.audio.handset",FT_BOOLEAN,
3100 8,TFS(&audio_opts_hs_on_air_feature),AUDIO_MGR_HS_ON_AIR,NULL,HFILL}
3102 { &hf_audio_mgr_opt_hd_on_air,
3103 {"Audio Manager Headset","unistim.audio.headset",FT_BOOLEAN,
3104 8,TFS(&audio_opts_hd_on_air_feature),AUDIO_MGR_HD_ON_AIR,NULL,HFILL}
3106 { &hf_audio_mgr_opt_noise_squelch,
3107 {"Audio Manager Noise Squelch","unistim.audio.squelch",FT_BOOLEAN,
3108 8,TFS(&noise_sqlch_disable), AUDIO_MGR_NOISE_SQUELCH,NULL,HFILL}
3110 { &hf_audio_mgr_mute,
3111 {"Audio Manager Mute","unistim.audio.mute",FT_BOOLEAN,
3112 8,TFS(&audio_mgr_mute_val),AUDIO_MGR_MUTE,NULL,HFILL}
3114 { &hf_audio_mgr_tx_rx,
3115 {"Audio Manager RX or TX","unistim.audio.rx.tx",FT_BOOLEAN,
3116 8,TFS(&audio_mgr_tx_rx_val),AUDIO_MGR_TX_RX,NULL,HFILL}
3118 { &hf_audio_mgr_stream_id,
3119 {"Audio Manager Stream ID","unistim.audio.stream.id",FT_UINT8,
3120 BASE_DEC,NULL,0x00,NULL,HFILL}
3122 { &hf_audio_mgr_transducer_based_tone_id,
3123 {"Audio Manager Transducer Based Tone On","unistim.audio.transducer.on",FT_UINT8,
3124 BASE_HEX,VALS(trans_base_tone_ids),0x07,NULL,HFILL}
3126 { &hf_audio_mgr_attenuated,
3127 {"Audio Manager Transducer Tone Attenuated","unistim.audio.attenuated.on",FT_BOOLEAN,
3128 8,NULL,AUDIO_MGR_ATTENUATED,NULL,HFILL}
3130 { &hf_audio_mgr_warbler_select,
3131 {"Warbler Select","unistim.warbler.select",FT_UINT8,
3132 BASE_HEX,NULL,0x07,NULL,HFILL}
3134 { &hf_audio_mgr_transducer_routing,
3135 {"Transducer Routing","unistim.transducer.routing",FT_UINT8,
3136 BASE_HEX,VALS(transducer_routing_vals),0xf8,NULL,HFILL}
3138 { &hf_audio_mgr_tone_vol_range,
3139 {"Tone Volume Range in Steps","unistim.tone.volume.range",FT_UINT8,
3140 BASE_HEX,NULL,0x0f,NULL,HFILL}
3142 { &hf_audio_mgr_cadence_select,
3143 {"Cadence Select","unistim.cadence.select",FT_UINT8,
3144 BASE_HEX,VALS(cadence_select_vals),0xf0,NULL,HFILL}
3146 { &hf_audio_special_tone,
3147 {"Special Tone Select","unistim.special.tone.select",FT_UINT8,
3148 BASE_HEX,VALS(special_tones_vals),0x00,NULL,HFILL}
3150 { &hf_audio_tone_level,
3151 {"Tone Level","unistim.audio.tone.level",FT_UINT8,
3152 BASE_DEC,NULL,0xf0,NULL,HFILL}
3154 { &hf_audio_visual_tones,
3155 {"Enable Visual Tones","unistim.visual.tones",FT_BOOLEAN,
3156 8,NULL,AUDIO_MGR_VISUAL_TONE,NULL,HFILL}
3158 { &hf_audio_stream_based_tone_id,
3159 {"Stream Based Tone ID","unistim.stream.tone.id",FT_UINT8,
3160 BASE_HEX,VALS(stream_based_tone_vals),0x1f,NULL,HFILL}
3162 { &hf_audio_stream_based_tone_rx_tx,
3163 {"Stream Based Tone RX or TX","unistim.stream.based.tone.rx.tx",FT_BOOLEAN,
3164 8,TFS(&stream_based_tone_rx_tx_yn),AUDIO_STREAM_BASED_TONE_RX_TX,NULL,HFILL}
3166 { &hf_audio_stream_based_tone_mute,
3167 {"Stream Based Tone Mute","unistim.stream.tone.mute",FT_BOOLEAN,
3168 8,TFS(&stream_based_tone_mute_yn),AUDIO_STREAM_BASED_TONE_MUTE,NULL,HFILL}
3170 { &hf_audio_stream_id,
3171 {"Stream ID","unistim.audio.stream.id",FT_UINT8,
3172 BASE_HEX,NULL,0x00,NULL,HFILL}
3174 { &hf_audio_stream_based_volume,
3175 {"Stream Based Volume ID","unistim.stream.volume.id",FT_UINT8,
3176 BASE_HEX,VALS(stream_base_vol_level),0x00,NULL,HFILL}
3178 { &hf_basic_switch_terminal_id,
3179 {"Terminal ID assigned by Switch","unistim.switch.terminal.id",FT_IPv4,
3180 BASE_NONE,NULL,0x00,NULL,HFILL}
3182 { &hf_basic_it_type,
3183 {"IT (Phone) Type","unistim.it.type",FT_UINT8,
3184 BASE_HEX,VALS(it_types),0x00,NULL,HFILL}
3186 { &hf_basic_prod_eng_code,
3187 {"Product Engineering Code for phone","unistim.basic.eng.code",FT_STRING,
3188 BASE_NONE,NULL,0x00,NULL,HFILL}
3190 { &hf_net_phone_primary_server_id,
3191 {"Phone Primary Server ID","unistim.net.phone.primary.id",FT_UINT8,
3192 BASE_DEC,NULL,0x00,NULL,HFILL}
3194 { &hf_net_phone_server_port,
3195 {"Port Number","unistim.server.port",FT_UINT16,
3196 BASE_DEC,NULL,0x00,NULL,HFILL}
3198 { &hf_net_phone_server_action,
3199 {"Action","unistim.server.action.byte",FT_UINT8,
3200 BASE_HEX,VALS(action_bytes),0x00,NULL,HFILL}
3202 { &hf_net_phone_server_retry_count,
3203 {"Number of times to Retry","unistim.server.retry.count",FT_UINT8,
3204 BASE_DEC,NULL,0x00,NULL,HFILL}
3206 { &hf_net_phone_server_failover_id,
3207 {"Failover Server ID","unistim.server.failover.id",FT_UINT8,
3208 BASE_DEC,NULL,0x00,NULL,HFILL}
3210 { &hf_net_phone_server_ip,
3211 {"IP address","unistim.server.ip.address",FT_IPv4,
3212 BASE_NONE,NULL,0x00,NULL,HFILL}
3214 { &hf_audio_apb_number,
3215 {"APB Number","unistim.audio.apb.number",FT_UINT8,
3216 BASE_HEX,NULL,0x00,NULL,HFILL}
3218 { & hf_audio_apb_op_code,
3219 {"APB Operation Code","unistim.audio.apb.op.code",FT_UINT8,
3220 BASE_HEX,VALS(apb_op_codes),0x00,NULL,HFILL}
3222 { &hf_audio_apb_param_len,
3223 {"APB Operation Parameter Length","unistim.apb.param.len",FT_UINT8,
3224 BASE_DEC,NULL,0x00,NULL,HFILL}
3226 { &hf_audio_apb_data,
3227 {"APB Operation Data","unistim.apb.operation.data",FT_BYTES,
3228 BASE_NONE,NULL,0x00,NULL,HFILL}
3230 { &hf_display_write_address_numeric,
3231 {"Is Address Numeric","unistim.write.address.numeric",FT_BOOLEAN,
3232 8,NULL,DISPLAY_WRITE_ADDRESS_NUMERIC_FLAG,NULL,HFILL}
3234 { &hf_display_write_address_context,
3235 {"Context Field in the Info Bar","unistim.write.address.context",FT_BOOLEAN,
3236 8,NULL,DISPLAY_WRITE_ADDRESS_CONTEXT_FLAG,NULL,HFILL}
3238 { &hf_display_write_address_line,
3239 {"Write A Line","unistim.write.address.line",FT_BOOLEAN,
3240 8,NULL,DISPLAY_WRITE_ADDRESS_LINE_FLAG ,NULL,HFILL}
3242 { &hf_display_write_address_soft_key,
3243 {"Write a SoftKey","unistim.write.address.softkey",FT_BOOLEAN,
3244 8,NULL,DISPLAY_WRITE_ADDRESS_SOFT_KEY_FLAG,NULL,HFILL}
3246 { &hf_display_write_address_soft_label,
3247 {"Write A Softkey Label","unistim.write.address.softkey.label",FT_BOOLEAN,
3248 8,NULL,DISPLAY_WRITE_ADDRESS_SOFT_LABEL_FLAG,NULL,HFILL}
3250 { &hf_display_write_address_softkey_id,
3251 {"Soft Key ID","unistim.write.addres.softkey.id",FT_UINT8,
3252 BASE_HEX,NULL,DISPLAY_WRITE_ADDRESS_SOFT_KEY_ID,NULL,HFILL}
3254 { &hf_display_write_address_char_pos,
3255 {"Character Position or Soft-Label Key ID","unistim.display.write.address.char.pos",FT_UINT8,
3256 BASE_HEX,NULL,DISPLAY_WRITE_ADDRESS_CHAR_POS,NULL,HFILL}
3258 { &hf_display_write_address_line_number,
3259 {"Line Number","unistim.write.address.line.number",FT_UINT8,
3260 BASE_DEC,NULL,DISPLAY_WRITE_ADDRESS_LINE_NUM,NULL,HFILL}
3262 { &hf_display_write_cursor_move,
3263 {"Cursor Move","unistim.display.cursor.move",FT_BOOLEAN,
3264 8,NULL,DISPLAY_WRITE_CURSOR_MOVE,NULL,HFILL}
3266 { &hf_display_write_clear_left,
3267 {"Clear Left","unistim.display.clear.left",FT_BOOLEAN,
3268 8,NULL,DISPLAY_WRITE_CLEAR_LEFT,NULL,HFILL}
3270 { &hf_display_write_clear_right,
3271 {"Clear Right","unistim.display.clear.right",FT_BOOLEAN,
3272 8,NULL,DISPLAY_WRITE_CLEAR_RIGHT,NULL,HFILL}
3274 { &hf_display_write_shift_left,
3275 {"Shift Left","unistim.display.shift.left",FT_BOOLEAN,
3276 8,NULL,DISPLAY_WRITE_SHIFT_LEFT,NULL,HFILL}
3278 { &hf_display_write_shift_right,
3279 {"Shift Right","unistim.display.shift.right",FT_BOOLEAN,
3280 8,NULL,DISPLAY_WRITE_SHIFT_RIGHT,NULL,HFILL}
3282 { &hf_display_write_highlight,
3283 {"Highlight","unistim.display.highlight",FT_BOOLEAN,
3284 8,NULL,DISPLAY_WRITE_HIGHLIGHT,NULL,HFILL}
3286 { &hf_display_write_tag,
3287 {"Tag for text","unistim.display.text.tag",FT_UINT8,
3288 BASE_DEC,NULL,0x00,NULL,HFILL}
3290 { &hf_display_cursor_move_cmd,
3291 {"Cursor Movement Command","unistim.cursor.move.cmd",FT_UINT8,
3292 BASE_HEX,VALS(cursor_move_cmds),DISPLAY_CURSOR_MOVE_CMD,NULL,HFILL}
3294 { &hf_display_cursor_blink,
3295 {"Should Cursor Blink","unistim.cursor.blink",FT_BOOLEAN,
3296 8,NULL,DISPLAY_CURSOR_BLINK,NULL,HFILL}
3298 { &hf_audio_vocoder_id,
3299 {"Vocoder Protocol","unistim.vocoder.id",FT_UINT8,
3300 BASE_HEX,VALS(vocoder_ids),0x00,NULL,HFILL}
3302 { &hf_audio_vocoder_param,
3303 {"Vocoder Config Param","unistim.vocoder.config.param",FT_UINT8,
3304 BASE_HEX,VALS(vocoder_config_params),AUDIO_VOCODER_CONFIG_PARAM,NULL,HFILL}
3306 { &hf_audio_vocoder_entity,
3307 {"Vocoder Entity","unistim.vocoder.entity",FT_UINT8,
3308 BASE_HEX,VALS(config_param_entities),AUDIO_VOCODER_CONFIG_ENTITY,NULL,HFILL}
3310 { &hf_audio_vocoder_annexa,
3311 {"Enable Annex A","unistim.enable.annexa",FT_BOOLEAN,
3312 8,NULL,AUDIO_VOCODER_ANNEXA,NULL,HFILL}
3314 { &hf_audio_vocoder_annexb,
3315 {"Enable Annex B","unistim.enable.annexb",FT_BOOLEAN,
3316 8,NULL,AUDIO_VOCODER_ANNEXB,NULL,HFILL}
3318 { &hf_audio_sample_rate,
3319 {"Sample Rate","unistim.audio.sample.rate",FT_UINT8,
3320 BASE_HEX,VALS(sample_rates),0x00,NULL,HFILL}
3322 { &hf_audio_rtp_type,
3323 {"RTP Type","unistim.audio.rtp.type",FT_UINT8,
3324 BASE_HEX,NULL,0x00,NULL,HFILL}
3326 { &hf_audio_bytes_per_frame,
3327 {"Bytes Per Frame","unistim.audio.bytes.per.frame",FT_UINT16,
3328 BASE_DEC,NULL,0x00,NULL,HFILL}
3330 { &hf_audio_rx_stream_id,
3331 {"Receive Stream Id","unistim.rx.stream.id",FT_UINT8,
3332 BASE_HEX,NULL,0x00,NULL,HFILL}
3334 { &hf_audio_tx_stream_id,
3335 {"Transmit Stream Id","unistim.rx.stream.id",FT_UINT8,
3336 BASE_HEX,NULL,0x00,NULL,HFILL}
3338 { &hf_rx_vocoder_type,
3339 {"Receive Vocoder Protocol","unistim.vocoder.id",FT_UINT8,
3340 BASE_HEX,VALS(vocoder_ids),0x00,NULL,HFILL}
3342 { &hf_tx_vocoder_type,
3343 {"Transmit Vocoder Protocol","unistim.vocoder.id",FT_UINT8,
3344 BASE_HEX,VALS(vocoder_ids),0x00,NULL,HFILL}
3346 { &hf_frames_per_packet,
3347 {"Frames Per Packet","unistim.vocoder.frames.per.packet",FT_UINT8,
3348 BASE_DEC,NULL,0x00,NULL,HFILL}
3350 { &hf_audio_tos,
3351 {"Type of Service","unistim.audio.type.service",FT_UINT8,
3352 BASE_HEX,VALS(types_of_service),AUDIO_TYPE_OF_SERVICE,NULL,HFILL}
3354 { &hf_audio_precedence,
3355 {"Precedence","unistim.audio.precedence",FT_UINT8,
3356 BASE_HEX,VALS(precedences),AUDIO_PRECENDENCE,NULL,HFILL}
3358 { &hf_audio_frf_11,
3359 {"FRF.11 Enable","unistim.audio.frf.11",FT_BOOLEAN,
3360 8,NULL,AUDIO_FRF_11,NULL,HFILL}
3362 { &hf_audio_lcl_rtp_port,
3363 {"Phone RTP Port","unistim.local.rtp.port",FT_UINT16,
3364 BASE_DEC,NULL,0x00,NULL,HFILL}
3366 { &hf_audio_lcl_rtcp_port,
3367 {"Phone RTCP Port","unistim.local.rtcp.port",FT_UINT16,
3368 BASE_DEC,NULL,0x00,NULL,HFILL}
3370 { &hf_audio_far_rtp_port,
3371 {"Distant RTP Port","unistim.far.rtp.port",FT_UINT16,
3372 BASE_DEC,NULL,0x00,NULL,HFILL}
3374 { &hf_audio_far_rtcp_port,
3375 {"Distant RTCP Port","unistim.far.rtcp.port",FT_UINT16,
3376 BASE_DEC,NULL,0x00,NULL,HFILL}
3378 { &hf_audio_far_ip_add,
3379 {"Distant IP Address for RT[C]P","unistim.far.ip.address",FT_IPv4,
3380 BASE_NONE,NULL,0x00,NULL,HFILL}
3382 { &hf_rtcp_bucket_id,
3383 {"RTCP Bucket ID","unistim.rtcp.bucket.id",FT_UINT16,
3384 BASE_HEX,NULL,0x00,NULL,HFILL}
3386 { &hf_key_icon_id,
3387 {"Icon ID","unistim.key.icon.id",FT_UINT8,
3388 BASE_HEX,NULL,0x00,NULL,HFILL}
3390 { &hf_display_clear_numeric,
3391 {"Numeric Index Field in InfoBar","unistim.display.clear.numeric",FT_BOOLEAN,
3392 8,NULL,DISPLAY_CLEAR_NUMERIC,NULL,HFILL}
3394 { &hf_display_clear_context ,
3395 {"Context Field in InfoBar","unistim.display.clear.context",FT_BOOLEAN,
3396 8,NULL,DISPLAY_CLEAR_CONTEXT,NULL,HFILL}
3398 { &hf_display_clear_date ,
3399 {"Date Field","unistim.display.clear.date",FT_BOOLEAN,
3400 8,NULL,DISPLAY_CLEAR_DATE,NULL,HFILL}
3402 { &hf_display_clear_time,
3403 {"Time Field","unistim.display.clear.time",FT_BOOLEAN,
3404 8,NULL,DISPLAY_CLEAR_TIME,NULL,HFILL}
3406 { &hf_display_clear_line,
3407 {"Line Data","unistim.display.clear.line",FT_BOOLEAN,
3408 8,NULL,DISPLAY_CLEAR_LINE,NULL,HFILL}
3410 { &hf_display_clear_status_bar_icon,
3411 {"Status Bar Icon","unistim.display.statusbar.icon",FT_BOOLEAN,
3412 8,NULL,DISPLAY_CLEAR_STATUS_BAR_ICON,NULL,HFILL}
3414 { &hf_display_clear_softkey,
3415 {"Soft Key","unistim.display.clear.softkey",FT_BOOLEAN,
3416 8,NULL,DISPLAY_CLEAR_SOFTKEY,NULL,HFILL}
3418 { &hf_display_clear_softkey_label ,
3419 {"Soft Key Label","unistim.display.clear.softkey.label",FT_BOOLEAN,
3420 8,NULL,DISPLAY_CLEAR_SOFTKEY_LABEL,NULL,HFILL}
3422 { &hf_display_clear_line_1 ,
3423 {"Line 1","unistim.display.clear.line1",FT_BOOLEAN,
3424 8,NULL,DISPLAY_CLEAR_LINE_1,NULL,HFILL}
3426 { &hf_display_clear_line_2 ,
3427 {"Line 2","unistim.display.clear.line2",FT_BOOLEAN,
3428 8,NULL,DISPLAY_CLEAR_LINE_2,NULL,HFILL}
3430 { &hf_display_clear_line_3 ,
3431 {"Line 3","unistim.display.clear.line3",FT_BOOLEAN,
3432 8,NULL,DISPLAY_CLEAR_LINE_3,NULL,HFILL}
3434 { &hf_display_clear_line_4 ,
3435 {"Line 4","unistim.display.clear.line4",FT_BOOLEAN,
3436 8,NULL,DISPLAY_CLEAR_LINE_4,NULL,HFILL}
3438 { &hf_display_clear_line_5 ,
3439 {"Line 5","unistim.display.clear.line5",FT_BOOLEAN,
3440 8,NULL,DISPLAY_CLEAR_LINE_5,NULL,HFILL}
3442 { &hf_display_clear_line_6 ,
3443 {"Line 6","unistim.display.clear.line6",FT_BOOLEAN,
3444 8,NULL,DISPLAY_CLEAR_LINE_6,NULL,HFILL}
3446 { &hf_display_clear_line_7 ,
3447 {"Line 7","unistim.display.clear.line7",FT_BOOLEAN,
3448 8,NULL,DISPLAY_CLEAR_LINE_7,NULL,HFILL}
3450 { &hf_display_clear_line_8 ,
3451 {"Line 8","unistim.display.clear.line8",FT_BOOLEAN,
3452 8,NULL,DISPLAY_CLEAR_LINE_8,NULL,HFILL}
3454 { &hf_display_clear_status_bar_icon_1 ,
3455 {"Status Bar Icon 1","unistim.display.clear.sbar.icon1",FT_BOOLEAN,
3456 8,NULL,DISPLAY_STATUS_BAR_ICON_1,NULL,HFILL}
3458 { &hf_display_clear_status_bar_icon_2 ,
3459 {"Status Bar Icon 2","unistim.display.clear.sbar.icon2",FT_BOOLEAN,
3460 8,NULL,DISPLAY_STATUS_BAR_ICON_2,NULL,HFILL}
3462 { &hf_display_clear_status_bar_icon_3 ,
3463 {"Status Bar Icon 3","unistim.display.clear.sbar.icon3",FT_BOOLEAN,
3464 8,NULL,DISPLAY_STATUS_BAR_ICON_3,NULL,HFILL}
3466 { &hf_display_clear_status_bar_icon_4 ,
3467 {"Status Bar Icon 4","unistim.display.clear.sbar.icon4",FT_BOOLEAN,
3468 8,NULL,DISPLAY_STATUS_BAR_ICON_4,NULL,HFILL}
3470 { &hf_display_clear_status_bar_icon_5 ,
3471 {"Status Bar Icon 5","unistim.display.clear.sbar.icon5",FT_BOOLEAN,
3472 8,NULL,DISPLAY_STATUS_BAR_ICON_5,NULL,HFILL}
3474 { &hf_display_clear_status_bar_icon_6 ,
3475 {"Status Bar Icon 6","unistim.display.clear.sbar.icon6",FT_BOOLEAN,
3476 8,NULL,DISPLAY_STATUS_BAR_ICON_6,NULL,HFILL}
3478 { &hf_display_clear_status_bar_icon_7 ,
3479 {"Status Bar Icon 7","unistim.display.clear.sbar.icon7",FT_BOOLEAN,
3480 8,NULL,DISPLAY_STATUS_BAR_ICON_7,NULL,HFILL}
3482 { &hf_display_clear_status_bar_icon_8 ,
3483 {"Status Bar Icon 8","unistim.display.clear.sbar.icon8",FT_BOOLEAN,
3484 8,NULL,DISPLAY_STATUS_BAR_ICON_8,NULL,HFILL}
3486 { &hf_display_clear_soft_key_1 ,
3487 {"Soft Key 1","unistim.display.clear.soft.key1",FT_BOOLEAN,
3488 8,NULL,DISPLAY_SOFT_KEY_1,NULL,HFILL}
3490 { &hf_display_clear_soft_key_2 ,
3491 {"Soft Key 2","unistim.display.clear.soft.key2",FT_BOOLEAN,
3492 8,NULL,DISPLAY_SOFT_KEY_2,NULL,HFILL}
3494 { &hf_display_clear_soft_key_3 ,
3495 {"Soft Key 3","unistim.display.clear.soft.key3",FT_BOOLEAN,
3496 8,NULL,DISPLAY_SOFT_KEY_3,NULL,HFILL}
3498 { &hf_display_clear_soft_key_4 ,
3499 {"Soft Key 4","unistim.display.clear.soft.key4",FT_BOOLEAN,
3500 8,NULL,DISPLAY_SOFT_KEY_4,NULL,HFILL}
3502 { &hf_display_clear_soft_key_5 ,
3503 {"Soft Key 5","unistim.display.clear.soft.key5",FT_BOOLEAN,
3504 8,NULL,DISPLAY_SOFT_KEY_5,NULL,HFILL}
3506 { &hf_display_clear_soft_key_6 ,
3507 {"Soft Key 6","unistim.display.clear.soft.key6",FT_BOOLEAN,
3508 8,NULL,DISPLAY_SOFT_KEY_6,NULL,HFILL}
3510 { &hf_display_clear_soft_key_7 ,
3511 {"Soft Key 7","unistim.display.clear.soft.key7",FT_BOOLEAN,
3512 8,NULL,DISPLAY_SOFT_KEY_7,NULL,HFILL}
3514 { &hf_display_clear_soft_key_8 ,
3515 {"Soft Key 8","unistim.display.clear.soft.key8",FT_BOOLEAN,
3516 8,NULL,DISPLAY_SOFT_KEY_8,NULL,HFILL}
3518 { &hf_display_clear_sk_label_key_id,
3519 {"Soft Key Label ID","unistim.display.clear.sk.label.id",FT_UINT8,
3520 BASE_HEX,NULL, DISPLAY_CLEAR_SK_LABEL_KEY_ID,NULL,HFILL}
3522 { &hf_display_clear_all_slks,
3523 {"Clear All Soft Key Labels","unistim.display.clear.all.sks",FT_BOOLEAN,
3524 8,NULL,DISPLAY_CLEAR_ALL_SLKS,NULL,HFILL}
3526 { &hf_key_led_cadence,
3527 {"LED Cadence","unistim.key.led.cadence",FT_UINT8,
3528 BASE_HEX,VALS(led_cadences),KEY_LED_CADENCE,NULL,HFILL}
3530 { &hf_key_led_id,
3531 {"LED ID","unistim.key.led.id",FT_UINT8,
3532 BASE_HEX,VALS(led_ids),KEY_LED_ID,NULL,HFILL}
3534 { &hf_basic_ether_address,
3535 {"Phone Ethernet Address","unistim.phone.ether",FT_ETHER,
3536 BASE_NONE,NULL,0x00,NULL,HFILL}
3538 { &hf_audio_rtcp_bucket_id,
3539 {"RTCP Bucket ID","unistim.audio.rtcp.bucket.id",FT_UINT8,
3540 BASE_HEX,NULL,AUDIO_RTCP_BUCKET_ID,NULL,HFILL}
3542 { &hf_audio_clear_bucket,
3543 {"Clear Bucket Counter","unistim.clear.bucket",FT_BOOLEAN,
3544 8,NULL,AUDIO_CLEAR_BUCKET,NULL,HFILL}
3546 { &hf_display_arrow,
3547 {"Arrow Display Direction","unistim.arrow.direction",FT_UINT8,
3548 BASE_HEX,VALS(arrow_dirs),0x00,NULL,HFILL}
3550 { &hf_audio_transducer_pair,
3551 {"Audio Transducer Pair","unistim.transducer.pairs",FT_UINT8,
3552 BASE_HEX,VALS(transducer_pairs),AUDIO_TRANSDUCER_PAIR_ID,NULL,HFILL}
3554 { &hf_audio_rx_enable,
3555 {"RX Enable","unistim.receive.enable",FT_BOOLEAN,
3556 8,NULL,AUDIO_RX_ENABLE,NULL,HFILL}
3558 { &hf_audio_tx_enable,
3559 {"TX Enable","unistim.transmit.enable",FT_BOOLEAN,
3560 8,NULL,AUDIO_TX_ENABLE,NULL,HFILL}
3562 { &hf_audio_sidetone_disable,
3563 {"Disable Sidetone","unistim.audio.sidetone.disable",FT_BOOLEAN,
3564 8,NULL,AUDIO_SIDETONE_DISABLE,NULL,HFILL}
3566 { &hf_audio_destruct_additive,
3567 {"Destructive/Additive","unistim.destructive.active",FT_BOOLEAN,
3568 8,TFS(&destruct_additive),AUDIO_DESTRUCT_ADD,NULL,HFILL}
3570 { &hf_audio_dont_force_active,
3571 {"Don't Force Active","unistim.dont.force.active",FT_BOOLEAN,
3572 8,TFS(&dont_force_active),AUDIO_DONT_FORCE_ACTIVE,NULL,HFILL}
3574 { &hf_display_line_width,
3575 {"Phone Line Width","unistim.line.width",FT_UINT8,
3576 BASE_DEC,NULL,DISPLAY_LINE_WIDTH,NULL,HFILL}
3578 { &hf_display_lines,
3579 {"Number Of Lines","unistim.number.lines",FT_UINT8,
3580 BASE_DEC,NULL,DISPLAY_LINES,NULL,HFILL}
3582 { &hf_display_softkey_width,
3583 {"Phone Softkey Width","unistim.softkey.width",FT_UINT8,
3584 BASE_DEC,NULL,DISPLAY_SKEY_WIDTH,NULL,HFILL}
3586 { &hf_display_softkeys,
3587 {"Phone Softkeys","unistim.phone.softkeys",FT_UINT8,
3588 BASE_DEC,NULL,DISPLAY_SKEYS,NULL,HFILL}
3590 { &hf_display_icon,
3591 {"Phone Icon Type","unistim.phone.icon.type",FT_UINT8,
3592 BASE_HEX,VALS(icon_types),DISPLAY_ICON,NULL,HFILL}
3594 { &hf_display_softlabel_key_width,
3595 {"Soft-Label Key width","unistim.softlabel.key.width",FT_UINT8,
3596 BASE_DEC,NULL,DISPLAY_SOFTLABEL_WIDTH,NULL,HFILL}
3598 { &hf_display_context_width,
3599 {"Phone Context Width","unistim.context.width",FT_UINT8,
3600 BASE_DEC,NULL,DISPLAY_CONTEXT_WIDTH,NULL,HFILL}
3602 { &hf_display_numeric_width,
3603 {"Phone Numeric Width","unistim.numeric.width",FT_UINT8,
3604 BASE_DEC,NULL,DISPLAY_NUMERIC_WIDTH,NULL,HFILL}
3606 { &hf_display_time_width,
3607 {"Phone Time Width","unistim.time.width",FT_UINT8,
3608 BASE_DEC,NULL,DISPLAY_TIME_WIDTH,NULL,HFILL}
3610 { &hf_display_date_width,
3611 {"Phone Date Width","unistim.date.width",FT_UINT8,
3612 BASE_DEC,NULL,DISPLAY_DATE_WIDTH,NULL,HFILL}
3614 { &hf_display_char_dload,
3615 {"Number of Downloadable Chars","unistim.number.dload.chars",FT_UINT8,
3616 BASE_DEC,NULL,DISPLAY_CHAR_DLOAD,NULL,HFILL}
3618 { &hf_display_freeform_icon_dload,
3619 {"Number of Freeform Icon Downloads","unistim.number.dload.icons",FT_UINT8,
3620 BASE_DEC,NULL,DISPLAY_FFORM_ICON_DLOAD,NULL,HFILL}
3622 { &hf_display_icon_type,
3623 {"Icon Types","unistim.icon.types",FT_UINT8,
3624 BASE_HEX,NULL,DISPLAY_ICON_TYPE,NULL,HFILL}
3626 { &hf_display_charsets,
3627 {"Character Sets","unistim.phone.charsets",FT_UINT8,
3628 BASE_HEX,NULL,DISPLAY_CHARSET,NULL,HFILL}
3630 { &hf_display_contrast,
3631 {"Phone Contrast Level","unistim.phone.contrast.level",FT_UINT8,
3632 BASE_DEC,NULL,0x00,NULL,HFILL}
3634 { &hf_display_cursor_numeric,
3635 {"Numeric Index Field","unistim.field.numeric",FT_BOOLEAN,
3636 8,NULL,DISPLAY_CURSOR_NUMERIC,NULL,HFILL}
3638 { &hf_display_cursor_context,
3639 {"Context Field","unistim.field.context",FT_BOOLEAN,
3640 8,NULL,DISPLAY_CURSOR_CONTEXT,NULL,HFILL}
3642 { &hf_display_cursor_line,
3643 {"Text Line","unistim.field.text.line",FT_BOOLEAN,
3644 8,NULL,DISPLAY_CURSOR_LINE,NULL,HFILL}
3646 { &hf_display_cursor_softkey,
3647 {"Softkey Position","unistim.position.skey",FT_BOOLEAN,
3648 8,NULL,DISPLAY_CURSOR_SKEY,NULL,HFILL}
3650 { &hf_display_cursor_softkey_id,
3651 {"Soft Key Id","unistim.cursor.skey.id",FT_UINT8,
3652 BASE_DEC,NULL,DISPLAY_CURSOR_SKEY_ID,NULL,HFILL}
3654 { &hf_display_cursor_char_pos,
3655 {"Character Position","unistim.phone.char.pos",FT_UINT8,
3656 BASE_DEC,NULL,DISPLAY_CURSOR_CHAR_POS,NULL,HFILL}
3658 { &hf_display_cursor_line_number,
3659 {"Display Line Number","unistim.display.line.number",FT_UINT8,
3660 BASE_DEC,NULL,DISPLAY_CURSOR_LINE_NUM,NULL,HFILL}
3662 { &hf_display_hlight_start,
3663 {"Display Highlight Start Position","unistim.hilite.start.pos",FT_UINT8,
3664 BASE_DEC,NULL,0x00,NULL,HFILL}
3666 { &hf_display_hlight_end,
3667 {"Display Highlight End Position","unistim.hilite.end.pos",FT_UINT8,
3668 BASE_DEC,NULL,0x00,NULL,HFILL}
3670 { &hf_display_date_format,
3671 {"Date Format","unistim.display.date.format",FT_UINT8,
3672 BASE_HEX,VALS(date_formats),DISPLAY_DATE_FORMAT,NULL,HFILL}
3674 { &hf_display_time_format,
3675 {"Time Format","unistim.display.time.format",FT_UINT8,
3676 BASE_HEX,VALS(time_formats),DISPLAY_TIME_FORMAT,NULL,HFILL}
3678 { &hf_display_use_time_format,
3679 {"Use Time Format","unistim.display.use.time.format",FT_BOOLEAN,
3680 8,NULL,DISPLAY_USE_TIME_FORMAT,NULL,HFILL}
3682 { &hf_display_use_date_format,
3683 {"Use Date Format","unistim.display.use.date.format",FT_BOOLEAN,
3684 8,NULL,DISPLAY_USE_DATE_FORMAT,NULL,HFILL}
3686 { &hf_display_context_format,
3687 {"Context Info Bar Format","unistim.display.context.format",FT_UINT8,
3688 BASE_HEX,VALS(display_formats),DISPLAY_CTX_FORMAT,NULL,HFILL}
3690 { &hf_display_context_field,
3691 {"Context Info Bar Field","unistim.display.context.field",FT_UINT8,
3692 BASE_HEX,VALS(display_format_fields),DISPLAY_CTX_FIELD,NULL,HFILL}
3694 { &hf_display_char_address,
3695 {"Display Character Address","unistim.display.char.address",FT_UINT8,
3696 BASE_HEX,NULL,0x00,NULL,HFILL}
3698 { &hf_display_layer_number,
3699 {"Softkey Layer Number","unistim.softkey.layer.num",FT_UINT8,
3700 BASE_HEX,NULL,0x00,NULL,HFILL}
3702 { &hf_display_layer_skey_id,
3703 {"Softkey ID","unistim.layer.softkey.id",FT_UINT8,
3704 BASE_DEC,NULL,DISPLAY_LAYER_SKEY_ID,NULL,HFILL}
3706 { &hf_display_layer_all_skeys,
3707 {"All Softkeys","unistim.layer.all.skeys",FT_BOOLEAN,
3708 8,NULL,DISPLAY_LAYER_ALL_SKEYS,NULL,HFILL}
3710 { &hf_display_once_or_cyclic,
3711 {"Layer Softkey Once/Cyclic","unistim.layer.once.cyclic",FT_BOOLEAN,
3712 8,TFS(&once_or_cyclic),DISPLAY_ONE_OR_CYCLIC,NULL,HFILL}
3714 { &hf_display_layer_duration,
3715 {"Display Duration (20ms steps)","unistim.layer.display.duration",FT_UINT8,
3716 BASE_DEC,NULL,0x00,NULL,HFILL}
3718 { &hf_key_programmable_keys,
3719 {"Number of Programmable Keys","unistim.num.prog.keys",FT_UINT8,
3720 BASE_DEC,NULL,KEY_NUM_PROG_KEYS,NULL,HFILL}
3722 { &hf_keys_soft_keys,
3723 {"Number of Soft Keys","unistim.num.soft.keys",FT_UINT8,
3724 BASE_DEC,NULL,KEY_NUM_SOFT_KEYS,NULL,HFILL}
3726 { &hf_keys_hd_key,
3727 {"Headset Key Exists","unistim.exist.hd.key",FT_BOOLEAN,
3728 8,NULL,KEY_HD_KEY_EXISTS,NULL,HFILL}
3730 { &hf_keys_mute_key,
3731 {"Mute Key Exists","unistim.exist.mute.key",FT_BOOLEAN,
3732 8,NULL,KEY_MUTE_KEY_EXISTS,NULL,HFILL}
3734 { &hf_keys_quit_key,
3735 {"Quit Key Exists","unistim.exist.quit.key",FT_BOOLEAN,
3736 8,NULL,KEY_QUIT_KEY_EXISTS,NULL,HFILL}
3738 { &hf_keys_copy_key,
3739 {"Copy Key Exists","unistim.exist.copy.key",FT_BOOLEAN,
3740 8,NULL,KEY_COPY_KEY_EXISTS,NULL,HFILL}
3742 { &hf_keys_mwi_key,
3743 {"Message Waiting Indicator Exists","unistim.exist.mwi.key",FT_BOOLEAN,
3744 8,NULL,KEY_MWI_EXISTS,NULL,HFILL}
3746 { &hf_keys_num_nav_keys,
3747 {"Number of Navigation Keys","unistim.num.nav.keys",FT_UINT8,
3748 BASE_DEC,VALS(number_nav_keys),KEY_NUM_NAV_KEYS,NULL,HFILL}
3750 { &hf_keys_num_conspic_keys,
3751 {"Number Of Conspicuous Keys","unistim.num.conspic.keys",FT_UINT8,
3752 BASE_DEC,NULL,KEY_NUM_CONSPIC_KEYS,NULL,HFILL}
3754 { &hf_keys_send_key_rel,
3755 {"Send Key Release","unistim.key.send.release",FT_BOOLEAN,
3756 8,TFS(&key_release),KEY_SEND_KEY_RELEASE,NULL,HFILL}
3758 { &hf_keys_enable_vol,
3759 {"Enable Volume Control","unistim.key.enable.vol",FT_BOOLEAN,
3760 8,TFS(&enable_vol),KEY_ENABLE_VOL_KEY,NULL,HFILL}
3762 { &hf_keys_conspic_prog_key,
3763 {"Conspicuous and Programmable Keys Same","unistim.conspic.prog.keys",FT_BOOLEAN,
3764 8,TFS(&conspic_prog),KEY_CONSPIC_PROG_KEY0,NULL,HFILL}
3766 { &hf_keys_acd_super_control,
3767 {"ACD Supervisor Control","unistim.acd.super.control",FT_BOOLEAN,
3768 8,TFS(&acd_supervisor),KEY_ACD_SUP_CONTROL,NULL,HFILL}
3770 { &hf_keys_local_dial_feedback,
3771 {"Local Keypad Feedback","unistim.key.feedback",FT_UINT8,
3772 BASE_HEX,VALS(local_dialpad_feedback),KEY_LOCAL_DIAL_PAD_FEED,NULL,HFILL}
3774 { &hf_audio_source_descr,
3775 {"Source Description Item","unistim.source.desc.item",FT_UINT8,
3776 BASE_HEX,VALS(source_descriptions),AUDIO_SOURCE_DESCRIPTION,NULL,HFILL}
3778 { &hf_audio_sdes_rtcp_bucket,
3779 {"RTCP Bucket Id","unistim.sdes.rtcp.bucket",FT_UINT8,
3780 BASE_HEX,NULL,AUDIO_SDES_RTCP_BUCKET,NULL,HFILL}
3782 { &hf_audio_desired_jitter,
3783 {"Desired Jitter","unistim.audio.desired.jitter",FT_UINT8,
3784 BASE_DEC,NULL,0x00,NULL,HFILL}
3786 { &hf_audio_high_water_mark,
3787 {"Threshold of audio frames where jitter buffer removes frames","unistim.high.water.mark",FT_UINT8,
3788 BASE_DEC,NULL,0x00,NULL,HFILL}
3790 { &hf_audio_early_packet_resync_thresh,
3791 {"Threshold in x/8000 sec where packets are too early","unistim.early.packet.thresh",FT_UINT32,
3792 BASE_DEC,NULL,0x00,NULL,HFILL}
3794 { &hf_audio_late_packet_resync_thresh,
3795 {"Threshold in x/8000 sec where packets are too late","unistim.late.packet.thresh",FT_UINT32,
3796 BASE_DEC,NULL,0x00,NULL,HFILL}
3798 { &hf_audio_resolve_phone_port,
3799 {"Resolve Phone Port","unistim.resolve.phone.port",FT_UINT16,
3800 BASE_DEC,NULL,0x00,NULL,HFILL}
3802 { &hf_audio_far_end_echo_port,
3803 {"Resolve Far End Port","unistim.resolve.far.port",FT_UINT16,
3804 BASE_DEC,NULL,0x00,NULL,HFILL}
3806 { &hf_audio_far_end_ip_address,
3807 {"Resolve Far End IP","unistim.resolve.far.ip",FT_IPv4,
3808 BASE_NONE,NULL,0x00,NULL,HFILL}
3810 { &hf_audio_nat_port,
3811 {"NAT Port","unistim.audio.nat.port",FT_UINT16,
3812 BASE_DEC,NULL,0x00,NULL,HFILL}
3814 { &hf_audio_nat_ip_address,
3815 {"NAT IP Address","unistim.audio.nat.ip",FT_IPv4,
3816 BASE_NONE,NULL,0x00,NULL,HFILL}
3818 { &hf_audio_direction_code,
3819 {"Stream Direction Code","unistim.audio.direction.codes",FT_UINT8,
3820 BASE_HEX,VALS(direction_codes),AUDIO_DIRECTION_CODE,NULL,HFILL}
3822 { &hf_audio_hf_support,
3823 {"Handsfree supported","unistim.handsfree.support",FT_BOOLEAN,
3824 8,NULL,AUDIO_HF_SUPPORT,NULL,HFILL}
3826 { &hf_audio_opt_rpt_max,
3827 {"Max Volume","unistim.max.vol",FT_BOOLEAN,
3828 8,TFS(&opt_rpt_enable_max_tone_vol),AUDIO_ENABLED_MAX_TONE,NULL,HFILL}
3830 { &hf_audio_opt_rpt_adj_vol,
3831 {"Volume Adjustments","unistim.audio.volume.adj",FT_BOOLEAN,
3832 8,TFS(&opt_rpt_adjust_volume),AUDIO_ENABLED_ADJ_VOL,NULL,HFILL}
3834 { &hf_audio_opt_rpt_auto_adj_vol,
3835 {"Auto Adjust RX Volume","unistim.auto.adj.rx.vol",FT_BOOLEAN,
3836 8,TFS(&opt_rpt_automatic_adjustable_rx_volume_report),
3837 AUDIO_AUTO_ADJ_RX_REP,NULL,HFILL}
3839 { &hf_audio_opt_rpt_hs_on_air,
3840 {"HS On Air","unistim.audio.hs.on.air",FT_BOOLEAN,
3841 8,TFS(&opt_rpths_on_air_feature),AUDIO_HS_ON_AIR_FEATURE,NULL,HFILL}
3843 { &hf_audio_opt_rpt_hd_on_air,
3844 {"HD On Air","unistim.audio.hd.on.air",FT_BOOLEAN,
3845 8,TFS(&opt_rpt_hd_on_air_feature),AUDIO_HD_ON_AIR_FEATURE,NULL,HFILL}
3847 { &hf_audio_opt_rpt_noise_squelch,
3848 {"Automatic Squelch","unistim.auto.noise.squelch",FT_BOOLEAN,
3849 8,TFS(&opt_rpt_noise_sqlch_disable),AUDIO_NOISE_SQUELCH_DIS,NULL,HFILL}
3851 { &hf_audio_rx_vol_apb_rpt,
3852 {"APB Volume Report","unistim.apb.volume.rpt",FT_UINT8,
3853 BASE_HEX,VALS(volume_rpt_apbs),AUDIO_APB_VOL_RPT,NULL,HFILL}
3855 { &hf_audio_rx_vol_vol_up,
3856 {"Volume Up","unistim.audio.volume.up",FT_BOOLEAN,
3857 8,NULL,AUDIO_VOL_UP_RPT,NULL,HFILL}
3859 { &hf_audio_rx_vol_vol_floor,
3860 {"RX Volume at Floor","unistim.audio.rx.vol.floor",FT_BOOLEAN,
3861 8,NULL,AUDIO_VOL_FLR_RPT,NULL,HFILL}
3863 { &hf_audio_rx_vol_vol_ceiling,
3864 {"RX Volume at Ceiling","unistim.audio.rx.vol.ceiling",FT_BOOLEAN,
3865 8,NULL,AUDIO_VOL_CEIL_RPT,NULL,HFILL}
3867 { &hf_audio_current_adj_vol_id,
3868 {"Current APB Volume Report","unistim.current.volume.rpt",FT_UINT8,
3869 BASE_HEX,VALS(volume_rpt_apbs),AUDIO_APB_VOL_RPT,NULL,HFILL}
3871 { &hf_audio_current_rx_level,
3872 {"Current RX Volume Level","unistim.current.rx.vol.level",FT_UINT8,
3873 BASE_DEC,NULL,0x00,NULL,HFILL}
3875 { &hf_audio_current_rx_range,
3876 {"Current RX Volume Range","unistim.current.rx.vol.range",FT_UINT8,
3877 BASE_DEC,NULL,0x00,NULL,HFILL}
3879 { &hf_audio_cadence_select,
3880 {"Alerting Cadence Select","unistim.alert.cad.sel",FT_UINT8,
3881 BASE_HEX,NULL,AUDIO_ALERT_CADENCE_SEL,NULL,HFILL}
3883 { &hf_audio_warbler_select,
3884 {"Alerting Warbler Select","unistim.alert.warb.select",FT_UINT8,
3885 BASE_HEX,NULL,AUDIO_ALERT_WARBLER_SEL,NULL,HFILL}
3887 { &hf_audio_open_stream_rpt,
3888 {"Open Stream Report","unistim.open.audio.stream.rpt",FT_UINT8,
3889 BASE_HEX,VALS(stream_result),0x00,NULL,HFILL}
3891 { &hf_audio_sdes_rpt_source_desc,
3892 {"Report Source Description","unistim.rpt.src.desc",FT_UINT8,
3893 BASE_HEX,VALS(source_descipts),AUDIO_SDES_INFO_RPT_DESC,NULL,HFILL}
3895 { &hf_audio_sdes_rpt_buk_id,
3896 {"Report RTCP Bucket ID","unistim.rpt.rtcp.buk.id",FT_UINT8,
3897 BASE_HEX,NULL,AUDIO_SDES_INFO_RPT_BUK,NULL,HFILL}
3899 { &hf_audio_phone_port,
3900 {"Phone Listen Port","unistim.phone.listen.port",FT_UINT16,
3901 BASE_DEC,NULL,0x00,NULL,HFILL}
3903 { &hf_audio_phone_ip,
3904 {"Phone Listen Address","unistim.phone.listen.address",FT_IPv4,
3905 BASE_NONE,NULL,0x00,NULL,HFILL}
3907 { &hf_audio_phone_add_len,
3908 {"Phone Address Length","unistim.phone.address.len",FT_UINT8,
3909 BASE_DEC,NULL,0x00,NULL,HFILL}
3911 { &hf_audio_nat_listen_port,
3912 {"NAT Listen Port","unistim.nat.listen.port",FT_UINT16,
3913 BASE_DEC,NULL,0x00,NULL,HFILL}
3915 { &hf_audio_nat_ip,
3916 {"NAT Listen Address","unistim.nat.listen.address",FT_UINT8,
3917 BASE_DEC,NULL,0x00,NULL,HFILL}
3919 { &hf_audio_nat_add_len,
3920 {"NAT Address Length","unistim.nat.address.len",FT_UINT8,
3921 BASE_DEC,NULL,0x00,NULL,HFILL}
3923 { &hf_audio_stream_direction_code,
3924 {"Audio Stream Direction","unistim.audio.stream.direction",FT_UINT8,
3925 BASE_HEX,VALS(stream_direction_codes),AUDIO_STREAM_DIRECTION,NULL,HFILL}
3927 { &hf_audio_stream_state,
3928 {"Audio Stream State","unistim.audio.stream.state",FT_BOOLEAN,
3929 8,TFS(&stream_states),AUDIO_STREAM_STATE,NULL,HFILL}
3931 { &hf_audio_transducer_list_length,
3932 {"Transducer List Length","unistim.trans.list.len",FT_UINT8,
3933 BASE_DEC,NULL,0x00,NULL,HFILL}
3935 { &hf_net_file_xfer_mode,
3936 {"File Transfer Mode","unistim.net.file.xfer.mode",FT_UINT8,
3937 BASE_HEX,VALS(file_xfer_modes),NETWORK_FILE_XFER_MODE,NULL,HFILL}
3939 { &hf_net_force_download ,
3940 {"Force Download","unistim.net.force.download",FT_BOOLEAN,
3941 8,NULL,NETWORK_FORCE_DLOAD,NULL,HFILL}
3943 { &hf_net_use_file_server_port,
3944 {"Use Custom Server Port","unistim.net.use.server.port",FT_BOOLEAN,
3945 8,NULL,NETWORK_USE_FSERV_PORT,NULL,HFILL}
3947 { &hf_net_use_local_port,
3948 {"Use Custom Local Port","unistim.net.use.local.port",FT_BOOLEAN,
3949 8,NULL,NETWORK_USE_LOCAL_PORT,NULL,HFILL}
3951 { &hf_net_file_server_port,
3952 {"File Server Port","unistim.net.file.server.port",FT_UINT16,
3953 BASE_DEC,NULL,0x00,NULL,HFILL}
3955 { &hf_net_full_pathname,
3956 {"Full Pathname","unistim.net.full_pathname",FT_STRINGZ,
3957 BASE_NONE,NULL,0x00,NULL,HFILL}
3959 { &hf_net_file_identifier,
3960 {"File Identifier","unistim.net.file_identifier",FT_STRINGZ,
3961 BASE_NONE,NULL,0x00,NULL,HFILL}
3963 { &hf_net_local_port,
3964 {"Local XFer Port","unistim.net.local.xfer.port",FT_UINT16,
3965 BASE_DEC,NULL,0x00,NULL,HFILL}
3967 { &hf_net_file_server_address,
3968 {"File Server IP Address","unistim.net.file.server.address",FT_IPv4,
3969 BASE_NONE,NULL,0x00,NULL,HFILL}
3971 { &hf_keys_admin_command,
3972 {"Admin Command","unistim.key.icon.admin.cmd",FT_UINT8,
3973 BASE_HEX,VALS(admin_commands),KEY_ADMIN_CMD,NULL,HFILL}
3975 { &hf_keys_logical_icon_id,
3976 {"Logical Icon ID","unistim.keys.logical.icon.id",FT_UINT16,
3977 BASE_HEX,NULL,0x00,NULL,HFILL}
3979 { &hf_keys_repeat_timer_one,
3980 {"Key Repeat Timer 1 Value","unistim.keys.repeat.time.one",FT_UINT8,
3981 BASE_DEC,NULL,0x00,NULL,HFILL}
3983 { &hf_keys_repeat_timer_two,
3984 {"Key Repeat Timer 2 Value","unistim.keys.repeat.time.two",FT_UINT8,
3985 BASE_DEC,NULL,0x00,NULL,HFILL}
3987 { &hf_keys_led_id,
3988 {"Led ID","unistim.keys.led.id",FT_UINT8,
3989 BASE_HEX,VALS(keys_led_ids),0x00,NULL,HFILL}
3991 { &hf_keys_phone_icon_id,
3992 {"Phone Icon ID","unistim.keys.phone.icon.id",FT_UINT8,
3993 BASE_HEX,NULL,0x00,NULL,HFILL}
3995 { &hf_keys_cadence_on_time,
3996 {"Indicator Cadence On Time","unistim.keys.cadence.on.time",FT_UINT8,
3997 BASE_DEC,NULL,0x00,NULL,HFILL}
3999 { &hf_keys_cadence_off_time,
4000 {"Indicator Cadence Off Time","unistim.keys.cadence.off.time",FT_UINT8,
4001 BASE_DEC,NULL,0x00,NULL,HFILL}
4003 { &hf_keys_user_activity_timeout,
4004 {"User Activity Timeout Value","unistim.keys.user.timeout.value",FT_UINT8,
4005 BASE_DEC,NULL,0x00,NULL,HFILL}
4007 { &hf_display_call_timer_mode,
4008 {"Call Timer Mode","unistim.display.call.timer.mode",FT_BOOLEAN,
4009 8,TFS(&call_duration_timer_mode),DISPLAY_CALL_TIMER_MODE,NULL,HFILL}
4011 { &hf_display_call_timer_reset,
4012 {"Call Timer Reset","unistim.display.call.timer.reset",FT_BOOLEAN,
4013 8,TFS(&call_duration_timer_reset),DISPLAY_CALL_TIMER_RESET,NULL,HFILL}
4015 { &hf_display_call_timer_display,
4016 {"Call Timer Display","unistim.display.call.timer.display",FT_BOOLEAN,
4017 8,TFS(&call_duration_display_timer),DISPLAY_CALL_TIMER_DISPLAY,NULL,HFILL}
4019 { &hf_display_call_timer_delay,
4020 {"Call Timer Delay","unistim.display.call.timer.delay",FT_BOOLEAN,
4021 8,TFS(&call_duration_timer_delay),DISPLAY_CALL_TIMER_DELAY,NULL,HFILL}
4023 { &hf_display_call_timer_id,
4024 {"Call Timer ID","unistim.display.call.timer.id",FT_UINT8,
4025 BASE_DEC,NULL,DISPLAY_CALL_TIMER_ID,NULL,HFILL}
4027 { &hf_expansion_switch_cmd,
4028 {"Expansion CMD (switch)","unistim.expansion.switch",FT_UINT8,
4029 BASE_HEX,VALS(expansion_switch_msgs),0x0,NULL,HFILL}
4031 { &hf_expansion_phone_cmd,
4032 {"Expansion CMD (phone)","unistim.expansion.phone",FT_UINT8,
4033 BASE_HEX,VALS(expansion_phone_msgs),0x0,NULL,HFILL}
4035 { &hf_expansion_softlabel_number,
4036 {"Module Soft Label Number","unistim.expansion.label.number",FT_UINT8,
4037 BASE_DEC,NULL,0x00,NULL,HFILL}
4041 /****LAST****/
4042 { &hf_generic_string,
4043 {"DATA","unistim.generic.data",FT_STRING,
4044 BASE_NONE,NULL,0x00,NULL,HFILL}
4046 { &hf_generic_data,
4047 {"DATA","unistim.generic.data",FT_BYTES,
4048 BASE_NONE,NULL,0x00,NULL,HFILL}
4052 /* Setup protocol subtree array */
4054 static gint *ett[] = {
4055 &ett_unistim
4058 static ei_register_info ei[] = {
4059 { &ei_unistim_len, { "unistim.len.bad", PI_MALFORMED, PI_ERROR, "Length too short", EXPFILL }},
4062 expert_module_t* expert_unistim;
4064 proto_unistim=proto_register_protocol("UNISTIM Protocol", "UNISTIM", "unistim");
4066 proto_register_subtree_array(ett,array_length(ett));
4067 proto_register_field_array(proto_unistim,hf,array_length(hf));
4068 expert_unistim = expert_register_protocol(proto_unistim);
4069 expert_register_field_array(expert_unistim, ei, array_length(ei));
4071 unistim_tap = register_tap("unistim");
4073 unistim_module = prefs_register_protocol(proto_unistim, proto_reg_handoff_unistim);
4075 prefs_register_uint_preference(unistim_module, "udp.port", "UNISTIM UDP port",
4076 "UNISTIM port (default 5000)", 10, &global_unistim_port);
4079 void
4080 proto_reg_handoff_unistim(void) {
4081 static gboolean initialized = FALSE;
4082 static dissector_handle_t unistim_handle;
4083 static guint unistim_port;
4085 if (!initialized) {
4086 unistim_handle=new_create_dissector_handle(dissect_unistim,proto_unistim);
4087 dissector_add_handle("udp.port", unistim_handle); /* for "decode as" */
4088 initialized=TRUE;
4089 } else {
4090 if (unistim_port != 0) {
4091 dissector_delete_uint("udp.port",unistim_port,unistim_handle);
4095 if (global_unistim_port != 0) {
4096 dissector_add_uint("udp.port",global_unistim_port,unistim_handle);
4098 unistim_port = global_unistim_port;