return flags and generation number in stat structure
[unix-history] / usr / src / sys / kern / uipc_domain.c
index 3386508..460a901 100644 (file)
@@ -1,15 +1,27 @@
 /*
 /*
- * Copyright (c) 1982 Regents of the University of California.
- * All rights reserved.  The Berkeley software License Agreement
- * specifies the terms and conditions for redistribution.
+ * Copyright (c) 1982, 1986 Regents of the University of California.
+ * All rights reserved.
  *
  *
- *     @(#)uipc_domain.c       6.7 (Berkeley) %G%
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *     @(#)uipc_domain.c       7.4 (Berkeley) %G%
  */
 
 #include "param.h"
 #include "socket.h"
 #include "protosw.h"
 #include "domain.h"
  */
 
 #include "param.h"
 #include "socket.h"
 #include "protosw.h"
 #include "domain.h"
+#include "mbuf.h"
 #include "time.h"
 #include "kernel.h"
 
 #include "time.h"
 #include "kernel.h"
 
@@ -26,14 +38,15 @@ domaininit()
 
 #ifndef lint
        ADDDOMAIN(unix);
 
 #ifndef lint
        ADDDOMAIN(unix);
+       ADDDOMAIN(route);
 #ifdef INET
        ADDDOMAIN(inet);
 #endif
 #ifdef NS
        ADDDOMAIN(ns);
 #endif
 #ifdef INET
        ADDDOMAIN(inet);
 #endif
 #ifdef NS
        ADDDOMAIN(ns);
 #endif
-#ifdef PUP
-       ADDDOMAIN(pup);
+#ifdef ISO
+       ADDDOMAIN(iso);
 #endif
 #include "imp.h"
 #if NIMP > 0
 #endif
 #include "imp.h"
 #if NIMP > 0
@@ -48,6 +61,11 @@ domaininit()
                        if (pr->pr_init)
                                (*pr->pr_init)();
        }
                        if (pr->pr_init)
                                (*pr->pr_init)();
        }
+
+if (max_linkhdr < 16)          /* XXX */
+max_linkhdr = 16;
+       max_hdr = max_linkhdr + max_protohdr;
+       max_datalen = MHLEN - max_hdr;
        pffasttimo();
        pfslowtimo();
 }
        pffasttimo();
        pfslowtimo();
 }
@@ -96,9 +114,9 @@ found:
        return (maybe);
 }
 
        return (maybe);
 }
 
-pfctlinput(cmd, arg)
+pfctlinput(cmd, sa)
        int cmd;
        int cmd;
-       caddr_t arg;
+       struct sockaddr *sa;
 {
        register struct domain *dp;
        register struct protosw *pr;
 {
        register struct domain *dp;
        register struct protosw *pr;
@@ -106,7 +124,7 @@ pfctlinput(cmd, arg)
        for (dp = domains; dp; dp = dp->dom_next)
                for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++)
                        if (pr->pr_ctlinput)
        for (dp = domains; dp; dp = dp->dom_next)
                for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++)
                        if (pr->pr_ctlinput)
-                               (*pr->pr_ctlinput)(cmd, arg);
+                               (*pr->pr_ctlinput)(cmd, sa);
 }
 
 pfslowtimo()
 }
 
 pfslowtimo()