diff options
author | Michael Mann <mmann78@netscape.net> | 2015-02-12 12:03:49 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-02-19 13:09:41 +0000 |
commit | 8d16ac46d50445f4e0ce567acb8e265db08a7576 (patch) | |
tree | 54d7b9813f8b83cca7d9592b2f5ae313f720a940 /epan/dissectors/packet-jxta.c | |
parent | 7208355fb99f18b5b82d028f6af170f3dbafc8c9 (diff) |
Add name resolution support to address type.
Add address_with_resolution_to_str API that returns address string + name resolution in the format %s (%s), first string is resolved name (if available) and second string is raw address string.
Convert AT_FCWWN to using proper name resolution format
First use of address_with_resolution_to_str with field types in proto.c
Change-Id: I2ae77c29a4ffc30bb919fbec00f06629830898c2
Reviewed-on: https://code.wireshark.org/review/7196
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/dissectors/packet-jxta.c')
-rw-r--r-- | epan/dissectors/packet-jxta.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-jxta.c b/epan/dissectors/packet-jxta.c index 6a8d8ab59f..af0b9c1831 100644 --- a/epan/dissectors/packet-jxta.c +++ b/epan/dissectors/packet-jxta.c @@ -244,12 +244,12 @@ jxta_hostlist_packet(void *pit, packet_info *pinfo _U_, epan_dissect_t *edt _U_, return 1; } -static gboolean uri_to_str(const address* addr, gchar *buf, int buf_len) +static int uri_to_str(const address* addr, gchar *buf, int buf_len) { int copy_len = addr->len < (buf_len - 1) ? addr->len : (buf_len - 1); memcpy(buf, addr->data, copy_len ); buf[copy_len] = '\0'; - return TRUE; + return copy_len+1; } static int uri_str_len(const address* addr) @@ -2368,7 +2368,7 @@ void proto_register_jxta(void) /* Register JXTA Sub-tree */ proto_register_subtree_array(ett, array_length(ett)); - uri_address_type = address_type_dissector_register("AT_URI", "URI/URL/URN", uri_to_str, uri_str_len, uri_col_filter_str, NULL); + uri_address_type = address_type_dissector_register("AT_URI", "URI/URL/URN", uri_to_str, uri_str_len, uri_col_filter_str, NULL, NULL, NULL); /* Register preferences */ /* register re-init routine */ |