aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorMichael Brown <mcb30@etherboot.org>2007-05-29 15:37:09 +0000
committerMichael Brown <mcb30@etherboot.org>2007-05-29 15:37:09 +0000
commit735e07268ed547061a482b19e9f901bbd3656425 (patch)
tree3330d184dbaabbfdd7f74963d27f0eec2c6b208a /src/include
parent0dfd5b84fdbe5d6ebdf73711f27a43a3ead53531 (diff)
downloadipxe-735e07268ed547061a482b19e9f901bbd3656425.zip
ipxe-735e07268ed547061a482b19e9f901bbd3656425.tar.gz
ipxe-735e07268ed547061a482b19e9f901bbd3656425.tar.bz2
Update HTTP to use data-xfer interface.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gpxe/http.h46
-rw-r--r--src/include/gpxe/linebuf.h4
2 files changed, 2 insertions, 48 deletions
diff --git a/src/include/gpxe/http.h b/src/include/gpxe/http.h
index 5490f43..a2abec1 100644
--- a/src/include/gpxe/http.h
+++ b/src/include/gpxe/http.h
@@ -7,56 +7,10 @@
*
*/
-#include <stdint.h>
-#include <gpxe/stream.h>
-#include <gpxe/async.h>
-#include <gpxe/linebuf.h>
-#include <gpxe/uri.h>
-
/** HTTP default port */
#define HTTP_PORT 80
/** HTTPS default port */
#define HTTPS_PORT 443
-/** HTTP receive state */
-enum http_rx_state {
- HTTP_RX_RESPONSE = 0,
- HTTP_RX_HEADER,
- HTTP_RX_DATA,
- HTTP_RX_DEAD,
-};
-
-/**
- * An HTTP request
- *
- */
-struct http_request {
- /** URI being fetched */
- struct uri *uri;
- /** Data buffer to fill */
- struct buffer *buffer;
- /** Asynchronous operation */
- struct async async;
-
- /** HTTP response code */
- unsigned int response;
- /** HTTP Content-Length */
- size_t content_length;
-
- /** Server address */
- struct sockaddr server;
- /** Stream application for this request */
- struct stream_application stream;
- /** Number of bytes already sent */
- size_t tx_offset;
- /** RX state */
- enum http_rx_state rx_state;
- /** Line buffer for received header lines */
- struct line_buffer linebuf;
-};
-
-extern int http_get ( struct uri *uri, struct buffer *buffer,
- struct async *parent );
-
#endif /* _GPXE_HTTP_H */
diff --git a/src/include/gpxe/linebuf.h b/src/include/gpxe/linebuf.h
index 5d81539..676731a 100644
--- a/src/include/gpxe/linebuf.h
+++ b/src/include/gpxe/linebuf.h
@@ -21,8 +21,8 @@ struct line_buffer {
};
extern char * buffered_line ( struct line_buffer *linebuf );
-extern int line_buffer ( struct line_buffer *linebuf,
- const char **data, size_t *len );
+extern ssize_t line_buffer ( struct line_buffer *linebuf,
+ const char *data, size_t len );
extern void empty_line_buffer ( struct line_buffer *linebuf );
#endif /* _GPXE_LINEBUF_H */