summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid S. Miller <davem@nuts.ninka.net>2003-03-19 03:28:07 -0800
committerDavid S. Miller <davem@nuts.ninka.net>2003-03-19 03:28:07 -0800
commit7f2c275429cf7ba253f8064aea71faba9d9f1a82 (patch)
tree38a2ae8c1f754b54f6c03fbfa4bfb023f3277049
parentdb08df953de8e5dd2eb3676da62d795f0b5e9707 (diff)
[IPV6]: Undo __constant_{n,h}to{n,h}l from anycast patch.
-rw-r--r--net/ipv6/addrconf.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 8d62bfbd4f64..b7501ff428ba 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -179,10 +179,10 @@ int ipv6_addr_type(struct in6_addr *addr)
st = addr->s6_addr32[0];
- if ((st & __constant_htonl(0xFF000000)) == __constant_htonl(0xFF000000)) {
+ if ((st & htonl(0xFF000000)) == htonl(0xFF000000)) {
type = IPV6_ADDR_MULTICAST;
- switch((st & __constant_htonl(0x00FF0000))) {
+ switch((st & htonl(0x00FF0000))) {
case __constant_htonl(0x00010000):
type |= IPV6_ADDR_LOOPBACK;
break;
@@ -199,9 +199,9 @@ int ipv6_addr_type(struct in6_addr *addr)
}
/* check for reserved anycast addresses */
- if ((st & __constant_htonl(0xE0000000)) &&
- ((addr->s6_addr32[2] == __constant_htonl(0xFDFFFFFF) &&
- (addr->s6_addr32[3] | __constant_htonl(0x7F)) == (u32)~0) ||
+ if ((st & htonl(0xE0000000)) &&
+ ((addr->s6_addr32[2] == htonl(0xFDFFFFFF) &&
+ (addr->s6_addr32[3] | htonl(0x7F)) == (u32)~0) ||
(addr->s6_addr32[2] == 0 && addr->s6_addr32[3] == 0)))
type = IPV6_ADDR_ANYCAST;
else
@@ -210,14 +210,14 @@ int ipv6_addr_type(struct in6_addr *addr)
/* Consider all addresses with the first three bits different of
000 and 111 as finished.
*/
- if ((st & __constant_htonl(0xE0000000)) != __constant_htonl(0x00000000) &&
- (st & __constant_htonl(0xE0000000)) != __constant_htonl(0xE0000000))
+ if ((st & htonl(0xE0000000)) != htonl(0x00000000) &&
+ (st & htonl(0xE0000000)) != htonl(0xE0000000))
return type;
- if ((st & __constant_htonl(0xFFC00000)) == __constant_htonl(0xFE800000))
+ if ((st & htonl(0xFFC00000)) == htonl(0xFE800000))
return (IPV6_ADDR_LINKLOCAL | type);
- if ((st & __constant_htonl(0xFFC00000)) == __constant_htonl(0xFEC00000))
+ if ((st & htonl(0xFFC00000)) == htonl(0xFEC00000))
return (IPV6_ADDR_SITELOCAL | type);
if ((addr->s6_addr32[0] | addr->s6_addr32[1]) == 0) {
@@ -225,23 +225,23 @@ int ipv6_addr_type(struct in6_addr *addr)
if (addr->in6_u.u6_addr32[3] == 0)
return IPV6_ADDR_ANY;
- if (addr->s6_addr32[3] == __constant_htonl(0x00000001))
+ if (addr->s6_addr32[3] == htonl(0x00000001))
return (IPV6_ADDR_LOOPBACK | type);
return (IPV6_ADDR_COMPATv4 | type);
}
- if (addr->s6_addr32[2] == __constant_htonl(0x0000ffff))
+ if (addr->s6_addr32[2] == htonl(0x0000ffff))
return IPV6_ADDR_MAPPED;
}
- st &= __constant_htonl(0xFF000000);
+ st &= htonl(0xFF000000);
if (st == 0)
return IPV6_ADDR_RESERVED;
- st &= __constant_htonl(0xFE000000);
- if (st == __constant_htonl(0x02000000))
+ st &= htonl(0xFE000000);
+ if (st == htonl(0x02000000))
return IPV6_ADDR_RESERVED; /* for NSAP */
- if (st == __constant_htonl(0x04000000))
+ if (st == htonl(0x04000000))
return IPV6_ADDR_RESERVED; /* for IPX */
return type;
}