]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/netat/at_var.h
xnu-792.10.96.tar.gz
[apple/xnu.git] / bsd / netat / at_var.h
index 072377c0a5015f09e3071fa54f085887712425ee..fdb445d3bcfb6c670dfa0f3e69a0d09424ace10c 100644 (file)
  *     Copyright (c) 1998 Apple Computer, Inc. 
  */
 
+#ifndef _NETAT_AT_VAR_H_
+#define _NETAT_AT_VAR_H_
+
+#include <sys/appleapiopts.h>
+#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];
@@ -116,6 +118,7 @@ typedef struct {
        short router_mix;
 } at_router_params_t;
 
+
 typedef struct at_kern_err {
        int             error;          /* kernel error # (KE_xxx) */
        int             port1;
@@ -141,6 +144,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.
@@ -179,6 +183,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 */
@@ -211,6 +216,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
@@ -267,13 +273,46 @@ 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.
+ */
+
+#define KEV_ATALK_SUBCLASS 5
+
+#define KEV_ATALK_ENABLED                              1       /* AppleTalk enabled from user space - node/net set and valid */
+#define KEV_ATALK_DISABLED                             2       /* AppleTalk disabled from user space */
+#define KEV_ATALK_ZONEUPDATED                  3       /* Zone for this node set/changed */
+#define KEV_ATALK_ROUTERUP                             4       /* Seed router found with valid cable range */
+#define KEV_ATALK_ROUTERUP_INVALID             5       /* Seed router found with invalid cable range */
+#define KEV_ATALK_ROUTERDOWN                   6       /* Seed router down */
+#define KEV_ATALK_ZONELISTCHANGED              7       /* Zone list changed by router */
+
+struct kev_atalk_data {
+       struct  net_event_data  link_data;
+       union {
+               struct  at_addr         address;
+               at_nvestr_t                     zone;
+       } node_data;
+};
+
+#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);
+void atalk_unlock(void);
+
+#endif /* KERNEL_PRIVATE */
+#endif /* __APPLE_API_OBSOLETE */
+#endif /* _NETAT_AT_VAR_H_ */