svn commit: r248953 - head/sys/netinet
Michael Tuexen
tuexen at FreeBSD.org
Sun Mar 31 18:27:46 UTC 2013
Author: tuexen
Date: Sun Mar 31 18:27:46 2013
New Revision: 248953
URL: http://svnweb.freebsd.org/changeset/base/248953
Log:
Add a macro for checking for IPv4 link local addresses.
MFC after: 1 week
Modified:
head/sys/netinet/sctp_constants.h
Modified: head/sys/netinet/sctp_constants.h
==============================================================================
--- head/sys/netinet/sctp_constants.h Sun Mar 31 17:50:01 2013 (r248952)
+++ head/sys/netinet/sctp_constants.h Sun Mar 31 18:27:46 2013 (r248953)
@@ -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))
More information about the svn-src-all
mailing list