diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2015-10-05 11:53:07 +0100 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-10-05 18:10:48 +0000 |
commit | a459ac72a2c01ec12d186907837aff891e3e223b (patch) | |
tree | 01328590650245061ae8d78c02f14c8fbdde0381 /epan/addr_resolv.h | |
parent | d52322efb3ab782871312950876803334ec018b9 (diff) | |
download | wireshark-a459ac72a2c01ec12d186907837aff891e3e223b.tar.gz |
Add BASE_PT_ field display types
Avoid displaying duplicate port numbers with transport name resolution disabled and
make some dissector code simpler.
Introduces port_with_resolution_to_str_buf() function and amends UDP/TCP/DCCP/SCTP to
use the new field display type.
Change-Id: Ifb97810b9c669ccbb1a310a2c0ffd6e2b63af210
Reviewed-on: https://code.wireshark.org/review/10625
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: João Valverde <j@v6e.pt>
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.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/epan/addr_resolv.h b/epan/addr_resolv.h index b3d1f70297..13e48df667 100644 --- a/epan/addr_resolv.h +++ b/epan/addr_resolv.h @@ -53,7 +53,7 @@ extern "C" { typedef struct _e_addr_resolve { gboolean mac_name; /**< Whether to resolve Ethernet MAC to manufacturer names */ gboolean network_name; /**< Whether to resolve IPv4, IPv6, and IPX addresses into host names */ - gboolean transport_name; /**< Whether to resolve TCP/UDP ports into service names */ + gboolean transport_name; /**< Whether to resolve TCP/UDP/DCCP/SCTP ports into service names */ gboolean concurrent_dns; /**< Whether to use concurrent DNS name resolution */ gboolean dns_pkt_addr_resolution; /**< Whether to resolve addresses using captured DNS packets */ gboolean use_external_net_name_resolver; /**< Whether to system's configured DNS server to resolve names */ @@ -141,6 +141,13 @@ 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); /* + * 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); + +/* * Asynchronous host name lookup initialization, processing, and cleanup */ |