Annotation of researchv10no/cmd/udemon/ufs.h, revision 1.1.1.1

1.1       root        1: #define snchan 1       
                      2: /* Spider channel to file system - but
                      3: also change "/dev/tiu/d?" in nfs1.c */
                      4: #define DSZ 16                 /*directory entry size*/
                      5: #define DEPTH 15
                      6: 
                      7: int    vflag;          /* flag for key arguments */
                      8: int    nflg;           /* make file temporoary on file store */
                      9: int    iflag;
                     10: int    xflag;
                     11: 
                     12: 
                     13: int    tme[2];         /*  modified time of file  */
                     14: char   buf[512];
                     15: char   cmdbuf[512];
                     16: char   *cbp;
                     17: #define NARG   9
                     18: char   rply [128];
                     19: char   nam[DEPTH * 14 + DSZ + 2];
                     20:                        /* stack for extracting or deleting directory */
                     21: struct xstk{
                     22:        char *first;    /* pointer to first title for direct. */
                     23:        char *pos;
                     24:        char *lst;      /* pter to last \*/
                     25: }stack[DEPTH];
                     26: struct stk{
                     27:        int     sff;
                     28:        char    *pos;
                     29:        int     pad;
                     30: };
                     31: struct xstk *xsp;
                     32: int    dirbuf[50];
                     33: int    ubuf[50];
                     34: int    statbuf[40];
                     35: 
                     36: 
                     37: 
                     38: int    nchar;
                     39: int    fn;                     /*Spider network file id*/
                     40: 
                     41: char   *terr ;
                     42: 
                     43: char   op                      /*op code*/;
                     44: char   pseudoop;
                     45: char   **eargv;
                     46: char   *np;            /*pointer into nam[]*/
                     47: char   *bp             /*pointer into buf[]*/;
                     48: char   *tp             /*pointer into *argv[]*/;
                     49: char   *fsp;           /* pointer to arg-modified for the filestore */
                     50: struct stk *sp;                /*pointer into stack[]*/
                     51: int    ff;                     /*file being processed*/
                     52: int    code;           /*dev/tiu  parameter*/
                     53: int    wchar;
                     54: int    sum;            /*check sum of data bytes*/
                     55: int    length;                 /*number of bytes transmitted*/
                     56: 
                     57: char   *stat1 ;
                     58: 
                     59: char   *ng ;
                     60: 
                     61: char   *nxt ;
                     62: char   *last ;
                     63: 
                     64: 
                     65: #define NTYPE  1               /* vtype for name item  */
                     66: #define WTYPE  2               /* vtype for w-store reference */
                     67: #define ETYPE  4               /* vtype for 2-word error code */
                     68: #define RTYPE  5               /* vtype for file reference */
                     69: #define XTYPE  6               /* default operand */
                     70: #define STYPE  7               /* vtype for status item */
                     71: #define DTYPE  8               /* vtype for directory entry */
                     72: #define FTYPE  9               /* vtype for file entry */
                     73: #define IITYPE 10              /* vtype for 2-word integer entry */
                     74: #define ITYPE  11              /* vtype of 1-word integer */
                     75: #define LTYPE  14              /* vtype for skip label */
                     76: #define ATYPE  15              /* vtype for account */
                     77: #define MAXTYPE        15              /* maximum value of vtype */
                     78: 
                     79: 
                     80:                                /*values of user op codes */
                     81: 
                     82: #define OK     128
                     83: #define DEFINE 129
                     84: #define REDEFINE       130
                     85: #define DELETE 131
                     86: #define EOM    133
                     87: #define XMT    135
                     88: #define POP    137
                     89: #define CDIR   138
                     90: #define OPEN   140
                     91: #define CLOSE  141
                     92: #define SEEK   142
                     93: #define READ   143
                     94: #define WRITE  144
                     95: #define TRUNCATE       145
                     96: #define LOGIN  146
                     97: #define QUIT   147
                     98: #define LIST   148
                     99: #define STATUS 149
                    100: #define UNIQUE 151
                    101: #define ASSIGN 154
                    102: #define FCREATE        155
                    103: #define IF     156
                    104: #define FI     157
                    105: #define SKIP   158
                    106: #define DCREATE        159
                    107: #define UNLESS 161
                    108: 
                    109: # define OPNUM 33              /* number of legal op codes */
                    110: 
                    111: int    diroff;
                    112: int    unix;
                    113: /*
                    114:  * Current format of File Store I-node
                    115:  */
                    116: struct spstat {
                    117:        int     f_dev;
                    118:        int     f_number;
                    119:        int     f_mode;
                    120:        char    f_nlink;
                    121:        char    f_uid;
                    122:        char    f_state;
                    123:        char    f_size0;
                    124:        char    *f_size1;
                    125:        char    f_seq;
                    126:        char    f_vol;
                    127:        int     f_accnt[2];
                    128:        int     f_perm[3];
                    129:        int     f_addr[8];
                    130:        int     f_spare[8];
                    131:        int     f_dmp[2];
                    132:        long    f_acctime;
                    133:        long    f_modtime;
                    134: };
                    135: int    command,filemode,pmode;
                    136: #define DELAY 60
                    137: #define GOOD 1
                    138: #define BAD    0
                    139: #define TWLOOP 0
                    140: #define TREAD  1
                    141: #define TCHECK 2
                    142: #define TSTATUS        3
                    143: #define TSENDC 4
                    144: struct {
                    145:        char    lobyte;
                    146:        char    hibyte;
                    147: };
                    148: #define IFMT   060000
                    149: #define IFDIR  040000
                    150: #define EXPLICIT       2
                    151: /*
                    152:  * Returns from gstat
                    153:  */
                    154: #define ORDFILE                0
                    155: #define DIRECTORY      1
                    156: #define NOTFOUND       -1
                    157: 
                    158: #define YES            1
                    159: #define NO             0
                    160: /*
                    161:  * Spider Network commands
                    162:  */
                    163: #define SPIDERWRITE    0
                    164: #define SPIDERREAD     1
                    165: #define SPIDERCHECK    2
                    166: #define SPIDERSTATUS   3
                    167: #define SPIDERCOM      4
                    168: #define SCOM   3
                    169: #define SDATA  1
                    170: #define SEOF   2
                    171: #define SPART  4
                    172: #define CHILD  0
                    173: struct dent{
                    174:        int     d_ino;
                    175:        char    d_name[14];
                    176: };
                    177: int    pid;
                    178: #define TEMPFILE       02000
                    179: #define BIGFILE        01000
                    180: #define RONLY  0
                    181: #define STDOUT 1
                    182: int    updread;
                    183: #define TRUE   1
                    184: #define FALSE  0
                    185: #define UPDATE 1
                    186: #define NOUPDATE 0
                    187: int    byte;
                    188: int    simulate;
                    189: char   *mach;
                    190: int    debug;
                    191: #define RPIPE  0
                    192: #define WPIPE  1
                    193: #define EBAD   0
                    194: #define OUTPUT 1
                    195:                        /* Compressed version of stat */
                    196: struct ustat{
                    197:        int     mode;
                    198:        int     type;
                    199:        int     ftype;
                    200:        int     uid;
                    201:        int     gid;
                    202:        long    size;
                    203:        long    modtime;
                    204:        long    acctime;
                    205: }us;
                    206:                        /* File Access permissions */
                    207: #define R      04
                    208: #define W      02
                    209: #define X      01
                    210:                        /* Types of files */
                    211: #define CHR    1
                    212: #define DIR    2
                    213: #define BLK    3
                    214: #define REC    4
                    215: char   *arg[20];
                    216: struct{
                    217:        int     hiword;
                    218:        int     loword;
                    219: };
                    220: #define dbg if(debug)fprintf

unix.superglobalmegacorp.com

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