Annotation of researchv8dc/netfs/fserv.h, revision 1.1

1.1     ! root        1: #include "sys/types.h"
        !             2: #include "sys/stat.h"
        !             3: extern int errno;
        !             4: extern char *malloc();
        !             5: 
        !             6: int dbgfd;     /* for debugging output, shared with children */
        !             7: int cntlfd;    /* fd for new service requests */
        !             8: int ackfd;     /* for responding to network */
        !             9: fd_set active; /* bit map of active channels for select */
        !            10: int myfd;      /* sole argument to children */
        !            11: int silent;    /* debugging level */
        !            12: #define NORMAN 60
        !            13: struct {
        !            14:        int pid;        /* pid of child, if it exists */
        !            15:        int fd;         /* fd of channel to client (duplicates index) */
        !            16:        int flags;      /* status */
        !            17:        int dtime;      /* time difference */
        !            18:        int dev;        /* client's idea of the root */
        !            19:        long lastheard; /* for time outs */
        !            20:        char *who;      /* client's name, for trapping loops */
        !            21:        int host;       /* correlates with permissions table */
        !            22:        int silent;
        !            23: } children[NORMAN];            /* one-one with fd's */
        !            24: #define CONN   1
        !            25: #define SPLIT  2
        !            26: #define UNINIT 3
        !            27: 
        !            28: #define NDEV 10
        !            29: extern struct tdev {
        !            30:        int ours, his;
        !            31: } devtab[NDEV];
        !            32: extern int ndev;
        !            33: 
        !            34: typedef struct aa {
        !            35:        long tag;
        !            36:        int dev;        /* his dev */
        !            37:        int ino;
        !            38:        char *name;     /* some name */
        !            39:        struct stat statb;      /* cached */
        !            40:        short fd;       /* the precious handle */
        !            41:        char how;       /* how opened */
        !            42: } netf;
        !            43: 
        !            44: extern netf *getnetf(), *gettag(), *newnetf(), *oldnetf();
        !            45: #define ftype(p) (p->statb.st_mode & S_IFMT)
        !            46: /* 1 for cmnd outline, 2 for cmnd detail, 4 for permissions */
        !            47: #define debug1 if(silent & 1) xdebug
        !            48: #define debug2 if(silent & 2) xdebug
        !            49: #define debug3 if(silent & 3) xdebug
        !            50: #define debug4 if(silent & 4) xdebug
        !            51: #define NDBG 200
        !            52: int dptr;
        !            53: char debugbuf[NDBG][128];

unix.superglobalmegacorp.com

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