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
dns.h
00001 #include <stdint.h> 00002 #include <stdbool.h> 00003 00004 extern bool DnsSendRequestsViaIp4; 00005 00006 extern void DnsProtocolString (uint8_t protocol, int size, char* text); 00007 extern void DnsRecordTypeString(uint8_t recordtype, int size, char* text); 00008 extern void DnsProtocolLog (uint8_t protocol); 00009 extern void DnsRecordTypeLog (uint8_t recordtype); 00010 00011 extern void DnsMain(void); 00012 extern int DnsHandlePacketReceived(void (*traceback)(void), int dnsProtocol, int sizeRx, void* pPacketRx, int* pSizeTx, void* pPacketTx); 00013 extern int DnsPollForPacketToSend(int ipType, void* pPacket, int* pSize); 00014 00015 #define DNS_UNICAST_SERVER_PORT 53 00016 #define DNS_UNICAST_CLIENT_PORT 53053 00017 00018 #define DNS_MDNS_PORT 5353 00019 00020 #define DNS_LLMNR_SERVER_PORT 5355 00021 #define DNS_LLMNR_CLIENT_PORT 53055 00022 00023 #define DNS_PROTOCOL_NONE 0 00024 #define DNS_PROTOCOL_UDNS 1 00025 #define DNS_PROTOCOL_MDNS 2 00026 #define DNS_PROTOCOL_LLMNR 3 00027 00028 #define DNS_RECORD_NONE 0 00029 #define DNS_RECORD_A 1 00030 #define DNS_RECORD_PTR 12 00031 #define DNS_RECORD_AAAA 28 00032 #define DNS_RECORD_TXT 16 00033 #define DNS_RECORD_SRV 33 00034
Generated on Tue Jul 12 2022 18:53:40 by 1.7.2