|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 1983 Regents of the University of California. ! 3: * All rights reserved. The Berkeley software License Agreement ! 4: * specifies the terms and conditions for redistribution. ! 5: * ! 6: * @(#)tftp.h 5.1 (Berkeley) 5/30/85 ! 7: */ ! 8: ! 9: /* ! 10: * Trivial File Transfer Protocol (IEN-133) ! 11: */ ! 12: #define SEGSIZE 512 /* data segment size */ ! 13: ! 14: /* ! 15: * Packet types. ! 16: */ ! 17: #define RRQ 01 /* read request */ ! 18: #define WRQ 02 /* write request */ ! 19: #define DATA 03 /* data packet */ ! 20: #define ACK 04 /* acknowledgement */ ! 21: #define ERROR 05 /* error code */ ! 22: ! 23: struct tftphdr { ! 24: short th_opcode; /* packet type */ ! 25: union { ! 26: short tu_block; /* block # */ ! 27: short tu_code; /* error code */ ! 28: char tu_stuff[1]; /* request packet stuff */ ! 29: } th_u; ! 30: char th_data[1]; /* data or error string */ ! 31: }; ! 32: ! 33: #define th_block th_u.tu_block ! 34: #define th_code th_u.tu_code ! 35: #define th_stuff th_u.tu_stuff ! 36: #define th_msg th_data ! 37: ! 38: /* ! 39: * Error codes. ! 40: */ ! 41: #define EUNDEF 0 /* not defined */ ! 42: #define ENOTFOUND 1 /* file not found */ ! 43: #define EACCESS 2 /* access violation */ ! 44: #define ENOSPACE 3 /* disk full or allocation exceeded */ ! 45: #define EBADOP 4 /* illegal TFTP operation */ ! 46: #define EBADID 5 /* unknown transfer ID */ ! 47: #define EEXISTS 6 /* file already exists */ ! 48: #define ENOUSER 7 /* no such user */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.