3 Op-Code: PXENV_FILE_OPEN (00e0h)
5 Input: Far pointer to a t_PXENV_FILE_OPEN parameter structure
6 that has been initialised by the caller.
8 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be
9 returned in AX. The status field in the parameter
10 structure must be set to one of the values represented
11 by the PXENV_STATUS_xxx constants.
13 Description: Opens a file specified by a URL for reading. Multiple
14 files may be opened and used concurrently.
17 typedef struct s_PXENV_FILE_OPEN {
25 Set before calling API service:
27 FileName: URL of file to be opened. Null terminated.
29 Reserved: Must be zero.
32 Returned from API service:
34 FileHandle: Handle for use in subsequent PXE FILE API calls.
36 Status: See PXENV_STATUS_xxx constants.
43 Op-Code: PXENV_FILE_CLOSE (00e1h)
45 Input: Far pointer to a t_PXENV_FILE_CLOSE parameter structure
46 that has been initialised by the caller.
48 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be
49 returned in AX. The status field in the parameter
50 structure must be set to one of the values represented
51 by the PXENV_STATUS_xxx constants.
53 Description: Closes a previously opened file.
56 typedef struct s_PXENV_FILE_CLOSE {
62 Set before calling API service:
64 FileHandle: Handle obtained when file was opened.
67 Returned from API service:
69 Status: See PXENV_STATUS_xxx constants.
76 Op-Code: PXENV_FILE_SELECT (00e2h)
78 Input: Far pointer to a t_PXENV_FILE_SELECT parameter structure
79 that has been initialised by the caller.
81 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be
82 returned in AX. The status field in the parameter
83 structure must be set to one of the values represented
84 by the PXENV_STATUS_xxx constants.
86 Description: Check a previously opened file's readiness for I/O.
89 typedef struct s_PXENV_FILE_SELECT {
93 #define RDY_READ 0x0001
94 } t_PXENV_FILE_SELECT;
97 Set before calling API service:
99 FileHandle: Handle obtained when file was opened.
102 Returned from API service:
104 Ready: Indication of readiness. This can be zero, or more,
105 of the RDY_xxx constants. Multiple values are
106 arithmetically or-ed together.
108 Status: See PXENV_STATUS_xxx constants.
115 Op-Code: PXENV_FILE_READ (00e3h)
117 Input: Far pointer to a t_PXENV_FILE_READ parameter structure
118 that has been initialised by the caller.
120 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be
121 returned in AX. The status field in the parameter
122 structure must be set to one of the values represented
123 by the PXENV_STATUS_xxx constants.
125 This API function is non-blocking. PXENV_EXIT_SUCCESS
126 and PXENV_STATUS_SUCCESS is returned if a data block
127 has been transferred into the caller's buffer.
128 PXENV_EXIT_FAILURE and PXENV_STATUS_TFTP_OPEN is
129 returned if no data is available to transfer; any
130 other status code reflects an error.
132 Description: Read from a previously opened file.
135 typedef struct s_PXENV_FILE_READ {
143 Set before calling API service:
145 FileHandle: Handle obtained when file was opened.
147 BufferSize: Maximum number of data bytes that can be copied into
150 Buffer: Segment:Offset address of data buffer.
153 Returned from API service:
155 BufferSize: Number of bytes written to the data buffer. End of
156 file if this is zero.
158 Status: See PXENV_STATUS_xxx constants.
165 Op-Code: PXENV_GET_FILE_SIZE (00e4h)
167 Input: Far pointer to a t_PXENV_GET_FILE_SIZE parameter
168 structure that has been initialised by the caller.
170 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be
171 returned in AX. The status field in the parameter
172 structure must be set to one of the values represented
173 by the PXENV_STATUS_xxx constants.
175 Description: Determine size of a previously opened file.
178 typedef struct s_PXENV_GET_FILE_SIZE {
182 } t_PXENV_GET_FILE_SIZE;
185 Set before calling API service:
187 FileHandle: Handle obtained when file was opened.
190 Returned from API service:
192 FileSize: Size of the file in bytes.
194 Status: See PXENV_STATUS_xxx constants.
201 Op-Code: PXENV_FILE_EXEC (00e5h)
203 Input: Far pointer to a t_PXENV_FILE_EXEC parameter
204 structure that has been initialized by the caller.
206 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be
207 returned in AX. The Status field in the parameter
208 structure must be set to one of the values represented
209 by the PXENV_STATUS_xxx constants.
211 Description: Execute a gPXE command.
213 typedef struct s_PXENV_FILE_EXEC {
214 PXENV_STATUS_t Status;
219 Set before calling API service:
221 Command: Command to execute. Null terminated.
224 Returned from API service:
226 Status: See PXENV_STATUS_xxx constants.
233 Op-Code: PXENV_FILE_API_CHECK (00e6h)
235 Input: Far pointer to a t_PXENV_FILE_CHECK_API parameter
236 structure that has been initialized by the caller.
238 On entry, the Magic field should contain the number
239 0x91d447b2 or the call will fail.
241 Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be
242 returned in AX. The Status field in the parameter
243 structure must be set to one of the values represented
244 by the PXENV_STATUS_xxx constants.
246 If this API is present and the Magic field contains the
247 proper value on entry, AX will contain PXENV_EXIT_SUCCESS,
248 the Status field PXENV_STATUS_SUCCESS, and the Magic field
249 the number 0xe9c17b20. Any other combination should be
250 considered a failure.
252 Description: Detect presence of this API.
255 typedef struct s_PXENV_FILE_CHECK_API {
262 } t_PXENV_FILE_CHECK_API;
264 Set before calling API service:
266 Size: Set to sizeof(t_PXENV_FILE_CHECK_API) (20).
267 Magic: Set to 0x91d447b2.
270 Returned from API service:
272 Size: Set to the number of bytes filled in (20).
273 Magic: Set to 0xe9c17b20.
274 Provider: Set to 0x45585067 ("gPXE"). Another implementation of this
275 API can use another value, e.g. to indicate a different
276 command set supported by FILE EXEC.
277 APIMask: Bitmask of supported API functions (one bit for each function
278 in the range 00e0h to 00ffh).
279 Flags: Set to zero, reserved for future use.