0

I see that the bitmask field in the header_field used in proto_register_field_array(const int parent, hf_register_info *hf, const int num_records); is a guint32, therefor I cannot use a 64 bit mask. Is there anyway I can go around?

Specifically, I have a 60 bit field so I am trying to create a field with type FT_UINT64and bitmask 0xffffffffffffffffor that matter, but of course, when compiling the C code i get:

warning: implicit conversion from 'long' to 'guint32' (aka 'unsigned int') changes value from 1152921504606846975 to 4294967295 [-Wconstant-conversion]
            NULL, 0xfffffffffffffff,

Thank you in advance for a response.

gigashock
  • 3
  • 2

2 Answers2

0

If the function takes a 32 bit parameter, there is no way you can force it to understand a 64 bit parameter, sorry. Look for if some other function can do what you want.

Prof. Falken
  • 24,226
  • 19
  • 100
  • 173
  • Yes I know that, that's kind of what I was going for. If anyone would know if there was some function or something in Wireshark I can use. – gigashock Aug 29 '14 at 13:52
0

After deep searching, it seems like the only possible solution is to forget about bitmasking in the header field definition and use the proto_tree_add_bits_item(proto_tree *tree, const int hf_index, tvbuff_t *tvb, const guint bit_offset, const gint no_of_bits, const guint encoding); function.

Thanks anyway :)

gigashock
  • 3
  • 2