Add BSS table to track scan results without dropping information
[hostap-gosc2009.git] / src / wps / http_server.h
blob219941c5ab5a56d52e6b14709706002d349244f3
1 /*
2 * http_server - HTTP server
3 * Copyright (c) 2009, Jouni Malinen <j@w1.fi>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
9 * Alternatively, this software may be distributed under the terms of BSD
10 * license.
12 * See README and COPYING for more details.
15 #ifndef HTTP_SERVER_H
16 #define HTTP_SERVER_H
18 struct http_server;
19 struct http_request;
21 void http_request_deinit(struct http_request *req);
22 void http_request_send(struct http_request *req, struct wpabuf *resp);
23 void http_request_send_and_deinit(struct http_request *req,
24 struct wpabuf *resp);
25 enum httpread_hdr_type http_request_get_type(struct http_request *req);
26 char * http_request_get_uri(struct http_request *req);
27 char * http_request_get_hdr(struct http_request *req);
28 char * http_request_get_data(struct http_request *req);
29 char * http_request_get_hdr_line(struct http_request *req, const char *tag);
30 struct sockaddr_in * http_request_get_cli_addr(struct http_request *req);
32 struct http_server * http_server_init(struct in_addr *addr, int port,
33 void (*cb)(void *ctx,
34 struct http_request *req),
35 void *cb_ctx);
36 void http_server_deinit(struct http_server *srv);
37 int http_server_get_port(struct http_server *srv);
39 #endif /* HTTP_SERVER_H */