Ask Your Question
0

proto.h changes from 3.5 to 3.6

asked 2021-12-08 19:35:24 +0000

The move from 3.5 to 3.6 broke all my plugins as I use proto_tree_add_uint_bits_format_value extensively and the signature of this function has changed from:

WS_DLL_PUBLIC proto_item *  
proto_tree_add_uint_bits_format_value(proto_tree *tree, const int hf_index, tvbuff_t *tvb,
    const guint bit_offset, const gint no_of_bits, guint32 value, const char *format, ...)
    G_GNUC_PRINTF(7,8)

to:

WS_DLL_PUBLIC proto_item *
proto_tree_add_uint_bits_format_value(proto_tree *tree, const int hf_index, tvbuff_t *tvb,
    const guint bit_offset, const gint no_of_bits, guint32 value, const guint encoding,
    const char *format, ...)
    G_GNUC_PRINTF(8,9);

Aside from breaking plugins (over 100 errors I need to fix in my plugins), the README.dissector has the old (3.5 and prior) signature:

proto_item *
proto_tree_add_uint_bits_format_value(tree, id, tvb, bit_offset,
    no_of_bits, value, format, ...);

This should probably be fixed.

Bottom line: some README on breaking changes would probably have been helpful.

Thanks,

pjm

edit retag flag offensive close merge delete

Comments

Presumably you mean "3.4", not "3.5". There was never a Wireshark release numbered 3.5, just development builds.

Guy Harris gravatar imageGuy Harris ( 2021-12-08 21:43:00 +0000 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-12-08 20:31:21 +0000

Chuckc gravatar image

(One of the developers may come by and give a proper answer. This is just to let you know you're being heard.)

Looks like the change happened in USB HID: Parse bit fields with correct bit order and there is some discussion about it there.

You will reach more of the developers with a post to the Wireshark-dev email list.

Issues (big fixes/documentation updates) can be opened at the Wireshark GitLab instance.

edit flag offensive delete link more

Comments

Chuckc gravatar imageChuckc ( 2021-12-09 14:12:48 +0000 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2021-12-08 19:35:24 +0000

Seen: 112 times

Last updated: Dec 08 '21