Witness: add move ip to tree_item
authorGregor Beck <gbeck@sernet.de>
Fri, 26 Jul 2013 11:37:34 +0000 (13:37 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 29 Jan 2014 08:18:28 +0000 (09:18 +0100)
epan/dissectors/packet-dcerpc-witness-cnf.c

index 88a2d40e0d2e9ff605d3fd3ad309e493a6b6e1fc..4336a065b08562de214d08a3869fc94da5b3af72 100644 (file)
@@ -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;