From: Cong Wang <amwang@redhat.com>
To: netdev@vger.kernel.org
Cc: Cong Wang <amwang@redhat.com>, "David S. Miller" <davem@davemloft.net>
Subject: [Patch v2 3/5] pktgen: display IPv4 address in human-readable format
Date: Wed, 10 Oct 2012 11:48:18 +0800 [thread overview]
Message-ID: <1349840900-24138-3-git-send-email-amwang@redhat.com> (raw)
In-Reply-To: <1349840900-24138-1-git-send-email-amwang@redhat.com>
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>
---
net/core/pktgen.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 98ee549..f9b4637 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -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);
--
1.7.7.6
next prev parent reply other threads:[~2012-10-10 3:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-10 3:48 [Patch v2 1/5] pktgen: fix crash when generating IPv6 packets Cong Wang
2012-10-10 3:48 ` [Patch v2 2/5] pktgen: set different default min_pkt_size for different protocols Cong Wang
2012-10-11 2:34 ` David Miller
2012-10-10 3:48 ` Cong Wang [this message]
2012-10-11 2:34 ` [Patch v2 3/5] pktgen: display IPv4 address in human-readable format David Miller
2012-10-10 3:48 ` [Patch v2 4/5] pktgen: enable automatic IPv6 address setting Cong Wang
2012-10-11 2:34 ` David Miller
2012-10-10 3:48 ` [Patch v2 5/5] pktgen: replace scan_ip6() with in6_pton() Cong Wang
2012-10-11 2:34 ` David Miller
2012-10-11 2:33 ` [Patch v2 1/5] pktgen: fix crash when generating IPv6 packets David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1349840900-24138-3-git-send-email-amwang@redhat.com \
--to=amwang@redhat.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).