From: Brian Haley <brian.haley@hp.com>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: Joe Perches <joe@perches.com>, Jens Rosenboom <jens@mcbone.net>,
Linux Network Developers <netdev@vger.kernel.org>
Subject: Re: [RFC] ipv6: Change %pI6 format to output compacted addresses?
Date: Thu, 13 Aug 2009 16:28:21 -0400 [thread overview]
Message-ID: <4A847765.3080102@hp.com> (raw)
In-Reply-To: <5D6A7C11-B300-4E39-BBDF-EF18C4BAE419@oracle.com>
Chuck Lever wrote:
> On Aug 13, 2009, at 2:21 PM, Joe Perches wrote:
>> On Thu, 2009-08-13 at 14:15 -0400, Chuck Lever wrote:
>>> On Aug 13, 2009, at 2:10 PM, Joe Perches wrote:
>>>> The patch allows "%p6ic" for compressed and "%p6ic4" for compressed
>>>> with ipv4 last u32.
>>>
>>> Why do these need to be separate?
>>
>> Just an option.
>> I think it possible somebody will want "1::" instead of "1::0.0.0.0"
>
> Hrm.
>
> Do you have a use case? Really, it's pretty easy to tell when the
> mapped v4 presentation format should be used. See
> ipv6_addr_v4mapped(). Otherwise the mapped v4 presentation format
> should never be used.
>
> A problem with the existing %p[iI] implementation is that each call site
> has to have logic that figures out the address family of the address
> before calling sprintf(). This makes it difficult to use this facility
> with, for example, debugging messages, since you have to add address
> family detection logic at every debugging message call site. Lots of
> clutter and duplicated code.
>
> With %p6ic4, each call site now has to see that it's an IPv6 address,
> and then decide if the address is a mapped v4 address or not. It's the
> same logic everywhere.
>
> It seems to me it would be a lot more useful if we had a new %p6
> formatter that handled all types of IPv6 addresses properly, the way
> inet_ntop(3) does in user space. (Or even a new formatter that could
> handle both address families).
I would agree that this could be better, maybe after playing with this
some more it will be obvious what that something is. I'd be willing
to review any thoughts you have :)
-Brian
next prev parent reply other threads:[~2009-08-13 20:28 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-12 15:39 [RFC] ipv6: Change %pI6 format to output compacted addresses? Jens Rosenboom
2009-08-13 1:33 ` Brian Haley
2009-08-13 10:39 ` Joe Perches
2009-08-13 13:52 ` Jens Rosenboom
2009-08-13 15:07 ` Joe Perches
2009-08-13 14:39 ` Jens Rosenboom
2009-08-13 15:14 ` Chuck Lever
2009-08-13 16:27 ` Brian Haley
2009-08-13 18:10 ` Joe Perches
2009-08-13 18:15 ` Chuck Lever
2009-08-13 18:21 ` Joe Perches
2009-08-13 18:39 ` Chuck Lever
2009-08-13 19:05 ` Joe Perches
2009-08-13 20:24 ` Brian Haley
2009-08-13 20:28 ` Brian Haley [this message]
2009-08-13 20:24 ` Brian Haley
2009-08-13 20:34 ` Joe Perches
2009-08-13 21:02 ` Chuck Lever
2009-08-13 21:13 ` Joe Perches
2009-08-13 23:31 ` David Miller
2009-08-14 6:22 ` Jens Rosenboom
2009-08-14 7:15 ` David Miller
2009-08-14 8:15 ` Jens Rosenboom
2009-08-14 20:12 ` David Miller
2009-08-15 15:24 ` [PATCH] lib/vsprintf.c: Add "%pI6c" - print pointer as compressed ipv6 address Joe Perches
2009-08-16 4:10 ` [RFC PATCH] lib/vsprintf.c: Add struct sockaddr * "%pN<foo>" output Joe Perches
2009-08-19 14:26 ` Chuck Lever
2009-08-19 20:44 ` [RFC PATCH V2] " Joe Perches
2009-08-19 22:20 ` Chuck Lever
2009-08-19 22:36 ` Joe Perches
2009-08-19 23:00 ` Chuck Lever
2009-08-20 4:24 ` Joe Perches
2009-08-20 4:29 ` David Miller
2009-08-17 15:18 ` [PATCH] lib/vsprintf.c: Add "%pI6c" - print pointer as compressed ipv6 address Jens Rosenboom
2009-08-17 22:29 ` [PATCH V2] " Joe Perches
2009-08-18 13:48 ` Jens Rosenboom
2009-08-29 7:20 ` David Miller
2009-08-14 16:26 ` [RFC] ipv6: Change %pI6 format to output compacted addresses? Chuck Lever
2009-08-13 14:18 ` Christoph Hellwig
2009-08-13 14:30 ` Jens Rosenboom
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=4A847765.3080102@hp.com \
--to=brian.haley@hp.com \
--cc=chuck.lever@oracle.com \
--cc=jens@mcbone.net \
--cc=joe@perches.com \
--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).