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. |
Definition in file http.h.
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 | |||
) |
void http_callback_auth | ( | httpd * | webserver, | |
request * | r | |||
) |
Callback for libhttpd, main entry point post login for auth confirmation.
Definition at line 222 of file http.c.
References auth_server_request(), s_config::auth_servers, authenticate_client(), _auth_serv_t::authserv_msg_script_path_fragment, client_list_append(), client_list_delete(), client_list_find(), config_get_config(), _t_client::counters, debug, _t_client::fw_connection_state, GATEWAY_MESSAGE_ACCOUNT_LOGGED_OUT, get_auth_server(), http_send_redirect_to_auth(), _t_counters::incoming, _t_client::ip, _t_client::mac, _t_counters::outgoing, REQUEST_TYPE_LOGOUT, send_http_page(), and _t_client::token.
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 | |||
) |
void http_send_redirect | ( | request * | r, | |
char * | url, | |||
char * | text | |||
) |
Sends a redirect to the web browser.
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.
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 | |||
) |
Sends a HTML page to web browser.
Definition at line 289 of file http.c.
References config_get_config(), debug, s_config::gw_id, s_config::htmlmsgfile, and safe_malloc().
Referenced by authenticate_client(), http_callback_404(), http_callback_about(), http_callback_auth(), http_callback_status(), http_callback_wifidog(), and http_send_redirect().