BSD 4_4_Lite2 release
[unix-history] / usr / src / sys / net / if.h
index da1e8ef..ec86b68 100644 (file)
@@ -1,10 +1,36 @@
 /*
 /*
- * Copyright (c) 1982, 1986, 1989 Regents of the University of California.
- * All rights reserved.
+ * Copyright (c) 1982, 1986, 1989, 1993
+ *     The Regents of the University of California.  All rights reserved.
  *
  *
- * %sccs.include.redist.c%
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *     This product includes software developed by the University of
+ *     California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
  *
  *
- *     @(#)if.h        7.21 (Berkeley) %G%
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *     @(#)if.h        8.3 (Berkeley) 2/9/95
  */
 
 /*
  */
 
 /*
 /*
  * Forward structure declarations for function prototypes [sic].
  */
 /*
  * Forward structure declarations for function prototypes [sic].
  */
-struct rtentry;        
 struct mbuf;
 struct mbuf;
+struct proc;
+struct rtentry;        
+struct socket;
+struct ether_header;
 #endif
 /*
  * Structure describing information about an interface
 #endif
 /*
  * Structure describing information about an interface
@@ -95,7 +124,7 @@ struct ifnet {
        int     (*if_done)              /* output complete routine */
                __P((struct ifnet *));  /* (XXX not used; fake prototype) */
        int     (*if_ioctl)             /* ioctl routine */
        int     (*if_done)              /* output complete routine */
                __P((struct ifnet *));  /* (XXX not used; fake prototype) */
        int     (*if_ioctl)             /* ioctl routine */
-               __P((struct ifnet *, int, caddr_t));
+               __P((struct ifnet *, u_long, caddr_t));
        int     (*if_reset)     
                __P((int));             /* new autoconfig will permit removal */
        int     (*if_watchdog)          /* timer routine */
        int     (*if_reset)     
                __P((int));             /* new autoconfig will permit removal */
        int     (*if_watchdog)          /* timer routine */
@@ -295,9 +324,40 @@ struct     ifconf {
                (ifa)->ifa_refcnt--;
 
 struct ifnet   *ifnet;
                (ifa)->ifa_refcnt--;
 
 struct ifnet   *ifnet;
-struct ifaddr  *ifa_ifwithaddr __P((struct sockaddr *)),
-               *ifa_ifwithnet __P((struct sockaddr *)),
-               *ifa_ifwithdstaddr __P((struct sockaddr *));
-void   ifafree __P((struct ifaddr *));
+
+void   ether_ifattach __P((struct ifnet *));
+void   ether_input __P((struct ifnet *, struct ether_header *, struct mbuf *));
+int    ether_output __P((struct ifnet *,
+          struct mbuf *, struct sockaddr *, struct rtentry *));
+char   *ether_sprintf __P((u_char *));
+
 void   if_attach __P((struct ifnet *));
 void   if_attach __P((struct ifnet *));
+void   if_down __P((struct ifnet *));
+void   if_qflush __P((struct ifqueue *));
+void   if_slowtimo __P((void *));
+void   if_up __P((struct ifnet *));
+#ifdef vax
+void   ifubareset __P((int));
+#endif
+int    ifconf __P((int, caddr_t));
+void   ifinit __P((void));
+int    ifioctl __P((struct socket *, u_long, caddr_t, struct proc *));
+int    ifpromisc __P((struct ifnet *, int));
+struct ifnet *ifunit __P((char *));
+
+struct ifaddr *ifa_ifwithaddr __P((struct sockaddr *));
+struct ifaddr *ifa_ifwithaf __P((int));
+struct ifaddr *ifa_ifwithdstaddr __P((struct sockaddr *));
+struct ifaddr *ifa_ifwithnet __P((struct sockaddr *));
+struct ifaddr *ifa_ifwithroute __P((int, struct sockaddr *,
+                                       struct sockaddr *));
+struct ifaddr *ifaof_ifpforaddr __P((struct sockaddr *, struct ifnet *));
+void   ifafree __P((struct ifaddr *));
+void   link_rtrequest __P((int, struct rtentry *, struct sockaddr *));
+
+int    loioctl __P((struct ifnet *, u_long, caddr_t));
+void   loopattach __P((int));
+int    looutput __P((struct ifnet *,
+          struct mbuf *, struct sockaddr *, struct rtentry *));
+void   lortrequest __P((int, struct rtentry *, struct sockaddr *));
 #endif
 #endif