First time here? Check out the FAQ!
THIS IS A TEST INSTANCE. Feel free to ask and answer questions, but take care to avoid triggering too many notifications.
0

masking a proto_field of type uint64

  • retag add tags

I have a field which has the following properties:

offset_in_bits: 6112
size_in_bits: 51

This means I need to i need to add the field in the following way:

pf_my_field = ProtoField.uint64(
    "my_protocol.my_field", "my_field",
    base.DEC,
    nil,
    0x7ffffffffffff)

The issue is that it doesn't work. the mask only works for the first 32 bits, but ignores the mask of the other 32. is this a bug? or am I missing something? note: I use masking for a lot of 32 bits or smaller fields and didn't have this kind of issue.

itamar's avatar
1
itamar
asked 2022-02-03 15:01:23 +0000
grahamb's avatar
23.8k
grahamb
updated 2022-02-03 15:18:51 +0000
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

The page https://www.wireshark.org/docs/wsdg_h... describes how to handle 64-bit integers in LUA.

So a 64-bit value can be specified with UInt64. For example: UInt64(0xFFFFFFFF, 0x7FFFF).

André's avatar
176
André
answered 2022-02-03 19:31:58 +0000
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer