summaryrefslogtreecommitdiff
path: root/epan/addr_resolv.h
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2015-10-05 13:51:58 +0100
committerMichael Mann <mmann78@netscape.net>2015-10-11 23:54:28 +0000
commit5823e6e50bad432ff7b6ea6c3c0dc2dc9232b469 (patch)
treed023251caa2d02acfb198076e8c932f3a326e2e8 /epan/addr_resolv.h
parentb752f97b0b1b23e7cb3df97364ebb78c6cd53222 (diff)
downloadwireshark-5823e6e50bad432ff7b6ea6c3c0dc2dc9232b469.tar.gz
Remove duplicate transport ports from proto tree summary
Don't display duplicate ports if transport name resolution is not enabled (for UDP/TCP/DCCP). Also introduce col_append_port() to handle info column port display with name resolution in a uniform format. Change-Id: Icb8ac45f726b7c539b4534c62061473e9b582753 Reviewed-on: https://code.wireshark.org/review/10804 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/addr_resolv.h')
-rw-r--r--epan/addr_resolv.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/epan/addr_resolv.h b/epan/addr_resolv.h
index 13e48df667..9645fe0c47 100644
--- a/epan/addr_resolv.h
+++ b/epan/addr_resolv.h
@@ -77,6 +77,7 @@ typedef struct serv_port {
gchar *tcp_name;
gchar *sctp_name;
gchar *dccp_name;
+ gchar *numeric;
} serv_port_t;
/*
@@ -141,11 +142,30 @@ extern gchar *dccp_port_to_display(wmem_allocator_t *allocator, guint port);
WS_DLL_PUBLIC gchar *sctp_port_to_display(wmem_allocator_t *allocator, guint port);
/*
+ * serv_name_lookup() returns the well known service name string, or numeric
+ * representation if one doesn't exist.
+ */
+WS_DLL_PUBLIC const gchar *serv_name_lookup(port_type proto, guint port);
+
+/*
+ * try_serv_name_lookup() returns the well known service name string, or NULL if
+ * one doesn't exist.
+ */
+WS_DLL_PUBLIC const gchar *try_serv_name_lookup(port_type proto, guint port);
+
+/*
+ * port_with_resolution_to_str() prints the "<resolved> (<numerical>)" port
+ * string.
+ */
+WS_DLL_PUBLIC gchar *port_with_resolution_to_str(wmem_allocator_t *scope,
+ port_type proto, guint port);
+
+/*
* port_with_resolution_to_str_buf() prints the "<resolved> (<numerical>)" port
* string to 'buf'. Return value is the same as g_snprintf().
*/
WS_DLL_PUBLIC int port_with_resolution_to_str_buf(gchar *buf, gulong buf_size,
- port_type port_typ, guint16 port_num);
+ port_type proto, guint port);
/*
* Asynchronous host name lookup initialization, processing, and cleanup