From: David Miller <davem@davemloft.net>
To: jengelh@computergmbh.de
Cc: joe@perches.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-2.6.25 1/8] Create ipv4_is_<type>(__be32 addr) functions
Date: Mon, 17 Dec 2007 14:43:19 -0800 (PST) [thread overview]
Message-ID: <20071217.144319.93471413.davem@davemloft.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0712172333550.32270@fbirervta.pbzchgretzou.qr>
From: Jan Engelhardt <jengelh@computergmbh.de>
Date: Mon, 17 Dec 2007 23:37:24 +0100 (CET)
>
> On Dec 13 2007 15:38, Joe Perches wrote:
> >+static inline bool ipv4_is_private_10(__be32 addr)
> >+{
> >+ return (addr & htonl(0xff000000)) == htonl(0x0a000000);
> >+}
>
> What are these functions needed for, even? There does not seem to be
> any code (at least in davem's net-2.6.25:net/ipv4/, where I dared to grep)
> that uses them.
You really need to grep the whole tree, never ever decrease the scope
of directories to search if you want to see if an interface is used.
It's used by some ipv6 address translation code as well as some
bits in SCTP:
include/net/addrconf.h: eui[0] = (ipv4_is_zeronet(addr) || ipv4_is_private_10(addr) ||
net/sctp/protocol.c: } else if (ipv4_is_private_10(addr->v4.sin_addr.s_addr) ||
So lazy...
next prev parent reply other threads:[~2007-12-17 22:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <e2ebcbf24539c0a3ef2ac77147dbfa55d8ac9e33.1197432867.git.joe@perches.com>
2007-12-13 23:38 ` Joe Perches
[not found] ` <1197589141-7020-2-git-send-email-joe@perches.com>
[not found] ` <1197589141-7020-3-git-send-email-joe@perches.com>
[not found] ` <1197589141-7020-4-git-send-email-joe@perches.com>
[not found] ` <1197589141-7020-5-git-send-email-joe@perches.com>
[not found] ` <1197589141-7020-6-git-send-email-joe@perches.com>
2007-12-16 21:42 ` David Miller
2007-12-17 22:37 ` Jan Engelhardt
2007-12-17 22:41 ` David Miller
2007-12-17 22:42 ` Joe Perches
2007-12-17 22:43 ` David Miller [this message]
2007-12-17 23:02 ` Jan Engelhardt
[not found] ` <885ea24008e2b1c07e6bff0344f260a0ff104a35.1197432867.git.joe@perches.com>
2007-12-13 23:39 ` [PATCH net-2.6.25 8/8] Remove unused IPV4TYPE macros Joe Perches
2007-12-16 21:48 ` David Miller
2007-12-17 4:01 ` Joe Perches
2007-12-17 4:28 ` 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=20071217.144319.93471413.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=jengelh@computergmbh.de \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®