]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/netinet/ip_mroute.h
xnu-792.21.3.tar.gz
[apple/xnu.git] / bsd / netinet / ip_mroute.h
index b5cc0f0de3ad6226c6f9fe2e79e281015395aa1e..3d1a18fee9f7437a1fbdb79e6c06a65452405366 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@
  */
 /*
  * Copyright (c) 1989 Stephen Deering.
@@ -90,7 +93,9 @@
 #define MRT_ASSERT      107     /* enable PIM assert processing */
 
 
+#ifdef KERNEL_PRIVATE
 #define GET_TIME(t)    microtime(&t)
+#endif KERNEL_PRIVATE
 
 /*
  * Types and macros for handling bitmaps with one bit per virtual interface.
@@ -175,11 +180,14 @@ struct sioc_vif_req {
     u_long ibytes;             /* Input byte count on vif              */
     u_long obytes;             /* Output byte count on vif             */
 };
-    
 
+#ifdef PRIVATE
 /*
  * The kernel's virtual-interface structure.
  */
+struct tbf;
+struct ifnet;
+struct socket;
 struct vif {
     u_char             v_flags;        /* VIFF_ flags defined above         */
     u_char             v_threshold;    /* min ttl required to forward on vif*/
@@ -196,6 +204,7 @@ struct vif {
     u_int              v_rsvp_on;      /* RSVP listening on this vif */
     struct socket      *v_rsvpd;       /* RSVP daemon socket */
 };
+#endif
 
 /*
  * The kernel's multicast forwarding cache entry structure 
@@ -231,7 +240,9 @@ struct igmpmsg {
     u_char         unused3;
     struct in_addr  im_src, im_dst;
 };
+#define MFCTBLSIZ       256
 
+#ifdef KERNEL_PRIVATE
 /*
  * Argument structure used for pkt info. while upcall is made
  */
@@ -245,7 +256,6 @@ struct rtdetq {
     struct rtdetq      *next;          /* Next in list of packets          */
 };
 
-#define MFCTBLSIZ      256
 #if (MFCTBLSIZ & (MFCTBLSIZ - 1)) == 0   /* from sys:route.h */
 #define MFCHASHMOD(h)  ((h) & (MFCTBLSIZ - 1))
 #else
@@ -273,21 +283,17 @@ struct tbf
     struct mbuf *tbf_t;                /* tail-insertion pointer       */
 };
 
-#ifdef KERNEL
-#ifdef __APPLE_API_PRIVATE
 
 struct sockopt;
 
-extern int     (*ip_mrouter_set) __P((struct socket *, struct sockopt *));
-extern int     (*ip_mrouter_get) __P((struct socket *, struct sockopt *));
-extern int     (*ip_mrouter_done) __P((void));
+extern int     (*ip_mrouter_set)(struct socket *, struct sockopt *);
+extern int     (*ip_mrouter_get)(struct socket *, struct sockopt *);
+extern int     (*ip_mrouter_done)(void);
 #if MROUTING
-extern int     (*mrt_ioctl) __P((int, caddr_t));
+extern int     (*mrt_ioctl)(int, caddr_t);
 #else
-extern int     (*mrt_ioctl) __P((int, caddr_t, struct proc *));
+extern int     (*mrt_ioctl)(int, caddr_t, struct proc *);
 #endif
 
-#endif /* __APPLE_API_PRIVATE */
-#endif /* KERNEL */
-
-#endif /* _NETINET_IP_MROUTE_H_ */
+#endif KERNEL_PRIVATE
+#endif _NETINET_IP_MROUTE_H_