Re: [PATCH net-2.6.25 1/8] Create ipv4_is_<type>(__be32 addr) functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2007-12-17 at 23:37 +0100, Jan Engelhardt wrote:
> >+static inline bool ipv4_is_loopback(__be32 addr)
> >+{
> >+	return (addr & htonl(0xff000000)) == htonl(0x7f000000);
> >+}
> >+
> Can we use __constant_htonl()?

I believe the generated code is the same.

> >+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.

include/net/addrconf.h
net/sctp/protocol.c

cheers, Joe

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux