diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-29 06:54:01 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-29 06:54:01 -0500 |
commit | 0ba6c33bcddc64a54b5f1c25a696c4767dc76292 (patch) | |
tree | 62e616f97a4762d8e75bf732e4827af2d15d52c5 /include/net/sctp/constants.h | |
parent | 21af0297c7e56024a5ccc4d8ad2a590f9ec371ba (diff) | |
parent | 85040bcb4643cba578839e953f25e2d1965d83d0 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.25
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.25: (1470 commits)
[IPV6] ADDRLABEL: Fix double free on label deletion.
[PPP]: Sparse warning fixes.
[IPV4] fib_trie: remove unneeded NULL check
[IPV4] fib_trie: More whitespace cleanup.
[NET_SCHED]: Use nla_policy for attribute validation in ematches
[NET_SCHED]: Use nla_policy for attribute validation in actions
[NET_SCHED]: Use nla_policy for attribute validation in classifiers
[NET_SCHED]: Use nla_policy for attribute validation in packet schedulers
[NET_SCHED]: sch_api: introduce constant for rate table size
[NET_SCHED]: Use typeful attribute parsing helpers
[NET_SCHED]: Use typeful attribute construction helpers
[NET_SCHED]: Use NLA_PUT_STRING for string dumping
[NET_SCHED]: Use nla_nest_start/nla_nest_end
[NET_SCHED]: Propagate nla_parse return value
[NET_SCHED]: act_api: use PTR_ERR in tcf_action_init/tcf_action_get
[NET_SCHED]: act_api: use nlmsg_parse
[NET_SCHED]: act_api: fix netlink API conversion bug
[NET_SCHED]: sch_netem: use nla_parse_nested_compat
[NET_SCHED]: sch_atm: fix format string warning
[NETNS]: Add namespace for ICMP replying code.
...
Diffstat (limited to 'include/net/sctp/constants.h')
-rw-r--r-- | include/net/sctp/constants.h | 36 |
1 files changed, 6 insertions, 30 deletions
diff --git a/include/net/sctp/constants.h b/include/net/sctp/constants.h index 05f22a6afbcd..fefcba67bd1e 100644 --- a/include/net/sctp/constants.h +++ b/include/net/sctp/constants.h | |||
@@ -365,36 +365,12 @@ typedef enum { | |||
365 | * Also, RFC 8.4, non-unicast addresses are not considered valid SCTP | 365 | * Also, RFC 8.4, non-unicast addresses are not considered valid SCTP |
366 | * addresses. | 366 | * addresses. |
367 | */ | 367 | */ |
368 | #define IS_IPV4_UNUSABLE_ADDRESS(a) \ | 368 | #define IS_IPV4_UNUSABLE_ADDRESS(a) \ |
369 | ((htonl(INADDR_BROADCAST) == *a) || \ | 369 | ((htonl(INADDR_BROADCAST) == a) || \ |
370 | (MULTICAST(*a)) || \ | 370 | ipv4_is_multicast(a) || \ |
371 | (((unsigned char *)(a))[0] == 0) || \ | 371 | ipv4_is_zeronet(a) || \ |
372 | ((((unsigned char *)(a))[0] == 198) && \ | 372 | ipv4_is_test_198(a) || \ |
373 | (((unsigned char *)(a))[1] == 18) && \ | 373 | ipv4_is_anycast_6to4(a)) |
374 | (((unsigned char *)(a))[2] == 0)) || \ | ||
375 | ((((unsigned char *)(a))[0] == 192) && \ | ||
376 | (((unsigned char *)(a))[1] == 88) && \ | ||
377 | (((unsigned char *)(a))[2] == 99))) | ||
378 | |||
379 | /* IPv4 Link-local addresses: 169.254.0.0/16. */ | ||
380 | #define IS_IPV4_LINK_ADDRESS(a) \ | ||
381 | ((((unsigned char *)(a))[0] == 169) && \ | ||
382 | (((unsigned char *)(a))[1] == 254)) | ||
383 | |||
384 | /* RFC 1918 "Address Allocation for Private Internets" defines the IPv4 | ||
385 | * private address space as the following: | ||
386 | * | ||
387 | * 10.0.0.0 - 10.255.255.255 (10/8 prefix) | ||
388 | * 172.16.0.0.0 - 172.31.255.255 (172.16/12 prefix) | ||
389 | * 192.168.0.0 - 192.168.255.255 (192.168/16 prefix) | ||
390 | */ | ||
391 | #define IS_IPV4_PRIVATE_ADDRESS(a) \ | ||
392 | ((((unsigned char *)(a))[0] == 10) || \ | ||
393 | ((((unsigned char *)(a))[0] == 172) && \ | ||
394 | (((unsigned char *)(a))[1] >= 16) && \ | ||
395 | (((unsigned char *)(a))[1] < 32)) || \ | ||
396 | ((((unsigned char *)(a))[0] == 192) && \ | ||
397 | (((unsigned char *)(a))[1] == 168))) | ||
398 | 374 | ||
399 | /* Flags used for the bind address copy functions. */ | 375 | /* Flags used for the bind address copy functions. */ |
400 | #define SCTP_ADDR6_ALLOWED 0x00000001 /* IPv6 address is allowed by | 376 | #define SCTP_ADDR6_ALLOWED 0x00000001 /* IPv6 address is allowed by |