Symbols
loading...
Files
loading...

captive_portal sample sample

captive_portal sample is a sample project defining the following symbols:

Most used functions

Name
Location
Summary
Set ups and starts a simple DNS server that will respond to all A queries (IPv4) based on configured rules, pairs of name and either IPv4 address or a netif ID (to respond by it's IPv4 add)
Stops and destroys DNS server's task and structs

Other commonly used symbols

Name
Location
Summary
DNS server config struct defining the rules for answering DNS (A type) queries dns_server_config_t config = { .num_of_entries = 2, .item = { {.name = "my-esp32.com", .ip = { .addr = ESP_IP4TOADDR( 192, 168, 4, 1) } } , {.name = "my-utils.com", .ip = { .addr = ESP_IP4TOADDR( 192, 168, 4, 100) } } } }; start_dns_server(&config);
Definition of one DNS entry: NAME - IP (or the netif whose IP to answer)
! Number of rules specified in the config struct
! Exact match of the name field of the DNS query to answer
! Use this network interface IP to answer, only if NULL, use the static IP below
! Constant IP address to answer this query, if "if_key==NULL"
! Array of pairs

Dependencies