2007-01-12 20:18:13 +01:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2007 Michael Brown <mbrown@fensystems.co.uk>.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License as
|
|
|
|
* published by the Free Software Foundation; either version 2 of the
|
|
|
|
* License, or any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
*/
|
|
|
|
|
2009-05-01 16:41:06 +02:00
|
|
|
FILE_LICENCE ( GPL2_OR_LATER );
|
|
|
|
|
2007-01-12 20:18:13 +01:00
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
*
|
|
|
|
* Hyper Text Transfer Protocol (HTTP)
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2012-02-28 15:53:28 +01:00
|
|
|
#include <stddef.h>
|
2010-04-19 21:16:01 +02:00
|
|
|
#include <ipxe/open.h>
|
|
|
|
#include <ipxe/http.h>
|
2012-02-28 15:53:28 +01:00
|
|
|
#include <ipxe/features.h>
|
2006-08-11 16:13:02 +02:00
|
|
|
|
2007-08-02 15:51:03 +02:00
|
|
|
FEATURE ( FEATURE_PROTOCOL, "HTTP", DHCP_EB_FEATURE_HTTP, 1 );
|
2007-08-02 05:36:00 +02:00
|
|
|
|
2007-07-30 04:01:04 +02:00
|
|
|
/**
|
|
|
|
* Initiate an HTTP connection
|
|
|
|
*
|
|
|
|
* @v xfer Data transfer interface
|
|
|
|
* @v uri Uniform Resource Identifier
|
|
|
|
* @ret rc Return status code
|
|
|
|
*/
|
2010-06-16 02:31:29 +02:00
|
|
|
static int http_open ( struct interface *xfer, struct uri *uri ) {
|
2007-07-30 04:01:04 +02:00
|
|
|
return http_open_filter ( xfer, uri, HTTP_PORT, NULL );
|
|
|
|
}
|
|
|
|
|
2007-05-29 17:37:09 +02:00
|
|
|
/** HTTP URI opener */
|
|
|
|
struct uri_opener http_uri_opener __uri_opener = {
|
|
|
|
.scheme = "http",
|
|
|
|
.open = http_open,
|
2007-01-18 04:39:45 +01:00
|
|
|
};
|