Ask Your Question

Revision history [back]

proto.h changes from 3.5 to 3.6

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