add tcp/ip
authorBill Joy <root@ucbvax.Berkeley.EDU>
Wed, 13 May 1981 08:18:49 +0000 (00:18 -0800)
committerBill Joy <root@ucbvax.Berkeley.EDU>
Wed, 13 May 1981 08:18:49 +0000 (00:18 -0800)
SCCS-vsn: sys/kern/vfs_vnops.c 4.10
SCCS-vsn: sys/vax/vax/locore.s 4.47
SCCS-vsn: sys/vax/vax/machdep.c 4.37
SCCS-vsn: sys/kern/init_main.c 4.16
SCCS-vsn: sys/conf/param.c 4.4

usr/src/sys/conf/param.c
usr/src/sys/kern/init_main.c
usr/src/sys/kern/vfs_vnops.c
usr/src/sys/vax/vax/locore.s
usr/src/sys/vax/vax/machdep.c

index 2e2a956..0d74497 100644 (file)
@@ -1,7 +1,12 @@
-/*     param.c 4.3     81/04/28        */
+/*     param.c 4.4     81/05/12        */
 
 #include "../h/param.h"
 #include "../h/systm.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
+#ifdef BBNNET
+#include "../bbnnet/net.h"
+#include "../bbnnet/imp.h"
+#include "../bbnnet/ucb.h"
+#endif BBNNET
 #include "../h/dir.h"
 #include "../h/user.h"
 #include "../h/proc.h"
 #include "../h/dir.h"
 #include "../h/user.h"
 #include "../h/proc.h"
@@ -33,6 +38,12 @@ int  nfile = 8 * (NPROC + 16 + MAXUSERS) / 10;
 int    ncallout = 16 + MAXUSERS;
 int    nclist = 100 + 16 * MAXUSERS;
 int    nport = NPROC / 2;
 int    ncallout = 16 + MAXUSERS;
 int    nclist = 100 + 16 * MAXUSERS;
 int    nport = NPROC / 2;
+#ifdef BBNNET
+int     nnetpages = NNETPAGES;
+int     nwork = NWORK;
+int     nnetcon = NCON;
+int     nhost = NHOST;
+#endif BBNNET
 
 /*
  * These are initialized at bootstrap time
 
 /*
  * These are initialized at bootstrap time
@@ -50,9 +61,17 @@ struct       inode *inode, *inodeNINODE;
 struct file *file, *fileNFILE;
 struct         callout *callout;
 struct cblock *cfree;
 struct file *file, *fileNFILE;
 struct         callout *callout;
 struct cblock *cfree;
-
 struct buf *buf, *swbuf;
 short  *swsize;
 int    *swpf;
 char   *buffers;
 struct cmap *cmap, *ecmap;
 struct buf *buf, *swbuf;
 short  *swsize;
 int    *swpf;
 char   *buffers;
 struct cmap *cmap, *ecmap;
+#ifdef BBNNET
+struct  pfree *freetab;
+struct  work *workfree, *workNWORK;
+struct  ucb *contab, *conNCON;
+struct  host *host, *hostNHOST;
+struct  net netcb;
+struct  net_stat netstat;
+struct  impstat imp_stat;
+#endif BBNNET
index 1dcc5be..edf4921 100644 (file)
@@ -1,4 +1,4 @@
-/*     init_main.c     4.15    81/04/28        */
+/*     init_main.c     4.16    81/05/12        */
 
 #include "../h/param.h"
 #include "../h/systm.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
@@ -106,7 +106,6 @@ main(firstaddr)
         * table so that it can map dirty pages into
         * its address space during asychronous pushes.
         */
         * table so that it can map dirty pages into
         * its address space during asychronous pushes.
         */
-
        mpid = 1;
        proc[0].p_szpt = clrnd(ctopt(nswbuf*CLSIZE*KLMAX + UPAGES));
        proc[1].p_stat = SZOMB;         /* force it to be in proc slot 2 */
        mpid = 1;
        proc[0].p_szpt = clrnd(ctopt(nswbuf*CLSIZE*KLMAX + UPAGES));
        proc[1].p_stat = SZOMB;         /* force it to be in proc slot 2 */
@@ -134,6 +133,13 @@ main(firstaddr)
                 */
                return;
        }
                 */
                return;
        }
