#include <glib.h>
-#include "gnuc_format_check.h"
#include "ipv4.h"
#include "nstime.h"
#include "tvbuff.h"
@param format printf like format string
@param ... printf like parameters */
extern void proto_item_set_text(proto_item *ti, const char *format, ...)
- GNUC_FORMAT_CHECK(printf, 2,3);
+ G_GNUC_PRINTF(2,3);
/** Append to text of item after it has already been created.
@param ti the item to append the text to
@param format printf like format string
@param ... printf like parameters */
extern void proto_item_append_text(proto_item *ti, const char *format, ...)
- GNUC_FORMAT_CHECK(printf, 2,3);
+ G_GNUC_PRINTF(2,3);
/** Set proto_item's length inside tvb, after it has already been created.
@param ti the item to set the length
@return the newly created item */
extern proto_item *
proto_tree_add_text(proto_tree *tree, tvbuff_t *tvb, gint start, gint length, const char *format,
- ...) GNUC_FORMAT_CHECK(printf,5,6);
+ ...) G_GNUC_PRINTF(5,6);
/** Add a text-only node to a proto_tree using a variable argument list.
@param tree the tree to append this item to
@return the newly created item */
extern proto_item *
proto_tree_add_none_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
- gint length, const char *format, ...) GNUC_FORMAT_CHECK(printf,6,7);
+ gint length, const char *format, ...) G_GNUC_PRINTF(6,7);
/** Add a FT_PROTOCOL to a proto_tree.
@param tree the tree to append this item to
@return the newly created item */
extern proto_item *
proto_tree_add_protocol_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
- gint length, const char *format, ...) GNUC_FORMAT_CHECK(printf,6,7);
+ gint length, const char *format, ...) G_GNUC_PRINTF(6,7);
extern proto_item *
proto_tree_add_bytes_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb,
gint start, gint length, const guint8* start_ptr, const char *format,
- ...) GNUC_FORMAT_CHECK(printf,7,8);
+ ...) G_GNUC_PRINTF(7,8);
/** Add a formatted FT_BYTES to a proto_tree, with the format generating
the entire string for the entry, including any field name.
@return the newly created item */
extern proto_item *
proto_tree_add_bytes_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
- gint length, const guint8* start_ptr, const char *format, ...) GNUC_FORMAT_CHECK(printf,7,8);
+ gint length, const guint8* start_ptr, const char *format, ...) G_GNUC_PRINTF(7,8);
/** Add a FT_ABSOLUTE_TIME or FT_RELATIVE_TIME to a proto_tree.
@param tree the tree to append this item to
extern proto_item *
proto_tree_add_time_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb,
gint start, gint length, nstime_t* value_ptr, const char *format, ...)
- GNUC_FORMAT_CHECK(printf,7,8);
+ G_GNUC_PRINTF(7,8);
/** Add a formatted FT_ABSOLUTE_TIME or FT_RELATIVE_TIME to a proto_tree, with
the format generating the entire string for the entry, including any field
@return the newly created item */
extern proto_item *
proto_tree_add_time_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
- gint length, nstime_t* value_ptr, const char *format, ...) GNUC_FORMAT_CHECK(printf,7,8);
+ gint length, nstime_t* value_ptr, const char *format, ...) G_GNUC_PRINTF(7,8);
/** Add a FT_IPXNET to a proto_tree.
@param tree the tree to append this item to
extern proto_item *
proto_tree_add_ipxnet_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb,
gint start, gint length, guint32 value, const char *format, ...)
- GNUC_FORMAT_CHECK(printf,7,8);
+ G_GNUC_PRINTF(7,8);
/** Add a formatted FT_IPXNET to a proto_tree, with the format generating
the entire string for the entry, including any field name.
@return the newly created item */
extern proto_item *
proto_tree_add_ipxnet_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
- gint length, guint32 value, const char *format, ...) GNUC_FORMAT_CHECK(printf,7,8);
+ gint length, guint32 value, const char *format, ...) G_GNUC_PRINTF(7,8);
/** Add a FT_IPv4 to a proto_tree.
@param tree the tree to append this item to
extern proto_item *
proto_tree_add_ipv4_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb,
gint start, gint length, guint32 value, const char *format, ...)
- GNUC_FORMAT_CHECK(printf,7,8);
+ G_GNUC_PRINTF(7,8);
/** Add a formatted FT_IPv4 to a proto_tree, with the format generating
the entire string for the entry, including any field name.
@return the newly created item */
extern proto_item *
proto_tree_add_ipv4_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
- gint length, guint32 value, const char *format, ...) GNUC_FORMAT_CHECK(printf,7,8);
+ gint length, guint32 value, const char *format, ...) G_GNUC_PRINTF(7,8);
/** Add a FT_IPv6 to a proto_tree.
@param tree the tree to append this item to
extern proto_item *
proto_tree_add_ipv6_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb,
gint start, gint length, const guint8* value_ptr, const char *format,
- ...) GNUC_FORMAT_CHECK(printf,7,8);
+ ...) G_GNUC_PRINTF(7,8);
/** Add a formatted FT_IPv6 to a proto_tree, with the format generating
the entire string for the entry, including any field name.
@return the newly created item */
extern proto_item *
proto_tree_add_ipv6_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
- gint length, const guint8* value_ptr, const char *format, ...) GNUC_FORMAT_CHECK(printf,7,8);
+ gint length, const guint8* value_ptr, const char *format, ...) G_GNUC_PRINTF(7,8);
/** Add a FT_ETHER to a proto_tree.
@param tree the tree to append this item to
extern proto_item *
proto_tree_add_ether_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb,
gint start, gint length, const guint8* value, const char *format, ...)
- GNUC_FORMAT_CHECK(printf,7,8);
+ G_GNUC_PRINTF(7,8);
/** Add a formatted FT_ETHER to a proto_tree, with the format generating
the entire string for the entry, including any field name.
@return the newly created item */
extern proto_item *
proto_tree_add_ether_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
- gint length, const guint8* value, const char *format, ...) GNUC_FORMAT_CHECK(printf,7,8);
+ gint length, const guint8* value, const char *format, ...) G_GNUC_PRINTF(7,8);
/** Add a FT_GUID to a proto_tree.
@param tree the tree to append this item to
extern proto_item *
proto_tree_add_guid_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb,
gint start, gint length, const e_guid_t *value_ptr, const char *format,
- ...) GNUC_FORMAT_CHECK(printf,7,8);
+ ...) G_GNUC_PRINTF(7,8);
/** Add a formatted FT_GUID to a proto_tree, with the format generating
the entire string for the entry, including any field name.
@return the newly created item */
extern proto_item *
proto_tree_add_guid_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
- gint length, const e_guid_t *value_ptr, const char *format, ...) GNUC_FORMAT_CHECK(printf,7,8);
+ gint length, const e_guid_t *value_ptr, const char *format, ...) G_GNUC_PRINTF(7,8);
/** Add a FT_OID to a proto_tree.
@param tree the tree to append this item to
extern proto_item *
proto_tree_add_oid_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb,
gint start, gint length, const guint8* value_ptr, const char *format,
- ...) GNUC_FORMAT_CHECK(printf,7,8);
+ ...) G_GNUC_PRINTF(7,8);
/** Add a formatted FT_OID to a proto_tree, with the format generating
the entire string for the entry, including any field name.
@return the newly created item */
extern proto_item *
proto_tree_add_oid_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
- gint length, const guint8* value_ptr, const char *format, ...) GNUC_FORMAT_CHECK(printf,7,8);
+ gint length, const guint8* value_ptr, const char *format, ...) G_GNUC_PRINTF(7,8);
/** Add a FT_STRING to a proto_tree.
@param tree the tree to append this item to
extern proto_item *
proto_tree_add_string_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb,
gint start, gint length, const char* value, const char *format, ...)
- GNUC_FORMAT_CHECK(printf,7,8);
+ G_GNUC_PRINTF(7,8);
/** Add a formatted FT_STRING to a proto_tree, with the format generating
the entire string for the entry, including any field name.
@return the newly created item */
extern proto_item *
proto_tree_add_string_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
- gint length, const char* value, const char *format, ...) GNUC_FORMAT_CHECK(printf,7,8);
+ gint length, const char* value, const char *format, ...) G_GNUC_PRINTF(7,8);
/** Add a FT_BOOLEAN to a proto_tree.
@param tree the tree to append this item to
extern proto_item *
proto_tree_add_boolean_format_value(proto_tree *tree, int hfindex,
tvbuff_t *tvb, gint start, gint length, guint32 value,
- const char *format, ...) GNUC_FORMAT_CHECK(printf,7,8);
+ const char *format, ...) G_GNUC_PRINTF(7,8);
/** Add a formatted FT_BOOLEAN to a proto_tree, with the format generating
the entire string for the entry, including any field name.
@return the newly created item */
extern proto_item *
proto_tree_add_boolean_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
- gint length, guint32 value, const char *format, ...) GNUC_FORMAT_CHECK(printf,7,8);
+ gint length, guint32 value, const char *format, ...) G_GNUC_PRINTF(7,8);
/** Add a FT_FLOAT to a proto_tree.
@param tree the tree to append this item to
extern proto_item *
proto_tree_add_float_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb,
gint start, gint length, float value, const char *format, ...)
- GNUC_FORMAT_CHECK(printf,7,8);
+ G_GNUC_PRINTF(7,8);
/** Add a formatted FT_FLOAT to a proto_tree, with the format generating
the entire string for the entry, including any field name.
@return the newly created item */
extern proto_item *
proto_tree_add_float_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
- gint length, float value, const char *format, ...) GNUC_FORMAT_CHECK(printf,7,8);
+ gint length, float value, const char *format, ...) G_GNUC_PRINTF(7,8);
/** Add a FT_DOUBLE to a proto_tree.
@param tree the tree to append this item to
extern proto_item *
proto_tree_add_double_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb,
gint start, gint length, double value, const char *format, ...)
- GNUC_FORMAT_CHECK(printf,7,8);
+ G_GNUC_PRINTF(7,8);
/** Add a formatted FT_DOUBLE to a proto_tree, with the format generating
the entire string for the entry, including any field name.
@return the newly created item */
extern proto_item *
proto_tree_add_double_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
- gint length, double value, const char *format, ...) GNUC_FORMAT_CHECK(printf,7,8);
+ gint length, double value, const char *format, ...) G_GNUC_PRINTF(7,8);
/** Add one of FT_UINT8, FT_UINT16, FT_UINT24 or FT_UINT32 to a proto_tree.
@param tree the tree to append this item to
extern proto_item *
proto_tree_add_uint_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb,
gint start, gint length, guint32 value, const char *format, ...)
- GNUC_FORMAT_CHECK(printf,7,8);
+ G_GNUC_PRINTF(7,8);
/** Add a formatted FT_UINT8, FT_UINT16, FT_UINT24 or FT_UINT32 to a proto_tree,
with the format generating the entire string for the entry, including any
@return the newly created item */
extern proto_item *
proto_tree_add_uint_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
- gint length, guint32 value, const char *format, ...) GNUC_FORMAT_CHECK(printf,7,8);
+ gint length, guint32 value, const char *format, ...) G_GNUC_PRINTF(7,8);
/** Add an FT_UINT64 to a proto_tree.
@param tree the tree to append this item to
extern proto_item *
proto_tree_add_uint64_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb,
gint start, gint length, guint64 value, const char *format, ...)
- GNUC_FORMAT_CHECK(printf,7,8);
+ G_GNUC_PRINTF(7,8);
/** Add a formatted FT_UINT64 to a proto_tree, with the format generating
the entire string for the entry, including any field name.
@return the newly created item */
extern proto_item *
proto_tree_add_uint64_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
- gint length, guint64 value, const char *format, ...) GNUC_FORMAT_CHECK(printf,7,8);
+ gint length, guint64 value, const char *format, ...) G_GNUC_PRINTF(7,8);
/** Add one of FT_INT8, FT_INT16, FT_INT24 or FT_INT32 to a proto_tree.
@param tree the tree to append this item to
extern proto_item *
proto_tree_add_int_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb,
gint start, gint length, gint32 value, const char *format, ...)
- GNUC_FORMAT_CHECK(printf,7,8);
+ G_GNUC_PRINTF(7,8);
/** Add a formatted FT_INT8, FT_INT16, FT_INT24 or FT_INT32 to a proto_tree,
with the format generating the entire string for the entry, including
@return the newly created item */
extern proto_item *
proto_tree_add_int_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
- gint length, gint32 value, const char *format, ...) GNUC_FORMAT_CHECK(printf,7,8);
+ gint length, gint32 value, const char *format, ...) G_GNUC_PRINTF(7,8);
/** Add an FT_INT64 to a proto_tree.
@param tree the tree to append this item to
extern proto_item *
proto_tree_add_int64_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb,
gint start, gint length, gint64 value, const char *format, ...)
- GNUC_FORMAT_CHECK(printf,7,8);
+ G_GNUC_PRINTF(7,8);
/** Add a formatted FT_INT64 to a proto_tree, with the format generating
the entire string for the entry, including any field name.
@return the newly created item */
extern proto_item *
proto_tree_add_int64_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
- gint length, gint64 value, const char *format, ...) GNUC_FORMAT_CHECK(printf,7,8);
+ gint length, gint64 value, const char *format, ...) G_GNUC_PRINTF(7,8);
/** Useful for quick debugging. Also sends string to STDOUT, so don't
leave call to this function in production code.
@return the newly created item */
extern proto_item *
proto_tree_add_debug_text(proto_tree *tree, const char *format,
- ...) GNUC_FORMAT_CHECK(printf,2,3);
+ ...) G_GNUC_PRINTF(2,3);
@return the newly created item */
extern proto_item *
proto_tree_add_uint_bits_format_value(proto_tree *tree, int hf_index, tvbuff_t *tvb, gint bit_offset, gint no_of_bits,
- guint32 value, const char *format, ...) GNUC_FORMAT_CHECK(printf,7,8);
+ guint32 value, const char *format, ...) G_GNUC_PRINTF(7,8);
/** Add bits for a FT_BOOLEAN header field to a proto_tree, with
the format generating the string for the value and with the field
@return the newly created item */
extern proto_item *
proto_tree_add_boolean_bits_format_value(proto_tree *tree, int hf_index, tvbuff_t *tvb, gint bit_offset, gint no_of_bits,
- guint32 value, const char *format, ...) GNUC_FORMAT_CHECK(printf,7,8);
+ guint32 value, const char *format, ...) G_GNUC_PRINTF(7,8);
/** Add bits for a FT_INT8, FT_INT16, FT_INT24 or FT_INT32
header field to a proto_tree, with the format generating the
@return the newly created item */
extern proto_item *
proto_tree_add_int_bits_format_value(proto_tree *tree, int hf_index, tvbuff_t *tvb, gint bit_offset, gint no_of_bits,
- gint32 value, const char *format, ...) GNUC_FORMAT_CHECK(printf,7,8);
+ gint32 value, const char *format, ...) G_GNUC_PRINTF(7,8);
/** Add bits for a FT_FLOAT header field to a proto_tree, with
the format generating the string for the value and with the field
@return the newly created item */
extern proto_item *
proto_tree_add_float_bits_format_value(proto_tree *tree, int hf_index, tvbuff_t *tvb, gint bit_offset, gint no_of_bits,
- float value, const char *format, ...) GNUC_FORMAT_CHECK(printf,7,8);
+ float value, const char *format, ...) G_GNUC_PRINTF(7,8);
/** Check if given string is a valid field name
@param field_name the field name to check