From 22b4ec91c006fec65e655ccbb0dbbc32438f820b Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Sun, 4 Jan 2015 21:40:05 -0500 Subject: Replace ep_display_to_address with wmem equivalent display_to_address. Almost all instances require using "manual" memory management, but it gets some ep_ calls out of the GUI. Change-Id: Ifa7303766b08d09442ccf3d7063cbe061578ecd9 Reviewed-on: https://code.wireshark.org/review/6318 Reviewed-by: Michael Mann --- epan/addr_resolv.h | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) (limited to 'epan/addr_resolv.h') diff --git a/epan/addr_resolv.h b/epan/addr_resolv.h index 140cc8703c..9051362f2a 100644 --- a/epan/addr_resolv.h +++ b/epan/addr_resolv.h @@ -132,7 +132,8 @@ extern gchar *ep_dccp_port_to_display(guint port); */ WS_DLL_PUBLIC gchar *ep_sctp_port_to_display(guint port); -/* ep_address_to_display takes as input an "address", as defined in address.h */ +/* + * address_to_display takes as input an "address", as defined in address.h */ /* it returns a string that contains: */ /* - if the address is of a type that can be translated into a name, and the user */ /* has activated name resolution, the translated name */ @@ -140,23 +141,8 @@ WS_DLL_PUBLIC gchar *ep_sctp_port_to_display(guint port); /* - if the address is of any other type, the result of ep_address_to_str on the argument, */ /* which should be a string representation for the answer -e.g. "10.10.10.10" for IPv4 */ /* address 10.10.10.10 */ - -WS_DLL_PUBLIC -const gchar *ep_address_to_display(const address *addr); - -/* - * wmem_address_to_display is the same as ep_address_to_display above, but - * using the wmem scope for memory management. - */ WS_DLL_PUBLIC -const gchar *wmem_address_to_display(wmem_allocator_t *allocator, const address *addr); - -/* get_addr_name_buf solves an address in the same way as ep_address_to_display above */ -/* The difference is that get_addr_name_buf takes as input a buffer, into which it puts */ -/* the result which is always NUL ('\0') terminated. The buffer should be large enough to */ -/* contain size characters including the terminator */ - -void get_addr_name_buf(const address *addr, gchar *buf, gsize size); +const gchar *address_to_display(wmem_allocator_t *allocator, const address *addr); const gchar *get_addr_name(const address *addr); -- cgit v1.2.1