mirror of
https://github.com/pi-hole/FTL.git
synced 2024-10-26 16:52:18 +02:00
952a296dd4
Signed-off-by: DL6ER <dl6er@dl6er.de>
83 lines
2.5 KiB
C
83 lines
2.5 KiB
C
/* Pi-hole: A black hole for Internet advertisements
|
|
* (c) 2017 Pi-hole, LLC (https://pi-hole.net)
|
|
* Network-wide ad blocking via your own hardware.
|
|
*
|
|
* FTL Engine
|
|
* API route prototypes
|
|
*
|
|
* This file is copyright under the latest version of the EUPL.
|
|
* Please see LICENSE file for your rights under this license. */
|
|
#ifndef ROUTES_H
|
|
#define ROUTES_H
|
|
|
|
// struct mg_connection
|
|
#include "../civetweb/civetweb.h"
|
|
// type cJSON
|
|
#include "../cJSON/cJSON.h"
|
|
#include "../webserver/http-common.h"
|
|
|
|
// API router
|
|
int api_handler(struct mg_connection *conn, void *ignored);
|
|
|
|
// Statistic methods
|
|
int api_stats_summary(struct ftl_conn *api);
|
|
int api_stats_query_types(struct ftl_conn *api);
|
|
int api_stats_upstreams(struct ftl_conn *api);
|
|
int api_stats_top_domains(struct ftl_conn *api);
|
|
int api_stats_top_clients(struct ftl_conn *api);
|
|
int api_stats_recentblocked(struct ftl_conn *api);
|
|
|
|
// History methods
|
|
int api_history(struct ftl_conn *api);
|
|
int api_history_clients(struct ftl_conn *api);
|
|
|
|
// History methods (database)
|
|
int api_history_database(struct ftl_conn *api);
|
|
int api_history_database_clients(struct ftl_conn *api);
|
|
|
|
// Query methods
|
|
int api_queries(struct ftl_conn *api);
|
|
int api_queries_suggestions(struct ftl_conn *api);
|
|
|
|
// Statistics methods (database)
|
|
int api_stats_database_top_items(struct ftl_conn *api);
|
|
int api_stats_database_summary(struct ftl_conn *api);
|
|
int api_stats_database_query_types(struct ftl_conn *api);
|
|
int api_stats_database_upstreams(struct ftl_conn *api);
|
|
|
|
// FTL methods
|
|
int api_ftl_client(struct ftl_conn *api);
|
|
int api_ftl_logs_dns(struct ftl_conn *api);
|
|
int api_ftl_dbinfo(struct ftl_conn *api);
|
|
int api_ftl_sysinfo(struct ftl_conn *api);
|
|
int get_ftl_obj(struct ftl_conn *api, cJSON *ftl, const bool is_locked);
|
|
int get_system_obj(struct ftl_conn *api, cJSON *system);
|
|
int api_config(struct ftl_conn *api);
|
|
|
|
// Network methods
|
|
int api_network_gateway(struct ftl_conn *api);
|
|
int api_network_interfaces(struct ftl_conn *api);
|
|
int api_network_devices(struct ftl_conn *api);
|
|
|
|
// DNS methods
|
|
int api_dns_blocking(struct ftl_conn *api);
|
|
int api_dns_cache(struct ftl_conn *api);
|
|
int api_dns_port(struct ftl_conn *api);
|
|
int api_dns_entries(struct ftl_conn *api);
|
|
|
|
// List methods
|
|
int api_list(struct ftl_conn *api);
|
|
int api_group(struct ftl_conn *api);
|
|
|
|
// Version method
|
|
int api_version(struct ftl_conn *api);
|
|
|
|
// Auth method
|
|
int check_client_auth(struct ftl_conn *api);
|
|
int api_auth(struct ftl_conn *api);
|
|
|
|
// Documentation methods
|
|
int api_docs(struct ftl_conn *api);
|
|
|
|
#endif // ROUTES_H
|