http.c File Reference

HTTP IO functions. More...

Go to the source code of this file.

Defines

#define _GNU_SOURCE

Functions

void http_callback_404 (httpd *webserver, request *r)
 Callback for libhttpd, main entry point for captive portal.
void http_callback_wifidog (httpd *webserver, request *r)
 Callback for libhttpd.
void http_callback_about (httpd *webserver, request *r)
 Callback for libhttpd.
void http_callback_status (httpd *webserver, request *r)
 Callback for libhttpd.
void http_send_redirect_to_auth (request *r, char *urlFragment, char *text)
 Convenience function to redirect the web browser to the auth server.
void http_send_redirect (request *r, char *url, char *text)
 Sends a redirect to the web browser.
void http_callback_auth (httpd *webserver, request *r)
 Callback for libhttpd, main entry point post login for auth confirmation.
void http_wifidog_header (request *r, char *title)
 Sends HTML header+menu to web browser.
void http_wifidog_footer (request *r)
 Sends HTML footer to web browser.

Variables

pthread_mutex_t client_list_mutex


Detailed Description

HTTP IO functions.

Author:
Copyright (C) 2004 Philippe April <papril777@yahoo.com>

Copyright (C) 2007 Benoit Grégoire

Copyright (C) 2007 David Bird <david@coova.com>

Definition in file http.c.


Function Documentation

void http_callback_404 ( httpd *  webserver,
request *  r 
)

Callback for libhttpd, main entry point for captive portal.

The 404 handler is also responsible for redirecting to the auth server

Definition at line 60 of file http.c.

void http_callback_about ( httpd *  webserver,
request *  r 
)

Callback for libhttpd.

Definition at line 124 of file http.c.

void http_callback_auth ( httpd *  webserver,
request *  r 
)

Callback for libhttpd, main entry point post login for auth confirmation.

Definition at line 214 of file http.c.

void http_callback_status ( httpd *  webserver,
request *  r 
)

Callback for libhttpd.

Definition at line 132 of file http.c.

void http_callback_wifidog ( httpd *  webserver,
request *  r 
)

Callback for libhttpd.

Definition at line 116 of file http.c.

void http_send_redirect ( request *  r,
char *  url,
char *  text 
)

Sends a redirect to the web browser.

Parameters:
r The request
url The url to redirect to
text The text to include in the redirect header and the manual redirect link title. NULL is acceptable

Definition at line 177 of file http.c.

Referenced by http_send_redirect_to_auth().

void http_send_redirect_to_auth ( request *  r,
char *  urlFragment,
char *  text 
)

Convenience function to redirect the web browser to the auth server.

Convenience function to redirect the web browser to the authe server.

Parameters:
r The request
urlFragment The end of the auth server URL to redirect to (the part after path)
text The text to include in the redirect header ant the mnual redirect title

Definition at line 147 of file http.c.

Referenced by authenticate_client(), http_callback_404(), and http_callback_auth().

void http_wifidog_footer ( request *  r  ) 

Sends HTML footer to web browser.

Definition at line 383 of file http.c.

Referenced by authenticate_client(), http_callback_404(), http_callback_about(), http_callback_auth(), http_callback_status(), http_callback_wifidog(), and http_send_redirect().

void http_wifidog_header ( request *  r,
char *  title 
)

Sends HTML header+menu to web browser.

Definition at line 286 of file http.c.

Referenced by authenticate_client(), http_callback_404(), http_callback_about(), http_callback_auth(), http_callback_status(), http_callback_wifidog(), and http_send_redirect().


Variable Documentation

pthread_mutex_t client_list_mutex

Global mutex to protect access to the client list

Definition at line 48 of file client_list.c.


Generated on Sun Apr 13 21:55:00 2008 for WifiDog by  doxygen 1.5.3