mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-11 15:22:13 +03:00
Add code-spell spelling checks to CI (#8067)
Help find and fix silly spelling errors as they are added to the repo.
This commit is contained in:
committed by
GitHub
parent
78a2ed6bd8
commit
60fe7b4ca8
@ -3,7 +3,7 @@
|
||||
This file is part of the esp8266 core for Arduino environment.
|
||||
|
||||
Legacy_ESP8266mDNS:
|
||||
The well known, thouroughly tested (yet no flawless) default mDNS library for the ESP8266 family
|
||||
The well known, thoroughly tested (yet no flawless) default mDNS library for the ESP8266 family
|
||||
|
||||
LEA_ESP8266mDNS:
|
||||
An (currently) experimental mDNS implementation, that supports a lot more of mDNS features than Legacy_ESP8266mDNS, like:
|
||||
@ -19,7 +19,7 @@
|
||||
- Dynamic queries for DNS-SD services with cached and updated answers and user notifications
|
||||
- Support for multi-homed client host domains
|
||||
|
||||
See 'LEA_ESP8266mDNS/EPS8266mDNS.h' for more implementation details and usage informations.
|
||||
See 'LEA_ESP8266mDNS/EPS8266mDNS.h' for more implementation details and usage information.
|
||||
See 'examples/mDNS_Clock' and 'examples/mDNS_ServiceMonitor' for implementation examples of the advanced features.
|
||||
|
||||
LEA_ESP8266mDNS is (mostly) client source code compatible to 'Legacy_ESP8266mDNS', so it could be
|
||||
|
@ -1132,7 +1132,7 @@ bool MDNSResponder::hasAnswerTxts(const MDNSResponder::hMDNSServiceQuery p_hServ
|
||||
MDNSResponder::answerTxts
|
||||
|
||||
Returns all TXT items for the given service as a ';'-separated string.
|
||||
If not already existing; the string is alloced, filled and attached to the answer.
|
||||
If not already existing; the string is allocated, filled and attached to the answer.
|
||||
|
||||
*/
|
||||
const char* MDNSResponder::answerTxts(const MDNSResponder::hMDNSServiceQuery p_hServiceQuery,
|
||||
@ -1165,7 +1165,7 @@ const char* MDNSResponder::answerTxts(const MDNSResponder::hMDNSServiceQuery p_h
|
||||
|
||||
Set a global callback for probe results. The callback is called, when probing
|
||||
for the host domain (or a service domain, without specific probe result callback)
|
||||
failes or succeedes.
|
||||
fails or succeeds.
|
||||
In the case of failure, the domain name should be changed via 'setHostname' or 'setServiceName'.
|
||||
When succeeded, the host or service domain will be announced by the MDNS responder.
|
||||
|
||||
@ -1191,7 +1191,7 @@ bool MDNSResponder::setHostProbeResultCallback(MDNSHostProbeFn1 pfn)
|
||||
MDNSResponder::setServiceProbeResultCallback
|
||||
|
||||
Set a service specific callback for probe results. The callback is called, when probing
|
||||
for the service domain failes or succeedes.
|
||||
for the service domain fails or succeeds.
|
||||
In the case of failure, the service name should be changed via 'setServiceName'.
|
||||
When succeeded, the service domain will be announced by the MDNS responder.
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
Essentially, this is an rewrite of the original EPS8266 Multicast DNS code (ESP8266mDNS).
|
||||
The target of this rewrite was to keep the existing interface as stable as possible while
|
||||
adding and extending the supported set of mDNS features.
|
||||
A lot of the additions were basicly taken from Erik Ekman's lwIP mdns app code.
|
||||
A lot of the additions were basically taken from Erik Ekman's lwIP mdns app code.
|
||||
|
||||
Supported mDNS features (in some cases somewhat limited):
|
||||
- Presenting a DNS-SD service to interested observers, eg. a http server by presenting _http._tcp service
|
||||
@ -52,7 +52,7 @@
|
||||
Static:
|
||||
Call 'uint32_t u32AnswerCount = MDNS.queryService("http", "tcp");'
|
||||
Iterate answers by: 'for (uint32_t u=0; u<u32AnswerCount; ++u) { const char* pHostname = MDNS.answerHostname(u); }'
|
||||
You should call MDNS.removeQuery() sometimes later (when the answers are nott needed anymore)
|
||||
You should call MDNS.removeQuery() sometimes later (when the answers are not needed anymore)
|
||||
|
||||
Dynamic:
|
||||
Install a dynamic query by calling 'DNSResponder::hMDNSServiceQuery hServiceQuery = MDNS.installServiceQuery("http", "tcp", serviceQueryCallback, &userData);'
|
||||
@ -195,7 +195,7 @@ public:
|
||||
|
||||
// Finish MDNS processing
|
||||
bool close(void);
|
||||
// for esp32 compatability
|
||||
// for esp32 compatibility
|
||||
bool end(void);
|
||||
// Change hostname (probing is restarted)
|
||||
bool setHostname(const char* p_pcHostname);
|
||||
@ -241,7 +241,7 @@ public:
|
||||
{
|
||||
setHostname(p_pcHostname);
|
||||
}
|
||||
// for esp32 compatibilty
|
||||
// for esp32 compatibility
|
||||
void setInstanceName(const String& s_pcHostname)
|
||||
{
|
||||
setInstanceName(s_pcHostname.c_str());
|
||||
@ -1180,7 +1180,7 @@ protected:
|
||||
uint8_t m_u8HostReplyMask; // Flags for reply components/answers
|
||||
bool m_bLegacyQuery; // Flag: Legacy query
|
||||
bool m_bResponse; // Flag: Response to a query
|
||||
bool m_bAuthorative; // Flag: Authorative (owner) response
|
||||
bool m_bAuthorative; // Flag: Authoritative (owner) response
|
||||
bool m_bCacheFlush; // Flag: Clients should flush their caches
|
||||
bool m_bUnicast; // Flag: Unicast response
|
||||
bool m_bUnannounce; // Flag: Unannounce service
|
||||
|
@ -395,7 +395,7 @@ bool MDNSResponder::_parseQuery(const MDNSResponder::stcMDNS_MsgHeader& p_MsgHea
|
||||
IPAddress localIPAddress(m_pUDPContext->getInputNetif()->ip_addr);
|
||||
if (((stcMDNS_RRAnswerA*)pKnownRRAnswer)->m_IPAddress == localIPAddress)
|
||||
{
|
||||
// SAME IP address -> We've received an old message from ourselfs (same IP)
|
||||
// SAME IP address -> We've received an old message from ourselves (same IP)
|
||||
DEBUG_EX_RX(DEBUG_OUTPUT.printf_P(PSTR("[MDNSResponder] _parseQuery: Tiebreak (IP4) WON (was an old message)!\n")););
|
||||
m_HostProbeInformation.m_bTiebreakNeeded = false;
|
||||
}
|
||||
@ -410,7 +410,7 @@ bool MDNSResponder::_parseQuery(const MDNSResponder::stcMDNS_MsgHeader& p_MsgHea
|
||||
}
|
||||
else // WON tiebreak
|
||||
{
|
||||
//TiebreakState = TiebreakState_Won; // We received an 'old' message from ourselfs -> Just ignore
|
||||
//TiebreakState = TiebreakState_Won; // We received an 'old' message from ourselves -> Just ignore
|
||||
DEBUG_EX_RX(DEBUG_OUTPUT.printf_P(PSTR("[MDNSResponder] _parseQuery: Tiebreak (IP4) WON (higher IP)!\n")););
|
||||
m_HostProbeInformation.m_bTiebreakNeeded = false;
|
||||
}
|
||||
@ -501,7 +501,7 @@ bool MDNSResponder::_parseQuery(const MDNSResponder::stcMDNS_MsgHeader& p_MsgHea
|
||||
(hostDomain == ((stcMDNS_RRAnswerSRV*)pKnownRRAnswer)->m_SRVDomain)) // Host domain match
|
||||
{
|
||||
|
||||
// We've received an old message from ourselfs (same SRV)
|
||||
// We've received an old message from ourselves (same SRV)
|
||||
DEBUG_EX_RX(DEBUG_OUTPUT.printf_P(PSTR("[MDNSResponder] _parseQuery: Tiebreak (SRV) won (was an old message)!\n")););
|
||||
pService->m_ProbeInformation.m_bTiebreakNeeded = false;
|
||||
}
|
||||
@ -516,7 +516,7 @@ bool MDNSResponder::_parseQuery(const MDNSResponder::stcMDNS_MsgHeader& p_MsgHea
|
||||
}
|
||||
else // WON tiebreak
|
||||
{
|
||||
//TiebreakState = TiebreakState_Won; // We received an 'old' message from ourselfs -> Just ignore
|
||||
//TiebreakState = TiebreakState_Won; // We received an 'old' message from ourselves -> Just ignore
|
||||
DEBUG_EX_RX(DEBUG_OUTPUT.printf_P(PSTR("[MDNSResponder] _parseQuery: Tiebreak (SRV) won (higher)!\n")););
|
||||
pService->m_ProbeInformation.m_bTiebreakNeeded = false;
|
||||
}
|
||||
@ -1560,7 +1560,7 @@ bool MDNSResponder::_announce(bool p_bAnnounce,
|
||||
|
||||
bResult = true;
|
||||
|
||||
sendParameter.m_bResponse = true; // Announces are 'Unsolicited authorative responses'
|
||||
sendParameter.m_bResponse = true; // Announces are 'Unsolicited authoritative responses'
|
||||
sendParameter.m_bAuthorative = true;
|
||||
sendParameter.m_bUnannounce = !p_bAnnounce; // When unannouncing, the TTL is set to '0' while creating the answers
|
||||
|
||||
@ -1612,7 +1612,7 @@ bool MDNSResponder::_announceService(stcMDNSService& p_rService,
|
||||
if (ProbingStatus_Done == p_rService.m_ProbeInformation.m_ProbingStatus)
|
||||
{
|
||||
|
||||
sendParameter.m_bResponse = true; // Announces are 'Unsolicited authorative responses'
|
||||
sendParameter.m_bResponse = true; // Announces are 'Unsolicited authoritative responses'
|
||||
sendParameter.m_bAuthorative = true;
|
||||
sendParameter.m_bUnannounce = !p_bAnnounce; // When unannouncing, the TTL is set to '0' while creating the answers
|
||||
|
||||
|
@ -245,7 +245,7 @@ bool MDNSResponder::_removeServiceQuery(MDNSResponder::stcMDNSServiceQuery* p_pS
|
||||
delete p_pServiceQuery;
|
||||
bResult = true;
|
||||
}
|
||||
else // No predecesor
|
||||
else // No predecessor
|
||||
{
|
||||
if (m_pServiceQueries == p_pServiceQuery)
|
||||
{
|
||||
@ -275,7 +275,7 @@ bool MDNSResponder::_removeLegacyServiceQuery(void)
|
||||
/*
|
||||
MDNSResponder::_findServiceQuery
|
||||
|
||||
'Convert' hMDNSServiceQuery to stcMDNSServiceQuery* (ensure existance)
|
||||
'Convert' hMDNSServiceQuery to stcMDNSServiceQuery* (ensure existence)
|
||||
|
||||
*/
|
||||
MDNSResponder::stcMDNSServiceQuery* MDNSResponder::_findServiceQuery(MDNSResponder::hMDNSServiceQuery p_hServiceQuery)
|
||||
@ -458,7 +458,7 @@ bool MDNSResponder::_releaseService(MDNSResponder::stcMDNSService* p_pService)
|
||||
delete p_pService;
|
||||
bResult = true;
|
||||
}
|
||||
else // No predecesor
|
||||
else // No predecessor
|
||||
{
|
||||
if (m_pServices == p_pService)
|
||||
{
|
||||
|
@ -122,7 +122,7 @@ namespace MDNSImplementation
|
||||
#define MDNS_SERVICE_TTL 4500
|
||||
|
||||
/*
|
||||
Compressed labels are flaged by the two topmost bits of the length byte being set
|
||||
Compressed labels are flagged by the two topmost bits of the length byte being set
|
||||
*/
|
||||
#define MDNS_DOMAIN_COMPRESS_MARK 0xC0
|
||||
/*
|
||||
@ -156,7 +156,7 @@ namespace MDNSImplementation
|
||||
|
||||
/*
|
||||
Enable/disable the usage of the F() macro in debug trace printf calls.
|
||||
There needs to be an PGM comptible printf function to use this.
|
||||
There needs to be an PGM compatible printf function to use this.
|
||||
|
||||
USE_PGM_PRINTF and F
|
||||
*/
|
||||
|
@ -283,12 +283,12 @@ size_t MDNSResponder::stcMDNSServiceTxt::length(void) const
|
||||
A TXT item can be looke up by its 'key' member.
|
||||
Export as ';'-separated byte array is supported.
|
||||
Export as 'length byte coded' byte array is supported.
|
||||
Comparision ((all A TXT items in B and equal) AND (all B TXT items in A and equal)) is supported.
|
||||
Comparison ((all A TXT items in B and equal) AND (all B TXT items in A and equal)) is supported.
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
MDNSResponder::stcMDNSServiceTxts::stcMDNSServiceTxts contructor
|
||||
MDNSResponder::stcMDNSServiceTxts::stcMDNSServiceTxts constructor
|
||||
*/
|
||||
MDNSResponder::stcMDNSServiceTxts::stcMDNSServiceTxts(void)
|
||||
: m_pTxts(0)
|
||||
@ -387,7 +387,7 @@ bool MDNSResponder::stcMDNSServiceTxts::remove(stcMDNSServiceTxt* p_pTxt)
|
||||
delete p_pTxt;
|
||||
bResult = true;
|
||||
}
|
||||
else if (m_pTxts == p_pTxt) // No predecesor, but first item
|
||||
else if (m_pTxts == p_pTxt) // No predecessor, but first item
|
||||
{
|
||||
m_pTxts = p_pTxt->m_pNext;
|
||||
delete p_pTxt;
|
||||
@ -646,7 +646,7 @@ bool MDNSResponder::stcMDNSServiceTxts::operator!=(const stcMDNSServiceTxts& p_O
|
||||
/**
|
||||
MDNSResponder::stcMDNS_MsgHeader
|
||||
|
||||
A MDNS message haeder.
|
||||
A MDNS message header.
|
||||
|
||||
*/
|
||||
|
||||
@ -1328,7 +1328,7 @@ bool MDNSResponder::stcProbeInformation::clear(bool p_bClearUserdata /*= false*/
|
||||
and the flag m_bAutoName is set. If the hostname changes, all 'auto-
|
||||
named' services are renamed also.
|
||||
m_u8Replymask is used while preparing a response to a MDNS query. It is
|
||||
resetted in '_sendMDNSMessage' afterwards.
|
||||
reset in '_sendMDNSMessage' afterwards.
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -1504,7 +1504,7 @@ bool MDNSResponder::stcMDNSService::releaseProtocol(void)
|
||||
- an IP4 address
|
||||
(- an IP6 address)
|
||||
- a MDNS TXTs
|
||||
The existance of a component is flaged in 'm_u32ContentFlags'.
|
||||
The existence of a component is flagged in 'm_u32ContentFlags'.
|
||||
For every answer component a TTL value is maintained.
|
||||
Answer objects can be connected to a linked list.
|
||||
|
||||
@ -1899,7 +1899,7 @@ bool MDNSResponder::stcMDNSServiceQuery::stcAnswer::removeIP4Address(MDNSRespond
|
||||
delete p_pIP4Address;
|
||||
bResult = true;
|
||||
}
|
||||
else if (m_pIP4Addresses == p_pIP4Address) // No predecesor, but first item
|
||||
else if (m_pIP4Addresses == p_pIP4Address) // No predecessor, but first item
|
||||
{
|
||||
m_pIP4Addresses = p_pIP4Address->m_pNext;
|
||||
delete p_pIP4Address;
|
||||
@ -2036,7 +2036,7 @@ bool MDNSResponder::stcMDNSServiceQuery::stcAnswer::removeIP6Address(MDNSRespond
|
||||
delete p_pIP6Address;
|
||||
bResult = true;
|
||||
}
|
||||
else if (m_pIP6Addresses == p_pIP6Address) // No predecesor, but first item
|
||||
else if (m_pIP6Addresses == p_pIP6Address) // No predecessor, but first item
|
||||
{
|
||||
m_pIP6Addresses = p_pIP6Address->m_pNext;
|
||||
delete p_pIP6Address;
|
||||
@ -2123,7 +2123,7 @@ MDNSResponder::stcMDNSServiceQuery::stcAnswer::stcIP6Address* MDNSResponder::stc
|
||||
MDNSResponder::stcMDNSServiceQuery
|
||||
|
||||
A service query object.
|
||||
A static query is flaged via 'm_bLegacyQuery'; while the function 'queryService'
|
||||
A static query is flagged via 'm_bLegacyQuery'; while the function 'queryService'
|
||||
is waiting for answers, the internal flag 'm_bAwaitingAnswers' is set. When the
|
||||
timeout is reached, the flag is removed. These two flags are only used for static
|
||||
service queries.
|
||||
@ -2282,7 +2282,7 @@ bool MDNSResponder::stcMDNSServiceQuery::removeAnswer(MDNSResponder::stcMDNSServ
|
||||
delete p_pAnswer;
|
||||
bResult = true;
|
||||
}
|
||||
else if (m_pAnswers == p_pAnswer) // No predecesor, but first item
|
||||
else if (m_pAnswers == p_pAnswer) // No predecessor, but first item
|
||||
{
|
||||
m_pAnswers = p_pAnswer->m_pNext;
|
||||
delete p_pAnswer;
|
||||
|
@ -154,7 +154,7 @@ bool MDNSResponder::_sendMDNSMessage_Multicast(MDNSResponder::stcMDNSSendParamet
|
||||
MDNSResponder::_prepareMDNSMessage
|
||||
|
||||
The MDNS message is composed in a two-step process.
|
||||
In the first loop 'only' the header informations (mainly number of answers) are collected,
|
||||
In the first loop 'only' the header information (mainly number of answers) are collected,
|
||||
while in the seconds loop, the header and all queries and answers are written to the UDP
|
||||
output buffer.
|
||||
|
||||
@ -214,7 +214,7 @@ bool MDNSResponder::_prepareMDNSMessage(MDNSResponder::stcMDNSSendParameter& p_r
|
||||
DEBUG_EX_ERR(if (!bResult) DEBUG_OUTPUT.printf_P(PSTR("[MDNSResponder] _prepareMDNSMessage: _writeMDNSQuestion FAILED!\n")););
|
||||
}
|
||||
|
||||
// Answers and authorative answers
|
||||
// Answers and authoritative answers
|
||||
#ifdef MDNS_IP4_SUPPORT
|
||||
if ((bResult) &&
|
||||
(p_rSendParameter.m_u8HostReplyMask & ContentFlag_A))
|
||||
@ -397,7 +397,7 @@ bool MDNSResponder::_sendMDNSQuery(const MDNSResponder::stcMDNS_RRDomain& p_Quer
|
||||
// It seems, that some mDNS implementations don't support 'unicast response' questions...
|
||||
sendParameter.m_pQuestions->m_Header.m_Attributes.m_u16Class = (/*0x8000 |*/ DNS_RRCLASS_IN); // /*Unicast &*/ INternet
|
||||
|
||||
// TODO: Add knwon answer to the query
|
||||
// TODO: Add known answer to the query
|
||||
(void)p_pKnownAnswers;
|
||||
|
||||
bResult = _sendMDNSMessage(sendParameter);
|
||||
@ -655,13 +655,13 @@ bool MDNSResponder::_readRRAnswerTXT(MDNSResponder::stcMDNS_RRAnswerTXT& p_rRRAn
|
||||
}
|
||||
|
||||
if ((bResult) &&
|
||||
(pTxt)) // Everythings fine so far
|
||||
(pTxt)) // Everything is fine so far
|
||||
{
|
||||
// Link TXT item to answer TXTs
|
||||
pTxt->m_pNext = p_rRRAnswerTXT.m_Txts.m_pTxts;
|
||||
p_rRRAnswerTXT.m_Txts.m_pTxts = pTxt;
|
||||
}
|
||||
else // At least no TXT (migth be OK, if length was 0) OR an error
|
||||
else // At least no TXT (might be OK, if length was 0) OR an error
|
||||
{
|
||||
if (!bResult)
|
||||
{
|
||||
@ -1226,9 +1226,9 @@ bool MDNSResponder::_readMDNSMsgHeader(MDNSResponder::stcMDNS_MsgHeader& p_rMsgH
|
||||
(_udpRead16(p_rMsgHeader.m_u16ARCount)))
|
||||
{
|
||||
|
||||
p_rMsgHeader.m_1bQR = (u8B1 & 0x80); // Query/Responde flag
|
||||
p_rMsgHeader.m_1bQR = (u8B1 & 0x80); // Query/Respond flag
|
||||
p_rMsgHeader.m_4bOpcode = (u8B1 & 0x78); // Operation code (0: Standard query, others ignored)
|
||||
p_rMsgHeader.m_1bAA = (u8B1 & 0x04); // Authorative answer
|
||||
p_rMsgHeader.m_1bAA = (u8B1 & 0x04); // Authoritative answer
|
||||
p_rMsgHeader.m_1bTC = (u8B1 & 0x02); // Truncation flag
|
||||
p_rMsgHeader.m_1bRD = (u8B1 & 0x01); // Recursion desired
|
||||
|
||||
@ -1430,7 +1430,7 @@ bool MDNSResponder::_writeMDNSServiceDomain(const MDNSResponder::stcMDNSService&
|
||||
// Found cached domain -> mark as compressed domain
|
||||
? ((MDNS_DOMAIN_COMPRESS_MARK > ((u16CachedDomainOffset >> 8) & ~MDNS_DOMAIN_COMPRESS_MARK)) && // Valid offset
|
||||
((!p_bPrependRDLength) ||
|
||||
(_write16(2, p_rSendParameter))) && // Lenght of 'Cxxx'
|
||||
(_write16(2, p_rSendParameter))) && // Length of 'Cxxx'
|
||||
(_write8(((u16CachedDomainOffset >> 8) | MDNS_DOMAIN_COMPRESS_MARK), p_rSendParameter)) && // Compression mark (and offset)
|
||||
(_write8((uint8_t)(u16CachedDomainOffset & 0xFF), p_rSendParameter)))
|
||||
// No cached domain -> add this domain to cache and write full domain name
|
||||
|
Reference in New Issue
Block a user