diff options
author | tuexen <tuexen@FreeBSD.org> | 2013-03-31 18:27:46 +0000 |
---|---|---|
committer | tuexen <tuexen@FreeBSD.org> | 2013-03-31 18:27:46 +0000 |
commit | c19a3957768718e35ab10aa2a24fe2979d330910 (patch) | |
tree | b9ce3e779d0deb8e434807a8340ffc4bb6dfadc8 /sys/netinet | |
parent | 9d8a3c5c3b4f3e39e3b60af49f0da1899c1a7ebc (diff) | |
download | FreeBSD-src-c19a3957768718e35ab10aa2a24fe2979d330910.zip FreeBSD-src-c19a3957768718e35ab10aa2a24fe2979d330910.tar.gz |
Add a macro for checking for IPv4 link local addresses.
MFC after: 1 week
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/sctp_constants.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/netinet/sctp_constants.h b/sys/netinet/sctp_constants.h index 1805700..dd6b6b2 100644 --- a/sys/netinet/sctp_constants.h +++ b/sys/netinet/sctp_constants.h @@ -997,6 +997,10 @@ __FBSDID("$FreeBSD$"); (((uint8_t *)&(a)->s_addr)[2] == 0) && \ (((uint8_t *)&(a)->s_addr)[3] == 1)) +#define IN4_ISLINKLOCAL_ADDRESS(a) \ + ((((uint8_t *)&(a)->s_addr)[0] == 169) && \ + (((uint8_t *)&(a)->s_addr)[1] == 254)) + #if defined(_KERNEL) #define SCTP_GETTIME_TIMEVAL(x) (getmicrouptime(x)) |