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