summaryrefslogtreecommitdiffstats
path: root/plugins/epan/unistim/packet-unistim.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--plugins/epan/unistim/packet-unistim.c387
1 files changed, 193 insertions, 194 deletions
diff --git a/plugins/epan/unistim/packet-unistim.c b/plugins/epan/unistim/packet-unistim.c
index 861ac763..e6094c2e 100644
--- a/plugins/epan/unistim/packet-unistim.c
+++ b/plugins/epan/unistim/packet-unistim.c
@@ -35,76 +35,76 @@ void proto_register_unistim(void);
static dissector_handle_t unistim_handle;
static unistim_info_t *uinfo;
-static int unistim_tap = -1;
+static int unistim_tap;
void proto_reg_handoff_unistim(void);
-static void dissect_payload(proto_tree *unistim_tree,tvbuff_t *tvb,gint offset, packet_info *pinfo);
-
-static gint dissect_broadcast_switch(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset,guint msg_len);
-static gint dissect_audio_switch(proto_tree *msg_tree,packet_info *pinfo,
- tvbuff_t *tvb,gint offset,guint msg_len);
-static gint dissect_expansion_switch(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset,guint msg_len);
-static gint dissect_display_switch(proto_tree *msg_tree, packet_info *pinfo,
- tvbuff_t *tvb,gint offset,guint msg_len);
-static gint dissect_key_indicator_switch(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset,guint msg_len);
-static gint dissect_basic_switch(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset,guint msg_len);
-static gint dissect_network_switch(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset,guint msg_len);
-static gint dissect_broadcast_phone(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset,guint msg_len);
-static gint dissect_audio_phone(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset,guint msg_len);
-static gint dissect_expansion_phone(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset,guint msg_len);
-static gint dissect_display_phone(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset,guint msg_len);
-static gint dissect_key_indicator_phone(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset,guint msg_len);
-static gint dissect_basic_phone(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset,guint msg_len);
-static gint dissect_network_phone(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset,guint msg_len);
-static gint dissect_unistim_message(proto_tree *unistim_tree, packet_info *pinfo,
- tvbuff_t *tvb,gint offset);
-static gint dissect_uftp_message(proto_tree *unistim_tree, packet_info *pinfo,
- tvbuff_t *tvb,gint offset);
-
-
-static int proto_unistim = -1;
-static int hf_unistim_seq_nu = -1;
-static int hf_unistim_packet_type = -1;
-static int hf_unistim_payload = -1;
-static int hf_unistim_cmd_add = -1;
-static int hf_unistim_len =-1;
-static int hf_terminal_id=-1;
-static int hf_basic_bit_field=-1;
-
-static int hf_basic_switch_cmd=-1;
-static int hf_basic_phone_cmd=-1;
-static int hf_broadcast_switch_cmd=-1;
-/* static int hf_broadcast_phone_cmd=-1; */
-static int hf_audio_switch_cmd=-1;
-static int hf_audio_phone_cmd=-1;
-static int hf_display_switch_cmd=-1;
-static int hf_display_phone_cmd=-1;
-static int hf_key_switch_cmd=-1;
-static int hf_key_phone_cmd=-1;
-static int hf_network_switch_cmd=-1;
-static int hf_network_phone_cmd=-1;
-static int hf_expansion_switch_cmd=-1;
-static int hf_expansion_phone_cmd=-1;
-static int hf_module_key_number=-1;
-
-static int hf_generic_data=-1;
-static int hf_generic_string=-1;
-
-static gint ett_unistim = -1;
-
-static expert_field ei_unistim_len = EI_INIT;
+static void dissect_payload(proto_tree *unistim_tree,tvbuff_t *tvb,int offset, packet_info *pinfo);
+
+static int dissect_broadcast_switch(proto_tree *msg_tree,
+ tvbuff_t *tvb,int offset,unsigned msg_len);
+static int dissect_audio_switch(proto_tree *msg_tree,packet_info *pinfo,
+ tvbuff_t *tvb,int offset,unsigned msg_len);
+static int dissect_expansion_switch(proto_tree *msg_tree,
+ tvbuff_t *tvb,int offset,unsigned msg_len);
+static int dissect_display_switch(proto_tree *msg_tree, packet_info *pinfo,
+ tvbuff_t *tvb,int offset,unsigned msg_len);
+static int dissect_key_indicator_switch(proto_tree *msg_tree,
+ tvbuff_t *tvb,int offset,unsigned msg_len);
+static int dissect_basic_switch(proto_tree *msg_tree,
+ tvbuff_t *tvb,int offset,unsigned msg_len);
+static int dissect_network_switch(proto_tree *msg_tree,
+ tvbuff_t *tvb,int offset,unsigned msg_len);
+static int dissect_broadcast_phone(proto_tree *msg_tree,
+ tvbuff_t *tvb,int offset,unsigned msg_len);
+static int dissect_audio_phone(proto_tree *msg_tree,
+ tvbuff_t *tvb,int offset,unsigned msg_len);
+static int dissect_expansion_phone(proto_tree *msg_tree,
+ tvbuff_t *tvb,int offset,unsigned msg_len);
+static int dissect_display_phone(proto_tree *msg_tree,
+ tvbuff_t *tvb,int offset,unsigned msg_len);
+static int dissect_key_indicator_phone(proto_tree *msg_tree,
+ tvbuff_t *tvb,int offset,unsigned msg_len);
+static int dissect_basic_phone(proto_tree *msg_tree,
+ tvbuff_t *tvb,int offset,unsigned msg_len);
+static int dissect_network_phone(proto_tree *msg_tree,
+ tvbuff_t *tvb,int offset,unsigned msg_len);
+static int dissect_unistim_message(proto_tree *unistim_tree, packet_info *pinfo,
+ tvbuff_t *tvb,int offset);
+static int dissect_uftp_message(proto_tree *unistim_tree, packet_info *pinfo,
+ tvbuff_t *tvb,int offset);
+
+
+static int proto_unistim;
+static int hf_unistim_seq_nu;
+static int hf_unistim_packet_type;
+static int hf_unistim_payload;
+static int hf_unistim_cmd_add;
+static int hf_unistim_len;
+static int hf_terminal_id;
+static int hf_basic_bit_field;
+
+static int hf_basic_switch_cmd;
+static int hf_basic_phone_cmd;
+static int hf_broadcast_switch_cmd;
+/* static int hf_broadcast_phone_cmd; */
+static int hf_audio_switch_cmd;
+static int hf_audio_phone_cmd;
+static int hf_display_switch_cmd;
+static int hf_display_phone_cmd;
+static int hf_key_switch_cmd;
+static int hf_key_phone_cmd;
+static int hf_network_switch_cmd;
+static int hf_network_phone_cmd;
+static int hf_expansion_switch_cmd;
+static int hf_expansion_phone_cmd;
+static int hf_module_key_number;
+
+static int hf_generic_data;
+static int hf_generic_string;
+
+static int ett_unistim;
+
+static expert_field ei_unistim_len;
static const value_string packet_names[]={
{0,"NAK"},
@@ -159,18 +159,18 @@ static const value_string command_address[]={
static int
dissect_unistim(tvbuff_t *tvb,packet_info *pinfo,proto_tree *tree,void *data _U_){
- gint offset=0;
+ int offset=0;
proto_item *ti= NULL;
proto_tree *overall_unistim_tree = NULL;
proto_tree *rudpm_tree=NULL;
/* heuristic*/
- switch(tvb_get_guint8(tvb,offset+4)) {/*rudp packet type 0,1,2 only */
+ switch(tvb_get_uint8(tvb,offset+4)) {/*rudp packet type 0,1,2 only */
case 0x0:/*NAK*/
case 0x1:/*ACK*/
break;
case 0x2:/*PAYLOAD*/
- switch(tvb_get_guint8(tvb,offset+5)){/*payload type 0,1,2,3,ff only */
+ switch(tvb_get_uint8(tvb,offset+5)){/*payload type 0,1,2,3,ff only */
case 0x0: /*NULL*/
case 0x1: /*UNISTIM*/
case 0x2: /*UNISTIM WITH TERM ID*/
@@ -217,9 +217,9 @@ dissect_unistim(tvbuff_t *tvb,packet_info *pinfo,proto_tree *tree,void *data _U_
offset+=4;
proto_tree_add_item(rudpm_tree,hf_unistim_packet_type,tvb,offset,1,ENC_BIG_ENDIAN);
- uinfo->rudp_type = tvb_get_guint8(tvb,offset);
+ uinfo->rudp_type = tvb_get_uint8(tvb,offset);
- switch(tvb_get_guint8(tvb,offset)) {
+ switch(tvb_get_uint8(tvb,offset)) {
case 0x00:
/*NAK*/
col_add_fstr(pinfo->cinfo, COL_INFO, "NAK for seq - 0x%X",
@@ -238,7 +238,6 @@ dissect_unistim(tvbuff_t *tvb,packet_info *pinfo,proto_tree *tree,void *data _U_
break;
default:
return 0;
- break;
}
/* Queue packet for tap */
@@ -247,10 +246,10 @@ dissect_unistim(tvbuff_t *tvb,packet_info *pinfo,proto_tree *tree,void *data _U_
}
static void
-dissect_payload(proto_tree *overall_unistim_tree,tvbuff_t *tvb, gint offset, packet_info *pinfo){
+dissect_payload(proto_tree *overall_unistim_tree,tvbuff_t *tvb, int offset, packet_info *pinfo){
proto_item *ti;
proto_tree *unistim_tree;
- guint payload_proto=tvb_get_guint8(tvb,offset);
+ unsigned payload_proto=tvb_get_uint8(tvb,offset);
/* Payload type for tap */
uinfo->payload_type = payload_proto;
@@ -292,24 +291,24 @@ dissect_payload(proto_tree *overall_unistim_tree,tvbuff_t *tvb, gint offset, pac
break;
}
- /* Handle UFTP seperately because it is significantly different
+ /* Handle UFTP separately because it is significantly different
than standard UNISTIM */
while (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_unistim_message(unistim_tree,pinfo,tvb,offset);
}
-static gint
-dissect_uftp_message(proto_tree *unistim_tree,packet_info *pinfo _U_,tvbuff_t *tvb,gint offset){
+static int
+dissect_uftp_message(proto_tree *unistim_tree,packet_info *pinfo _U_,tvbuff_t *tvb,int offset){
- guint command;
- guint str_len;
- guint dat_len;
+ unsigned command;
+ unsigned str_len;
+ unsigned dat_len;
proto_tree *msg_tree;
msg_tree = proto_tree_add_subtree(unistim_tree,tvb,offset,-1,ett_unistim,NULL,"UFTP CMD");
- command=tvb_get_guint8(tvb,offset);
+ command=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_uftp_command,tvb,offset,1,ENC_BIG_ENDIAN);
@@ -365,21 +364,21 @@ dissect_uftp_message(proto_tree *unistim_tree,packet_info *pinfo _U_,tvbuff_t *t
}
-static gint
-dissect_unistim_message(proto_tree *unistim_tree,packet_info *pinfo,tvbuff_t *tvb,gint offset){
- guint addr;
- guint msg_len;
+static int
+dissect_unistim_message(proto_tree *unistim_tree,packet_info *pinfo,tvbuff_t *tvb,int offset){
+ unsigned addr;
+ unsigned msg_len;
proto_item *ti;
proto_tree *msg_tree;
msg_tree = proto_tree_add_subtree(unistim_tree,tvb,offset,-1,ett_unistim,&ti,"Unistim CMD");
- addr=tvb_get_guint8(tvb,offset);
+ addr=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_unistim_cmd_add,tvb,offset,1,ENC_BIG_ENDIAN);
offset+=1;
- msg_len=tvb_get_guint8(tvb,offset);
+ msg_len=tvb_get_uint8(tvb,offset);
if (msg_len<=2)
{
@@ -480,12 +479,12 @@ dissect_unistim_message(proto_tree *unistim_tree,packet_info *pinfo,tvbuff_t *tv
/*DONE*/
-static gint
+static int
dissect_basic_phone(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset, guint msg_len){
- guint basic_cmd;
+ tvbuff_t *tvb,int offset, unsigned msg_len){
+ unsigned basic_cmd;
- basic_cmd=tvb_get_guint8(tvb,offset);
+ basic_cmd=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_basic_phone_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
@@ -570,11 +569,11 @@ dissect_basic_phone(proto_tree *msg_tree,
return offset;
}
/*DONE*/
-static gint
+static int
dissect_basic_switch(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset,guint msg_len){
- guint basic_cmd;
- basic_cmd=tvb_get_guint8(tvb,offset);
+ tvbuff_t *tvb,int offset,unsigned msg_len){
+ unsigned basic_cmd;
+ basic_cmd=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_basic_switch_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
offset+=1;msg_len-=1;
switch(basic_cmd){
@@ -649,14 +648,14 @@ dissect_basic_switch(proto_tree *msg_tree,
/*DONE*/
-static gint
+static int
dissect_broadcast_switch(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset, guint msg_len){
- guint bcast_cmd;
- guint year,month,day,hour,minute,second;
+ tvbuff_t *tvb,int offset, unsigned msg_len){
+ unsigned bcast_cmd;
+ unsigned year,month,day,hour,minute,second;
proto_tree *date_tree;
proto_tree *time_tree;
- bcast_cmd=tvb_get_guint8(tvb,offset);
+ bcast_cmd=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_broadcast_switch_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
offset+=1;msg_len-=1;
switch(bcast_cmd){
@@ -675,12 +674,12 @@ dissect_broadcast_switch(proto_tree *msg_tree,
break;
case 0x02:
/*Time and Date Download*/
- year=tvb_get_guint8(tvb,offset);
- month=tvb_get_guint8(tvb,offset+1);
- day=tvb_get_guint8(tvb,offset+2);
- hour=tvb_get_guint8(tvb,offset+3);
- minute=tvb_get_guint8(tvb,offset+4);
- second=tvb_get_guint8(tvb,offset+5);
+ year=tvb_get_uint8(tvb,offset);
+ month=tvb_get_uint8(tvb,offset+1);
+ day=tvb_get_uint8(tvb,offset+2);
+ hour=tvb_get_uint8(tvb,offset+3);
+ minute=tvb_get_uint8(tvb,offset+4);
+ second=tvb_get_uint8(tvb,offset+5);
date_tree=proto_tree_add_subtree_format(msg_tree,tvb,offset,3,ett_unistim,NULL,
"Date %i/%i/%i",month,day,year%100);
proto_tree_add_item(date_tree,hf_broadcast_year,tvb,offset,1,ENC_BIG_ENDIAN);
@@ -721,9 +720,9 @@ dissect_broadcast_switch(proto_tree *msg_tree,
return offset;
}
/*DONE Haven't seen any phone broadcasts, wouldn't expect to*/
-static gint
+static int
dissect_broadcast_phone(proto_tree *msg_tree,
- tvbuff_t *tvb, gint offset,guint msg_len){
+ tvbuff_t *tvb, int offset,unsigned msg_len){
proto_tree_add_item(msg_tree,hf_generic_data, tvb,offset,msg_len,ENC_NA);
offset+=msg_len;
@@ -732,17 +731,17 @@ dissect_broadcast_phone(proto_tree *msg_tree,
}
/*DONE*/
-static gint
+static int
dissect_display_switch(proto_tree *msg_tree, packet_info *pinfo,
- tvbuff_t *tvb, gint offset,guint msg_len){
- guint clear_mask;
- guint highlight_cmd;
- guint time_date_mask;
- guint display_cmd;
- guint address_byte;
- guint movement_byte;
+ tvbuff_t *tvb, int offset,unsigned msg_len){
+ unsigned clear_mask;
+ unsigned highlight_cmd;
+ unsigned time_date_mask;
+ unsigned display_cmd;
+ unsigned address_byte;
+ unsigned movement_byte;
proto_tree *address_tree;
- display_cmd=tvb_get_guint8(tvb,offset);
+ display_cmd=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_display_switch_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
offset+=1;msg_len-=1;
@@ -805,7 +804,7 @@ dissect_display_switch(proto_tree *msg_tree, packet_info *pinfo,
break;
case 0x0f:
/*Clear Field*/
- clear_mask=tvb_get_guint8(tvb,offset);
+ clear_mask=tvb_get_uint8(tvb,offset);
/*need to know which paths to take*/
proto_tree_add_item(msg_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
proto_tree_add_item(msg_tree,hf_display_clear_numeric,
@@ -896,7 +895,7 @@ dissect_display_switch(proto_tree *msg_tree, packet_info *pinfo,
break;
case 0x10:
/*Cursor Control*/
- movement_byte=tvb_get_guint8(tvb,offset);
+ movement_byte=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
proto_tree_add_item(msg_tree,hf_display_cursor_move_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
proto_tree_add_item(msg_tree,hf_display_cursor_blink,tvb,offset,1,ENC_BIG_ENDIAN);
@@ -906,7 +905,7 @@ dissect_display_switch(proto_tree *msg_tree, packet_info *pinfo,
break;
}
if((movement_byte&0x01)==0x01){
- address_byte=tvb_get_guint8(tvb,offset);
+ address_byte=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
proto_tree_add_item(msg_tree,hf_display_write_address_numeric,
tvb,offset,1,ENC_BIG_ENDIAN);
@@ -968,7 +967,7 @@ dissect_display_switch(proto_tree *msg_tree, packet_info *pinfo,
break;
case 0x17:
/*Time and Date Format*/
- time_date_mask=tvb_get_guint8(tvb,offset);
+ time_date_mask=tvb_get_uint8(tvb,offset);
if((time_date_mask&DISPLAY_USE_TIME_FORMAT)==DISPLAY_USE_TIME_FORMAT){
proto_tree_add_item(msg_tree,hf_display_time_format,tvb,offset,1,ENC_BIG_ENDIAN);
}
@@ -993,7 +992,7 @@ dissect_display_switch(proto_tree *msg_tree, packet_info *pinfo,
#define F_TAG 4
if((display_cmd&F_ADDR)==F_ADDR){
address_tree=proto_tree_add_subtree(msg_tree,tvb,offset,0,ett_unistim,NULL,"Address Data");
- address_byte=tvb_get_guint8(tvb,offset);
+ address_byte=tvb_get_uint8(tvb,offset);
proto_tree_add_item(address_tree,hf_basic_bit_field,
tvb,offset,1,ENC_BIG_ENDIAN);
proto_tree_add_item(address_tree,hf_display_write_address_numeric,
@@ -1088,7 +1087,7 @@ dissect_display_switch(proto_tree *msg_tree, packet_info *pinfo,
break;
case 0x23:
/*Highlighted Field Definition*/
- highlight_cmd=tvb_get_guint8(tvb,offset);
+ highlight_cmd=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_display_cursor_numeric,tvb,offset,1,ENC_BIG_ENDIAN);
proto_tree_add_item(msg_tree,hf_display_cursor_context ,tvb,offset,1,ENC_BIG_ENDIAN);
proto_tree_add_item(msg_tree,hf_display_cursor_line,tvb,offset,1,ENC_BIG_ENDIAN);
@@ -1186,12 +1185,12 @@ dissect_display_switch(proto_tree *msg_tree, packet_info *pinfo,
return offset;
}
/*DONE*/
-static gint
+static int
dissect_display_phone(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset,guint msg_len){
- guint display_cmd;
- guint highlight_cmd;
- display_cmd=tvb_get_guint8(tvb,offset);
+ tvbuff_t *tvb,int offset,unsigned msg_len){
+ unsigned display_cmd;
+ unsigned highlight_cmd;
+ display_cmd=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_display_phone_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
offset+=1;msg_len-=1;
switch(display_cmd){
@@ -1238,7 +1237,7 @@ dissect_display_phone(proto_tree *msg_tree,
break;
case 0x03:
/*Highlight Status On*/
- highlight_cmd=tvb_get_guint8(tvb,offset);
+ highlight_cmd=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_display_cursor_numeric,tvb,offset,1,ENC_BIG_ENDIAN);
proto_tree_add_item(msg_tree,hf_display_cursor_context ,tvb,offset,1,ENC_BIG_ENDIAN);
proto_tree_add_item(msg_tree,hf_display_cursor_line,tvb,offset,1,ENC_BIG_ENDIAN);
@@ -1298,11 +1297,11 @@ dissect_display_phone(proto_tree *msg_tree,
}
-static gint
+static int
dissect_key_indicator_switch(proto_tree *msg_tree,
- tvbuff_t *tvb, gint offset,guint msg_len){
- guint key_cmd;
- key_cmd=tvb_get_guint8(tvb,offset);
+ tvbuff_t *tvb, int offset,unsigned msg_len){
+ unsigned key_cmd;
+ key_cmd=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_key_switch_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
offset+=1;msg_len-=1;
switch(key_cmd){
@@ -1416,21 +1415,21 @@ dissect_key_indicator_switch(proto_tree *msg_tree,
}
/*DONE*/
-static gint
+static int
dissect_key_indicator_phone(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset, guint msg_len){
- guint key_cmd;
- key_cmd=tvb_get_guint8(tvb,offset);
+ tvbuff_t *tvb,int offset, unsigned msg_len){
+ unsigned key_cmd;
+ key_cmd=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_key_phone_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
offset+=1;msg_len-=1;
switch(key_cmd){
case 0x00:
/*Key Event*/
/* Set the tap info */
- uinfo->key_state = tvb_get_guint8(tvb,offset);
+ uinfo->key_state = tvb_get_uint8(tvb,offset);
uinfo->key_state >>= 6;
/* Extract the key code */
- uinfo->key_val = (tvb_get_guint8(tvb,offset) & 0x3F);
+ uinfo->key_val = (tvb_get_uint8(tvb,offset) & 0x3F);
proto_tree_add_item(msg_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
proto_tree_add_item(msg_tree,hf_key_code,tvb,offset,1,ENC_BIG_ENDIAN);
@@ -1511,13 +1510,13 @@ dissect_key_indicator_phone(proto_tree *msg_tree,
/*Done*/
-static gint
+static int
dissect_network_switch(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset, guint msg_len){
- guint network_cmd;
- guint string_len;
+ tvbuff_t *tvb,int offset, unsigned msg_len){
+ unsigned network_cmd;
+ unsigned string_len;
- network_cmd=tvb_get_guint8(tvb,offset);
+ network_cmd=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_network_switch_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
offset+=1;msg_len-=1;
switch(network_cmd){
@@ -1654,13 +1653,13 @@ dissect_network_switch(proto_tree *msg_tree,
}
/*DONE*/
-static gint
+static int
dissect_expansion_switch(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset, guint msg_len){
- guint expansion_cmd;
+ tvbuff_t *tvb,int offset, unsigned msg_len){
+ unsigned expansion_cmd;
- expansion_cmd=tvb_get_guint8(tvb,offset);
+ expansion_cmd=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_expansion_switch_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
offset+=1; msg_len-=1;
switch(expansion_cmd){
@@ -1701,16 +1700,16 @@ dissect_expansion_switch(proto_tree *msg_tree,
return offset;
}
-static gint
+static int
dissect_expansion_phone(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset, guint msg_len){
- guint expansion_cmd;
- guint key_number;
+ tvbuff_t *tvb,int offset, unsigned msg_len){
+ unsigned expansion_cmd;
+ unsigned key_number;
- expansion_cmd=tvb_get_guint8(tvb,offset);
+ expansion_cmd=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_expansion_phone_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
offset+=1; msg_len-=1;
- key_number=(tvb_get_guint8(tvb,offset))-64;
+ key_number=(tvb_get_uint8(tvb,offset))-64;
switch(expansion_cmd){
case 0x59:
@@ -1723,13 +1722,13 @@ dissect_expansion_phone(proto_tree *msg_tree,
return offset;
}
-static gint
+static int
dissect_network_phone(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset, guint msg_len){
- guint network_cmd;
+ tvbuff_t *tvb,int offset, unsigned msg_len){
+ unsigned network_cmd;
proto_tree *server_tree;
- guint i;
- network_cmd=tvb_get_guint8(tvb,offset);
+ unsigned i;
+ network_cmd=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_network_phone_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
offset+=1;msg_len-=1;
switch(network_cmd){
@@ -1768,7 +1767,7 @@ dissect_network_phone(proto_tree *msg_tree,
break;
case 0x05:
/*Network Manager Options Report*/
- proto_tree_add_boolean(msg_tree,hf_net_phone_diag,tvb,offset,1,FALSE);
+ proto_tree_add_boolean(msg_tree,hf_net_phone_diag,tvb,offset,1,false);
proto_tree_add_item(msg_tree,hf_net_phone_rudp,tvb,offset,1,ENC_BIG_ENDIAN);
offset+=1;
break;
@@ -1790,7 +1789,7 @@ dissect_network_phone(proto_tree *msg_tree,
offset+=1;msg_len-=1;
for (i=1; msg_len>8; i++){
/*if less than 9 not full report so punt*/
-/* guint16 port_num;
+/* uint16_t port_num;
port_num=tvb_get_ntohs(tvb,offset);
if(port_num<1064)
break;
@@ -1834,15 +1833,15 @@ dissect_network_phone(proto_tree *msg_tree,
return offset;
}
/*DONE*/
-static gint
+static int
dissect_audio_switch(proto_tree *msg_tree,packet_info *pinfo,
- tvbuff_t *tvb,gint offset,guint msg_len){
+ tvbuff_t *tvb,int offset,unsigned msg_len){
proto_tree *param_tree;
- guint audio_cmd;
- guint apb_op_code;
- guint apb_data_len;
- guint vocoder_param;
- audio_cmd=tvb_get_guint8(tvb,offset);
+ unsigned audio_cmd;
+ unsigned apb_op_code;
+ unsigned apb_data_len;
+ unsigned vocoder_param;
+ audio_cmd=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_audio_switch_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
offset+=1;msg_len-=1;
switch(audio_cmd){
@@ -2050,13 +2049,13 @@ dissect_audio_switch(proto_tree *msg_tree,packet_info *pinfo,
proto_tree_add_item(msg_tree,hf_audio_apb_number,tvb,offset,1,ENC_BIG_ENDIAN);
offset+=1;msg_len-=1;
while(msg_len>0){
- apb_op_code=tvb_get_guint8(tvb,offset);
+ apb_op_code=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_audio_apb_op_code,tvb,
offset,1,ENC_BIG_ENDIAN);
offset+=1;msg_len-=1;
if(apb_op_code>0x39){
/*should have a len + data*/
- apb_data_len=tvb_get_guint8(tvb,offset);
+ apb_data_len=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_audio_apb_param_len,tvb,
offset,1,ENC_BIG_ENDIAN);
offset+=1;msg_len-=1;
@@ -2112,15 +2111,15 @@ dissect_audio_switch(proto_tree *msg_tree,packet_info *pinfo,
proto_tree_add_item(msg_tree,hf_audio_far_ip_add,tvb,offset,4,ENC_BIG_ENDIAN);
offset+=4;msg_len-=4;
{
- guint32 far_ip_addr;
+ uint32_t far_ip_addr;
address far_addr;
- guint16 far_port;
+ uint16_t far_port;
far_ip_addr = tvb_get_ipv4(tvb, offset-4);
set_address(&far_addr, AT_IPv4, 4, &far_ip_addr);
far_port = tvb_get_ntohs(tvb, offset-8);
- rtp_add_address(pinfo, PT_UDP, &far_addr, far_port, 0, "UNISTIM", pinfo->num, FALSE, NULL);
+ rtp_add_address(pinfo, PT_UDP, &far_addr, far_port, 0, "UNISTIM", pinfo->num, false, NULL);
far_port = tvb_get_ntohs(tvb, offset-6);
rtcp_add_address(pinfo, &far_addr, far_port, 0, "UNISTIM", pinfo->num);
@@ -2178,7 +2177,7 @@ dissect_audio_switch(proto_tree *msg_tree,packet_info *pinfo,
offset+=1;msg_len-=1;
while(msg_len>0){
param_tree=proto_tree_add_subtree(msg_tree,tvb,offset,0,ett_unistim,NULL,"Param");
- vocoder_param=tvb_get_guint8(tvb,offset);
+ vocoder_param=tvb_get_uint8(tvb,offset);
proto_tree_add_item(param_tree,hf_basic_bit_field,
tvb,offset,1,ENC_BIG_ENDIAN);
proto_tree_add_item(param_tree,hf_audio_vocoder_param,
@@ -2270,15 +2269,15 @@ dissect_audio_switch(proto_tree *msg_tree,packet_info *pinfo,
}
/*DONE*/
-static gint
+static int
dissect_audio_phone(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset,guint msg_len){
- guint audio_cmd;
- guint apb_op_code;
- guint apb_data_len;
- guint stream_dir;
- guint stream_state;
- audio_cmd=tvb_get_guint8(tvb,offset);
+ tvbuff_t *tvb,int offset,unsigned msg_len){
+ unsigned audio_cmd;
+ unsigned apb_op_code;
+ unsigned apb_data_len;
+ unsigned stream_dir;
+ unsigned stream_state;
+ audio_cmd=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_audio_phone_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
offset+=1;msg_len-=1;
switch(audio_cmd){
@@ -2415,12 +2414,12 @@ dissect_audio_phone(proto_tree *msg_tree,
break;
case 0x13:
/*Audio Stream Status Report*/
- stream_dir=tvb_get_guint8(tvb,offset);
+ stream_dir=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_audio_stream_direction_code,tvb,offset,1,ENC_BIG_ENDIAN);
offset+=1;msg_len-=1;
proto_tree_add_item(msg_tree,hf_audio_mgr_stream_id,tvb,offset,1,ENC_BIG_ENDIAN);
offset+=1;msg_len-=1;
- stream_state=tvb_get_guint8(tvb,offset);
+ stream_state=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_audio_stream_state,tvb,offset,1,ENC_BIG_ENDIAN);
offset+=1;msg_len-=1;
if((AUDIO_STREAM_STATE&stream_state)!=AUDIO_STREAM_STATE)
@@ -2462,13 +2461,13 @@ dissect_audio_phone(proto_tree *msg_tree,
proto_tree_add_item(msg_tree,hf_audio_apb_number,tvb,offset,1,ENC_BIG_ENDIAN);
offset+=1;msg_len-=1;
while(msg_len>0){
- apb_op_code=tvb_get_guint8(tvb,offset);
+ apb_op_code=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_audio_apb_op_code,tvb,
offset,1,ENC_BIG_ENDIAN);
offset+=1;msg_len-=1;
if(apb_op_code>0x39){
/*should have a len + data*/
- apb_data_len=tvb_get_guint8(tvb,offset);
+ apb_data_len=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_audio_apb_param_len,tvb,
offset,1,ENC_BIG_ENDIAN);
offset+=1;msg_len-=1;
@@ -2744,23 +2743,23 @@ proto_register_unistim(void){
},
{ &hf_basic_switch_query_attr,
{"Query Basic Manager Attributes","unistim.basic.attrs",FT_BOOLEAN,
- 8,NULL,BASIC_QUERY_ATTRIBUTES,"Basic Query Attributes",HFILL}
+ 8,NULL,BASIC_QUERY_ATTRIBUTES,NULL,HFILL}
},
{ &hf_basic_switch_query_opts,
{"Query Basic Manager Options","unistim.basic.opts",FT_BOOLEAN,
- 8,NULL,BASIC_QUERY_OPTIONS,"Basic Query Options",HFILL}
+ 8,NULL,BASIC_QUERY_OPTIONS,NULL,HFILL}
},
{ &hf_basic_switch_query_fw,
{"Query Basic Switch Firmware","unistim.basic.fw",FT_BOOLEAN,
- 8,NULL,BASIC_QUERY_FW,"Basic Query Firmware",HFILL}
+ 8,NULL,BASIC_QUERY_FW,NULL,HFILL}
},
{ &hf_basic_switch_query_hw_id,
{"Query Basic Manager Hardware ID","unistim.basic.hwid",FT_BOOLEAN,
- 8,NULL,BASIC_QUERY_HW_ID,"Basic Query Hardware ID",HFILL}
+ 8,NULL,BASIC_QUERY_HW_ID,NULL,HFILL}
},
{ &hf_basic_switch_query_it_type,
{"Query Basic Manager Phone Type","unistim.basic.type",FT_BOOLEAN,
- 8,NULL,BASIC_QUERY_IT_TYPE,"Basic Query Phone Type",HFILL}
+ 8,NULL,BASIC_QUERY_IT_TYPE,NULL,HFILL}
},
{ &hf_basic_switch_query_prod_eng_code,
{"Query Basic Manager Prod Eng Code","unistim.basic.code",FT_BOOLEAN,
@@ -3826,7 +3825,7 @@ proto_register_unistim(void){
/* Setup protocol subtree array */
- static gint *ett[] = {
+ static int *ett[] = {
&ett_unistim
};