Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: oldheating gps motorhome heating
Diff: base/net/web-net6-script.js
- Revision:
- 144:7106252b7abf
- Parent:
- 142:b472ba95b018
- Child:
- 146:6bc151bd7063
--- a/base/net/web-net6-script.js Sat Dec 26 19:38:40 2020 +0000
+++ b/base/net/web-net6-script.js Sat Dec 26 20:02:22 2020 +0000
@@ -2,7 +2,6 @@
'use strict';
let arp = '';
-let dns = '';
let hopLimit = '';
let mtu = '';
@@ -45,32 +44,11 @@
arp += Net.makeMac(fields[3]);
arp += '\r\n';
}
-function parseDnsLine(line)
-{
- if (line.length == 0) return;
- let fields = line.split('\t');
-
- dns += parseInt(fields[0], 16).toString().padStart(2, ' ');
- let minutes = parseInt(fields[1], 16) / 1000 / 60;
- dns += Math.floor(minutes).toString().padStart(4, ' ');
- dns += ' ';
- dns += Net.makeIp6(fields[2]).padEnd(40, ' ');
- dns += ' ';
- dns += fields[3];
- dns += ' ';
- dns += fields[4];
- dns += '\r\n';
-}
function parseArpLines(text)
{
arp = '';
text.split('\n').forEach(parseArpLine);
}
-function parseDnsLines(text)
-{
- dns = '';
- text.split('\n').forEach(parseDnsLine);
-}
function parseGenLines(text)
{
let lines = text.split('\n');
@@ -107,14 +85,12 @@
let topics = Ajax.response.split('\f');
parseGenLines(topics[0]);
parseArpLines(topics[1]);
- parseDnsLines(topics[2]);
}
function display()
{
let elem;
elem = Ajax.getElementOrNull('ajax-arp' ); if (elem) elem.textContent = arp;
- elem = Ajax.getElementOrNull('ajax-dns' ); if (elem) elem.textContent = dns;
elem = Ajax.getElementOrNull('ajax-slaac' ); if (elem) elem.textContent = slaac;
elem = Ajax.getElementOrNull('ajax-hop-limit' ); if (elem) elem.textContent = hopLimit;
elem = Ajax.getElementOrNull('ajax-mtu' ); if (elem) elem.textContent = mtu;