10 FILE_LICENCE ( GPL2_OR_LATER
);
14 #define TFTP_PORT 69 /**< Default TFTP server port */
15 #define TFTP_DEFAULT_BLKSIZE 512 /**< Default TFTP data block size */
16 #define TFTP_MAX_BLKSIZE 1432
18 #define TFTP_RRQ 1 /**< Read request opcode */
19 #define TFTP_WRQ 2 /**< Write request opcode */
20 #define TFTP_DATA 3 /**< Data block opcode */
21 #define TFTP_ACK 4 /**< Data block acknowledgement opcode */
22 #define TFTP_ERROR 5 /**< Error opcode */
23 #define TFTP_OACK 6 /**< Options acknowledgement opcode */
25 #define TFTP_ERR_FILE_NOT_FOUND 1 /**< File not found */
26 #define TFTP_ERR_ACCESS_DENIED 2 /**< Access violation */
27 #define TFTP_ERR_DISK_FULL 3 /**< Disk full or allocation exceeded */
28 #define TFTP_ERR_ILLEGAL_OP 4 /**< Illegal TFTP operation */
29 #define TFTP_ERR_UNKNOWN_TID 5 /**< Unknown transfer ID */
30 #define TFTP_ERR_FILE_EXISTS 6 /**< File already exists */
31 #define TFTP_ERR_UNKNOWN_USER 7 /**< No such user */
32 #define TFTP_ERR_BAD_OPTS 8 /**< Option negotiation failed */
34 #define MTFTP_PORT 1759 /**< Default MTFTP server port */
36 /** A TFTP read request (RRQ) packet */
40 } __attribute__ (( packed
));
42 /** A TFTP data (DATA) packet */
47 } __attribute__ (( packed
));
49 /** A TFTP acknowledgement (ACK) packet */
53 } __attribute__ (( packed
));
55 /** A TFTP error (ERROR) packet */
60 } __attribute__ (( packed
));
62 /** A TFTP options acknowledgement (OACK) packet */
66 } __attribute__ (( packed
));
68 /** The common header of all TFTP packets */
71 } __attribute__ (( packed
));
73 /** A union encapsulating all TFTP packet types */
75 struct tftp_common common
;
77 struct tftp_data data
;
79 struct tftp_error error
;
80 struct tftp_oack oack
;
83 extern void tftp_set_request_blksize ( unsigned int blksize
);
85 #endif /* _GPXE_TFTP_H */