|
idfxx 1.0.0
Modern C++23 components for ESP-IDF
|
Namespaces | |
| namespace | detail |
| namespace | sntp |
Classes | |
| struct | ap_sta_ip4_assigned_event_data |
| Information about an IP assigned to a station connected to an AP. More... | |
| struct | dns_info |
| DNS server information. More... | |
| class | error_category |
| Error category for network interface errors. More... | |
| class | interface |
| Network interface handle. More... | |
| struct | ip4_event_data |
| Information about an acquired IPv4 address. More... | |
| struct | ip6_event_data |
| Information about an acquired IPv6 address. More... | |
Enumerations | |
| enum class | dhcp_option_id : int { subnet_mask = 1 , domain_name_server = 6 , router_solicitation_address = 32 , requested_ip_address = 50 , ip_address_lease_time = 51 , ip_request_retry_time = 52 , vendor_class_identifier = 60 , vendor_specific_info = 43 , captiveportal_uri = 114 } |
| DHCP option identifiers. More... | |
| enum class | dns_type : int { main = 0 , backup = 1 , fallback = 2 } |
| DNS server type. More... | |
| enum class | flag : uint32_t { dhcp_client = 1u << 0 , dhcp_server = 1u << 1 , autoup = 1u << 2 , garp = 1u << 3 , event_ip_modified = 1u << 4 , is_ppp = 1u << 5 , is_bridge = 1u << 6 , mldv6_report = 1u << 7 , ipv6_autoconfig_enabled = 1u << 8 } |
| Network interface flags. More... | |
| enum class | ip_event_id : int32_t { sta_got_ip4 = 0 , sta_lost_ip4 = 1 , ap_sta_ip4_assigned = 2 , got_ip6 = 3 , eth_got_ip4 = 4 , eth_lost_ip4 = 5 , ppp_got_ip4 = 6 , ppp_lost_ip4 = 7 } |
| IP event IDs. More... | |
| enum class | errc : esp_err_t { invalid_params = 0x5001 , if_not_ready = 0x5002 , dhcpc_start_failed = 0x5003 , dhcp_already_started = 0x5004 , dhcp_already_stopped = 0x5005 , no_mem = 0x5006 , dhcp_not_stopped = 0x5007 , driver_attach_failed = 0x5008 , init_failed = 0x5009 , dns_not_configured = 0x500A , mld6_failed = 0x500B , ip6_addr_failed = 0x500C , dhcps_start_failed = 0x500D , tx_failed = 0x500E } |
| Network interface error codes. More... | |
Functions | |
| std::error_code | make_error_code (errc e) noexcept |
| Creates an error code from an idfxx::netif::errc value. | |
| void | init () |
| Initializes the TCP/IP stack and network interface subsystem. | |
| void | deinit () |
| Deinitializes the network interface subsystem. | |
| result< void > | try_init () |
| Initializes the TCP/IP stack and network interface subsystem. | |
| result< void > | try_deinit () |
| Deinitializes the network interface subsystem. | |
| size_t | get_nr_of_ifs () |
| Returns the number of registered network interfaces. | |
| std::optional< interface > | get_default () |
| Returns a non-owning handle to the default network interface. | |
| void | set_default (interface &iface) |
| Sets the given interface as the default network interface. | |
| std::optional< interface > | find_by_key (const char *key) |
| Finds a network interface by its key string. | |
Variables | |
| const event_base< ip_event_id > | ip_events |
| IP event base. | |
| constexpr idfxx::event< ip_event_id, ip4_event_data > | sta_got_ip4 {ip_event_id::sta_got_ip4} |
| Station received IPv4 address event with IP details. | |
| constexpr idfxx::event< ip_event_id > | sta_lost_ip4 {ip_event_id::sta_lost_ip4} |
| Station lost IPv4 address event. | |
| constexpr idfxx::event< ip_event_id, ap_sta_ip4_assigned_event_data > | ap_sta_ip4_assigned |
| Soft-AP assigned IP to a connected station event. | |
| constexpr idfxx::event< ip_event_id, ip6_event_data > | got_ip6 {ip_event_id::got_ip6} |
| Received IPv6 address event. | |
| constexpr idfxx::event< ip_event_id, ip4_event_data > | eth_got_ip4 {ip_event_id::eth_got_ip4} |
| Ethernet received IPv4 address event with IP details. | |
| constexpr idfxx::event< ip_event_id > | eth_lost_ip4 {ip_event_id::eth_lost_ip4} |
| Ethernet lost IPv4 address event. | |
| constexpr idfxx::event< ip_event_id, ip4_event_data > | ppp_got_ip4 {ip_event_id::ppp_got_ip4} |
| PPP interface received IPv4 address event with IP details. | |
| constexpr idfxx::event< ip_event_id > | ppp_lost_ip4 {ip_event_id::ppp_lost_ip4} |
| PPP interface lost IPv4 address event. | |
|
strong |
DHCP option identifiers.
|
strong |
|
strong |
Network interface error codes.
|
strong |
Network interface flags.
Can be combined using bitwise operators via the flags<flag> type.
|
strong |
IP event IDs.
Used with the netif::ip_events event base to register listeners for IP-related events.
|
inline |
Deinitializes the network interface subsystem.
| std::system_error | on failure. |
Definition at line 780 of file netif.hpp.
References idfxx::unwrap().
Finds a network interface by its key string.
| key | The interface key to search for. |
References find_by_key().
Referenced by find_by_key().
| std::optional< interface > idfxx::netif::get_default | ( | ) |
Returns a non-owning handle to the default network interface.
References get_default().
Referenced by get_default().
| size_t idfxx::netif::get_nr_of_ifs | ( | ) |
Returns the number of registered network interfaces.
References get_nr_of_ifs().
Referenced by get_nr_of_ifs().
|
inline |
Initializes the TCP/IP stack and network interface subsystem.
| std::system_error | on failure. |
Definition at line 777 of file netif.hpp.
References idfxx::unwrap().
|
inlinenoexcept |
Creates an error code from an idfxx::netif::errc value.
| e | The netif error code enumerator. |
Definition at line 211 of file netif.hpp.
References idfxx::netif_category().
Sets the given interface as the default network interface.
| iface | The interface to set as default. |
References set_default().
Referenced by set_default().
Deinitializes the network interface subsystem.
Initializes the TCP/IP stack and network interface subsystem.
Must be called before creating any network interfaces.
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
extern |
IP event base.
Event base for IP events. Use with the idfxx event loop to register listeners for IP address acquisition, loss, and assignment events.
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |