1 | /* ----------------------------------------------------------------------- |
---|
2 | * |
---|
3 | * Copyright 1999-2008 H. Peter Anvin - All Rights Reserved |
---|
4 | * Copyright 2009-2011 Intel Corporation; author: H. Peter Anvin |
---|
5 | * |
---|
6 | * This program is free software; you can redistribute it and/or modify |
---|
7 | * it under the terms of the GNU General Public License as published by |
---|
8 | * the Free Software Foundation, Inc., 53 Temple Place Ste 330, |
---|
9 | * Boston MA 02111-1307, USA; either version 2 of the License, or |
---|
10 | * (at your option) any later version; incorporated herein by reference. |
---|
11 | * |
---|
12 | * ----------------------------------------------------------------------- */ |
---|
13 | |
---|
14 | /* |
---|
15 | * tftp.h |
---|
16 | */ |
---|
17 | #ifndef PXE_TFTP_H |
---|
18 | #define PXE_TFTP_H |
---|
19 | |
---|
20 | /* |
---|
21 | * TFTP default port number |
---|
22 | */ |
---|
23 | #define TFTP_PORT 69 |
---|
24 | |
---|
25 | /* |
---|
26 | * TFTP default block size |
---|
27 | */ |
---|
28 | #define TFTP_BLOCKSIZE_LG2 9 |
---|
29 | #define TFTP_BLOCKSIZE (1 << TFTP_BLOCKSIZE_LG2) |
---|
30 | |
---|
31 | /* |
---|
32 | * TFTP operation codes |
---|
33 | */ |
---|
34 | #define TFTP_RRQ htons(1) // Read rest |
---|
35 | #define TFTP_WRQ htons(2) // Write rest |
---|
36 | #define TFTP_DATA htons(3) // Data packet |
---|
37 | #define TFTP_ACK htons(4) // ACK packet |
---|
38 | #define TFTP_ERROR htons(5) // ERROR packet |
---|
39 | #define TFTP_OACK htons(6) // OACK packet |
---|
40 | |
---|
41 | /* |
---|
42 | * TFTP error codes |
---|
43 | */ |
---|
44 | #define TFTP_EUNDEF htons(0) // Unspecified error |
---|
45 | #define TFTP_ENOTFOUND htons(1) // File not found |
---|
46 | #define TFTP_EACCESS htons(2) // Access violation |
---|
47 | #define TFTP_ENOSPACE htons(3) // Disk full |
---|
48 | #define TFTP_EBADOP htons(4) // Invalid TFTP operation |
---|
49 | #define TFTP_EBADID htons(5) // Unknown transfer |
---|
50 | #define TFTP_EEXISTS htons(6) // File exists |
---|
51 | #define TFTP_ENOUSER htons(7) // No such user |
---|
52 | #define TFTP_EOPTNEG htons(8) // Option negotiation failure |
---|
53 | |
---|
54 | #endif /* PXE_TFTP_H */ |
---|