X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Fnet%2Fsctp%2Fconstants.h;h=c32ddf0279c83513430c841f8a5f31e4c969f7d3;hb=85e9ca333d03fbd56b9e123c8456f0d98e20faad;hp=05f22a6afbcdc4cceeefd4431696db74c384f044;hpb=c8b1ef88d09961078d3c685fcdc1d1659db05231;p=linux-2.6-omap-h63xx.git diff --git a/include/net/sctp/constants.h b/include/net/sctp/constants.h index 05f22a6afbc..c32ddf0279c 100644 --- a/include/net/sctp/constants.h +++ b/include/net/sctp/constants.h @@ -1,18 +1,18 @@ -/* SCTP kernel reference Implementation +/* SCTP kernel implementation * (C) Copyright IBM Corp. 2001, 2004 * Copyright (c) 1999-2000 Cisco, Inc. * Copyright (c) 1999-2001 Motorola, Inc. * Copyright (c) 2001 Intel Corp. * - * This file is part of the SCTP kernel reference Implementation + * This file is part of the SCTP kernel implementation * - * The SCTP reference implementation is free software; + * This SCTP implementation is free software; * you can redistribute it and/or modify it under the terms of * the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * - * The SCTP reference implementation is distributed in the hope that it + * This SCTP implementation is distributed in the hope that it * will be useful, but WITHOUT ANY WARRANTY; without even the implied * ************************ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -365,36 +365,12 @@ typedef enum { * Also, RFC 8.4, non-unicast addresses are not considered valid SCTP * addresses. */ -#define IS_IPV4_UNUSABLE_ADDRESS(a) \ - ((htonl(INADDR_BROADCAST) == *a) || \ - (MULTICAST(*a)) || \ - (((unsigned char *)(a))[0] == 0) || \ - ((((unsigned char *)(a))[0] == 198) && \ - (((unsigned char *)(a))[1] == 18) && \ - (((unsigned char *)(a))[2] == 0)) || \ - ((((unsigned char *)(a))[0] == 192) && \ - (((unsigned char *)(a))[1] == 88) && \ - (((unsigned char *)(a))[2] == 99))) - -/* IPv4 Link-local addresses: 169.254.0.0/16. */ -#define IS_IPV4_LINK_ADDRESS(a) \ - ((((unsigned char *)(a))[0] == 169) && \ - (((unsigned char *)(a))[1] == 254)) - -/* RFC 1918 "Address Allocation for Private Internets" defines the IPv4 - * private address space as the following: - * - * 10.0.0.0 - 10.255.255.255 (10/8 prefix) - * 172.16.0.0.0 - 172.31.255.255 (172.16/12 prefix) - * 192.168.0.0 - 192.168.255.255 (192.168/16 prefix) - */ -#define IS_IPV4_PRIVATE_ADDRESS(a) \ - ((((unsigned char *)(a))[0] == 10) || \ - ((((unsigned char *)(a))[0] == 172) && \ - (((unsigned char *)(a))[1] >= 16) && \ - (((unsigned char *)(a))[1] < 32)) || \ - ((((unsigned char *)(a))[0] == 192) && \ - (((unsigned char *)(a))[1] == 168))) +#define IS_IPV4_UNUSABLE_ADDRESS(a) \ + ((htonl(INADDR_BROADCAST) == a) || \ + ipv4_is_multicast(a) || \ + ipv4_is_zeronet(a) || \ + ipv4_is_test_198(a) || \ + ipv4_is_anycast_6to4(a)) /* Flags used for the bind address copy functions. */ #define SCTP_ADDR6_ALLOWED 0x00000001 /* IPv6 address is allowed by