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
udp/dns/dns.h@37:793b39683406, 2017-10-04 (annotated)
- Committer:
- andrewboyson
- Date:
- Wed Oct 04 07:51:02 2017 +0000
- Revision:
- 37:793b39683406
- Parent:
- 35:93c39d260a83
- Child:
- 41:db727df5f98b
Added trace back and trace forward to log messages
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
andrewboyson | 13:9cd54f7db57a | 1 | #include "mbed.h" |
andrewboyson | 13:9cd54f7db57a | 2 | |
andrewboyson | 13:9cd54f7db57a | 3 | extern void DnsProtocolToString (uint8_t protocol, int size, char* text); |
andrewboyson | 13:9cd54f7db57a | 4 | extern void DnsRecordTypeToString(uint8_t recordtype, int size, char* text); |
andrewboyson | 32:679654f2d023 | 5 | extern int DnsGetNextProtocol(int protocol); |
andrewboyson | 33:714a0345e59b | 6 | extern bool DnsHostNamesEquate(char* pA, char* pB); |
andrewboyson | 32:679654f2d023 | 7 | extern int DnsMakeFullNameFromName (int protocol, char* name, int size, char* fqdn); |
andrewboyson | 32:679654f2d023 | 8 | extern int DnsStripNameFromFullName(int protocol, char* fqdn, int size, char* name); |
andrewboyson | 32:679654f2d023 | 9 | |
andrewboyson | 13:9cd54f7db57a | 10 | extern void DnsTick(); |
andrewboyson | 37:793b39683406 | 11 | extern int DnsHandlePacketReceived(void (*traceback)(void), int dnsProtocol, int* pSize, void* pPacket); |
andrewboyson | 13:9cd54f7db57a | 12 | extern int DnsPollForPacketToSend(void* pPacket, int* pSize); |
andrewboyson | 13:9cd54f7db57a | 13 | |
andrewboyson | 13:9cd54f7db57a | 14 | #define DNS_UNICAST_SERVER_PORT 53 |
andrewboyson | 14:e75a59c1123d | 15 | #define DNS_UNICAST_CLIENT_PORT 53053 |
andrewboyson | 14:e75a59c1123d | 16 | |
andrewboyson | 14:e75a59c1123d | 17 | #define DNS_MDNS_PORT 5353 |
andrewboyson | 14:e75a59c1123d | 18 | |
andrewboyson | 13:9cd54f7db57a | 19 | #define DNS_LLMNR_SERVER_PORT 5355 |
andrewboyson | 14:e75a59c1123d | 20 | #define DNS_LLMNR_CLIENT_PORT 53055 |
andrewboyson | 13:9cd54f7db57a | 21 | |
andrewboyson | 13:9cd54f7db57a | 22 | #define DNS_PROTOCOL_NONE 0 |
andrewboyson | 13:9cd54f7db57a | 23 | #define DNS_PROTOCOL_UDNS 1 |
andrewboyson | 13:9cd54f7db57a | 24 | #define DNS_PROTOCOL_MDNS 2 |
andrewboyson | 13:9cd54f7db57a | 25 | #define DNS_PROTOCOL_LLMNR 3 |
andrewboyson | 13:9cd54f7db57a | 26 | |
andrewboyson | 30:e34173b7585c | 27 | #define DNS_RECORD_NONE 0 |
andrewboyson | 13:9cd54f7db57a | 28 | #define DNS_RECORD_A 1 |
andrewboyson | 13:9cd54f7db57a | 29 | #define DNS_RECORD_PTR 12 |
andrewboyson | 13:9cd54f7db57a | 30 | #define DNS_RECORD_AAAA 28 |
andrewboyson | 15:6ca6778168b1 | 31 | #define DNS_RECORD_TXT 16 |
andrewboyson | 15:6ca6778168b1 | 32 | #define DNS_RECORD_SRV 33 |
andrewboyson | 35:93c39d260a83 | 33 | |
andrewboyson | 35:93c39d260a83 | 34 | #define DNS_MAX_LABEL_LENGTH 63 |