svn commit: r252983 - stable/8/sys/netinet

Michael Tuexen tuexen at FreeBSD.org
Sun Jul 7 18:41:26 UTC 2013


Author: tuexen
Date: Sun Jul  7 18:41:25 2013
New Revision: 252983
URL: http://svnweb.freebsd.org/changeset/base/252983

Log:
  MFC r248953:
  Add a macro for checking for IPv4 link local addresses.

Modified:
  stable/8/sys/netinet/sctp_constants.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/netinet/   (props changed)

Modified: stable/8/sys/netinet/sctp_constants.h
==============================================================================
--- stable/8/sys/netinet/sctp_constants.h	Sun Jul  7 18:34:36 2013	(r252982)
+++ stable/8/sys/netinet/sctp_constants.h	Sun Jul  7 18:41:25 2013	(r252983)
@@ -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