Convert a number of "guint" to "uint" in function names and alike.
This commit is contained in:
parent
b72753c50a
commit
c7091b057c
@ -371,13 +371,13 @@ struct aeron_fragment_t_stct
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Aeron transport management. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
static unsigned aeron_guint32_hash_func(const void *key)
|
||||
static unsigned aeron_uint32_hash_func(const void *key)
|
||||
{
|
||||
uint32_t value = *((const uint32_t *) key);
|
||||
return ((unsigned) value);
|
||||
}
|
||||
|
||||
static gboolean aeron_guint32_compare_func(const void *lhs, const void *rhs)
|
||||
static gboolean aeron_uint32_compare_func(const void *lhs, const void *rhs)
|
||||
{
|
||||
uint32_t key1 = *((const uint32_t *) lhs);
|
||||
uint32_t key2 = *((const uint32_t *) rhs);
|
||||
@ -402,7 +402,7 @@ static aeron_transport_t * aeron_transport_add(const aeron_conversation_info_t *
|
||||
session_map = (wmem_map_t *) conversation_get_proto_data(conv, proto_aeron);
|
||||
if (session_map == NULL)
|
||||
{
|
||||
session_map = wmem_map_new(wmem_file_scope(), aeron_guint32_hash_func, aeron_guint32_compare_func);
|
||||
session_map = wmem_map_new(wmem_file_scope(), aeron_uint32_hash_func, aeron_uint32_compare_func);
|
||||
conversation_add_proto_data(conv, proto_aeron, (void *) session_map);
|
||||
}
|
||||
transport = (aeron_transport_t *) wmem_map_lookup(session_map, (const void *) &session_id);
|
||||
@ -412,7 +412,7 @@ static aeron_transport_t * aeron_transport_add(const aeron_conversation_info_t *
|
||||
}
|
||||
transport = wmem_new0(wmem_file_scope(), aeron_transport_t);
|
||||
transport->channel_id = aeron_channel_id_assign();
|
||||
transport->stream = wmem_map_new(wmem_file_scope(), aeron_guint32_hash_func, aeron_guint32_compare_func);
|
||||
transport->stream = wmem_map_new(wmem_file_scope(), aeron_uint32_hash_func, aeron_uint32_compare_func);
|
||||
transport->last_frame = NULL;
|
||||
copy_address_wmem(wmem_file_scope(), &(transport->addr1), cinfo->addr1);
|
||||
copy_address_wmem(wmem_file_scope(), &(transport->addr2), cinfo->addr2);
|
||||
@ -440,7 +440,7 @@ static aeron_stream_t * aeron_transport_stream_add(aeron_transport_t * transport
|
||||
{
|
||||
stream = wmem_new0(wmem_file_scope(), aeron_stream_t);
|
||||
stream->transport = transport;
|
||||
stream->term = wmem_map_new(wmem_file_scope(), aeron_guint32_hash_func, aeron_guint32_compare_func);
|
||||
stream->term = wmem_map_new(wmem_file_scope(), aeron_uint32_hash_func, aeron_uint32_compare_func);
|
||||
stream->rcv = wmem_list_new(wmem_file_scope());
|
||||
stream->rcv_count = 0;
|
||||
stream->last_frame = NULL;
|
||||
@ -491,7 +491,7 @@ static aeron_term_t * aeron_stream_term_add(aeron_stream_t * stream, uint32_t te
|
||||
{
|
||||
term = wmem_new0(wmem_file_scope(), aeron_term_t);
|
||||
term->stream = stream;
|
||||
term->fragment = wmem_map_new(wmem_file_scope(), aeron_guint32_hash_func, aeron_guint32_compare_func);
|
||||
term->fragment = wmem_map_new(wmem_file_scope(), aeron_uint32_hash_func, aeron_uint32_compare_func);
|
||||
term->message = wmem_tree_new(wmem_file_scope());
|
||||
term->orphan_fragment = wmem_list_new(wmem_file_scope());
|
||||
term->nak = wmem_list_new(wmem_file_scope());
|
||||
|
@ -121,15 +121,15 @@ static dissector_handle_t asp_handle;
|
||||
static dissector_handle_t pap_handle;
|
||||
|
||||
static int proto_atp;
|
||||
static int hf_atp_ctrlinfo; /* guint8_t control information */
|
||||
static int hf_atp_ctrlinfo; /* uint8_t control information */
|
||||
static int hf_atp_function; /* bits 7,6 function */
|
||||
static int hf_atp_xo; /* bit 5 exactly-once */
|
||||
static int hf_atp_eom; /* bit 4 end-of-message */
|
||||
static int hf_atp_sts; /* bit 3 send transaction status */
|
||||
static int hf_atp_treltimer; /* bits 2,1,0 TRel timeout indicator */
|
||||
|
||||
static int hf_atp_bitmap; /* guint8_t bitmap or sequence number */
|
||||
static int hf_atp_tid; /* guint16_t transaction id. */
|
||||
static int hf_atp_bitmap; /* uint8_t bitmap or sequence number */
|
||||
static int hf_atp_tid; /* uint16_t transaction id. */
|
||||
static int hf_atp_user_bytes;
|
||||
|
||||
static int hf_atp_segments;
|
||||
|
@ -618,7 +618,7 @@ awdl_tag_sync_tree(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void
|
||||
}
|
||||
|
||||
inline static bool
|
||||
test_bit_guint32(unsigned i, uint32_t n) {
|
||||
test_bit_uint32(unsigned i, uint32_t n) {
|
||||
return ((n >> i) & 1) == 1;
|
||||
}
|
||||
|
||||
@ -691,14 +691,14 @@ awdl_tag_service_params(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
|
||||
if (bitmask != 0) {
|
||||
unsigned count = 0;
|
||||
for (unsigned i = 0; i < 32; i++) {
|
||||
if (test_bit_guint32(i, bitmask)) {
|
||||
if (test_bit_uint32(i, bitmask)) {
|
||||
proto_item *value_item;
|
||||
unsigned shift = i << 3;
|
||||
value_item = proto_tree_add_bitmask(values_tree, tvb, offset, hf_awdl_serviceparams_values,
|
||||
ett_awdl_serviceparams_value, value_fields, ENC_LITTLE_ENDIAN);
|
||||
uint8_t value = tvb_get_uint8(tvb, offset);
|
||||
for (unsigned k = 0; k < 8; k++) {
|
||||
if (test_bit_guint32(k, value)) {
|
||||
if (test_bit_uint32(k, value)) {
|
||||
if (count == 0) {
|
||||
proto_item_append_text(values_item, ": %u", k + shift);
|
||||
} else {
|
||||
|
@ -573,7 +573,7 @@ bp_block_canonical_t * bp_block_canonical_new(wmem_allocator_t *alloc, uint64_t
|
||||
return obj;
|
||||
}
|
||||
|
||||
static uint64_t * guint64_new(wmem_allocator_t *alloc, const uint64_t val) {
|
||||
static uint64_t * uint64_new(wmem_allocator_t *alloc, const uint64_t val) {
|
||||
uint64_t *obj = wmem_new(alloc, uint64_t);
|
||||
*obj = val;
|
||||
return obj;
|
||||
@ -1261,7 +1261,7 @@ static int dissect_block_canonical(tvbuff_t *tvb, packet_info *pinfo, proto_tree
|
||||
if (block->type_code) {
|
||||
wmem_list_t *type_list = wmem_map_lookup(bundle->block_types, block->type_code);
|
||||
if (!type_list) {
|
||||
uint64_t *key = guint64_new(wmem_file_scope(), *(block->type_code));
|
||||
uint64_t *key = uint64_new(wmem_file_scope(), *(block->type_code));
|
||||
type_list = wmem_list_new(wmem_file_scope());
|
||||
wmem_map_insert(bundle->block_types, key, type_list);
|
||||
}
|
||||
@ -1273,7 +1273,7 @@ static int dissect_block_canonical(tvbuff_t *tvb, packet_info *pinfo, proto_tree
|
||||
expert_add_info(pinfo, item_block_num, &ei_block_num_dupe);
|
||||
}
|
||||
else {
|
||||
uint64_t *key = guint64_new(wmem_file_scope(), *(block->block_number));
|
||||
uint64_t *key = uint64_new(wmem_file_scope(), *(block->block_number));
|
||||
wmem_map_insert(bundle->block_nums, key, block);
|
||||
}
|
||||
}
|
||||
|
@ -1420,23 +1420,23 @@ dissect_dbus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
|
||||
static unsigned
|
||||
get_dbus_message_len(packet_info *pinfo _U_, tvbuff_t *tvb,
|
||||
int offset, void *data _U_) {
|
||||
uint32_t (*get_guint32)(tvbuff_t *, const int);
|
||||
uint32_t (*get_uint32)(tvbuff_t *, const int);
|
||||
|
||||
uint32_t len_body, len_hdr;
|
||||
|
||||
switch (tvb_get_uint8(tvb, offset)) {
|
||||
case 'l':
|
||||
get_guint32 = tvb_get_letohl;
|
||||
get_uint32 = tvb_get_letohl;
|
||||
break;
|
||||
case 'B':
|
||||
default:
|
||||
get_guint32 = tvb_get_ntohl;
|
||||
get_uint32 = tvb_get_ntohl;
|
||||
break;
|
||||
}
|
||||
|
||||
len_hdr = DBUS_HEADER_LEN + get_guint32(tvb, offset + 12);
|
||||
len_hdr = DBUS_HEADER_LEN + get_uint32(tvb, offset + 12);
|
||||
len_hdr = WS_ROUNDUP_8(len_hdr);
|
||||
len_body = get_guint32(tvb, offset + 4);
|
||||
len_body = get_uint32(tvb, offset + 4);
|
||||
|
||||
return len_hdr + len_body;
|
||||
}
|
||||
|
@ -2354,9 +2354,9 @@ static int dissect_kademlia_tag(tvbuff_t *tvb, packet_info *pinfo,
|
||||
tag_type = tvb_get_uint8( tvb, offset+2 );
|
||||
offset = dissect_kademlia_tagname( tvb, pinfo, offset, subtree, &tagname_string, &tagname_extended_string );
|
||||
if ( strlen( tagname_string ) == 1 ) {
|
||||
const uint8_t tagname_guint = *(const uint8_t*)tagname_string;
|
||||
const uint8_t tagname_uint = *(const uint8_t*)tagname_string;
|
||||
|
||||
proto_item_append_text( tag_node, " 0x%02X [%s] = ", tagname_guint, tagname_extended_string );
|
||||
proto_item_append_text( tag_node, " 0x%02X [%s] = ", tagname_uint, tagname_extended_string );
|
||||
}
|
||||
else
|
||||
proto_item_append_text( tag_node, " \"%s\" [%s] = ", tagname_string, tagname_extended_string );
|
||||
|
@ -352,12 +352,12 @@ post_update_config_can_addr_mappings_cb(void) {
|
||||
}
|
||||
|
||||
static uint16_t
|
||||
masked_guint16_value(const uint16_t value, const uint16_t mask) {
|
||||
masked_uint16_value(const uint16_t value, const uint16_t mask) {
|
||||
return (value & mask) >> ws_ctz(mask);
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
masked_guint32_value(const uint32_t value, const uint32_t mask) {
|
||||
masked_uint32_value(const uint32_t value, const uint32_t mask) {
|
||||
return (value & mask) >> ws_ctz(mask);
|
||||
}
|
||||
|
||||
@ -386,14 +386,14 @@ find_config_can_addr_mapping(bool ext_id, uint32_t can_id, uint16_t *source_addr
|
||||
|
||||
if (tmp != NULL) {
|
||||
if (tmp->ecu_addr_mask != 0) {
|
||||
*source_addr = masked_guint32_value(can_id, tmp->ecu_addr_mask);
|
||||
*source_addr = masked_uint32_value(can_id, tmp->ecu_addr_mask);
|
||||
*target_addr = *source_addr;
|
||||
*addr_len = (7 + ws_count_ones(tmp->ecu_addr_mask)) / 8;
|
||||
return 1;
|
||||
}
|
||||
if (tmp->source_addr_mask != 0 && tmp->target_addr_mask != 0) {
|
||||
*source_addr = masked_guint32_value(can_id, tmp->source_addr_mask);
|
||||
*target_addr = masked_guint32_value(can_id, tmp->target_addr_mask);
|
||||
*source_addr = masked_uint32_value(can_id, tmp->source_addr_mask);
|
||||
*target_addr = masked_uint32_value(can_id, tmp->target_addr_mask);
|
||||
uint8_t tmp_len = ws_count_ones(tmp->source_addr_mask);
|
||||
if (ws_count_ones(tmp->target_addr_mask) > tmp_len) {
|
||||
tmp_len = ws_count_ones(tmp->target_addr_mask);
|
||||
@ -759,7 +759,7 @@ dissect_iso15765(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, uint32_t b
|
||||
/* we need to assume that all following bytes are of the first frame data */
|
||||
data_length = tvb_reported_length(tvb) - offset;
|
||||
|
||||
frag_id_low = masked_guint16_value(pci, ISO15765_MESSAGE_SEQUENCE_NUMBER_MASK);
|
||||
frag_id_low = masked_uint16_value(pci, ISO15765_MESSAGE_SEQUENCE_NUMBER_MASK);
|
||||
fragmented = true;
|
||||
|
||||
/* FlexRay data_length cut off, if configured */
|
||||
|
@ -148,7 +148,7 @@ static const value_string company_pid_vals[] = {
|
||||
/*
|
||||
* struct _timestamps_t {
|
||||
* uint8_t version;
|
||||
* guint24 reserved;
|
||||
* uint24_t reserved;
|
||||
* struct _timestamp_t timestamps[8];
|
||||
* };
|
||||
*/
|
||||
|
@ -1200,7 +1200,7 @@ dissect_mmse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, uint8_t pdut,
|
||||
proto_tree_add_string_format(mmse_tree, hf_mmse_header_string, tvb, offset - 1,
|
||||
length + 1, str, "%s: %s (Not decoded)", hdr_name, str);
|
||||
} else { /* General form with length */
|
||||
if (peek == 0x1F) { /* Value length in guintvar */
|
||||
if (peek == 0x1F) { /* Value length in uintvar */
|
||||
unsigned length_len = 0;
|
||||
length = 1 + tvb_get_uintvar(tvb, offset + 1,
|
||||
&length_len, pinfo, &ei_mmse_oversized_uintvar);
|
||||
|
@ -2011,7 +2011,7 @@ process_ptvc_record(ptvcursor_t *ptvc, packet_info *pinfo, const ptvc_record *re
|
||||
* We construct a conversation specified by the client and server
|
||||
* addresses and the connection number; the key representing the unique
|
||||
* NCP request then is composed of the pointer to the conversation
|
||||
* structure, cast to a "guint" (which may throw away the upper 32
|
||||
* structure, cast to a "uint" (which may throw away the upper 32
|
||||
* bits of the pointer on a P64 platform, but the low-order 32 bits
|
||||
* are more likely to differ between conversations than the upper 32 bits),
|
||||
* and the sequence number.
|
||||
@ -7661,7 +7661,7 @@ dissect_nds_reply(tvbuff_t *tvb, packet_info *pinfo,
|
||||
process_multivalues(ncp_tree, tvb, pinfo, &temp_value);
|
||||
break;
|
||||
case NDS_TAG_REMOTE_ENTRY:
|
||||
nds_offset += 4; /* GUINT32 reserved field */
|
||||
nds_offset += 4; /* UINT32 reserved field */
|
||||
proto_tree_add_item(ncp_tree, hf_nds_eid, tvb, nds_offset, 4, ENC_LITTLE_ENDIAN);
|
||||
nds_offset += 4;
|
||||
temp_value.vvalue = tvb_get_letohl(tvb, nds_offset);
|
||||
|
@ -4004,7 +4004,7 @@ static const fragment_items ndps_frag_items = {
|
||||
* We construct a conversation specified by the client and server
|
||||
* addresses and the connection number; the key representing the unique
|
||||
* NDPS request then is composed of the pointer to the conversation
|
||||
* structure, cast to a "guint" (which may throw away the upper 32
|
||||
* structure, cast to a "uint" (which may throw away the upper 32
|
||||
* bits of the pointer on a P64 platform, but the low-order 32 bits
|
||||
* are more likely to differ between conversations than the upper 32 bits),
|
||||
* and the sequence number.
|
||||
|
@ -14109,9 +14109,9 @@ static value_string_ext q708_sanc_areas_ext = VALUE_STRING_EXT_INIT(q708_sanc_ar
|
||||
* bulletins. This function takes an ISPC and analyzes it according to these tables.
|
||||
*/
|
||||
void
|
||||
analyze_q708_ispc(tvbuff_t *tvb, proto_tree *tree, int offset, int length, guint16 ispc)
|
||||
analyze_q708_ispc(tvbuff_t *tvb, proto_tree *tree, int offset, int length, uint16_t ispc)
|
||||
{
|
||||
guint16 sanc;
|
||||
uint16_t sanc;
|
||||
|
||||
sanc = ispc >> 3;
|
||||
|
||||
|
@ -1839,7 +1839,7 @@ dissect_q931_information_rate_ie(tvbuff_t *tvb, packet_info *pinfo, int offset,
|
||||
}
|
||||
|
||||
static int
|
||||
dissect_q931_guint16_value(tvbuff_t *tvb, packet_info *pinfo, int offset, int len,
|
||||
dissect_q931_uint16_value(tvbuff_t *tvb, packet_info *pinfo, int offset, int len,
|
||||
proto_tree *tree, proto_item* item, int hf_value)
|
||||
{
|
||||
uint8_t octet;
|
||||
@ -1921,7 +1921,7 @@ dissect_q931_e2e_transit_delay_ie(tvbuff_t *tvb, packet_info *pinfo, int offset,
|
||||
|
||||
if (len == 0)
|
||||
return;
|
||||
value_len = dissect_q931_guint16_value(tvb, pinfo, offset, len, tree, item, hf_q931_cumulative_transit_delay);
|
||||
value_len = dissect_q931_uint16_value(tvb, pinfo, offset, len, tree, item, hf_q931_cumulative_transit_delay);
|
||||
if (value_len < 0)
|
||||
return; /* error */
|
||||
offset += value_len;
|
||||
@ -1929,7 +1929,7 @@ dissect_q931_e2e_transit_delay_ie(tvbuff_t *tvb, packet_info *pinfo, int offset,
|
||||
|
||||
if (len == 0)
|
||||
return;
|
||||
value_len = dissect_q931_guint16_value(tvb, pinfo, offset, len, tree, item, hf_q931_requested_end_to_end_transit_delay);
|
||||
value_len = dissect_q931_uint16_value(tvb, pinfo, offset, len, tree, item, hf_q931_requested_end_to_end_transit_delay);
|
||||
if (value_len < 0)
|
||||
return; /* error */
|
||||
offset += value_len;
|
||||
@ -1937,7 +1937,7 @@ dissect_q931_e2e_transit_delay_ie(tvbuff_t *tvb, packet_info *pinfo, int offset,
|
||||
|
||||
if (len == 0)
|
||||
return;
|
||||
dissect_q931_guint16_value(tvb, pinfo, offset, len, tree, item, hf_q931_maximum_end_to_end_transit_delay);
|
||||
dissect_q931_uint16_value(tvb, pinfo, offset, len, tree, item, hf_q931_maximum_end_to_end_transit_delay);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1949,7 +1949,7 @@ dissect_q931_td_selection_and_int_ie(tvbuff_t *tvb, packet_info *pinfo, int offs
|
||||
{
|
||||
if (len == 0)
|
||||
return;
|
||||
dissect_q931_guint16_value(tvb, pinfo, offset, len, tree, item, hf_q931_transit_delay);
|
||||
dissect_q931_uint16_value(tvb, pinfo, offset, len, tree, item, hf_q931_transit_delay);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -201,7 +201,7 @@ riemann_verify_wire_format(uint64_t field_number, const char *field_name, int ex
|
||||
}
|
||||
|
||||
static uint64_t
|
||||
riemann_get_guint64(tvbuff_t *tvb, unsigned offset, unsigned *len)
|
||||
riemann_get_uint64(tvbuff_t *tvb, unsigned offset, unsigned *len)
|
||||
{
|
||||
uint64_t num = 0;
|
||||
unsigned shift = 0;
|
||||
@ -228,7 +228,7 @@ riemann_get_string(wmem_allocator_t *scope, tvbuff_t *tvb, int offset)
|
||||
uint64_t size;
|
||||
unsigned len = 0;
|
||||
|
||||
size = riemann_get_guint64(tvb, offset, &len);
|
||||
size = riemann_get_uint64(tvb, offset, &len);
|
||||
offset += len;
|
||||
return tvb_get_string_enc(scope, tvb, offset, (int)size, ENC_ASCII);
|
||||
}
|
||||
@ -239,7 +239,7 @@ riemann_dissect_int64(proto_tree *riemann_tree, tvbuff_t *tvb, unsigned offset,
|
||||
uint64_t num;
|
||||
unsigned len = 0;
|
||||
|
||||
num = riemann_get_guint64(tvb, offset, &len);
|
||||
num = riemann_get_uint64(tvb, offset, &len);
|
||||
proto_tree_add_int64(riemann_tree, hf_index, tvb, offset, len, num);
|
||||
return len;
|
||||
}
|
||||
@ -251,7 +251,7 @@ riemann_dissect_sint64(proto_tree *riemann_tree, tvbuff_t *tvb, unsigned offset,
|
||||
int64_t snum;
|
||||
unsigned len = 0;
|
||||
|
||||
num = riemann_get_guint64(tvb, offset, &len);
|
||||
num = riemann_get_uint64(tvb, offset, &len);
|
||||
/* zigzag decoding */
|
||||
if (num & 1) {
|
||||
snum = -((int64_t)(num >> 1)) - 1;
|
||||
@ -269,7 +269,7 @@ riemann_dissect_string(proto_tree *riemann_tree, tvbuff_t *tvb, unsigned offset,
|
||||
uint64_t size;
|
||||
unsigned len = 0, orig_offset = offset;
|
||||
|
||||
size = riemann_get_guint64(tvb, offset, &len);
|
||||
size = riemann_get_uint64(tvb, offset, &len);
|
||||
offset += len;
|
||||
proto_tree_add_item(riemann_tree, hf_index, tvb, offset, (int)size, ENC_ASCII);
|
||||
offset += (int)size;
|
||||
@ -289,13 +289,13 @@ riemann_dissect_attribute(packet_info *pinfo, proto_tree *riemann_tree,
|
||||
proto_item *pi;
|
||||
proto_tree *attribute_tree;
|
||||
|
||||
size = (int64_t)riemann_get_guint64(tvb, offset, &len);
|
||||
size = (int64_t)riemann_get_uint64(tvb, offset, &len);
|
||||
pi = proto_tree_add_item(riemann_tree, hf_riemann_attribute, tvb, (int)offset, (int)(size + len), ENC_NA);
|
||||
attribute_tree = proto_item_add_subtree(pi, ett_attribute);
|
||||
offset += len;
|
||||
|
||||
while (size > 0) {
|
||||
tag = riemann_get_guint64(tvb, offset, &len);
|
||||
tag = riemann_get_uint64(tvb, offset, &len);
|
||||
fn = tag >> 3;
|
||||
wire = tag & 0x7;
|
||||
offset += len;
|
||||
@ -332,13 +332,13 @@ riemann_dissect_query(packet_info *pinfo, proto_tree *riemann_tree,
|
||||
proto_item *pi;
|
||||
proto_tree *query_tree;
|
||||
|
||||
size = (int64_t)riemann_get_guint64(tvb, offset, &len);
|
||||
size = (int64_t)riemann_get_uint64(tvb, offset, &len);
|
||||
pi = proto_tree_add_item(riemann_tree, hf_riemann_query, tvb, (int)offset, (int)(size + len), ENC_NA);
|
||||
query_tree = proto_item_add_subtree(pi, ett_query);
|
||||
offset += len;
|
||||
|
||||
while (size > 0) {
|
||||
tag = riemann_get_guint64(tvb, offset, &len);
|
||||
tag = riemann_get_uint64(tvb, offset, &len);
|
||||
fn = tag >> 3;
|
||||
wire = tag & 0x7;
|
||||
offset += len;
|
||||
@ -373,14 +373,14 @@ riemann_dissect_event(packet_info *pinfo, proto_tree *riemann_tree,
|
||||
proto_tree *event_tree;
|
||||
bool need_comma = false;
|
||||
|
||||
size = riemann_get_guint64(tvb, offset, &len);
|
||||
size = riemann_get_uint64(tvb, offset, &len);
|
||||
pi = proto_tree_add_item(riemann_tree, hf_riemann_event, tvb, (int)offset, (int)(size + len), ENC_NA);
|
||||
event_tree = proto_item_add_subtree(pi, ett_event);
|
||||
offset += len;
|
||||
|
||||
while (size > 0) {
|
||||
const char *comma = need_comma ? ", " : "";
|
||||
tag = riemann_get_guint64(tvb, offset, &len);
|
||||
tag = riemann_get_uint64(tvb, offset, &len);
|
||||
fn = tag >> 3;
|
||||
wire = tag & 0x7;
|
||||
offset += len;
|
||||
@ -466,14 +466,14 @@ riemann_dissect_state(packet_info *pinfo, proto_tree *riemann_tree,
|
||||
proto_tree *state_tree;
|
||||
bool need_comma = false;
|
||||
|
||||
size = riemann_get_guint64(tvb, offset, &len);
|
||||
size = riemann_get_uint64(tvb, offset, &len);
|
||||
pi = proto_tree_add_item(riemann_tree, hf_riemann_state, tvb, offset, (int)(size + len), ENC_NA);
|
||||
state_tree = proto_item_add_subtree(pi, ett_state);
|
||||
offset += len;
|
||||
|
||||
while (size > 0) {
|
||||
const char *comma = need_comma ? ", " : "";
|
||||
tag = riemann_get_guint64(tvb, offset, &len);
|
||||
tag = riemann_get_uint64(tvb, offset, &len);
|
||||
fn = tag >> 3;
|
||||
wire = tag & 0x7;
|
||||
offset += len;
|
||||
@ -541,7 +541,7 @@ riemann_dissect_msg(packet_info *pinfo, proto_item *pi, proto_tree *riemann_tree
|
||||
bool cinfo_set = false;
|
||||
|
||||
while (size > 0) {
|
||||
tag = riemann_get_guint64(tvb, offset, &len);
|
||||
tag = riemann_get_uint64(tvb, offset, &len);
|
||||
fn = tag >> 3;
|
||||
wire = tag & 0x7;
|
||||
offset += len;
|
||||
@ -605,7 +605,7 @@ is_riemann(tvbuff_t *tvb, unsigned offset)
|
||||
(captured_length < RIEMANN_MIN_NEEDED_FOR_HEURISTICS)) {
|
||||
return false;
|
||||
}
|
||||
tag = riemann_get_guint64(tvb, offset, &len);
|
||||
tag = riemann_get_uint64(tvb, offset, &len);
|
||||
field_number = tag >> 3;
|
||||
wire_format = tag & 0x7;
|
||||
if ((field_number == RIEMANN_FN_MSG_OK && wire_format == RIEMANN_WIRE_INTEGER) ||
|
||||
|
@ -5809,7 +5809,7 @@ static int rtps_util_add_typecode(proto_tree *tree, tvbuff_t *tvb, packet_info *
|
||||
|
||||
/* - - - - - - - Default index - - - - - - - */
|
||||
LONG_ALIGN(offset);
|
||||
/*defaultIdx = NEXT_guint32(tvb, offset, encoding);*/
|
||||
/*defaultIdx = NEXT_uint32(tvb, offset, encoding);*/
|
||||
offset += 4;
|
||||
|
||||
/* - - - - - - - Discriminator type code - - - - - - - */
|
||||
|
@ -2571,7 +2571,7 @@ s7comm_get_timestring_from_s7time(tvbuff_t *tvb, unsigned offset, char *str, int
|
||||
*
|
||||
*******************************************************************************************************/
|
||||
static uint8_t
|
||||
s7comm_guint8_from_bcd(uint8_t i)
|
||||
s7comm_uint8_from_bcd(uint8_t i)
|
||||
{
|
||||
return 10 * (i /16) + (i % 16);
|
||||
}
|
||||
@ -2603,7 +2603,7 @@ s7comm_add_timestamp_to_tree(tvbuff_t *tvb,
|
||||
if (has_ten_bytes) {
|
||||
/* The low nibble of byte 10 is weekday, the high nibble the LSD of msec */
|
||||
for (i = 0; i < 9; i++) {
|
||||
timestamp[i] = s7comm_guint8_from_bcd(tvb_get_uint8(tvb, offset + i));
|
||||
timestamp[i] = s7comm_uint8_from_bcd(tvb_get_uint8(tvb, offset + i));
|
||||
}
|
||||
tmp = tvb_get_uint8(tvb, offset + 9) >> 4;
|
||||
} else {
|
||||
@ -2612,11 +2612,11 @@ s7comm_add_timestamp_to_tree(tvbuff_t *tvb,
|
||||
timestamp[0] = 0;
|
||||
timestamp[1] = 19; /* start with 19.., will be corrected later */
|
||||
for (i = 0; i < 7; i++) {
|
||||
timestamp[i + 2] = s7comm_guint8_from_bcd(tvb_get_uint8(tvb, offset + i));
|
||||
timestamp[i + 2] = s7comm_uint8_from_bcd(tvb_get_uint8(tvb, offset + i));
|
||||
}
|
||||
tmp = tvb_get_uint8(tvb, offset + 7) >> 4;
|
||||
}
|
||||
timestamp[9] = s7comm_guint8_from_bcd(tmp);
|
||||
timestamp[9] = s7comm_uint8_from_bcd(tmp);
|
||||
|
||||
msec = (uint16_t)timestamp[8] * 10 + (uint16_t)timestamp[9];
|
||||
year_org = timestamp[1];
|
||||
|
@ -1428,7 +1428,7 @@ parameter_value_q (proto_tree *tree, packet_info *pinfo, proto_item *ti, tvbuff_
|
||||
#define wkh_3_ValueWithLength /* Parse Value With Length */ \
|
||||
/* END */ \
|
||||
} else { /* val_start points to 1st byte of length field */ \
|
||||
if (val_id == 0x1F) { /* Value Length = guintvar */ \
|
||||
if (val_id == 0x1F) { /* Value Length = uintvar */ \
|
||||
val_len = tvb_get_uintvar(tvb, val_start + 1, &val_len_len, pinfo, &ei_wsp_oversized_uintvar); \
|
||||
val_len_len++; /* 0x1F length indicator byte */ \
|
||||
} else { /* Short length followed by Len data octets */ \
|
||||
@ -4350,8 +4350,8 @@ static const hdr_parse_func_ptr WellKnownOpenwaveHeader[128] = {
|
||||
* Followed with:
|
||||
* 2nd byte: 0x00 -- 0x1E: <Value Length (bytes)>
|
||||
* Followed with: <Len> bytes of data
|
||||
* 2nd byte: 0x1F : <Value Length is a guintvar>
|
||||
* Followed with: <guintvar Len>
|
||||
* 2nd byte: 0x1F : <Value Length is a uintvar>
|
||||
* Followed with: <uintvar Len>
|
||||
* Followed with: <Len> bytes of data
|
||||
* 2nd byte: 0x20 -- 0x7F: <Textual header value (C string)>
|
||||
* 2nd byte: 0x80 -- 0xFF: <Binary value (7-bit encoded ID)>
|
||||
@ -4566,7 +4566,7 @@ dissect_sir(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
tvb, offset, len, val_len);
|
||||
offset += len;
|
||||
/* Protocol Options list.
|
||||
* Each protocol option is encoded as a guintvar */
|
||||
* Each protocol option is encoded as a uintvar */
|
||||
|
||||
val_len_save = val_len;
|
||||
for (i = 0; i < val_len_save; i++) {
|
||||
|
@ -59,7 +59,7 @@ subset_get_ptr(tvbuff_t *tvb, unsigned abs_offset, unsigned abs_length)
|
||||
}
|
||||
|
||||
static int
|
||||
subset_find_guint8(tvbuff_t *tvb, unsigned abs_offset, unsigned limit, uint8_t needle)
|
||||
subset_find_uint8(tvbuff_t *tvb, unsigned abs_offset, unsigned limit, uint8_t needle)
|
||||
{
|
||||
struct tvb_subset *subset_tvb = (struct tvb_subset *) tvb;
|
||||
int result;
|
||||
@ -77,7 +77,7 @@ subset_find_guint8(tvbuff_t *tvb, unsigned abs_offset, unsigned limit, uint8_t n
|
||||
}
|
||||
|
||||
static int
|
||||
subset_pbrk_guint8(tvbuff_t *tvb, unsigned abs_offset, unsigned limit, const ws_mempbrk_pattern* pattern, unsigned char *found_needle)
|
||||
subset_pbrk_uint8(tvbuff_t *tvb, unsigned abs_offset, unsigned limit, const ws_mempbrk_pattern* pattern, unsigned char *found_needle)
|
||||
{
|
||||
struct tvb_subset *subset_tvb = (struct tvb_subset *) tvb;
|
||||
int result;
|
||||
@ -109,8 +109,8 @@ static const struct tvb_ops tvb_subset_ops = {
|
||||
subset_offset, /* offset */
|
||||
subset_get_ptr, /* get_ptr */
|
||||
subset_memcpy, /* memcpy */
|
||||
subset_find_guint8, /* find_guint8 */
|
||||
subset_pbrk_guint8, /* pbrk_guint8 */
|
||||
subset_find_uint8, /* find_uint8 */
|
||||
subset_pbrk_uint8, /* pbrk_uint8 */
|
||||
subset_clone, /* clone */
|
||||
};
|
||||
|
||||
|
@ -69,8 +69,8 @@ def test_replacements():
|
||||
test_string = """\
|
||||
(if_info_t*) g_malloc0(sizeof(if_info_t))
|
||||
(oui_info_t *)g_malloc(sizeof (oui_info_t))
|
||||
(guint8 *)g_malloc(16 * sizeof(guint8))
|
||||
(guint32 *)g_malloc(sizeof(guint32)*2)
|
||||
(uint8_t *)g_malloc(16 * sizeof(uint8_t))
|
||||
(uint32_t *)g_malloc(sizeof(uint32_t)*2)
|
||||
(struct imf_field *)g_malloc (sizeof (struct imf_field))
|
||||
(rtspstat_t *)g_malloc( sizeof(rtspstat_t) )
|
||||
(proto_data_t *)wmem_alloc(scope, sizeof(proto_data_t))
|
||||
@ -85,8 +85,8 @@ def test_replacements():
|
||||
expected_output = """\
|
||||
g_new0(if_info_t, 1)
|
||||
g_new(oui_info_t, 1)
|
||||
g_new(guint8, 16)
|
||||
g_new(guint32, 2)
|
||||
g_new(uint8_t, 16)
|
||||
g_new(uint32_t, 2)
|
||||
g_new(struct imf_field, 1)
|
||||
g_new(rtspstat_t, 1)
|
||||
wmem_new(scope, proto_data_t)
|
||||
|
@ -96,13 +96,13 @@ manuf_hash_to_qstringlist(void *key, void *value, void *sl_ptr)
|
||||
{
|
||||
QList<QStringList> *values = (QList<QStringList> *) sl_ptr;
|
||||
hashmanuf_t *manuf = (hashmanuf_t*)value;
|
||||
unsigned eth_as_guint = GPOINTER_TO_UINT(key);
|
||||
unsigned eth_as_uint = GPOINTER_TO_UINT(key);
|
||||
|
||||
if (get_hash_manuf_used(manuf)) {
|
||||
QString entry = QString("%1:%2:%3")
|
||||
.arg((eth_as_guint >> 16 & 0xff), 2, 16, QChar('0'))
|
||||
.arg((eth_as_guint >> 8 & 0xff), 2, 16, QChar('0'))
|
||||
.arg((eth_as_guint & 0xff), 2, 16, QChar('0'));
|
||||
.arg((eth_as_uint >> 16 & 0xff), 2, 16, QChar('0'))
|
||||
.arg((eth_as_uint >> 8 & 0xff), 2, 16, QChar('0'))
|
||||
.arg((eth_as_uint & 0xff), 2, 16, QChar('0'));
|
||||
|
||||
*values << (QStringList() << entry << QString(get_hash_manuf_resolved_name(manuf)));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user