summaryrefslogtreecommitdiff
path: root/epan/to_str.h
diff options
context:
space:
mode:
Diffstat (limited to 'epan/to_str.h')
-rw-r--r--epan/to_str.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/epan/to_str.h b/epan/to_str.h
index 56ac29b9cd..082aea99c4 100644
--- a/epan/to_str.h
+++ b/epan/to_str.h
@@ -55,6 +55,33 @@ WS_DLL_PUBLIC gchar* 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 gchar* tvb_address_with_resolution_to_str(wmem_allocator_t *scope, tvbuff_t *tvb, int type, const gint offset);
+/*
+ * address_to_name takes as input an "address", as defined in address.h.
+ *
+ * If the address is of a type that can be translated into a name, and the
+ * user has activated name resolution, and the name can be resolved, it
+ * returns a string containing the translated name.
+ *
+ * Otherwise, it returns NULL.
+ */
+const gchar *address_to_name(const address *addr);
+
+/*
+ * address_to_display takes as input an "address", as defined in address.h .
+ *
+ * If the address is of a type that can be translated into a name, and the
+ * user has activated name resolution, and the name can be resolved, it
+ * returns a string containing the translated name.
+ *
+ * Otherwise, if the address is of type AT_NONE, it returns "NONE".
+ *
+ * Otherwise, it returns a string containing the result of address_to_str
+ * 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
+const gchar *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);
#define tvb_ether_to_str(tvb, offset) tvb_address_to_str(wmem_packet_scope(), tvb, AT_ETHER, offset)