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: http-net-html.c
- Revision:
- 14:c3c43c8faf0e
- Child:
- 29:4d649264d6b6
diff -r 3acc2e009ce8 -r c3c43c8faf0e http-net-html.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/http-net-html.c Sat Dec 29 19:01:39 2018 +0000
@@ -0,0 +1,70 @@
+#include "http.h"
+#include "http-base.h"
+#include "page.h"
+#include "nav.h"
+#include "net.h"
+#include "mac.h"
+#include "ip4.h"
+#include "ip6.h"
+#include "ar4.h"
+#include "ar6.h"
+#include "nr4.h"
+#include "nr6.h"
+#include "ndp.h"
+#include "ndp.h"
+#include "dhcp.h"
+#include "slaac.h"
+
+#define WIDTH 16
+
+void HttpNetHtml()
+{
+ HttpOk("text/html; charset=UTF-8", "no-cache", NULL, NULL);
+ PageAddHeader(NavSite, "Net", "settings.css", NULL);
+ NavAdd(NET_PAGE);
+ PageAddH1(NavSite, "Net");
+
+ PageAddH2("Ethernet");
+ PageAddLabelledMac ("MAC", WIDTH, MacLocal);
+
+ PageAddH2("IP4 DHCP");
+ PageAddLabelledIp4 ("IP4 address", WIDTH, DhcpLocalIp);
+ PageAddLabelledValue("Domain", WIDTH, DhcpDomainName);
+ PageAddLabelledValue("Host name", WIDTH, DhcpHostName);
+ PageAddLabelledIp4 ("NTP server", WIDTH, DhcpNtp);
+ PageAddLabelledIp4 ("DNS server", WIDTH, DhcpDnsServer);
+ PageAddLabelledIp4 ("DHCP server", WIDTH, DhcpServer);
+ PageAddLabelledIp4 ("Router", WIDTH, DhcpRouter);
+ PageAddLabelledIp4 ("Subnet mask", WIDTH, DhcpSubnetMask);
+ PageAddLabelledIp4 ("Broadcast IP", WIDTH, DhcpBroadcastIp);
+ PageAddLabelledInt ("Lease time IP", WIDTH, DhcpLeaseTime);
+ PageAddLabelledInt ("Renewal T1", WIDTH, DhcpRenewalT1);
+ PageAddLabelledInt ("Renewal T2", WIDTH, DhcpRenewalT2);
+ PageAddLabelledInt ("Elapsed", WIDTH, DhcpGetElapsedLife());
+
+ PageAddH2("IP6 NDP");
+ PageAddLabelledInt ("Hop limit", WIDTH, NdpHopLimit);
+ PageAddLabelledOnOff("Managed address", WIDTH, NdpManagedConfiguration);
+ PageAddLabelledOnOff("Other configuration", WIDTH, NdpOtherConfiguration);
+ PageAddLabelledMac ("Router MAC", WIDTH, NdpRouterMac);
+ PageAddLabelledInt ("Prefix length", WIDTH, NdpPrefixLength);
+ PageAddLabelledOnOff("Prefix flag L", WIDTH, NdpPrefixFlagL);
+ PageAddLabelledOnOff("Prefix flag A", WIDTH, NdpPrefixFlagA);
+ PageAddLabelledInt ("Prefix valid secs", WIDTH, NdpPrefixValidLifetime);
+ PageAddLabelledInt ("Prefix preferred secs", WIDTH, NdpPrefixPreferredLifetime);
+ PageAddLabelledIp6 ("Prefix", WIDTH, NdpPrefix);
+ PageAddLabelledInt ("DNS life secs", WIDTH, NdpDnsLifetime);
+ PageAddLabelledIp6 ("DNS server", WIDTH, NdpDnsServer);
+ PageAddLabelledInt ("Lease time", WIDTH, NdpLifetime);
+ PageAddLabelledInt ("Elapsed", WIDTH, NdpGetElapsedLife());
+ PageAddLabelledIp6 ("SLAAC", WIDTH, SlaacLinkLocalIp);
+ PageAddLabelledInt ("MTU", WIDTH, NdpMtu);
+
+ PageAddH2("ARP 4"); HttpAddText("<code>"); Ar4SendHttp(); HttpAddText("</code>\r\n");
+ PageAddH2("DNS 4"); HttpAddText("<code>"); Nr4SendHttp(); HttpAddText("</code>\r\n");
+ PageAddH2("ARP 6"); HttpAddText("<code>"); Ar6SendHttp(); HttpAddText("</code>\r\n");
+ PageAddH2("DNS 6"); HttpAddText("<code>"); Nr6SendHttp(); HttpAddText("</code>\r\n");
+
+ PageAddEnd();
+
+}