|
@@ -22,8 +22,6 @@
|
22
|
22
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
23
|
23
|
*/
|
24
|
24
|
|
25
|
|
-#if 0
|
26
|
|
-
|
27
|
25
|
#include "pxe.h"
|
28
|
26
|
|
29
|
27
|
static int pxe_tftp_read_block ( unsigned char *data, unsigned int block,
|
|
@@ -109,13 +107,9 @@ static int pxe_tftp_read_block ( unsigned char *data, unsigned int block,
|
109
|
107
|
* other PXE API call "if an MTFTP connection is active".
|
110
|
108
|
*/
|
111
|
109
|
PXENV_EXIT_t pxenv_tftp_open ( struct s_PXENV_TFTP_OPEN *tftp_open ) {
|
112
|
|
- struct sockaddr_in tftp_server;
|
113
|
|
- struct tftpreq_info_t request;
|
114
|
|
- struct tftpblk_info_t block;
|
115
|
|
-
|
116
|
110
|
DBG ( "PXENV_TFTP_OPEN" );
|
117
|
|
- ENSURE_READY ( tftp_open );
|
118
|
111
|
|
|
112
|
+#if 0
|
119
|
113
|
/* Set server address and port */
|
120
|
114
|
tftp_server.sin_addr.s_addr = tftp_open->ServerIPAddress
|
121
|
115
|
? tftp_open->ServerIPAddress
|
|
@@ -146,6 +140,7 @@ PXENV_EXIT_t pxenv_tftp_open ( struct s_PXENV_TFTP_OPEN *tftp_open ) {
|
146
|
140
|
pxe_stack->tftpdata.len = block.len;
|
147
|
141
|
pxe_stack->tftpdata.eof = block.eof;
|
148
|
142
|
memcpy ( pxe_stack->tftpdata.data, block.data, block.len );
|
|
143
|
+#endif
|
149
|
144
|
|
150
|
145
|
tftp_open->Status = PXENV_STATUS_SUCCESS;
|
151
|
146
|
return PXENV_EXIT_SUCCESS;
|
|
@@ -174,7 +169,7 @@ PXENV_EXIT_t pxenv_tftp_open ( struct s_PXENV_TFTP_OPEN *tftp_open ) {
|
174
|
169
|
*/
|
175
|
170
|
PXENV_EXIT_t pxenv_tftp_close ( struct s_PXENV_TFTP_CLOSE *tftp_close ) {
|
176
|
171
|
DBG ( "PXENV_TFTP_CLOSE" );
|
177
|
|
- ENSURE_READY ( tftp_close );
|
|
172
|
+
|
178
|
173
|
tftp_close->Status = PXENV_STATUS_SUCCESS;
|
179
|
174
|
return PXENV_EXIT_SUCCESS;
|
180
|
175
|
}
|
|
@@ -246,11 +241,9 @@ PXENV_EXIT_t pxenv_tftp_close ( struct s_PXENV_TFTP_CLOSE *tftp_close ) {
|
246
|
241
|
* @ref pxe_x86_pmode16 "implementation note" for more details.)
|
247
|
242
|
*/
|
248
|
243
|
PXENV_EXIT_t pxenv_tftp_read ( struct s_PXENV_TFTP_READ *tftp_read ) {
|
249
|
|
- struct tftpblk_info_t block;
|
250
|
|
-
|
251
|
244
|
DBG ( "PXENV_TFTP_READ" );
|
252
|
|
- ENSURE_READY ( tftp_read );
|
253
|
245
|
|
|
246
|
+#if 0
|
254
|
247
|
/* Do we have a block pending */
|
255
|
248
|
if ( pxe_stack->tftpdata.magic_cookie == PXE_TFTP_MAGIC_COOKIE ) {
|
256
|
249
|
block.data = pxe_stack->tftpdata.data;
|
|
@@ -271,6 +264,7 @@ PXENV_EXIT_t pxenv_tftp_read ( struct s_PXENV_TFTP_READ *tftp_read ) {
|
271
|
264
|
memcpy ( SEGOFF16_TO_PTR(tftp_read->Buffer), block.data, block.len );
|
272
|
265
|
DBG ( " %d to %hx:%hx", block.len, tftp_read->Buffer.segment,
|
273
|
266
|
tftp_read->Buffer.offset );
|
|
267
|
+#endif
|
274
|
268
|
|
275
|
269
|
tftp_read->Status = PXENV_STATUS_SUCCESS;
|
276
|
270
|
return PXENV_EXIT_SUCCESS;
|
|
@@ -369,14 +363,11 @@ PXENV_EXIT_t pxenv_tftp_read ( struct s_PXENV_TFTP_READ *tftp_read ) {
|
369
|
363
|
*/
|
370
|
364
|
PXENV_EXIT_t pxenv_tftp_read_file ( struct s_PXENV_TFTP_READ_FILE
|
371
|
365
|
*tftp_read_file ) {
|
372
|
|
- struct sockaddr_in tftp_server;
|
373
|
|
- int rc;
|
374
|
|
-
|
375
|
366
|
DBG ( "PXENV_TFTP_READ_FILE %s to [%x,%x)", tftp_read_file->FileName,
|
376
|
367
|
tftp_read_file->Buffer,
|
377
|
368
|
tftp_read_file->Buffer + tftp_read_file->BufferSize );
|
378
|
|
- ENSURE_READY ( tftp_read_file );
|
379
|
369
|
|
|
370
|
+#if 0
|
380
|
371
|
/* inserted by Klaus Wittemeier */
|
381
|
372
|
/* KERNEL_BUF stores the name of the last required file */
|
382
|
373
|
/* This is a fix to make Microsoft Remote Install Services work (RIS) */
|
|
@@ -399,10 +390,13 @@ PXENV_EXIT_t pxenv_tftp_read_file ( struct s_PXENV_TFTP_READ_FILE
|
399
|
390
|
tftp_read_file->Status = PXENV_STATUS_FAILURE;
|
400
|
391
|
return PXENV_EXIT_FAILURE;
|
401
|
392
|
}
|
|
393
|
+#endif
|
|
394
|
+
|
402
|
395
|
tftp_read_file->Status = PXENV_STATUS_SUCCESS;
|
403
|
396
|
return PXENV_EXIT_SUCCESS;
|
404
|
397
|
}
|
405
|
398
|
|
|
399
|
+#if 0
|
406
|
400
|
static int pxe_tftp_read_block ( unsigned char *data,
|
407
|
401
|
unsigned int block __unused,
|
408
|
402
|
unsigned int len, int eof ) {
|
|
@@ -415,6 +409,7 @@ static int pxe_tftp_read_block ( unsigned char *data,
|
415
|
409
|
pxe_stack->readfile.offset += len;
|
416
|
410
|
return eof ? 0 : 1;
|
417
|
411
|
}
|
|
412
|
+#endif
|
418
|
413
|
|
419
|
414
|
/**
|
420
|
415
|
* TFTP GET FILE SIZE
|
|
@@ -463,8 +458,8 @@ PXENV_EXIT_t pxenv_tftp_get_fsize ( struct s_PXENV_TFTP_GET_FSIZE
|
463
|
458
|
int rc;
|
464
|
459
|
|
465
|
460
|
DBG ( "PXENV_TFTP_GET_FSIZE" );
|
466
|
|
- ENSURE_READY ( tftp_get_fsize );
|
467
|
461
|
|
|
462
|
+#if 0
|
468
|
463
|
pxe_stack->readfile.buffer = NULL;
|
469
|
464
|
pxe_stack->readfile.bufferlen = 0;
|
470
|
465
|
pxe_stack->readfile.offset = 0;
|
|
@@ -476,6 +471,8 @@ PXENV_EXIT_t pxenv_tftp_get_fsize ( struct s_PXENV_TFTP_GET_FSIZE
|
476
|
471
|
return PXENV_EXIT_FAILURE;
|
477
|
472
|
}
|
478
|
473
|
tftp_get_fsize->FileSize = pxe_stack->readfile.offset;
|
|
474
|
+#endif
|
|
475
|
+
|
479
|
476
|
tftp_get_fsize->Status = PXENV_STATUS_SUCCESS;
|
480
|
477
|
return PXENV_EXIT_SUCCESS;
|
481
|
478
|
}
|
|
@@ -623,5 +620,3 @@ Note to future API designers at Intel: try to understand the
|
623
|
620
|
underlying network protocol first!
|
624
|
621
|
|
625
|
622
|
*/
|
626
|
|
-
|
627
|
|
-#endif
|