]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/netinet/ip6.h
xnu-1228.9.59.tar.gz
[apple/xnu.git] / bsd / netinet / ip6.h
index 38060eb93a86799905908d3e43dbfd7ad1d1d859..fcdbd2d08cf3ace69264d84bfaf52a3165597f90 100644 (file)
@@ -1,16 +1,19 @@
 /*
  * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
  *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ * 
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
  * 
  * The Original Code and all software distributed under the License are
  * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
@@ -20,7 +23,7 @@
  * Please see the License for the specific language governing rights and
  * limitations under the License.
  * 
- * @APPLE_LICENSE_HEADER_END@
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  */
 /*     $KAME: ip6.h,v 1.18 2001/03/29 05:34:30 itojun Exp $*/
 
@@ -240,8 +243,7 @@ struct ip6_frag {
 #define IPV6_MMTU      1280    /* minimal MTU and reassembly. 1024 + 256 */
 #define IPV6_MAXPACKET 65535   /* ip6 max packet size without Jumbo payload*/
 
-#ifdef KERNEL
-#ifdef __APPLE_API_PRIVATE
+#ifdef KERNEL_PRIVATE
 /*
  * IP6_EXTHDR_CHECK ensures that region between the IP6 header and the
  * target header (including IPv6 itself, extension headers and
@@ -251,25 +253,25 @@ struct ip6_frag {
  * supposed to never be matched but is prepared just in case.
  */
 
-#define IP6_EXTHDR_CHECK(m, off, hlen, ret)                            \
+#define IP6_EXTHDR_CHECK(m, off, hlen, action)                         \
 do {                                                                   \
     if ((m)->m_next != NULL) {                                         \
        if (((m)->m_flags & M_LOOP) &&                                  \
            ((m)->m_len < (off) + (hlen)) &&                            \
            (((m) = m_pullup((m), (off) + (hlen))) == NULL)) {          \
                ip6stat.ip6s_exthdrtoolong++;                           \
-               return ret;                                             \
+               action;                                                 \
        } else if ((m)->m_flags & M_EXT) {                              \
                if ((m)->m_len < (off) + (hlen)) {                      \
                        ip6stat.ip6s_exthdrtoolong++;                   \
                        m_freem(m);                                     \
-                       return ret;                                     \
+                       action;                                         \
                }                                                       \
        } else {                                                        \
                if ((m)->m_len < (off) + (hlen)) {                      \
                        ip6stat.ip6s_exthdrtoolong++;                   \
                        m_freem(m);                                     \
-                       return ret;                                     \
+                       action;                                         \
                }                                                       \
        }                                                               \
     } else {                                                           \
@@ -277,7 +279,7 @@ do {                                                                        \
                ip6stat.ip6s_tooshort++;                                \
                in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_truncated);   \
                m_freem(m);                                             \
-               return ret;                                             \
+               action;                                                 \
        }                                                               \
     }                                                                  \
 } while (0)
@@ -328,7 +330,6 @@ do {                                                                        \
                }                                                       \
        }                                                               \
 } while (0)
-#endif /* __APPLE_API_PRIVATE */
-#endif /*KERNEL*/
 
-#endif /* not _NETINET_IP6_H_ */
+#endif KERNEL_PRIVATE
+#endif !_NETINET_IP6_H_