aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rtps.h
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2016-12-05 15:21:34 -0500
committerAnders Broman <a.broman58@gmail.com>2016-12-05 22:05:16 +0000
commit74f025d79e37dbbd628144a7b69c8f0f23b50996 (patch)
tree671562cdbb6a90f3f4fdeb8296a21aa5fb1891e1 /epan/dissectors/packet-rtps.h
parent548b9febb3c915b3693af0f5e8fe338447ca0f11 (diff)
RTPS: Cleanup endian handling
1. Rather than pass a boolean that has to be continually evaluated, just pass the necessary encoding (ENC_LITTLE_ENDIAN or ENC_BIG_ENDIAN) 2. Incorporate more use of proto_tree_add_item_ret_[u]int 3. Remove NEXT_guint16 and NEXT_guint32 because we now have tvb_get_guint16 and tvb_get_guint32 Change-Id: Ib1c3488450b4e727d2c1943ba4e577faf2350dcc Reviewed-on: https://code.wireshark.org/review/19103 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-rtps.h')
-rw-r--r--epan/dissectors/packet-rtps.h34
1 files changed, 17 insertions, 17 deletions
diff --git a/epan/dissectors/packet-rtps.h b/epan/dissectors/packet-rtps.h
index 9c8d667f7b..ee3a0be24c 100644
--- a/epan/dissectors/packet-rtps.h
+++ b/epan/dissectors/packet-rtps.h
@@ -560,48 +560,48 @@ typedef struct _rtps_dissector_data {
extern guint16 rtps_util_add_protocol_version(proto_tree *tree, tvbuff_t* tvb, gint offset);
extern guint16 rtps_util_add_vendor_id(proto_tree *tree, tvbuff_t * tvb, gint offset);
extern void rtps_util_add_locator_t(proto_tree *tree, packet_info *pinfo, tvbuff_t * tvb, gint offset,
- gboolean little_endian, const guint8 * label);
+ const guint encoding, const guint8 * label);
extern int rtps_util_add_locator_list(proto_tree *tree, packet_info *pinfo, tvbuff_t * tvb,
- gint offset, const guint8* label, gboolean little_endian);
+ gint offset, const guint8* label, const guint encoding);
extern void rtps_util_add_ipv4_address_t(proto_tree *tree, packet_info *pinfo, tvbuff_t * tvb, gint offset,
- gboolean little_endian, int hf_item);
+ const guint encoding, int hf_item);
extern void rtps_util_add_locator_udp_v4(proto_tree *tree, packet_info *pinfo, tvbuff_t * tvb,
- gint offset, const guint8 * label, gboolean little_endian);
+ gint offset, const guint8 * label, const guint encoding);
extern int rtps_util_add_entity_id(proto_tree *tree, tvbuff_t * tvb, gint offset,
int hf_item, int hf_item_entity_key, int hf_item_entity_kind,
int subtree_entity_id, const char *label, guint32* entity_id_out);
extern void rtps_util_add_generic_entity_id(proto_tree *tree, tvbuff_t * tvb, gint offset, const char* label,
int hf_item, int hf_item_entity_key, int hf_item_entity_kind,
int subtree_entity_id);
-extern guint64 rtps_util_add_seq_number(proto_tree *, tvbuff_t *,
- gint, int, const char *);
+extern guint64 rtps_util_add_seq_number(proto_tree *tree, tvbuff_t *tvb, gint offset, const guint encoding,
+ const char *label);
extern void rtps_util_add_ntp_time(proto_tree *tree, tvbuff_t * tvb, gint offset,
- gboolean little_endian, int hf_time);
+ const guint encoding, int hf_time);
extern gint rtps_util_add_string(proto_tree *tree, tvbuff_t* tvb, gint offset,
- int hf_item, gboolean little_endian);
+ int hf_item, const guint encoding);
extern void rtps_util_add_port(proto_tree *tree, packet_info *pinfo, tvbuff_t * tvb,
- gint offset, gboolean little_endian, int hf_item);
+ gint offset, const guint encoding, int hf_item);
extern void rtps_util_add_durability_service_qos(proto_tree *tree, tvbuff_t * tvb,
- gint offset, gboolean little_endian);
+ gint offset, const guint encoding);
extern void rtps_util_add_liveliness_qos(proto_tree *tree, tvbuff_t * tvb, gint offset,
- gboolean little_endian);
+ const guint encoding);
extern gint rtps_util_add_seq_string(proto_tree *tree, tvbuff_t* tvb, gint offset,
- gboolean little_endian, int param_length, int hf_numstring,
+ const guint encoding, int param_length, int hf_numstring,
int hf_string, const char *label);
extern gint rtps_util_add_seq_octets(proto_tree *tree, packet_info *pinfo, tvbuff_t* tvb,
- gint offset, gboolean little_endian, int param_length, int hf_id);
+ gint offset, const guint encoding, int param_length, int hf_id);
extern gint rtps_util_add_seq_ulong(proto_tree *tree, tvbuff_t * tvb, gint offset, int hf_item,
- gboolean little_endian, int param_length, const char *label);
+ const guint encoding, int param_length, const char *label);
extern gboolean rtps_is_ping(tvbuff_t *tvb, packet_info *pinfo, gint offset);
/* Shared submessage dissection */
extern void dissect_PAD(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags,
- gboolean little_endian, int octects_to_next_header, proto_tree *tree);
+ const guint encoding, int octects_to_next_header, proto_tree *tree);
extern void dissect_INFO_SRC(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags,
- gboolean little_endian, int octets_to_next_header, proto_tree *tree, guint16 rtps_version);
+ const guint encoding, int octets_to_next_header, proto_tree *tree, guint16 rtps_version);
extern void dissect_INFO_TS(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags,
- gboolean little_endian, int octets_to_next_header, proto_tree *tree);
+ const guint encoding, int octets_to_next_header, proto_tree *tree);
#ifdef __cplusplus