Annotation of xinu/h/net.h, revision 1.1.1.1

1.1       root        1: /* net.h */
                      2: 
                      3: /* High-level network definitions and constants */
                      4: 
                      5: #define        NETBUFS         25              /* number of network buffers    */
                      6: #ifndef        Ndg
                      7: #define        NETQS           1               /* number of xinu ports used to */
                      8: #else                                  /*  demultiplex udp datagrams   */
                      9: #define        NETQS           Ndg
                     10: #endif
                     11: #define        NETQLEN         15              /* size of a demux queue        */
                     12: #define        NETFQ           3               /* size of input-to-output queue*/
                     13: #ifndef        NETNLEN
                     14: #define        NETNLEN         30              /* length of network name       */
                     15: #endif
                     16: 
                     17: /* Commands for the network pseudo device control call */
                     18: 
                     19: #define        NC_SETGW        1               /* set gateway IP address       */
                     20: 
                     21: /* Network input and output processes: procedure name and parameters */
                     22: 
                     23: #define        NETIN           netin           /* network input daemon process */
                     24: #define        NETOUT          netout          /* network output process       */
                     25: extern int             NETIN(), NETOUT();
                     26: #define        NETISTK         1024            /* stack size for network input */
                     27: #define        NETOSTK         1900            /* stack size for network output*/
                     28: #define        NETIPRI         100             /* network runs at high priority*/
                     29: #define        NETOPRI          99             /* network output priority      */
                     30: #define        NETINAM         "netin"         /* name of network input process*/
                     31: #define        NETONAM         "netout"        /* name of network output   "   */
                     32: #define        NETIARGC        1               /* count of args to net input   */
                     33: #define        NETOARGC        2               /* count of args to net output  */
                     34: 
                     35: 
                     36: /* Mapping of external network UDP "port" to internal Xinu port */
                     37: 
                     38: struct netq    {                       /* UDP demultiplexing info      */
                     39:        Bool    valid;                  /* is this entry in use?        */
                     40:        short   uport;                  /* local UDP "port" number      */
                     41:        int     pid;                    /* pid of process if one waiting*/
                     42:        int     xport;                  /* Corresponding Xinu port on   */
                     43: };                                     /*  which incoming pac. queued  */
                     44: 
                     45: struct netinfo {                       /* info and parms. for network  */
                     46:        int     netpool;                /* network packet buffer pool   */
                     47:        struct  netq netqs[NETQS];      /* UDP packet demux info        */
                     48:        Bool    mnvalid;                /* is my host name field valid? */
                     49:        Bool    mavalid;                /* is my network address valid? */
                     50:        char    myname[NETNLEN];        /* domain name of this machine  */
                     51:        IPaddr  myaddr;                 /* IP address of this machine   */
                     52:        IPaddr  mynet;                  /* Network portion of myaddr    */
                     53:        IPaddr  gateway;                /* IP address of gateway to use */
                     54:        int     nxtprt;                 /* next available local UDP port*/
                     55:        int     nmutex;                 /* output mutual excl. semaphore*/
                     56:        int     npacket;                /* # of packets processed       */
                     57:        int     ndrop;                  /* # of dropped packets         */
                     58:        int     nover;                  /* # dropped because queue full */
                     59: };
                     60: 
                     61: extern struct  netinfo Net;            /* All network parameters       */

unix.superglobalmegacorp.com

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