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/dnslabel.c
- Revision:
- 183:ee809769bf89
- Parent:
- 182:ff48c6ea91c1
--- a/udp/dns/dnslabel.c Sun Jan 10 11:52:19 2021 +0000 +++ b/udp/dns/dnslabel.c Tue Jan 12 19:10:22 2021 +0000 @@ -5,6 +5,16 @@ #include "dnslabel.h" #include "dhcp.h" +bool DnsLabelIsExternal(char* p) +{ + while (true) + { + if (*p == '\0') return false; + if (*p == '.') return true; + p++; + } +} + void DnsLabelCopy(char* dst, char* src) { strncpy(dst, src, DNS_MAX_LABEL_LENGTH); //Copies up to 63 bytes