Andrew Boyson / web

Dependents:   oldheating gps motorhome heating

Files at this revision

API Documentation at this revision

Comitter:
andrewboyson
Date:
Thu Jan 21 13:33:44 2021 +0000
Parent:
152:edbf676b08ca
Child:
154:306e328871ee
Commit message:
Added button to test resolution of a name from an address.

Changed in this revision

base/net/web-net-ajax.c Show annotated file Show diff for this revision Revisions of this file
base/net/web-net-html.c Show annotated file Show diff for this revision Revisions of this file
base/net/web-net-query.c Show annotated file Show diff for this revision Revisions of this file
--- a/base/net/web-net-ajax.c	Tue Jan 19 18:59:06 2021 +0000
+++ b/base/net/web-net-ajax.c	Thu Jan 21 13:33:44 2021 +0000
@@ -2,7 +2,8 @@
 #include "http.h"
 #include "mac.h"
 #include "tcb.h"
-#include  "nr.h"
+#include "nr.h"
+#include "nrtest.h"
 #include "ar4.h"
 #include "ar6.h"
 
--- a/base/net/web-net-html.c	Tue Jan 19 18:59:06 2021 +0000
+++ b/base/net/web-net-html.c	Thu Jan 21 13:33:44 2021 +0000
@@ -20,6 +20,7 @@
     WebAddAjaxInput("Name", 40, "ajax-nr", "name-to-resolve");
     WebAddAjaxButton("Request AAAA", "request-AAAA");
     WebAddAjaxButton("Request A"   , "request-A"   );
+    WebAddAjaxButton("Request PTR" , "request-PTR" );
     
     WebAddH2("Name cache");
     HttpAddText("<code id='ajax-dns'></code>\r\n");
--- a/base/net/web-net-query.c	Tue Jan 19 18:59:06 2021 +0000
+++ b/base/net/web-net-query.c	Thu Jan 21 13:33:44 2021 +0000
@@ -2,6 +2,7 @@
 
 #include "http.h"
 #include "nr.h"
+#include "nrtest.h"
 
 void WebNetQuery(char* pQuery)
 {
@@ -24,6 +25,10 @@
         {
             NrMakeRequestForAddress4FromName(NrTest);
         }
+        if (HttpSameStr(pName, "request-PTR"))
+        {
+            NrTestNameFromAddress();
+        }
     }
 }