Annotation of Net2/arch/i386/netboot/tftp.h, revision 1.1

1.1     ! root        1: /* netboot
        !             2:  *
        !             3:  * tftp.h,v
        !             4:  * Revision 1.1  1993/07/08  16:04:13  brezak
        !             5:  * Diskless boot prom code from Jim McKim ([email protected])
        !             6:  *
        !             7:  * Revision 1.2  1993/06/30  20:14:17  mckim
        !             8:  * Added BOOTP support.
        !             9:  *
        !            10:  * Revision 1.1.1.1  1993/05/28  11:41:08  mckim
        !            11:  * Initial version.
        !            12:  *
        !            13:  *
        !            14:  * source in this file came from
        !            15:  * the Mach ethernet boot written by Leendert van Doorn.
        !            16:  *
        !            17:  * Trivial File Transfer Protocol (see RFC 783)
        !            18:  */
        !            19: 
        !            20: #define        SEGSIZE         512             /* data segment size */
        !            21: 
        !            22: /*
        !            23:  * Packet types
        !            24:  */
        !            25: #define        TFTP_RRQ        01              /* read request */
        !            26: #define        TFTP_WRQ        02              /* write request */
        !            27: #define        TFTP_DATA       03              /* data packet */
        !            28: #define        TFTP_ACK        04              /* acknowledgement */
        !            29: #define        TFTP_ERROR      05              /* error code */
        !            30: 
        !            31: /*
        !            32:  * TFTP header structure
        !            33:  */
        !            34: typedef struct {
        !            35:   u_short      th_op;                  /* packet type */
        !            36:   union {
        !            37:     u_short    tu_block;               /* block # */
        !            38:     u_short    tu_code;                /* error code */
        !            39:     char       tu_stuff[1];            /* request packet stuff */
        !            40:     } th_u;
        !            41: } tftphdr_t;
        !            42: 
        !            43: /* for ease of reference */
        !            44: #define        th_block        th_u.tu_block
        !            45: #define        th_code         th_u.tu_code
        !            46: #define        th_stuff        th_u.tu_stuff
        !            47: #define        th_data         th_stuff[2]
        !            48: #define        th_msg          th_data
        !            49: 
        !            50: void SetTftpParms(ipaddr_t server, ipaddr_t gateway, char *file_name);
        !            51: u_long Read(void *result, u_long nbytes);
        !            52: u_long PhysRead(u_long addr, u_long nbytes);
        !            53: void IpSend(packet_t *pkt, ipaddr_t dst, ipaddr_t gateway);

unix.superglobalmegacorp.com

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