pktgen: display IPv4 address in human-readable format
authorAmerigo Wang <amwang@redhat.com>
Tue, 9 Oct 2012 17:48:18 +0000 (17:48 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 11 Oct 2012 02:33:30 +0000 (22:33 -0400)
It is weird to display IPv4 address in %x format, what's more,
IPv6 address is disaplayed in human-readable format too. So,
make it human-readable.

Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <amwang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/pktgen.c

index 98ee5496355363c4c6bbcec7426cba1d491528f7..f9b4637e9f241bff01aae9a525bc7d218ad03354 100644 (file)
@@ -702,8 +702,8 @@ static int pktgen_if_show(struct seq_file *seq, void *v)
                                &pkt_dev->cur_in6_saddr,
                                &pkt_dev->cur_in6_daddr);
        } else
-               seq_printf(seq, "     cur_saddr: 0x%x  cur_daddr: 0x%x\n",
-                          pkt_dev->cur_saddr, pkt_dev->cur_daddr);
+               seq_printf(seq, "     cur_saddr: %pI4  cur_daddr: %pI4\n",
+                          &pkt_dev->cur_saddr, &pkt_dev->cur_daddr);
 
        seq_printf(seq, "     cur_udp_dst: %d  cur_udp_src: %d\n",
                   pkt_dev->cur_udp_dst, pkt_dev->cur_udp_src);