boot_http.h revision e00d72467ba84dfb2c5b9e5026b7844f34c9286f
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _BOOT_HTTP_H
#define _BOOT_HTTP_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include <parseURL.h>
#ifdef __cplusplus
extern "C" {
#endif
/* State information returned by http_conn_info() */
typedef struct {
/* Structure for version of the http file */
typedef struct {
/* Internal Libhttp errors */
/* necessarily the underlying transport */
/* connection). */
/* error. */
/* No matching entry */
/* Sources of errors */
typedef struct {
char *statusmsg; /* status message */
typedef void *http_handle_t;
boot_http_ver_t const *http_get_version(void);
void http_set_p12_format(int);
void http_set_verbose(boolean_t);
int http_set_cipher_list(const char *);
int http_set_basic_auth(http_handle_t, const char *, const char *);
int http_set_random_file(http_handle_t, const char *);
int http_set_certificate_authority_file(const char *);
int http_set_client_certificate_file(http_handle_t, const char *);
int http_set_password(http_handle_t, const char *);
int http_set_key_file_password(http_handle_t, const char *);
int http_set_private_key_file(http_handle_t, const char *);
int http_head_request(http_handle_t, const char *);
int http_get_request(http_handle_t, const char *);
void http_free_respinfo(http_respinfo_t *);
char *http_get_header_value(http_handle_t, const char *);
int http_srv_close(http_handle_t);
void http_decode_err(ulong_t, int *, int *, int *);
#ifdef __cplusplus
}
#endif
#endif /* _BOOT_HTTP_H */