]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/netat/at_var.h
xnu-792.12.6.tar.gz
[apple/xnu.git] / bsd / netat / at_var.h
index 40c0fe6960a63d84a0770f79133d93f1785edb07..5cb4c68bf9ab73ba97c97904b4fbd1d3ba7000f1 100644 (file)
@@ -1,30 +1,41 @@
 /*
- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * The contents of this file constitute Original Code as defined in and
- * are subject to the Apple Public Source License Version 1.1 (the
- * "License").  You may not use this file except in compliance with the
- * License.  Please obtain a copy of the License at
- * http://www.apple.com/publicsource and read it before using this file.
+ * Copyright (c) 2006 Apple Computer, Inc. All Rights Reserved.
  * 
- * This Original Code and all software distributed under the License are
- * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
- * License for the specific language governing rights and limitations
- * under the License.
+ * @APPLE_LICENSE_OSREFERENCE_HEADER_START@
  * 
- * @APPLE_LICENSE_HEADER_END@
+ * 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.  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 
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 
+ * Please see the License for the specific language governing rights and 
+ * limitations under the License.
+ *
+ * @APPLE_LICENSE_OSREFERENCE_HEADER_END@
  */
 /*
  *     Copyright (c) 1998 Apple Computer, Inc. 
  */
 
+#ifndef _NETAT_AT_VAR_H_
+#define _NETAT_AT_VAR_H_
+
 #include <sys/appleapiopts.h>
-#ifdef __APPLE_API_PRIVATE
+#ifdef __APPLE_API_OBSOLETE
 #include <sys/queue.h>
 
 /* at_var.h */
 #define MCAST_TRACK_DELETE     2
 #define MCAST_TRACK_CHECK      3
 
-#define ETHERNET_ADDR_LEN 6
-#define IFNAMESIZ 16
-
 /* maximum number of I/F's allowed */
 #define IF_TOTAL_MAX   17      /* max count of any combination of I/F's */
                                /* 17 == (1+(4*4)); 9 and 13 would also be
                                   reasonable values */
 
 #define FDDI_OR_TOKENRING(i) ((i == IFT_FDDI) || (i == IFT_ISO88025))
-
+#define ETHERNET_ADDR_LEN 6
+#define IFNAMESIZ 16
 typedef struct etalk_addr {
        u_char          etalk_addr_octet[ETHERNET_ADDR_LEN];    
 } etalk_addr_t;
-
 typedef char if_name_t[IFNAMESIZ];
 typedef struct at_ifname_list {
        if_name_t at_if[IF_TOTAL_MAX];
@@ -118,6 +126,7 @@ typedef struct {
        short router_mix;
 } at_router_params_t;
 
+
 typedef struct at_kern_err {
        int             error;          /* kernel error # (KE_xxx) */
        int             port1;
@@ -143,6 +152,7 @@ typedef struct at_kern_err {
 #define KE_RTMP_OVERFLOW               10
 #define KE_ZIP_OVERFLOW                        11
 
+#ifdef KERNEL_PRIVATE
 /*
  * Interface address, AppleTalk version.  One of these structures
  * is allocated for each AppleTalk address on an interface.
@@ -181,6 +191,7 @@ typedef struct at_ifaddr {
 
        /* for use by ZIP */
        u_char          ifNumRetries;
+       u_char          ifGNIScheduled; /* to keep getnetinfo from being scheduled more than once */
        at_nvestr_t     ifZoneName;
 
        /* Added for routing support */
@@ -213,6 +224,7 @@ typedef struct at_ifaddr {
                                           middle of an elap_online operation */
 
 } at_ifaddr_t;
+#endif /* KERNEL_PRIVATE */
 
 #define        LAP_OFFLINE             0       /* LAP_OFFLINE MUST be 0 */     
 #define        LAP_ONLINE              1
@@ -269,16 +281,16 @@ typedef struct at_ifaddr {
 #define ELAP_CFG_HOME      0x02        /* designate home port (one allowed) */
 #define ELAP_CFG_SEED      0x08        /* set if it's a seed port */
 
-#ifdef KERNEL
+#ifdef KERNEL_PRIVATE
 extern TAILQ_HEAD(at_ifQueueHd, at_ifaddr) at_ifQueueHd;
 
-int at_control __P((struct socket *, u_long, caddr_t, struct ifnet *));
-int ddp_usrreq __P((struct socket *, int, struct mbuf *, struct mbuf *, 
-                   struct mbuf *));
-int ddp_ctloutput __P((struct socket *, struct sockopt *));
-void ddp_init __P((void));;
-void ddp_slowtimo __P((void));
-#endif
+int at_control(struct socket *, u_long, caddr_t, struct ifnet *);
+int ddp_usrreq(struct socket *, int, struct mbuf *, struct mbuf *, 
+                   struct mbuf *);
+int ddp_ctloutput(struct socket *, struct sockopt *);
+void ddp_init(void);;
+void ddp_slowtimo(void);
+#endif /* KERNEL_PRIVATE */
 
 /*
  * Define AppleTalk event subclass and specific AppleTalk events.
@@ -302,4 +314,13 @@ struct kev_atalk_data {
        } node_data;
 };
 
-#endif /* __APPLE_API_PRIVATE */
+#ifdef KERNEL_PRIVATE
+
+void atalk_post_msg(struct ifnet *ifp, u_long event_code, struct at_addr *address, at_nvestr_t *zone);
+void aarp_sched_probe(void *);
+void atalk_lock();
+void atalk_unlock();
+
+#endif /* KERNEL_PRIVATE */
+#endif /* __APPLE_API_OBSOLETE */
+#endif /* _NETAT_AT_VAR_H_ */