From ee3aae4fae4c1cd32599a6569f6f1410963bda8e Mon Sep 17 00:00:00 2001 From: Gregor Beck Date: Fri, 26 Jul 2013 13:37:34 +0200 Subject: [PATCH] Witness: add move ip to tree_item --- epan/dissectors/packet-dcerpc-witness-cnf.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/epan/dissectors/packet-dcerpc-witness-cnf.c b/epan/dissectors/packet-dcerpc-witness-cnf.c index 88a2d40e0d..4336a065b0 100644 --- a/epan/dissectors/packet-dcerpc-witness-cnf.c +++ b/epan/dissectors/packet-dcerpc-witness-cnf.c @@ -37,18 +37,23 @@ static int witness_dissect_move_ipaddr(tvbuff_t *tvb, int offset, packet_info *p proto_tree_add_item(tr, hf_witness_move_ipaddr_list_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN); //proto_tree_add_ipv4 + if (flags & 1) { + const char *ip = tvb_ip_to_str(tvb, offset); + proto_item_append_text(tr, " %s", ip); + proto_item_append_text(tree, " %s", ip); + col_append_fstr(pinfo->cinfo, COL_INFO, " %s", ip); + } offset += 4; proto_tree_add_item(tr, hf_witness_move_ipaddr_list_ipv6, tvb, offset, 16, ENC_BIG_ENDIAN); //proto_tree_add_ipv6 - offset += 16; - - if (flags & 1) { - //add ipv4 to ti - } if (flags & 2) { - //add ipv6 to ti + const char *ip = tvb_ip6_to_str(tvb, offset); + proto_item_append_text(tr, " %s", ip); + proto_item_append_text(tree, " %s", ip); + col_append_fstr(pinfo->cinfo, COL_INFO, " %s", ip); } + offset += 16; proto_item_set_end(ti, tvb, offset); return offset; -- 2.11.4.GIT