diff options
Diffstat (limited to 'epan/dissectors/packet-turbocell.c')
-rw-r--r-- | epan/dissectors/packet-turbocell.c | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/epan/dissectors/packet-turbocell.c b/epan/dissectors/packet-turbocell.c index 47653eb5..bd1c16d5 100644 --- a/epan/dissectors/packet-turbocell.c +++ b/epan/dissectors/packet-turbocell.c @@ -16,7 +16,7 @@ * networks, contact kiltedtaco@xxxxxxxxx */ /* 2008-08-05 : Added support for aggregate frames. - * AP mode, NWID and sat mode fiels identification were + * AP mode, NWID and sat mode fields identification were * taken from http://aphopper.sourceforge.net/turbocell.html * everything else is based on (educated) guesses. */ @@ -40,30 +40,30 @@ void proto_register_turbocell(void); void proto_reg_handoff_turbocell(void); -static int proto_turbocell = -1; -static int proto_aggregate = -1; - -static int hf_turbocell_type = -1; -static int hf_turbocell_dst = -1; -static int hf_turbocell_counter = -1; -static int hf_turbocell_name = -1; -static int hf_turbocell_nwid = -1; -static int hf_turbocell_satmode = -1; -static int hf_turbocell_unknown = -1; -static int hf_turbocell_timestamp = -1; -static int hf_turbocell_station = -1; -static int hf_turbocell_ip = -1; - -static int hf_turbocell_aggregate_msdu_header_text = -1; -static int hf_turbocell_aggregate_msdu_len = -1; -static int hf_turbocell_aggregate_unknown1 = -1; -static int hf_turbocell_aggregate_unknown2 = -1; -static int hf_turbocell_aggregate_len = -1; - -static gint ett_turbocell = -1; -static gint ett_network = -1; -static gint ett_msdu_aggregation_parent_tree = -1; -static gint ett_msdu_aggregation_subframe_tree = -1; +static int proto_turbocell; +static int proto_aggregate; + +static int hf_turbocell_type; +static int hf_turbocell_dst; +static int hf_turbocell_counter; +static int hf_turbocell_name; +static int hf_turbocell_nwid; +static int hf_turbocell_satmode; +static int hf_turbocell_unknown; +static int hf_turbocell_timestamp; +static int hf_turbocell_station; +static int hf_turbocell_ip; + +static int hf_turbocell_aggregate_msdu_header_text; +static int hf_turbocell_aggregate_msdu_len; +static int hf_turbocell_aggregate_unknown1; +static int hf_turbocell_aggregate_unknown2; +static int hf_turbocell_aggregate_len; + +static int ett_turbocell; +static int ett_network; +static int ett_msdu_aggregation_parent_tree; +static int ett_msdu_aggregation_subframe_tree; /* The ethernet dissector we hand off to */ static dissector_handle_t eth_handle; @@ -93,12 +93,12 @@ dissect_turbocell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat proto_tree *turbocell_tree = NULL, *network_tree; tvbuff_t *next_tvb; int i=0; - guint8 packet_type; - guint8 * str_name; - guint str_len; - gint remaining_length; + uint8_t packet_type; + uint8_t * str_name; + unsigned str_len; + int remaining_length; - packet_type = tvb_get_guint8(tvb, 0); + packet_type = tvb_get_uint8(tvb, 0); if (!(packet_type & 0x0F)){ col_set_str(pinfo->cinfo, COL_INFO, "Turbocell Packet (Beacon)"); @@ -125,7 +125,7 @@ dissect_turbocell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat /* it seem when we have this magic number,that means an alternate header version */ - if (tvb_get_bits64(tvb, 64,48,ENC_BIG_ENDIAN) != G_GINT64_CONSTANT(0x000001fe23dc45ba)){ + if (tvb_get_bits64(tvb, 64,48,ENC_BIG_ENDIAN) != INT64_C(0x000001fe23dc45ba)){ proto_tree_add_item(turbocell_tree, hf_turbocell_counter, tvb, 0x02, 2, ENC_BIG_ENDIAN); proto_tree_add_item(turbocell_tree, hf_turbocell_dst, tvb, 0x04, 6, ENC_NA); proto_tree_add_item(turbocell_tree, hf_turbocell_timestamp, tvb, 0x0A, 3, ENC_BIG_ENDIAN); @@ -149,14 +149,14 @@ dissect_turbocell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat /* I couldn't find anything in the header that would definitively indicate if payload is either data or network info */ /* Since the frame size is limited this should work ok */ - if (tvb_get_guint8(tvb, 0x14)>=0x20){ + if (tvb_get_uint8(tvb, 0x14)>=0x20){ name_item = proto_tree_add_item(turbocell_tree, hf_turbocell_name, tvb, 0x14, 30, ENC_ASCII); network_tree = proto_item_add_subtree(name_item, ett_network); str_name=tvb_get_stringz_enc(pinfo->pool, tvb, 0x14, &str_len, ENC_ASCII); col_append_fstr(pinfo->cinfo, COL_INFO, ", Network=\"%s\"", format_text(pinfo->pool, str_name, str_len-1)); - while(tvb_get_guint8(tvb, 0x34 + 8*i)==0x00 && (tvb_reported_length_remaining(tvb,0x34 + 8*i) > 6) && (i<32)) { + while(tvb_get_uint8(tvb, 0x34 + 8*i)==0x00 && (tvb_reported_length_remaining(tvb,0x34 + 8*i) > 6) && (i<32)) { proto_tree_add_item(network_tree, hf_turbocell_station, tvb, 0x34+8*i, 6, ENC_NA); i++; } @@ -169,9 +169,9 @@ dissect_turbocell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat } else { tvbuff_t *msdu_tvb = NULL; - guint32 msdu_offset = 0x04; - guint16 j = 1; - guint16 msdu_length; + uint32_t msdu_offset = 0x04; + uint16_t j = 1; + uint16_t msdu_length; proto_item *parent_item; proto_tree *mpdu_tree; @@ -302,7 +302,7 @@ void proto_register_turbocell(void) }, }; - static gint *ett[] = { + static int *ett[] = { &ett_turbocell, &ett_network, &ett_msdu_aggregation_parent_tree, |