rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Loading...
Searching...
No Matches
wifi_dns.c File Reference

The name servers a join gave, on the console. See wifi_dns.h. More...

#include "wifi_dns.h"
#include <stdio.h>
#include "esp_log.h"

Functions

static size_t put (char *line, size_t cap, size_t at, const esp_netif_dns_info_t *d)
 Append one server to line.
void wifi_dns_poll (esp_netif_t *netif, bool joined)
 Log the name servers once a join: on the first call with joined after one without.

Variables

static const char * TAG = "wifi"
 The console tag: the radio's lines.
static bool s_logged
 This join's line is written.

Detailed Description

The name servers a join gave, on the console. See wifi_dns.h.

SPDX-License-Identifier: MIT

Function Documentation

◆ put()

size_t put ( char * line,
size_t cap,
size_t at,
const esp_netif_dns_info_t * d )
static

Append one server to line.

Parameters
lineThe line so far.
capIts size in bytes.
atBytes in it, terminator not counted.
dThe server.
Returns
Bytes in it after the server; at when d is no address.

◆ wifi_dns_poll()

void wifi_dns_poll ( esp_netif_t * netif,
bool joined )

Log the name servers once a join: on the first call with joined after one without.

The Wi-Fi worker task's, while netif exists.

Parameters
netifThe station's interface; not read unless joined.
joinedThe station holds an address on the home network.