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@39:04f4080eee71, 2019-01-25 (annotated)
- Committer:
- andrewboyson
- Date:
- Fri Jan 25 17:38:24 2019 +0000
- Revision:
- 39:04f4080eee71
- Parent:
- 30:6a08abbe6301
- Child:
- 41:b62b2b46f530
Updated net library
Who changed what in which revision?
| User | Revision | Line number | New 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 | 14:c3c43c8faf0e | 27 | PageAddLabelledMac ("MAC", WIDTH, MacLocal); |
| andrewboyson | 14:c3c43c8faf0e | 28 | |
| andrewboyson | 14:c3c43c8faf0e | 29 | PageAddH2("IP4 DHCP"); |
| andrewboyson | 14:c3c43c8faf0e | 30 | PageAddLabelledIp4 ("IP4 address", WIDTH, DhcpLocalIp); |
| andrewboyson | 14:c3c43c8faf0e | 31 | PageAddLabelledValue("Domain", WIDTH, DhcpDomainName); |
| andrewboyson | 14:c3c43c8faf0e | 32 | PageAddLabelledValue("Host name", WIDTH, DhcpHostName); |
| andrewboyson | 39:04f4080eee71 | 33 | PageAddLabelledIp4 ("NTP server", WIDTH, DhcpNtpIp); |
| andrewboyson | 39:04f4080eee71 | 34 | PageAddLabelledIp4 ("DNS server", WIDTH, DhcpDnsServerIp); |
| andrewboyson | 39:04f4080eee71 | 35 | PageAddLabelledIp4 ("DHCP server", WIDTH, DhcpServerIp); |
| andrewboyson | 39:04f4080eee71 | 36 | PageAddLabelledIp4 ("Router", WIDTH, DhcpRouterIp); |
| andrewboyson | 14:c3c43c8faf0e | 37 | PageAddLabelledIp4 ("Subnet mask", WIDTH, DhcpSubnetMask); |
| andrewboyson | 14:c3c43c8faf0e | 38 | PageAddLabelledIp4 ("Broadcast IP", WIDTH, DhcpBroadcastIp); |
| andrewboyson | 14:c3c43c8faf0e | 39 | PageAddLabelledInt ("Lease time IP", WIDTH, DhcpLeaseTime); |
| andrewboyson | 14:c3c43c8faf0e | 40 | PageAddLabelledInt ("Renewal T1", WIDTH, DhcpRenewalT1); |
| andrewboyson | 14:c3c43c8faf0e | 41 | PageAddLabelledInt ("Renewal T2", WIDTH, DhcpRenewalT2); |
| andrewboyson | 14:c3c43c8faf0e | 42 | PageAddLabelledInt ("Elapsed", WIDTH, DhcpGetElapsedLife()); |
| andrewboyson | 14:c3c43c8faf0e | 43 | |
| andrewboyson | 14:c3c43c8faf0e | 44 | PageAddH2("IP6 NDP"); |
| andrewboyson | 14:c3c43c8faf0e | 45 | PageAddLabelledInt ("Hop limit", WIDTH, NdpHopLimit); |
| andrewboyson | 14:c3c43c8faf0e | 46 | PageAddLabelledOnOff("Managed address", WIDTH, NdpManagedConfiguration); |
| andrewboyson | 14:c3c43c8faf0e | 47 | PageAddLabelledOnOff("Other configuration", WIDTH, NdpOtherConfiguration); |
| andrewboyson | 14:c3c43c8faf0e | 48 | PageAddLabelledMac ("Router MAC", WIDTH, NdpRouterMac); |
| andrewboyson | 14:c3c43c8faf0e | 49 | PageAddLabelledInt ("Prefix length", WIDTH, NdpPrefixLength); |
| andrewboyson | 14:c3c43c8faf0e | 50 | PageAddLabelledOnOff("Prefix flag L", WIDTH, NdpPrefixFlagL); |
| andrewboyson | 14:c3c43c8faf0e | 51 | PageAddLabelledOnOff("Prefix flag A", WIDTH, NdpPrefixFlagA); |
| andrewboyson | 14:c3c43c8faf0e | 52 | PageAddLabelledInt ("Prefix valid secs", WIDTH, NdpPrefixValidLifetime); |
| andrewboyson | 14:c3c43c8faf0e | 53 | PageAddLabelledInt ("Prefix preferred secs", WIDTH, NdpPrefixPreferredLifetime); |
| andrewboyson | 14:c3c43c8faf0e | 54 | PageAddLabelledIp6 ("Prefix", WIDTH, NdpPrefix); |
| andrewboyson | 14:c3c43c8faf0e | 55 | PageAddLabelledInt ("DNS life secs", WIDTH, NdpDnsLifetime); |
| andrewboyson | 14:c3c43c8faf0e | 56 | PageAddLabelledIp6 ("DNS server", WIDTH, NdpDnsServer); |
| andrewboyson | 14:c3c43c8faf0e | 57 | PageAddLabelledInt ("Lease time", WIDTH, NdpLifetime); |
| andrewboyson | 14:c3c43c8faf0e | 58 | PageAddLabelledInt ("Elapsed", WIDTH, NdpGetElapsedLife()); |
| andrewboyson | 14:c3c43c8faf0e | 59 | PageAddLabelledIp6 ("SLAAC", WIDTH, SlaacLinkLocalIp); |
| andrewboyson | 14:c3c43c8faf0e | 60 | PageAddLabelledInt ("MTU", WIDTH, 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 | } |