This is our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Hi,

I'm working on a protocol dissector which uses a variable-length quantity encoding. So I've written functions like:

guint32 tvb_get_varuint32(tvbuff_t *tvb, guint8 *octet_count, guint32 offset)

to peek the values from the buffer.

For all other proto_tree_add_XXX functions I can pass my own value and length, but for adding bitmask there is no such option. There is a proto_tree_add_bitmask_len() function where I can pass my length, but not my own value.

In proto.c there are non-exported functions like proto_tree_add_bitmask_value() where I could pass a value, but not the length.

Is there any solution to realize this without any changes to proto.c?

There is at least one existing dissector (packet-wap.c) which uses a similar VLQ encoding, but has no bitmasks in it.

Thanks for help, Thomas

asked 28 Feb '16, 04:15

th-wiens's gravatar image

th-wiens
1111
accept rate: 0%

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×29
×5
×2

question asked: 28 Feb '16, 04:15

question was seen: 993 times

last updated: 28 Feb '16, 04:15

p​o​w​e​r​e​d by O​S​Q​A