10000 lwIP on ethernet: examples by d-a-v · Pull Request #8395 · esp8266/Arduino · GitHub
[go: up one dir, main page]

Skip to content

lwIP on ethernet: examples #8395

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Jun 2, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix comment restyle + comment eth.setdefault()
  • Loading branch information
d-a-v committed Mar 4, 2022
commit 969a46037376256bfe0810af6f18e57b8173033b
14 changes: 8 additions & 6 deletions libraries/ESP8266mDNS/src/LEAmDNS_Transfer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1766,11 +1766,13 @@ namespace MDNSImplementation
stcMDNS_RRAttributes attributes(DNS_RRTYPE_AAAA,
((p_rSendParameter.m_bCacheFlush ? 0x8000 : 0)
| DNS_RRCLASS_IN)); // Cache flush? & INternet
bool bResult = ((_writeMDNSHostDomain(m_pcHostname, false, p_rSendParameter)) && // esp8266.local
(_writeMDNSRRAttributes(attributes, p_rSendParameter)) && // TYPE & CLASS
(_write32((p_rSendParameter.m_bUnannounce ? 0 : MDNS_HOST_TTL), p_rSendParameter)) && // TTL
(_write16(MDNS_IP6_SIZE, p_rSendParameter)) && // RDLength
(false /*TODO: IP6 version of: _udpAppendBuffer((uint32_t)p_IPAddress, MDNS_IP4_SIZE)*/)); // RData
bool bResult
= ((_writeMDNSHostDomain(m_pcHostname, false, p_rSendParameter)) && // esp8266.local
(_writeMDNSRRAttributes(attributes, p_rSendParameter)) && // TYPE & CLASS
(_write32((p_rSendParameter.m_bUnannounce ? 0 : MDNS_HOST_TTL), p_rSendParameter))
&& // TTL
(_write16(MDNS_IP6_SIZE, p_rSendParameter)) && // RDLength
(false /*TODO: IP6 version of: _udpAppendBuffer((uint32_t)p_IPAddress, MDNS_IP4_SIZE)*/)); // RData

DEBUG_EX_ERR(if (!bResult) {
DEBUG_OUTPUT.printf_P(PSTR("[MDNSResponder] _writeMDNSAnswer_AAAA: FAILED!\n"));
Expand Down Expand Up @@ -1855,7 +1857,7 @@ namespace MDNSImplementation
p_rSendParameter.m_u16Offset))
&& (_writeMDNSRRDomain(hostDomain,
p_rSendParameter))) // Host, eg. esp8266.local
// Cache available for domain
// Cache available for domain
: ((MDNS_DOMAIN_COMPRESS_MARK
> ((u16CachedDomainOffset >> 8) & ~MDNS_DOMAIN_COMPRESS_MARK))
&& // Valid offset
Expand Down
8 changes: 7 additions & 1 deletion libraries/lwIP_Ethernet/examples/EthClient/EthClient.ino
10000
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ void setup() {

Serial.println("\nEthernet\n");

eth.setDefault(true); // default route set through this interface
// Uncomment to force routing through this interface.
// Default is set to false. In this case lwIP searches for
// the best suited output interface matching the destination address.
// If several interfaces match, the first one is picked.
// On esp8266/Arduno: WiFi interfaces are checked first.
// eth.setDefault(true); // default route set through this interface

if (!ethInitDHCP(eth)) {
Serial.printf("no hardware found\n");
while (1) {
Expand Down
2 changes: 1 addition & 1 deletion libraries/lwIP_Ethernet/examples/EthSSLValidation/certs.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pwIDAQAB
// CN: Sectigo RSA Domain Validation Secure Server CA => name: Sectigo_RSA_Domain_Validation_Secure_Server_CA
// not valid before: 2018-11-02 00:00:00
// not valid after: 2030-12-31 23:59:59
const char cert_Sectigo_RSA_Domain_Validation_Secure_Server_CA [] PROGMEM = R"CERT(
const char cert_Sectigo_RSA_Domain_Validation_Secure_Server_CA[] PROGMEM = R"CERT(
-----BEGIN CERTIFICATE-----
MIIGEzCCA/ugAwIBAgIQfVtRJrR2uhHbdBYLvFMNpzANBgkqhkiG9w0BAQwFADCB
iDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0pl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ void handleHTTPRequest() {

// Get current time
time_t now = time(nullptr);
;
struct tm timeinfo;
gmtime_r(&now, &timeinfo);

Expand Down
1 change: 1 addition & 0 deletions tests/clang-format-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ NamespaceIndentation: Inner
BreakBeforeBraces: Allman
IndentWidth: 4
IndentCaseLabels: false
ReflowComments: false
0