Annotation of cci/usr/include/arpa/tftp.h, revision 1.1

1.1     ! root        1: /*     tftp.h  4.2     83/06/11        */
        !             2: 
        !             3: /*
        !             4:  * Trivial File Transfer Protocol (IEN-133)
        !             5:  */
        !             6: #define        SEGSIZE         512             /* data segment size */
        !             7: 
        !             8: /*
        !             9:  * Packet types.
        !            10:  */
        !            11: #define        RRQ     01                      /* read request */
        !            12: #define        WRQ     02                      /* write request */
        !            13: #define        DATA    03                      /* data packet */
        !            14: #define        ACK     04                      /* acknowledgement */
        !            15: #define        ERROR   05                      /* error code */
        !            16: 
        !            17: 
        !            18: #if defined(vax)
        !            19: struct tftphdr {
        !            20:        short   th_opcode;              /* packet type */
        !            21:        union {
        !            22:                short   tu_block;       /* block # */
        !            23:                short   tu_code;        /* error code */
        !            24:                char    tu_stuff[1];    /* request packet stuff */
        !            25:        } th_u;
        !            26:        char    th_data[1];             /* data or error string */
        !            27: };
        !            28: 
        !            29: #define        th_block        th_u.tu_block
        !            30: #define        th_code         th_u.tu_code
        !            31: #define        th_stuff        th_u.tu_stuff
        !            32: #define        th_msg          th_data
        !            33: #endif
        !            34: 
        !            35: #if defined(tahoe)
        !            36: struct         tftphdr {
        !            37:        union {
        !            38:                short   opcode;                 /* packet type */
        !            39:                struct {
        !            40:                        short   dummy;
        !            41:                        short   block;          /* block #  OR error code */
        !            42:                }u1;
        !            43:                struct {
        !            44:                        short   dummy;
        !            45:                        char    stuff[1];       /* request packet stuff */
        !            46:                }u2;
        !            47:        }u;
        !            48:        char    th_data[1];                     /* data or error string */
        !            49: };
        !            50: #define th_opcode      u.opcode
        !            51: #define        th_block        u.u1.block
        !            52: #define        th_code         u.u1.block
        !            53: #define        th_stuff        u.u2.stuff
        !            54: #define        th_msg          th_data
        !            55: #endif
        !            56: 
        !            57: /*
        !            58:  * Error codes.
        !            59:  */
        !            60: #define        EUNDEF          0               /* not defined */
        !            61: #define        ENOTFOUND       1               /* file not found */
        !            62: #define        EACCESS         2               /* access violation */
        !            63: #define        ENOSPACE        3               /* disk full or allocation exceeded */
        !            64: #define        EBADOP          4               /* illegal TFTP operation */
        !            65: #define        EBADID          5               /* unknown transfer ID */
        !            66: #define        EEXISTS         6               /* file already exists */
        !            67: #define        ENOUSER         7               /* no such user */

unix.superglobalmegacorp.com

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