+
+#ifdef BBNNET 
+       /*
+        * Initialize bbn network.
+        */
+       netinit();
+#endif BBNNET
        proc[0].p_szpt = 1;
        sched();
 }
        proc[0].p_szpt = 1;
        sched();
 }
index 4a94cfb..ce9822f 100644 (file)
@@ -1,4 +1,4 @@
-/*     vfs_vnops.c     4.9     81/04/28        */
+/*     vfs_vnops.c     4.10    81/05/12        */
 
 #include "../h/param.h"
 #include "../h/systm.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
@@ -59,6 +59,12 @@ register struct file *fp;
                return;
        }
        flag = fp->f_flag;
                return;
        }
        flag = fp->f_flag;
+#ifdef BBNNET
+       if (flag&FNET) {
+               netclose(fp);
+               return;
+       }
+#endif
        if (flag & FPORT) {
                ptclose(fp);
                fp->f_count = 0;
        if (flag & FPORT) {
                ptclose(fp);
                fp->f_count = 0;
index 671aa03..7f21851 100644 (file)
@@ -1,4 +1,4 @@
-/*     locore.s        4.46    81/05/05        */
+/*     locore.s        4.47    81/05/12        */
 
 #include "../h/mtpr.h"
 #include "../h/trap.h"
 
 #include "../h/mtpr.h"
 #include "../h/trap.h"
@@ -330,6 +330,9 @@ _/**/mname: .globl  _/**/mname;             \
        SYSMAP(msgbufmap,msgbuf         ,CLSIZE         )
        SYSMAP(camap    ,cabase         ,16*CLSIZE      )
        SYSMAP(ecamap   ,calimit        ,0              )
        SYSMAP(msgbufmap,msgbuf         ,CLSIZE         )
        SYSMAP(camap    ,cabase         ,16*CLSIZE      )
        SYSMAP(ecamap   ,calimit        ,0              )
+#ifdef BBNNET
+       SYSMAP(Netmap   ,netutl         ,NNETPAGES*CLSIZE)
+#endif
 
 eSysmap:
        .set    _Syssize,(eSysmap-_Sysmap)/4
 
 eSysmap:
        .set    _Syssize,(eSysmap-_Sysmap)/4
index dc17816..ed21558 100644 (file)
@@ -1,7 +1,11 @@
-/*     machdep.c       4.36    81/05/09        */
+/*     machdep.c       4.37    81/05/12        */
 
 #include "../h/param.h"
 #include "../h/systm.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
+#ifdef BBNNET
+#include "../bbnnet/net.h"
+#include "../bbnnet/ucb.h"
+#endif BBNNET
 #include "../h/dir.h"
 #include "../h/user.h"
 #include "../h/map.h"
 #include "../h/dir.h"
 #include "../h/user.h"
 #include "../h/map.h"
@@ -115,7 +119,13 @@ startup(firstaddr)
        valloc(swapmap, struct map, nswapmap = nproc * 2);
        valloc(argmap, struct map, ARGMAPSIZE);
        valloc(kernelmap, struct map, nproc);
        valloc(swapmap, struct map, nswapmap = nproc * 2);
        valloc(argmap, struct map, ARGMAPSIZE);
        valloc(kernelmap, struct map, nproc);
-
+#ifdef BBNNET
+       valloc(netmap, struct map, nnetpages/2);
+       valloc(freetab, struct pfree, nnetpages);
+       valloclim(workfree, struct work, nwork, workNWORK);
+       valloclim(contab, struct ucb, nnetcon, conNCON);
+       valloclim(host, struct host, nhost, hostNHOST);
+#endif BBNNET
        /*
         * Now allocate space for core map
         */
        /*
         * Now allocate space for core map
         */
@@ -158,6 +168,13 @@ startup(firstaddr)
        printf("avail mem = %d\n", ctob(maxmem));
        rminit(kernelmap, USRPTSIZE, 1, "usrpt", nproc);
 
        printf("avail mem = %d\n", ctob(maxmem));
        rminit(kernelmap, USRPTSIZE, 1, "usrpt", nproc);
 
+#ifdef BBNNET
+       /*
+        * Initialize network buffer management map.
+        */
+       rminit(netmap, nnetpages-1, 1, "netpage", nnetpages/2);
+#endif BBNNET
+
        /*
         * Configure the system.
         */
        /*
         * Configure the system.
         */