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