mDNS

Dependents:   OS

This is a mDNS server.

Revision:
6:3bf9f4943d1a
Parent:
5:4b6323e78f58
diff -r 4b6323e78f58 -r 3bf9f4943d1a mDNSResponder.cpp
--- a/mDNSResponder.cpp	Wed Sep 11 10:40:41 2019 +0000
+++ b/mDNSResponder.cpp	Wed Nov 20 13:27:10 2019 +0000
@@ -117,7 +117,7 @@
     struct dns_question* question;
     uint8_t *query;
 
-    MDBG("start probe duplicate domain\n");
+    MDBG("start probe duplicate domain\n\r");
 
     hdr = (struct dns_hdr *)query_buf;
     
@@ -146,7 +146,7 @@
     
     query += 4;
 
-    MDBG("send probe query(%d)\n", 
+    MDBG("send probe query(%d)\n\r", 
         (uint16_t)((uint32_t)query - (uint32_t)query_buf));
 
     mdns_sock.sendto(send_endpt, query_buf,
@@ -243,14 +243,14 @@
 
     memset(dest, 0, MAX_DOMAIN_LEN);
 
-    MDBG("\n");
+    MDBG("\n\r");
     while((len < MAX_DOMAIN_LEN) && (c != 0x00)) 
     {
         c = *query;
         
         while (c == 0xc0) 
         {
-            MDBG("%s : read offset\n", __FUNCTION__);
+            MDBG("%s : read offset\n\r", __FUNCTION__);
             query++;
             query  = (char*)((uint32_t)packet + *query);
             c = *query;
@@ -262,7 +262,7 @@
         len++;
     }
 
-    MDBG("\n%s : %s\n", __FUNCTION__, dest);
+    MDBG("\n%s : %s\n\r", __FUNCTION__, dest);
     return dest;
 }
 
@@ -587,7 +587,7 @@
     char *queryptr;
     uint8_t is_request;
         
-    MDBG("MDNS Process\n");
+    MDBG("MDNS Process\n\r");
 
     while(mdns_sock.recvfrom(&rcv_endpt, 
                     rcv_buf, sizeof(rcv_buf)) != 0)