Andrew Boyson / web

Dependents:   oldheating gps motorhome heating

Revision:
145:d2bd78be00b2
Parent:
110:8ab752842d25
Child:
146:6bc151bd7063
--- a/base/net/web-net-class.inc	Sat Dec 26 20:02:22 2020 +0000
+++ b/base/net/web-net-class.inc	Sun Dec 27 16:18:19 2020 +0000
@@ -15,6 +15,18 @@
 "        result += parseInt(text.substr(0, 2), 16).toString();\n"
 "        return result;\n"
 "    }\n"
+"    static makeIp4Rev(text)\n"
+"    {\n"
+"        let result = '';\n"
+"        result += parseInt(text.substr(0, 2), 16).toString();\n"
+"        result += '.';\n"
+"        result += parseInt(text.substr(2, 2), 16).toString();\n"
+"        result += '.';\n"
+"        result += parseInt(text.substr(4, 2), 16).toString();\n"
+"        result += '.';\n"
+"        result += parseInt(text.substr(6, 2), 16).toString();\n"
+"        return result;\n"
+"    }\n"
 "    static makeMac(text)\n"
 "    {\n"
 "        text = text.toLowerCase();\n"