david/ipxe
Archived
1
0
Commit Graph

31 Commits

Author SHA1 Message Date
Michael Brown
323cdf8c4c [xfer] Implement xfer_vreopen() to properly handle redirections
When handling a redirection event, we need to close the existing
connection before opening the new connection.
2009-03-30 13:24:56 +01:00
Michael Brown
8ae1cac050 [xfer] Make consistent assumptions that xfer metadata can never be NULL
The documentation in xfer.h and xfer.c does not say that the metadata
parameter is optional in calls such as xfer_deliver_iob_meta() and the
deliver_iob() method.  However, some code in net/ is prepared to
accept a NULL pointer, and xfer_deliver_as_iob() passes a NULL pointer
directly to the deliver_iob() method.

Fix this mess of conflicting assumptions by making everything assume
that the metadata parameter is mandatory, and fixing
xfer_deliver_as_iob() to pass in a dummy metadata structure (as is
already done in xfer_deliver_iob()).
2009-02-15 08:44:22 +00:00
Michael Brown
2e812235f4 [makefile] Add -Wformat-nonliteral as an extra warning category
-Wformat-nonliteral is not enabled by -Wall and needs to be explicitly
 specified.

Modified the few files that use nonliteral format strings to work with
this new setting in place.

Inspired by a patch from Carl Karsten <carl@personnelware.com> and an
identical patch from Rorschach <r0rschach@lavabit.com>.
2008-10-10 18:41:24 +01:00
Sergey Vlasov
e6cd16946a [ftp] Terminate processing after receiving an error
When an error reply (not 1xx, 2xx or 3xx) was received, ftp_reply()
invoked ftp_done() to close connections, but did not return, and the
rest of code in this function could try to send commands to the closed
control connection.

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
2008-07-30 20:27:09 +01:00
Michael Brown
8f4c2b4a4c [ftp] Cope with RETR completion prior to all data received
Based on a patch contributed by Sergey Vlasov <vsu@altlinux.ru> :

  In my testing with "qemu -net user" the 226 response to RETR was
  often received earlier than final packets of the data connection;
  this caused the received file to become truncated without any error
  indication.  Fix this by adding an intermediate state FTP_TRANSFER
  between FTP_RETR and FTP_QUIT, so that the transfer is considered to
  be complete only when both the end of data connection is encountered
  and the final reply to the RETR command is received.
2008-07-30 20:22:49 +01:00
Michael Brown
f6a8158eed Make seek information part of the xfer metadata, rather than an entirely
separate xfer method.

Add missing .alloc_iob entries to several xfer_interface_operations
structures.
2008-01-08 16:46:55 +00:00
Michael Brown
9fd6a0418f Allowed zero-cost enforced ordering of features in startup banner
list.

Added FEATURE() macros to most relevant (non-driver) files.
2007-08-02 14:51:03 +01:00
Michael Brown
b34d4d0449 Separate the "is data ready" function of xfer_seek() into an
xfer_window() function, which can return a scalar rather than a
boolean.
2007-07-08 14:11:07 +01:00
Michael Brown
ca4c6f9eee Kill off unused request() method in data-xfer interface. 2007-07-08 02:10:54 +01:00
Holger Lubitz
7fa85d19b9 convert to zalloc 2007-07-06 20:49:26 +02:00
Michael Brown
95adce0ce1 Add concept of transfer metadata, to be used by UDP in order to
implement sendto()/recvfrom() equivalents.
2007-06-11 15:04:39 +01:00
Michael Brown
4ccd1e8198 Should call ftp_done() if constructor fails. 2007-05-29 15:37:30 +00:00
Michael Brown
0dfd5b84fd Updated FTP to use data-xfer API. 2007-05-28 20:11:02 +00:00
Michael Brown
6d32f0e6e2 Changed to use the generic stream API. 2007-01-31 02:09:13 +00:00
Michael Brown
73b09ecba6 Use stdio.h instead of vsprintf.h 2007-01-19 01:13:12 +00:00
Michael Brown
dd6d94004f HTTP/DNS now working fully asynchronously. HTTP/IP addresses and any
other protocol won't work at the moment.
2007-01-18 03:39:45 +00:00
Michael Brown
df0397f334 Update TFTP and FTP to take the same temporary URI scheme as HTTP 2007-01-15 09:58:26 +00:00
Michael Brown
4e20d73bb5 Gave asynchronous operations approximate POSIX signal semantics. This
will enable us to cascade async operations, which is necessary in order to
properly support DNS.  (For example, an HTTP request may have to redirect
to a new location and will have to perform a new DNS lookup, so we can't
just rely on doing the name lookup at the time of parsing the initial
URL).

Anything other than HTTP is probably broken right now; I'll fix the others
up asap.
2007-01-15 08:49:10 +00:00
Michael Brown
ad22cccc09 No need to maintain a received byte count; we always fill in sequential
order so we can just use buffer->fill.
2007-01-12 17:16:46 +00:00
Michael Brown
6918cf9e9e Change FTP to use a data buffer rather than a callback function. 2007-01-11 04:51:20 +00:00
Michael Brown
83e1340d88 Use autocolourisation 2006-12-29 14:09:23 +00:00
Michael Brown
61ed298bc7 Merge changes from mcb-tcp-fixes branch. 2006-12-27 23:09:46 +00:00
Michael Brown
9600af14a3 Added debug messages 2006-12-05 22:53:49 +00:00
Michael Brown
89bcb57201 Update ftp.c to work with Nikhil's TCP stack.
Remove the now-totally-obsolete sockaddr_in field from tcp.h.
2006-12-05 19:07:47 +00:00
Michael Brown
3a660f9b25 Update ftp.c and hello.c to use the generic async_operations API. 2006-06-19 15:46:58 +00:00
Michael Brown
8637834031 Made the temporary buffer part of the TCP senddata() API, to ease the
transition away from uIP.

Prepared ipv4.c for transition away from uIP.
2006-06-17 23:20:54 +00:00
Michael Brown
2462047128 Typo 2006-04-30 18:19:39 +00:00
Michael Brown
9e1becaf8a Merge TCP aborted(), timedout() and closed() methods into a single
closed() method with a reason code.
2006-04-30 16:59:45 +00:00
Michael Brown
8afb6303fb Half-way tidy 2006-04-30 15:23:29 +00:00
Michael Brown
04b6a1e004 Make all TCP methods optional; at least FTP data is a read-only
connection and so legitimately ignores acked() and senddata().
2006-04-30 13:20:40 +00:00
Michael Brown
aec0e127d2 Proof-of-concept FTP implementation 2006-04-30 12:02:07 +00:00