BSD 4_4 release
[unix-history] / usr / src / sys / netinet / in_var.h
index e088b32..8218f0b 100644 (file)
@@ -1,10 +1,36 @@
 /*
 /*
- * Copyright (c) 1985, 1986 Regents of the University of California.
- * All rights reserved.
+ * Copyright (c) 1985, 1986, 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.
  *
  *
- *     @(#)in_var.h    7.7 (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.
+ *
+ *     @(#)in_var.h    8.1 (Berkeley) 6/10/93
  */
 
 /*
  */
 
 /*
@@ -44,13 +70,16 @@ struct      in_aliasreq {
  */
 #define        IA_SIN(ia) (&(((struct in_ifaddr *)(ia))->ia_addr))
 
  */
 #define        IA_SIN(ia) (&(((struct in_ifaddr *)(ia))->ia_addr))
 
+#define IN_LNAOF(in, ifa) \
+       ((ntohl((in).s_addr) & ~((struct in_ifaddr *)(ifa)->ia_subnetmask))
+                       
+
 #ifdef KERNEL
 #ifdef KERNEL
-struct in_ifaddr *in_ifaddr;
-struct in_ifaddr *in_iaonnetof();
-struct ifqueue ipintrq;                /* ip packet input queue */
-#endif
+extern struct  in_ifaddr *in_ifaddr;
+extern struct  ifqueue ipintrq;                /* ip packet input queue */
+void   in_socktrim __P((struct sockaddr_in *));
+
 
 
-#ifdef KERNEL
 /*
  * Macro for finding the interface (ifnet structure) corresponding to one
  * of our IP addresses.
 /*
  * Macro for finding the interface (ifnet structure) corresponding to one
  * of our IP addresses.
@@ -162,6 +191,10 @@ struct in_multistep {
        IN_NEXT_MULTI((step), (inm)); \
 }
 
        IN_NEXT_MULTI((step), (inm)); \
 }
 
+int    in_ifinit __P((struct ifnet *,
+           struct in_ifaddr *, struct sockaddr_in *, int));
 struct in_multi *in_addmulti __P((struct in_addr *, struct ifnet *));
 int    in_delmulti __P((struct in_multi *));
 struct in_multi *in_addmulti __P((struct in_addr *, struct ifnet *));
 int    in_delmulti __P((struct in_multi *));
+void   in_ifscrub __P((struct ifnet *, struct in_ifaddr *));
+int    in_control __P((struct socket *, int, caddr_t, struct ifnet *));
 #endif
 #endif