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
net/http-net-html.c
- Committer:
- andrewboyson
- Date:
- 2019-01-29
- Revision:
- 41:b62b2b46f530
- Parent:
- 39:04f4080eee71
- Child:
- 59:309e78f243dd
File content as of revision 41:b62b2b46f530:
#include "http.h"
#include "http-server.h"
#include "page.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(PageSite, "Net", "settings.css", NULL);
PageAddNav(NET_PAGE);
PageAddH1(PageSite, "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, DhcpNtpIp);
PageAddLabelledIp4 ("DNS server", WIDTH, DhcpDnsServerIp);
PageAddLabelledIp4 ("DHCP server", WIDTH, DhcpServerIp);
PageAddLabelledIp4 ("Router", WIDTH, DhcpRouterIp);
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, NdpGetLease());
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();
}