A stack which works with or without an Mbed os library. Provides IPv4 or IPv6 with a full 1500 byte buffer.
Dependents: oldheating gps motorhome heating
Diff: udp/dns/dns.cpp
- Revision:
- 41:db727df5f98b
- Parent:
- 37:793b39683406
- Child:
- 43:bc028d5a6424
diff -r a94674b4f5a2 -r db727df5f98b udp/dns/dns.cpp --- a/udp/dns/dns.cpp Thu Oct 05 09:00:18 2017 +0000 +++ b/udp/dns/dns.cpp Fri Oct 06 10:18:01 2017 +0000 @@ -30,7 +30,7 @@ default: snprintf(text, size, "%d", recordtype); break; } } -int DnsGetNextProtocol(int protocol) +int DnsGetNextProtocol4(int protocol) { switch(protocol) { @@ -41,6 +41,17 @@ default: LogTimeF("DNS invalid protocol %d\r\n", protocol); return DNS_PROTOCOL_NONE; } } +int DnsGetNextProtocol6(int protocol) +{ + switch(protocol) + { + case DNS_PROTOCOL_NONE: return DNS_PROTOCOL_MDNS; + case DNS_PROTOCOL_MDNS: return DNS_PROTOCOL_LLMNR; + case DNS_PROTOCOL_LLMNR: return DNS_PROTOCOL_UDNS; + case DNS_PROTOCOL_UDNS: return DNS_PROTOCOL_NONE; + default: LogTimeF("DNS invalid protocol %d\r\n", protocol); return DNS_PROTOCOL_NONE; + } +} bool DnsHostNamesEquate(char* pA, char* pB) { while(true)