svn commit: r252969 - stable/9/sys/netinet

Michael Tuexen tuexen at FreeBSD.org
Sun Jul 7 16:29:16 UTC 2013


Author: tuexen
Date: Sun Jul  7 16:29:16 2013
New Revision: 252969
URL: http://svnweb.freebsd.org/changeset/base/252969

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

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

Modified: stable/9/sys/netinet/sctp_constants.h
==============================================================================
--- stable/9/sys/netinet/sctp_constants.h	Sun Jul  7 16:25:39 2013	(r252968)
+++ stable/9/sys/netinet/sctp_constants.h	Sun Jul  7 16:29:16 2013	(r252969)
@@ -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