summaryrefslogtreecommitdiffstats
path: root/epan/to_str.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/to_str.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/to_str.h')
-rw-r--r--epan/to_str.h41
1 files changed, 19 insertions, 22 deletions
diff --git a/epan/to_str.h b/epan/to_str.h
index 920061bb..b62bea43 100644
--- a/epan/to_str.h
+++ b/epan/to_str.h
@@ -11,13 +11,10 @@
#ifndef __TO_STR_H__
#define __TO_STR_H__
-#include <glib.h>
-
#include "wsutil/nstime.h"
-#include <wsutil/inet_addr.h>
+#include <wsutil/inet_cidr.h>
#include <epan/proto.h>
#include <epan/packet_info.h>
-#include <epan/ipv6.h>
#include "ws_symbol_export.h"
#include <epan/wmem_scopes.h>
#include <wsutil/to_str.h>
@@ -43,9 +40,9 @@ extern "C" {
************** Address
*/
-WS_DLL_PUBLIC gchar *address_to_str(wmem_allocator_t *scope, const address *addr);
+WS_DLL_PUBLIC char *address_to_str(wmem_allocator_t *scope, const address *addr);
-WS_DLL_PUBLIC gchar *address_with_resolution_to_str(wmem_allocator_t *scope, const address *addr);
+WS_DLL_PUBLIC char *address_with_resolution_to_str(wmem_allocator_t *scope, const address *addr);
/*
* address_to_name takes as input an "address", as defined in address.h.
@@ -56,7 +53,7 @@ WS_DLL_PUBLIC gchar *address_with_resolution_to_str(wmem_allocator_t *scope, con
*
* Otherwise, it returns NULL.
*/
-WS_DLL_PUBLIC const gchar *address_to_name(const address *addr);
+WS_DLL_PUBLIC const char *address_to_name(const address *addr);
/*
* address_to_display takes as input an "address", as defined in address.h .
@@ -71,17 +68,17 @@ WS_DLL_PUBLIC const gchar *address_to_name(const address *addr);
* on the argument, which should be a string representation for the address,
* e.g. "10.10.10.10" for IPv4 address 10.10.10.10.
*/
-WS_DLL_PUBLIC gchar *address_to_display(wmem_allocator_t *allocator, const address *addr);
+WS_DLL_PUBLIC char *address_to_display(wmem_allocator_t *allocator, const address *addr);
-WS_DLL_PUBLIC void address_to_str_buf(const address *addr, gchar *buf, int buf_len);
+WS_DLL_PUBLIC void address_to_str_buf(const address *addr, char *buf, int buf_len);
-WS_DLL_PUBLIC const gchar *port_type_to_str (port_type type);
+WS_DLL_PUBLIC const char *port_type_to_str (port_type type);
/*
************** TVB
*/
-WS_DLL_PUBLIC gchar* tvb_address_with_resolution_to_str(wmem_allocator_t *scope, tvbuff_t *tvb, int type, const gint offset);
+WS_DLL_PUBLIC char* tvb_address_with_resolution_to_str(wmem_allocator_t *scope, tvbuff_t *tvb, int type, const int offset);
#define tvb_ether_to_str(scope, tvb, offset) tvb_address_to_str(scope, tvb, AT_ETHER, offset)
@@ -104,7 +101,7 @@ WS_DLL_PUBLIC gchar* tvb_address_with_resolution_to_str(wmem_allocator_t *scope,
* @return A pointer to the formatted string
*
*/
-WS_DLL_PUBLIC gchar* tvb_address_to_str(wmem_allocator_t *scope, tvbuff_t *tvb, int type, const gint offset);
+WS_DLL_PUBLIC char* tvb_address_to_str(wmem_allocator_t *scope, tvbuff_t *tvb, int type, const int offset);
/** Turn an address type retrieved from a tvb into a string.
*
@@ -116,7 +113,7 @@ WS_DLL_PUBLIC gchar* tvb_address_to_str(wmem_allocator_t *scope, tvbuff_t *tvb,
* @return A pointer to the formatted string
*
*/
-WS_DLL_PUBLIC gchar* tvb_address_var_to_str(wmem_allocator_t *scope, tvbuff_t *tvb, address_type type, const gint offset, int length);
+WS_DLL_PUBLIC char* tvb_address_var_to_str(wmem_allocator_t *scope, tvbuff_t *tvb, address_type type, const int offset, int length);
/*
************** Time
@@ -133,7 +130,7 @@ WS_DLL_PUBLIC char *abs_time_to_str_ex(wmem_allocator_t *scope,
#define abs_time_to_str(scope, nst, fmt, show_zone) \
abs_time_to_str_ex(scope, nst, fmt, (show_zone) ? ABS_TIME_TO_STR_SHOW_ZONE : 0)
-gchar *
+char *
abs_time_to_unix_str(wmem_allocator_t *scope, const nstime_t *rel_time);
WS_DLL_PUBLIC char *abs_time_secs_to_str_ex(wmem_allocator_t *scope,
@@ -143,25 +140,25 @@ WS_DLL_PUBLIC char *abs_time_secs_to_str_ex(wmem_allocator_t *scope,
#define abs_time_secs_to_str(scope, nst, fmt, show_zone) \
abs_time_secs_to_str_ex(scope, nst, fmt, (show_zone) ? ABS_TIME_TO_STR_SHOW_ZONE : 0)
-WS_DLL_PUBLIC gchar *signed_time_secs_to_str(wmem_allocator_t *scope, const gint32 time_val);
+WS_DLL_PUBLIC char *signed_time_secs_to_str(wmem_allocator_t *scope, const int32_t time_val);
-WS_DLL_PUBLIC gchar *unsigned_time_secs_to_str(wmem_allocator_t *scope, const guint32);
+WS_DLL_PUBLIC char *unsigned_time_secs_to_str(wmem_allocator_t *scope, const uint32_t);
-WS_DLL_PUBLIC gchar *signed_time_msecs_to_str(wmem_allocator_t *scope, gint32 time_val);
+WS_DLL_PUBLIC char *signed_time_msecs_to_str(wmem_allocator_t *scope, int32_t time_val);
-WS_DLL_PUBLIC gchar *rel_time_to_str(wmem_allocator_t *scope, const nstime_t *);
+WS_DLL_PUBLIC char *rel_time_to_str(wmem_allocator_t *scope, const nstime_t *);
-WS_DLL_PUBLIC gchar *rel_time_to_secs_str(wmem_allocator_t *scope, const nstime_t *);
+WS_DLL_PUBLIC char *rel_time_to_secs_str(wmem_allocator_t *scope, const nstime_t *);
/*
************** Misc
*/
-WS_DLL_PUBLIC gchar *guid_to_str_buf(const e_guid_t *, gchar *, int);
+WS_DLL_PUBLIC char *guid_to_str_buf(const e_guid_t *, char *, int);
-WS_DLL_PUBLIC gchar *guid_to_str(wmem_allocator_t *scope, const e_guid_t *);
+WS_DLL_PUBLIC char *guid_to_str(wmem_allocator_t *scope, const e_guid_t *);
-WS_DLL_PUBLIC char *decode_bits_in_field(wmem_allocator_t *scope, const guint bit_offset, const gint no_of_bits, const guint64 value, const guint encoding);
+WS_DLL_PUBLIC char *decode_bits_in_field(wmem_allocator_t *scope, const unsigned bit_offset, const int no_of_bits, const uint64_t value, const unsigned encoding);
#ifdef __cplusplus
}