aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-cell_broadcast.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-01-13 19:49:12 +0000
committerGuy Harris <guy@alum.mit.edu>2014-01-13 19:49:12 +0000
commitaec280d8743c43cb7de8308c258785463f389ff8 (patch)
tree033a54a240a8fa899eeed941fb3fab812c901fdb /epan/dissectors/packet-cell_broadcast.h
parent39fe54ac35e84dd934210a34fbf3c5447e2ab60a (diff)
In a source file that defines external functions, the header file that
declares the functions must be included, in order to make sure the declarations match the function signature. Make it so. They *didn't* match; fix that. Do *not* use 16-bit tvbuff offsets; there is no advantage to that (and, in fact, 32-bit arithmetic may be easier on some platforms), and it has the disadvantage that you're more likely to have the offset overflow. dissect_cbs_serial_number() returns the new offset, not the length of the item it dissected; don't add its return value to the offset, set the offset to its return value. Make dissect_cbs_message_identifier() return the new offset as well, for consistency, and don't add *its* return value to the offset. svn path=/trunk/; revision=54714
Diffstat (limited to 'epan/dissectors/packet-cell_broadcast.h')
-rw-r--r--epan/dissectors/packet-cell_broadcast.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/epan/dissectors/packet-cell_broadcast.h b/epan/dissectors/packet-cell_broadcast.h
index 516384b851..9debf361b3 100644
--- a/epan/dissectors/packet-cell_broadcast.h
+++ b/epan/dissectors/packet-cell_broadcast.h
@@ -33,8 +33,10 @@
* @param tvb the tv buffer of the current data
* @param tree the tree to append this item to
* @param offset the offset in the tvb
+ *
+ * @return the offset after the Message Identifier
*/
-void dissect_cbs_message_identifier(tvbuff_t *tvb, proto_tree *tree, guint16 offset);
+guint dissect_cbs_message_identifier(tvbuff_t *tvb, proto_tree *tree, guint offset);
/**
@@ -43,8 +45,10 @@ void dissect_cbs_message_identifier(tvbuff_t *tvb, proto_tree *tree, guint16 off
* @param tvb the tv buffer of the current data
* @param tree the tree to append this item to
* @param offset the offset in the tvb
+ *
+ * @return the offset after the Serial Number
*/
-void dissect_cbs_serial_number(tvbuff_t *tvb, proto_tree *tree, guint16 offset);
+guint dissect_cbs_serial_number(tvbuff_t *tvb, proto_tree *tree, guint offset);
/**
@@ -54,11 +58,11 @@ void dissect_cbs_serial_number(tvbuff_t *tvb, proto_tree *tree, guint16 offset);
* @param pinfo the packet info of the current data
* @param tree the tree to append this item to
*/
-guint16 dissect_umts_cell_broadcast_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
+void dissect_umts_cell_broadcast_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
/**
* Dissects CB Data
*/
-tvbuff_t * dissect_cbs_data(guint8 sms_encoding, tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint16 offset);
+tvbuff_t * dissect_cbs_data(guint8 sms_encoding, tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint offset);
#endif /* PACKET_CELL_BROADCAST_H */