Annotation of researchv10no/cmd/face/faceproto.h, revision 1.1

1.1     ! root        1: /*
        !             2:  * protocol for talking to the face server
        !             3:  * defined as lengths and offsets for machine independence
        !             4:  *
        !             5:  * multiple byte quantites are stored little endian:
        !             6:  * least significant byte in byte 0,
        !             7:  * next least in byte 1,
        !             8:  * and so on
        !             9:  */
        !            10: 
        !            11: #define        frfshort(p, off)        ((p)[(off)+0]+((p)[(off)+1]<<8))
        !            12: #define        frflong(p, off) ((p)[(off)+0]+((p)[(off)+1]<<8)+((p)[(off)+2]<<16)+((p)[(off)+3]<<24))
        !            13: #define        tofshort(p, off, n)     ((p)[(off)+0]=n, (p)[(off)+1]=((n)>>8))
        !            14: #define        toflong(p, off, n)      ((p)[(off)+0]=n, (p)[(off)+1]=((n)>>8),\
        !            15:                                (p)[(off)+2]=((n)>>16), (p)[(off)+3]=((n)>>24))
        !            16: 
        !            17: #define        F_TYPE  0       /* one byte: message type */
        !            18: /* one byte of pad */
        !            19: #define        F_LEN   2       /* two bytes: length of accompanying data */
        !            20: #define        F_P1    4       /* four bytes: first parameter */
        !            21: #define        F_P2    8       /* four bytes: second parameter */
        !            22: 
        !            23: #define        F_DATA  12      /* associated data, if any */
        !            24: 
        !            25: /*
        !            26:  * type codes
        !            27:  */
        !            28: #define        DOSTAT  1
        !            29: #define        DOREAD  2
        !            30: 
        !            31: /*
        !            32:  * for DOSTAT, associated data returned
        !            33:  * is a representation of struct stat
        !            34:  * it was first defined on a VAX,
        !            35:  * so here, too, integers are little-endian
        !            36:  */
        !            37: 
        !            38: #define        ST_DEV  0       /* (2) */
        !            39: #define        ST_INO  2       /* (2) */
        !            40: #define        ST_MODE 4       /* (2) */
        !            41: #define        ST_NLINK 6      /* (2) */
        !            42: #define        ST_UID  8       /* (2) */
        !            43: #define        ST_GID  10      /* (2) */
        !            44: #define        ST_RDEV 12      /* (2) */
        !            45: /* two bytes of padding */
        !            46: #define        ST_SIZE 16      /* (4) */
        !            47: #define        ST_ATIME 20     /* (4) */
        !            48: #define        ST_MTIME 24     /* (4) */
        !            49: #define        ST_CTIME 28     /* (4) */
        !            50: #define        STLEN   32      /* sizeof(struct stat) */
        !            51: 
        !            52: #define        STFMT   0170000 /* ST_MODE: type of file */
        !            53: #define        STDIR   0040000 /* .. directory */
        !            54: 
        !            55: #define        FMAXPATH        128     /* max length of pathname */
        !            56: #define        FMAXDATA        4096    /* max data read at once */
        !            57: 
        !            58: #define        FROOT   2       /* i-number of root directory */
        !            59: 
        !            60: /*
        !            61:  * directories
        !            62:  */
        !            63: #define        FD_INO  0       /* (2 bytes) */
        !            64: #define        FD_NAME 2
        !            65: #define        FDLEN   16

unix.superglobalmegacorp.com

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