Andrew Boyson / web

Dependents:   oldheating gps motorhome heating

Committer:
andrewboyson
Date:
Fri Mar 08 18:42:58 2019 +0000
Revision:
59:309e78f243dd
Parent:
41:b62b2b46f530
Child:
77:4689596a2f3f
Introduced leds to supplement toggles when no changes are needed.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
andrewboyson 14:c3c43c8faf0e 1 #include "http.h"
andrewboyson 29:4d649264d6b6 2 #include "http-server.h"
andrewboyson 14:c3c43c8faf0e 3 #include "page.h"
andrewboyson 14:c3c43c8faf0e 4 #include "net.h"
andrewboyson 14:c3c43c8faf0e 5 #include "mac.h"
andrewboyson 14:c3c43c8faf0e 6 #include "ip4.h"
andrewboyson 14:c3c43c8faf0e 7 #include "ip6.h"
andrewboyson 14:c3c43c8faf0e 8 #include "ar4.h"
andrewboyson 14:c3c43c8faf0e 9 #include "ar6.h"
andrewboyson 14:c3c43c8faf0e 10 #include "nr4.h"
andrewboyson 14:c3c43c8faf0e 11 #include "nr6.h"
andrewboyson 14:c3c43c8faf0e 12 #include "ndp.h"
andrewboyson 14:c3c43c8faf0e 13 #include "ndp.h"
andrewboyson 14:c3c43c8faf0e 14 #include "dhcp.h"
andrewboyson 14:c3c43c8faf0e 15 #include "slaac.h"
andrewboyson 14:c3c43c8faf0e 16
andrewboyson 14:c3c43c8faf0e 17 #define WIDTH 16
andrewboyson 14:c3c43c8faf0e 18
andrewboyson 14:c3c43c8faf0e 19 void HttpNetHtml()
andrewboyson 14:c3c43c8faf0e 20 {
andrewboyson 14:c3c43c8faf0e 21 HttpOk("text/html; charset=UTF-8", "no-cache", NULL, NULL);
andrewboyson 30:6a08abbe6301 22 PageAddHeader(PageSite, "Net", "settings.css", NULL);
andrewboyson 30:6a08abbe6301 23 PageAddNav(NET_PAGE);
andrewboyson 30:6a08abbe6301 24 PageAddH1(PageSite, "Net");
andrewboyson 14:c3c43c8faf0e 25
andrewboyson 14:c3c43c8faf0e 26 PageAddH2("Ethernet");
andrewboyson 59:309e78f243dd 27 PageAddLabelledMac (WIDTH, "MAC", MacLocal);
andrewboyson 14:c3c43c8faf0e 28
andrewboyson 14:c3c43c8faf0e 29 PageAddH2("IP4 DHCP");
andrewboyson 59:309e78f243dd 30 PageAddLabelledIp4 (WIDTH, "IP4 address", DhcpLocalIp);
andrewboyson 59:309e78f243dd 31 PageAddLabelledValue(WIDTH, "Domain", DhcpDomainName);
andrewboyson 59:309e78f243dd 32 PageAddLabelledValue(WIDTH, "Host name", DhcpHostName);
andrewboyson 59:309e78f243dd 33 PageAddLabelledIp4 (WIDTH, "NTP server", DhcpNtpIp);
andrewboyson 59:309e78f243dd 34 PageAddLabelledIp4 (WIDTH, "DNS server", DhcpDnsServerIp);
andrewboyson 59:309e78f243dd 35 PageAddLabelledIp4 (WIDTH, "DHCP server", DhcpServerIp);
andrewboyson 59:309e78f243dd 36 PageAddLabelledIp4 (WIDTH, "Router", DhcpRouterIp);
andrewboyson 59:309e78f243dd 37 PageAddLabelledIp4 (WIDTH, "Subnet mask", DhcpSubnetMask);
andrewboyson 59:309e78f243dd 38 PageAddLabelledIp4 (WIDTH, "Broadcast IP", DhcpBroadcastIp);
andrewboyson 59:309e78f243dd 39 PageAddLabelledInt (WIDTH, "Lease time IP", DhcpLeaseTime);
andrewboyson 59:309e78f243dd 40 PageAddLabelledInt (WIDTH, "Renewal T1", DhcpRenewalT1);
andrewboyson 59:309e78f243dd 41 PageAddLabelledInt (WIDTH, "Renewal T2", DhcpRenewalT2);
andrewboyson 59:309e78f243dd 42 PageAddLabelledInt (WIDTH, "Elapsed", DhcpGetElapsedLife());
andrewboyson 14:c3c43c8faf0e 43
andrewboyson 14:c3c43c8faf0e 44 PageAddH2("IP6 NDP");
andrewboyson 59:309e78f243dd 45 PageAddLabelledInt (WIDTH, "Hop limit", NdpHopLimit);
andrewboyson 59:309e78f243dd 46 PageAddLabelledOnOff(WIDTH, "Managed address", NdpManagedConfiguration);
andrewboyson 59:309e78f243dd 47 PageAddLabelledOnOff(WIDTH, "Other configuration", NdpOtherConfiguration);
andrewboyson 59:309e78f243dd 48 PageAddLabelledMac (WIDTH, "Router MAC", NdpRouterMac);
andrewboyson 59:309e78f243dd 49 PageAddLabelledInt (WIDTH, "Prefix length", NdpPrefixLength);
andrewboyson 59:309e78f243dd 50 PageAddLabelledOnOff(WIDTH, "Prefix flag L", NdpPrefixFlagL);
andrewboyson 59:309e78f243dd 51 PageAddLabelledOnOff(WIDTH, "Prefix flag A", NdpPrefixFlagA);
andrewboyson 59:309e78f243dd 52 PageAddLabelledInt (WIDTH, "Prefix valid secs", NdpPrefixValidLifetime);
andrewboyson 59:309e78f243dd 53 PageAddLabelledInt (WIDTH, "Prefix preferred secs", NdpPrefixPreferredLifetime);
andrewboyson 59:309e78f243dd 54 PageAddLabelledIp6 (WIDTH, "Prefix", NdpPrefix);
andrewboyson 59:309e78f243dd 55 PageAddLabelledInt (WIDTH, "DNS life secs", NdpDnsLifetime);
andrewboyson 59:309e78f243dd 56 PageAddLabelledIp6 (WIDTH, "DNS server", NdpDnsServer);
andrewboyson 59:309e78f243dd 57 PageAddLabelledInt (WIDTH, "Lease time", NdpGetLease());
andrewboyson 59:309e78f243dd 58 PageAddLabelledInt (WIDTH, "Elapsed", NdpGetElapsedLife());
andrewboyson 59:309e78f243dd 59 PageAddLabelledIp6 (WIDTH, "SLAAC", SlaacLinkLocalIp);
andrewboyson 59:309e78f243dd 60 PageAddLabelledInt (WIDTH, "MTU", NdpMtu);
andrewboyson 14:c3c43c8faf0e 61
andrewboyson 14:c3c43c8faf0e 62 PageAddH2("ARP 4"); HttpAddText("<code>"); Ar4SendHttp(); HttpAddText("</code>\r\n");
andrewboyson 14:c3c43c8faf0e 63 PageAddH2("DNS 4"); HttpAddText("<code>"); Nr4SendHttp(); HttpAddText("</code>\r\n");
andrewboyson 14:c3c43c8faf0e 64 PageAddH2("ARP 6"); HttpAddText("<code>"); Ar6SendHttp(); HttpAddText("</code>\r\n");
andrewboyson 14:c3c43c8faf0e 65 PageAddH2("DNS 6"); HttpAddText("<code>"); Nr6SendHttp(); HttpAddText("</code>\r\n");
andrewboyson 14:c3c43c8faf0e 66
andrewboyson 14:c3c43c8faf0e 67 PageAddEnd();
andrewboyson 14:c3c43c8faf0e 68
andrewboyson 14:c3c43c8faf0e 69 }