summaryrefslogtreecommitdiffstats
path: root/epan/tvbuff-int.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:53 +0000
commita86c5f7cae7ec9a3398300555a0b644689d946a1 (patch)
tree39fe4b107c71174fd1e8a8ceb9a4d2aa14116248 /epan/tvbuff-int.h
parentReleasing progress-linux version 4.2.6-1~progress7.99u1. (diff)
downloadwireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.tar.xz
wireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.zip
Merging upstream version 4.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/tvbuff-int.h')
-rw-r--r--epan/tvbuff-int.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/epan/tvbuff-int.h b/epan/tvbuff-int.h
index 49b65f2d..ad253448 100644
--- a/epan/tvbuff-int.h
+++ b/epan/tvbuff-int.h
@@ -15,16 +15,16 @@
struct tvbuff;
struct tvb_ops {
- gsize tvb_size;
+ size_t tvb_size;
void (*tvb_free)(struct tvbuff *tvb);
- guint (*tvb_offset)(const struct tvbuff *tvb, guint counter);
- const guint8 *(*tvb_get_ptr)(struct tvbuff *tvb, guint abs_offset, guint abs_length);
- void *(*tvb_memcpy)(struct tvbuff *tvb, void *target, guint offset, guint length);
+ unsigned (*tvb_offset)(const struct tvbuff *tvb, unsigned counter);
+ const uint8_t *(*tvb_get_ptr)(struct tvbuff *tvb, unsigned abs_offset, unsigned abs_length);
+ void *(*tvb_memcpy)(struct tvbuff *tvb, void *target, unsigned offset, unsigned length);
- gint (*tvb_find_guint8)(tvbuff_t *tvb, guint abs_offset, guint limit, guint8 needle);
- gint (*tvb_ws_mempbrk_pattern_guint8)(tvbuff_t *tvb, guint abs_offset, guint limit, const ws_mempbrk_pattern* pattern, guchar *found_needle);
+ int (*tvb_find_uint8)(tvbuff_t *tvb, unsigned abs_offset, unsigned limit, uint8_t needle);
+ int (*tvb_ws_mempbrk_pattern_uint8)(tvbuff_t *tvb, unsigned abs_offset, unsigned limit, const ws_mempbrk_pattern* pattern, unsigned char *found_needle);
- tvbuff_t *(*tvb_clone)(tvbuff_t *tvb, guint abs_offset, guint abs_length);
+ tvbuff_t *(*tvb_clone)(tvbuff_t *tvb, unsigned abs_offset, unsigned abs_length);
};
/*
@@ -38,8 +38,8 @@ struct tvbuff {
/* Record-keeping */
const struct tvb_ops *ops;
- gboolean initialized;
- guint flags;
+ bool initialized;
+ unsigned flags;
struct tvbuff *ds_tvb; /**< data source top-level tvbuff */
/** Pointer to the data for this tvbuff.
@@ -49,7 +49,7 @@ struct tvbuff {
* backing data and fill it in unless we need that
* data, e.g. when tvb_get_ptr() is called.
*/
- const guint8 *real_data;
+ const uint8_t *real_data;
/** Amount of data that's available from the capture
* file. This is the length of virtual buffer (and/or
@@ -58,13 +58,13 @@ struct tvbuff {
* by the capture process.
*
* This must never be > reported_length or contained_length. */
- guint length;
+ unsigned length;
/** Amount of data that was reported as being in
* the packet or other data that this represents.
* As indicated above, it may be greater than the
* amount of data that's available. */
- guint reported_length;
+ unsigned reported_length;
/** If this was extracted from a parent tvbuff,
* this is the amount of extracted data that
@@ -80,10 +80,10 @@ struct tvbuff {
* this is the same as reported_length.
*
* This must never be > reported_length. */
- guint contained_length;
+ unsigned contained_length;
/* Offset from beginning of first "real" tvbuff. */
- gint raw_offset;
+ int raw_offset;
};
WS_DLL_PUBLIC tvbuff_t *tvb_new(const struct tvb_ops *ops);
@@ -92,7 +92,7 @@ tvbuff_t *tvb_new_proxy(tvbuff_t *backing);
void tvb_add_to_chain(tvbuff_t *parent, tvbuff_t *child);
-guint tvb_offset_from_real_beginning_counter(const tvbuff_t *tvb, const guint counter);
+unsigned tvb_offset_from_real_beginning_counter(const tvbuff_t *tvb, const unsigned counter);
-void tvb_check_offset_length(const tvbuff_t *tvb, const gint offset, gint const length_val, guint *offset_ptr, guint *length_ptr);
+void tvb_check_offset_length(const tvbuff_t *tvb, const int offset, int const length_val, unsigned *offset_ptr, unsigned *length_ptr);
#endif