summaryrefslogtreecommitdiffstats
path: root/src/core/downloader.c
Commit message (Collapse)AuthorAgeFilesLines
* [downloader] Allow underlying downloads to provide detailed job progressMichael Brown2017-09-061-2/+9
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [downloader] Treat redirection failures as fatalMichael Brown2016-07-041-2/+6
| | | | | Debugged-by: Robin Smidsrød <robin@smidsrod.no> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [downloader] Update image URI in response to a redirectionMichael Brown2016-01-091-6/+41
| | | | | | | | | | | | | | Update the image's recorded URI when a download redirection occurs. This ensures that URIs relative to a redirected download are resolved correctly. In particular, this allows for the use of relative URIs in scripts that are themselves downloaded via a redirection, such as the HTTP 301 redirection used to fix up URIs pointing to directories but omitting the trailing slash (e.g. "http://boot.ipxe.org/demo", which will be redirected to "http://boot.ipxe.org/demo/"). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [downloader] Provide direct access to the underlying data transfer bufferMichael Brown2015-07-221-0/+14
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [downloader] Use generic data-transfer buffer mechanismMichael Brown2015-07-221-74/+18Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Relicense files under GPL2_OR_LATER_OR_UBDLMichael Brown2015-03-021-1/+5
| | | | | | | | | | These files cannot be automatically relicensed by util/relicense.pl since they either contain unusual but trivial contributions (such as the addition of __nonnull function attributes), or contain lines dating back to the initial git revision (and so require manual knowledge of the code's origin). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [downloader] Profile receive datapathMichael Brown2014-04-281-0/+15
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [image] Ensure every image has a fully resolved URIMichael Brown2014-02-271-12/+4Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [job] Allow job_progress() to return an ongoing job status code, if knownMichael Brown2013-11-011-2/+5
| | | | | | | | Some background jobs have a meaningful ongoing status code (e.g. the current link status for a job waiting for a network link to come up). Allow this to be exposed via the job_progress() method. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Update FSF mailing address in GPL licence textsMichael Brown2012-07-201-1/+2
| | | | | Suggested-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [downloader] Use a more meaningful error message when out of memoryMichael Brown2012-03-271-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [downloader] Abort download immediately if buffer resizing failsMichael Brown2012-03-271-0/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [downloader] Log final status of all downloadsMichael Brown2012-03-261-0/+10
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [image] Simplify image managementMichael Brown2011-03-071-2/+1Star
| | | | | | | | | | | Refactor the {load,exec} image operations as {probe,exec}. This makes the probe mechanism cleaner, eliminates some forward declarations, avoids holding magic state in image->priv, eliminates the possibility of screwing up between the "load" and "exec" stages, and makes the documentation simpler since the concept of "loading" (as distinct from "executing") no longer needs to be explained. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [image] Allow download job to complete before acting upon imageMichael Brown2011-03-021-9/+0Star
| | | | | | | | | Allow the monojob controlling the download to complete before calling register_image() and friends. This allows the trailing "ok" from monojob.c to be printed before the image starts executing (and possibly printing output of its own). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [xfer] Generalise metadata "whence" field to "flags" fieldMichael Brown2010-09-031-1/+1
| | | | | | | | | | | | | iPXE has never supported SEEK_END; the usage of "whence" offers only the options of SEEK_SET and SEEK_CUR and so is effectively a boolean flag. Further flags will be required to support additional metadata required by the Fibre Channel network model, so repurpose the "whence" field as a generic "flags" field. xfer_seek() has always been used with SEEK_SET, so remove the "whence" field altogether from its argument list. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [interface] Convert all data-xfer interfaces to generic interfacesMichael Brown2010-06-221-32/+16Star
| | | | | | | | | | | | | | Remove data-xfer as an interface type, and replace data-xfer interfaces with generic interfaces supporting the data-xfer methods. Filter interfaces (as used by the TLS layer) are handled using the generic pass-through interface capability. A side-effect of this is that deliver_raw() no longer exists as a data-xfer method. (In practice this doesn't lose any efficiency, since there are no instances within the current codebase where xfer_deliver_raw() is used to pass data to an interface supporting the deliver_raw() method.) Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [interface] Convert all job-control interfaces to generic interfacesMichael Brown2010-06-221-39/+30Star
| | | | | | | | | Remove job-control as an interface type, and replace job-control interfaces with generic interfaces supporting the close() method. (Both done() and kill() are absorbed into the function of close(); kill() is merely close(-ECANCELED).) Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [refcnt] Add ref_init() wrapper functionMichael Brown2010-06-221-1/+1
| | | | | | | Standardise on using ref_init() to initialise an embedded reference count, to match the coding style used by other embedded objects. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Rename gPXE to iPXEMichael Brown2010-04-201-7/+7
| | | | | | | | | | | Access to the gpxe.org and etherboot.org domains and associated resources has been revoked by the registrant of the domain. Work around this problem by renaming project from gPXE to iPXE, and updating URLs to match. Also update README, LOG and COPYRIGHTS to remove obsolete information. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [job] Report progress of downloader jobs via job_progress()Michael Brown2009-08-311-2/+21
|
* [legal] Add a selection of FILE_LICENCE declarationsMichael Brown2009-05-181-0/+2
| | | | | Add FILE_LICENCE declarations to almost all files that make up the various standard builds of gPXE.
* [xfer] Implement xfer_vreopen() to properly handle redirectionsMichael Brown2009-03-301-1/+1
| | | | | When handling a redirection event, we need to close the existing connection before opening the new connection.
* Make seek information part of the xfer metadata, rather than an entirelyMichael Brown2008-01-081-45/+24Star
| | | | | | | separate xfer method. Add missing .alloc_iob entries to several xfer_interface_operations structures.
* Separate the "is data ready" function of xfer_seek() into anMichael Brown2007-07-081-0/+1
| | | | | xfer_window() function, which can return a scalar rather than a boolean.
* Kill off unused request() method in data-xfer interface.Michael Brown2007-07-081-1/+0Star
|
* convert to zallocHolger Lubitz2007-07-061-2/+1Star
|
* Kill off job::start() (it was only ever added as part of an abortedMichael Brown2007-06-281-1/+0Star
| | | | attempt at triggering TCP-related protocols to start).
* Use standard xfer_open() argument list for downloader instantiatorMichael Brown2007-06-091-6/+11
|
* Modify data-xfer semantics: it is no longer necessary to call one ofMichael Brown2007-05-261-14/+1Star
| | | | | | | | | request(), seek() or deliver_xxx() in order to start the data flow. Autonomous generators must be genuinely autonomous (having their own process), or otherwise arrange to be called. TCP does this by starting the retry timer immediately. Add some debugging statements.
* Prefix all the open()-family routines with xfer_, to disambiguate themMichael Brown2007-05-181-3/+3
| | | | from the normal POSIX-style open()
* Do not hold self-references. This then avoids the problem of having toMichael Brown2007-05-151-5/+17
| | | | | | | | | ensure that we only drop our self-reference exactly once. To maintain the guarantee that an object won't go out of scope unexpectedly while one of its event handlers is being called, the event-calling functions now automatically obtain and drop extra references.
* Data-transfer interface should now be functionally complete.Michael Brown2007-05-151-9/+22
|
* Initial sketch for a downloader objectMichael Brown2007-05-011-0/+276