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

Committer:
andrewboyson
Date:
2017-05-09
Revision:
15:6ca6778168b1
Parent:
14:e75a59c1123d
Child:
30:e34173b7585c

File content as of revision 15:6ca6778168b1:

#include "mbed.h"

extern void DnsProtocolToString  (uint8_t protocol,   int size, char* text);
extern void DnsRecordTypeToString(uint8_t recordtype, int size, char* text);
extern void DnsTick();
extern int  DnsHandlePacketReceived(int dnsProtocol, int* pSize, void* pPacket);
extern int  DnsPollForPacketToSend(void* pPacket, int* pSize);

#define DNS_UNICAST_SERVER_PORT     53
#define DNS_UNICAST_CLIENT_PORT  53053

#define DNS_MDNS_PORT             5353

#define DNS_LLMNR_SERVER_PORT     5355
#define DNS_LLMNR_CLIENT_PORT    53055

#define DNS_PROTOCOL_NONE   0
#define DNS_PROTOCOL_UDNS   1
#define DNS_PROTOCOL_MDNS   2
#define DNS_PROTOCOL_LLMNR  3

#define DNS_RECORD_A     1
#define DNS_RECORD_PTR  12
#define DNS_RECORD_AAAA 28
#define DNS_RECORD_TXT  16
#define DNS_RECORD_SRV  33