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

Committer:
andrewboyson
Date:
Mon May 01 18:20:55 2017 +0000
Revision:
13:9cd54f7db57a
Child:
14:e75a59c1123d
Added ability to read DNS queries with encoded IP addresses

Who changed what in which revision?

UserRevisionLine numberNew 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 13:9cd54f7db57a 5 extern void DnsTick();
andrewboyson 13:9cd54f7db57a 6 extern int DnsHandlePacketReceived(int dnsProtocol, int* pSize, void* pPacket);
andrewboyson 13:9cd54f7db57a 7 extern int DnsPollForPacketToSend(void* pPacket, int* pSize);
andrewboyson 13:9cd54f7db57a 8
andrewboyson 13:9cd54f7db57a 9 #define DNS_UNICAST_SERVER_PORT 53
andrewboyson 13:9cd54f7db57a 10 #define DNS_MULTICAST_SERVER_PORT 5353
andrewboyson 13:9cd54f7db57a 11 #define DNS_LLMNR_SERVER_PORT 5355
andrewboyson 13:9cd54f7db57a 12 #define DNS_CLIENT_PORT 53053
andrewboyson 13:9cd54f7db57a 13
andrewboyson 13:9cd54f7db57a 14 #define DNS_PROTOCOL_NONE 0
andrewboyson 13:9cd54f7db57a 15 #define DNS_PROTOCOL_UDNS 1
andrewboyson 13:9cd54f7db57a 16 #define DNS_PROTOCOL_MDNS 2
andrewboyson 13:9cd54f7db57a 17 #define DNS_PROTOCOL_LLMNR 3
andrewboyson 13:9cd54f7db57a 18
andrewboyson 13:9cd54f7db57a 19 #define DNS_RECORD_A 1
andrewboyson 13:9cd54f7db57a 20 #define DNS_RECORD_PTR 12
andrewboyson 13:9cd54f7db57a 21 #define DNS_RECORD_AAAA 28