From 294b585994da4427ac98a8353ff41aed5f301d54 Mon Sep 17 00:00:00 2001 From: pk33 Date: Fri, 1 Nov 2024 23:51:15 +0100 Subject: Import and fix old code --- include/musl/arpa/tftp.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 include/musl/arpa/tftp.h (limited to 'include/musl/arpa/tftp.h') diff --git a/include/musl/arpa/tftp.h b/include/musl/arpa/tftp.h new file mode 100644 index 0000000..799c54f --- /dev/null +++ b/include/musl/arpa/tftp.h @@ -0,0 +1,31 @@ +#ifndef _ARPA_TFTP_H +#define _ARPA_TFTP_H +#define SEGSIZE 512 +#define RRQ 01 +#define WRQ 02 +#define DATA 03 +#define ACK 04 +#define ERROR 05 +struct tftphdr { + short th_opcode; + union { + unsigned short tu_block; + short tu_code; + char tu_stuff[1]; + } th_u; + char th_data[1]; +}; +#define th_block th_u.tu_block +#define th_code th_u.tu_code +#define th_stuff th_u.tu_stuff +#define th_msg th_data +#define EUNDEF 0 +#define ENOTFOUND 1 +#define EACCESS 2 +#define ENOSPACE 3 +#define EBADOP 4 +#define EBADID 5 +#define EEXISTS 6 +#define ENOUSER 7 +#endif + -- cgit v1.2.3