http.h File Reference

HTTP IO functions. More...

Go to the source code of this file.

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_callback_auth (httpd *webserver, request *r)
 Callback for libhttpd, main entry point post login for auth confirmation.
void send_http_page (request *r, const char *title, const char *message)
 Sends a HTML page to web browser.
void http_send_redirect (request *r, char *url, char *text)
 Sends a redirect to the web browser.
void http_send_redirect_to_auth (request *r, char *urlFragment, char *text)
 Convenience function to redirect the web browser to the authe server.


Detailed Description

HTTP IO functions.

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

Definition in file http.h.


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 64 of file http.c.

References _auth_serv_t::authserv_login_script_path_fragment, config_get_config(), debug, get_auth_server(), s_config::gw_address, s_config::gw_id, s_config::gw_port, http_send_redirect_to_auth(), MAX_BUF, and send_http_page().

void http_callback_about ( httpd *  webserver,
request *  r 
)

Callback for libhttpd.

Definition at line 132 of file http.c.

References send_http_page().

void http_callback_auth ( httpd *  webserver,
request *  r 
)

void http_callback_status ( httpd *  webserver,
request *  r 
)

Callback for libhttpd.

Definition at line 138 of file http.c.

References config_get_config(), debug, s_config::httpdpassword, s_config::httpdrealm, s_config::httpdusername, and send_http_page().

void http_callback_wifidog ( httpd *  webserver,
request *  r 
)

Callback for libhttpd.

Definition at line 126 of file http.c.

References send_http_page().

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 192 of file http.c.

References debug, and send_http_page().

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 authe 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 162 of file http.c.

References _auth_serv_t::authserv_hostname, _auth_serv_t::authserv_http_port, _auth_serv_t::authserv_path, _auth_serv_t::authserv_ssl_port, _auth_serv_t::authserv_use_ssl, get_auth_server(), and http_send_redirect().

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

void send_http_page ( request *  r,
const char *  title,
const char *  message 
)


Generated on Fri Sep 25 15:28:43 2009 for WifiDog by  doxygen 1.5.5