Annotation of xinu/sys/netinit.c, revision 1.1.1.1

1.1       root        1: /* netinit.c - netinit */
                      2: 
                      3: #include <conf.h>
                      4: #include <kernel.h>
                      5: #include <sleep.h>
                      6: #include <network.h>
                      7: 
                      8: /*------------------------------------------------------------------------
                      9:  *  netinit  -  initialize network data structures
                     10:  *------------------------------------------------------------------------
                     11:  */
                     12: netinit()
                     13: {
                     14:        struct  netq    *nqptr;
                     15:        int     i;
                     16: 
                     17:        /* Initialize pool of network buffers and rest of Net structure */
                     18: 
                     19:        if (clkruns == FALSE)
                     20:                panic("net: no clock");
                     21:        Net.netpool = mkpool(EMAXPAK, NETBUFS);
                     22:        for (i=0 ; i<NETQS ; i++) {
                     23:                nqptr = &Net.netqs[i];
                     24:                nqptr->valid = FALSE;
                     25:                nqptr->uport = -1;
                     26:                nqptr->xport = pcreate(NETQLEN);
                     27:        }
                     28:        Net.mnvalid = Net.mavalid = FALSE;
                     29:        dot2ip(Net.gateway, GATEWAY);
                     30:        Net.nxtprt = ULPORT;
                     31:        Net.nmutex = screate(1);
                     32:        Net.npacket = Net.ndrop = Net.nover = 0;
                     33:        return(OK);
                     34: }
                     35: 
                     36: struct netinfo Net;

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.