1*3ff40c12SJohn Marino /* 2*3ff40c12SJohn Marino * http_server - HTTP server 3*3ff40c12SJohn Marino * Copyright (c) 2009, Jouni Malinen <j@w1.fi> 4*3ff40c12SJohn Marino * 5*3ff40c12SJohn Marino * This software may be distributed under the terms of the BSD license. 6*3ff40c12SJohn Marino * See README for more details. 7*3ff40c12SJohn Marino */ 8*3ff40c12SJohn Marino 9*3ff40c12SJohn Marino #ifndef HTTP_SERVER_H 10*3ff40c12SJohn Marino #define HTTP_SERVER_H 11*3ff40c12SJohn Marino 12*3ff40c12SJohn Marino struct http_server; 13*3ff40c12SJohn Marino struct http_request; 14*3ff40c12SJohn Marino 15*3ff40c12SJohn Marino void http_request_deinit(struct http_request *req); 16*3ff40c12SJohn Marino void http_request_send(struct http_request *req, struct wpabuf *resp); 17*3ff40c12SJohn Marino void http_request_send_and_deinit(struct http_request *req, 18*3ff40c12SJohn Marino struct wpabuf *resp); 19*3ff40c12SJohn Marino enum httpread_hdr_type http_request_get_type(struct http_request *req); 20*3ff40c12SJohn Marino char * http_request_get_uri(struct http_request *req); 21*3ff40c12SJohn Marino char * http_request_get_hdr(struct http_request *req); 22*3ff40c12SJohn Marino char * http_request_get_data(struct http_request *req); 23*3ff40c12SJohn Marino char * http_request_get_hdr_line(struct http_request *req, const char *tag); 24*3ff40c12SJohn Marino struct sockaddr_in * http_request_get_cli_addr(struct http_request *req); 25*3ff40c12SJohn Marino 26*3ff40c12SJohn Marino struct http_server * http_server_init(struct in_addr *addr, int port, 27*3ff40c12SJohn Marino void (*cb)(void *ctx, 28*3ff40c12SJohn Marino struct http_request *req), 29*3ff40c12SJohn Marino void *cb_ctx); 30*3ff40c12SJohn Marino void http_server_deinit(struct http_server *srv); 31*3ff40c12SJohn Marino int http_server_get_port(struct http_server *srv); 32*3ff40c12SJohn Marino 33*3ff40c12SJohn Marino #endif /* HTTP_SERVER_H */ 34