Classes | Defines | Functions
http_server.c File Reference
#include "includes.h"
#include <fcntl.h>
#include "common.h"
#include "eloop.h"
#include "httpread.h"
#include "http_server.h"
Include dependency graph for http_server.c:

Go to the source code of this file.

Classes

struct  http_request
struct  http_server

Defines

#define HTTP_SERVER_MAX_CONNECTIONS   10
#define HTTP_SERVER_MAX_REQ_LEN   8000
#define HTTP_SERVER_TIMEOUT   30

Functions

static void http_request_cb (struct httpread *handle, void *cookie, enum httpread_event en)
void http_request_deinit (struct http_request *req)
static void http_request_free_all (struct http_request *req)
struct sockaddr_in * http_request_get_cli_addr (struct http_request *req)
char * http_request_get_data (struct http_request *req)
char * http_request_get_hdr (struct http_request *req)
char * http_request_get_hdr_line (struct http_request *req, const char *tag)
enum httpread_hdr_type http_request_get_type (struct http_request *req)
char * http_request_get_uri (struct http_request *req)
static struct http_requesthttp_request_init (struct http_server *srv, int fd, struct sockaddr_in *cli)
void http_request_send (struct http_request *req, struct wpabuf *resp)
void http_request_send_and_deinit (struct http_request *req, struct wpabuf *resp)
static void http_server_cb (int sd, void *eloop_ctx, void *sock_ctx)
void http_server_deinit (struct http_server *srv)
int http_server_get_port (struct http_server *srv)
struct http_serverhttp_server_init (struct in_addr *addr, int port, void(*cb)(void *ctx, struct http_request *req), void *cb_ctx)

Define Documentation

#define HTTP_SERVER_MAX_CONNECTIONS   10

Definition at line 25 of file http_server.c.

#define HTTP_SERVER_MAX_REQ_LEN   8000

Definition at line 24 of file http_server.c.

#define HTTP_SERVER_TIMEOUT   30

Definition at line 23 of file http_server.c.


Function Documentation

static void http_request_cb ( struct httpread handle,
void *  cookie,
enum httpread_event  en 
) [static]

Definition at line 47 of file http_server.c.

void http_request_deinit ( struct http_request req)

Definition at line 97 of file http_server.c.

static void http_request_free_all ( struct http_request req) [static]

Definition at line 127 of file http_server.c.

struct sockaddr_in* http_request_get_cli_addr ( struct http_request req) [read]

Definition at line 199 of file http_server.c.

char* http_request_get_data ( struct http_request req)

Definition at line 187 of file http_server.c.

char* http_request_get_hdr ( struct http_request req)

Definition at line 181 of file http_server.c.

char* http_request_get_hdr_line ( struct http_request req,
const char *  tag 
)

Definition at line 193 of file http_server.c.

Definition at line 169 of file http_server.c.

char* http_request_get_uri ( struct http_request req)

Definition at line 175 of file http_server.c.

static struct http_request* http_request_init ( struct http_server srv,
int  fd,
struct sockaddr_in *  cli 
) [static, read]

Definition at line 67 of file http_server.c.

void http_request_send ( struct http_request req,
struct wpabuf resp 
)

Definition at line 138 of file http_server.c.

void http_request_send_and_deinit ( struct http_request req,
struct wpabuf resp 
)

Definition at line 161 of file http_server.c.

static void http_server_cb ( int  sd,
void *  eloop_ctx,
void *  sock_ctx 
) [static]

Definition at line 205 of file http_server.c.

void http_server_deinit ( struct http_server srv)

Definition at line 295 of file http_server.c.

int http_server_get_port ( struct http_server srv)

Definition at line 309 of file http_server.c.

struct http_server* http_server_init ( struct in_addr *  addr,
int  port,
void(*)(void *ctx, struct http_request *req)  cb,
void *  cb_ctx 
) [read]

Definition at line 234 of file http_server.c.



wpa_supplicant_node
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Jan 2 2014 11:25:17