summaryrefslogtreecommitdiff
path: root/inet/arpa/tftp.h
diff options
context:
space:
mode:
Diffstat (limited to 'inet/arpa/tftp.h')
-rw-r--r--inet/arpa/tftp.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/inet/arpa/tftp.h b/inet/arpa/tftp.h
index 036720011f..0904407c73 100644
--- a/inet/arpa/tftp.h
+++ b/inet/arpa/tftp.h
@@ -33,8 +33,8 @@
* @(#)tftp.h 8.1 (Berkeley) 6/2/93
*/
-#ifndef _TFTP_H_
-#define _TFTP_H_
+#ifndef _ARPA_TFTP_H
+#define _ARPA_TFTP_H 1
/*
* Trivial File Transfer Protocol (IEN-133)
@@ -44,20 +44,20 @@
/*
* Packet types.
*/
-#define RRQ 01 /* read request */
-#define WRQ 02 /* write request */
-#define DATA 03 /* data packet */
-#define ACK 04 /* acknowledgement */
-#define ERROR 05 /* error code */
+#define RRQ 01 /* read request */
+#define WRQ 02 /* write request */
+#define DATA 03 /* data packet */
+#define ACK 04 /* acknowledgement */
+#define ERROR 05 /* error code */
struct tftphdr {
- short th_opcode; /* packet type */
+ short th_opcode; /* packet type */
union {
- short tu_block; /* block # */
- short tu_code; /* error code */
- char tu_stuff[1]; /* request packet stuff */
+ unsigned short tu_block; /* block # */
+ short tu_code; /* error code */
+ char tu_stuff[1]; /* request packet stuff */
} th_u;
- char th_data[1]; /* data or error string */
+ char th_data[1]; /* data or error string */
};
#define th_block th_u.tu_block
@@ -77,4 +77,4 @@ struct tftphdr {
#define EEXISTS 6 /* file already exists */
#define ENOUSER 7 /* no such user */
-#endif /* !_TFTP_H_ */
+#endif /* arpa/tftp.h */