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
base/net-trace/web-trace-ajax.c@136:be1d42268b5d, 2020-04-02 (annotated)
- Committer:
- andrewboyson
- Date:
- Thu Apr 02 19:10:57 2020 +0000
- Revision:
- 136:be1d42268b5d
- Parent:
- 130:9a5b8fe308f1
- Child:
- 142:b472ba95b018
Modified the IPv4 and IPv6 pages to display the resolution indexes for cross referencing against the TCP page
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| andrewboyson | 103:91194cc19bbb | 1 | #include <stdint.h> |
| andrewboyson | 103:91194cc19bbb | 2 | |
| andrewboyson | 103:91194cc19bbb | 3 | #include "http.h" |
| andrewboyson | 103:91194cc19bbb | 4 | #include "log.h" |
| andrewboyson | 103:91194cc19bbb | 5 | #include "net.h" |
| andrewboyson | 103:91194cc19bbb | 6 | #include "link.h" |
| andrewboyson | 103:91194cc19bbb | 7 | #include "dns.h" |
| andrewboyson | 103:91194cc19bbb | 8 | #include "dnsname.h" |
| andrewboyson | 103:91194cc19bbb | 9 | #include "dnsquery.h" |
| andrewboyson | 103:91194cc19bbb | 10 | #include "dnsreply.h" |
| andrewboyson | 103:91194cc19bbb | 11 | #include "dnsserver.h" |
| andrewboyson | 103:91194cc19bbb | 12 | #include "ntp.h" |
| andrewboyson | 103:91194cc19bbb | 13 | #include "dhcp.h" |
| andrewboyson | 103:91194cc19bbb | 14 | #include "ns.h" |
| andrewboyson | 103:91194cc19bbb | 15 | #include "nr4.h" |
| andrewboyson | 103:91194cc19bbb | 16 | #include "nr6.h" |
| andrewboyson | 103:91194cc19bbb | 17 | #include "echo4.h" |
| andrewboyson | 103:91194cc19bbb | 18 | #include "echo6.h" |
| andrewboyson | 103:91194cc19bbb | 19 | #include "dest6.h" |
| andrewboyson | 103:91194cc19bbb | 20 | #include "ra.h" |
| andrewboyson | 103:91194cc19bbb | 21 | #include "rs.h" |
| andrewboyson | 103:91194cc19bbb | 22 | #include "ar4.h" |
| andrewboyson | 103:91194cc19bbb | 23 | #include "ar6.h" |
| andrewboyson | 103:91194cc19bbb | 24 | #include "arp.h" |
| andrewboyson | 103:91194cc19bbb | 25 | #include "ip4.h" |
| andrewboyson | 103:91194cc19bbb | 26 | #include "ip6.h" |
| andrewboyson | 103:91194cc19bbb | 27 | #include "udp.h" |
| andrewboyson | 103:91194cc19bbb | 28 | #include "tcp.h" |
| andrewboyson | 130:9a5b8fe308f1 | 29 | #include "web.h" |
| andrewboyson | 103:91194cc19bbb | 30 | #include "tftp.h" |
| andrewboyson | 103:91194cc19bbb | 31 | #include "ntpclient.h" |
| andrewboyson | 103:91194cc19bbb | 32 | |
| andrewboyson | 103:91194cc19bbb | 33 | void WebTraceAjax() |
| andrewboyson | 103:91194cc19bbb | 34 | { |
| andrewboyson | 103:91194cc19bbb | 35 | HttpOk("text/plain; charset=UTF-8", "no-cache", NULL, NULL); |
| andrewboyson | 103:91194cc19bbb | 36 | char nibble; |
| andrewboyson | 103:91194cc19bbb | 37 | |
| andrewboyson | 103:91194cc19bbb | 38 | nibble = 0; //0 |
| andrewboyson | 103:91194cc19bbb | 39 | if ( DnsSendRequestsViaIp4) nibble |= 2; |
| andrewboyson | 103:91194cc19bbb | 40 | if ( NtpClientQuerySendRequestsViaIp4) nibble |= 4; |
| andrewboyson | 103:91194cc19bbb | 41 | if (TftpSendRequestsViaIp4) nibble |= 8; |
| andrewboyson | 103:91194cc19bbb | 42 | HttpAddNibbleAsHex(nibble); |
| andrewboyson | 103:91194cc19bbb | 43 | |
| andrewboyson | 103:91194cc19bbb | 44 | HttpAddByteAsHex(NetTraceHost[0]); //1, 2 |
| andrewboyson | 103:91194cc19bbb | 45 | HttpAddByteAsHex(NetTraceHost[1]); //3, 4 |
| andrewboyson | 103:91194cc19bbb | 46 | |
| andrewboyson | 103:91194cc19bbb | 47 | nibble = 0; //5 |
| andrewboyson | 103:91194cc19bbb | 48 | if (NetTraceStack ) nibble |= 1; |
| andrewboyson | 103:91194cc19bbb | 49 | if (NetTraceNewLine ) nibble |= 2; |
| andrewboyson | 103:91194cc19bbb | 50 | if (NetTraceVerbose ) nibble |= 4; |
| andrewboyson | 103:91194cc19bbb | 51 | if (LinkTrace ) nibble |= 8; |
| andrewboyson | 103:91194cc19bbb | 52 | HttpAddNibbleAsHex(nibble); |
| andrewboyson | 103:91194cc19bbb | 53 | |
| andrewboyson | 103:91194cc19bbb | 54 | nibble = 0; //6 |
| andrewboyson | 103:91194cc19bbb | 55 | if (DnsNameTrace ) nibble |= 1; |
| andrewboyson | 103:91194cc19bbb | 56 | if (DnsQueryTrace ) nibble |= 2; |
| andrewboyson | 103:91194cc19bbb | 57 | if (DnsReplyTrace ) nibble |= 4; |
| andrewboyson | 103:91194cc19bbb | 58 | if (DnsServerTrace ) nibble |= 8; |
| andrewboyson | 103:91194cc19bbb | 59 | HttpAddNibbleAsHex(nibble); |
| andrewboyson | 103:91194cc19bbb | 60 | |
| andrewboyson | 103:91194cc19bbb | 61 | nibble = 0; //7 |
| andrewboyson | 103:91194cc19bbb | 62 | if (NtpTrace ) nibble |= 1; |
| andrewboyson | 103:91194cc19bbb | 63 | if (DhcpTrace ) nibble |= 2; |
| andrewboyson | 103:91194cc19bbb | 64 | if (NsTraceRecvSol ) nibble |= 4; |
| andrewboyson | 103:91194cc19bbb | 65 | if (NsTraceRecvAdv ) nibble |= 8; |
| andrewboyson | 103:91194cc19bbb | 66 | HttpAddNibbleAsHex(nibble); |
| andrewboyson | 103:91194cc19bbb | 67 | |
| andrewboyson | 103:91194cc19bbb | 68 | nibble = 0; //8 |
| andrewboyson | 103:91194cc19bbb | 69 | if (NsTraceSendSol ) nibble |= 1; |
| andrewboyson | 103:91194cc19bbb | 70 | if (Nr4Trace ) nibble |= 2; |
| andrewboyson | 103:91194cc19bbb | 71 | if (Nr6Trace ) nibble |= 4; |
| andrewboyson | 103:91194cc19bbb | 72 | if (NtpClientTrace ) nibble |= 8; |
| andrewboyson | 103:91194cc19bbb | 73 | HttpAddNibbleAsHex(nibble); |
| andrewboyson | 103:91194cc19bbb | 74 | |
| andrewboyson | 103:91194cc19bbb | 75 | nibble = 0; //9 |
| andrewboyson | 103:91194cc19bbb | 76 | if (Echo4Trace ) nibble |= 4; |
| andrewboyson | 103:91194cc19bbb | 77 | if (Echo6Trace ) nibble |= 8; |
| andrewboyson | 103:91194cc19bbb | 78 | HttpAddNibbleAsHex(nibble); |
| andrewboyson | 103:91194cc19bbb | 79 | |
| andrewboyson | 103:91194cc19bbb | 80 | nibble = 0; //10 |
| andrewboyson | 103:91194cc19bbb | 81 | if (Dest6Trace ) nibble |= 1; |
| andrewboyson | 103:91194cc19bbb | 82 | if (RaTrace ) nibble |= 2; |
| andrewboyson | 103:91194cc19bbb | 83 | if (RsTrace ) nibble |= 4; |
| andrewboyson | 103:91194cc19bbb | 84 | if (Ar4Trace ) nibble |= 8; |
| andrewboyson | 103:91194cc19bbb | 85 | HttpAddNibbleAsHex(nibble); |
| andrewboyson | 103:91194cc19bbb | 86 | |
| andrewboyson | 103:91194cc19bbb | 87 | nibble = 0; //11 |
| andrewboyson | 103:91194cc19bbb | 88 | if (Ar6Trace ) nibble |= 1; |
| andrewboyson | 103:91194cc19bbb | 89 | if (ArpTrace ) nibble |= 2; |
| andrewboyson | 103:91194cc19bbb | 90 | if (Ip4Trace ) nibble |= 4; |
| andrewboyson | 103:91194cc19bbb | 91 | if (Ip6Trace ) nibble |= 8; |
| andrewboyson | 103:91194cc19bbb | 92 | HttpAddNibbleAsHex(nibble); |
| andrewboyson | 103:91194cc19bbb | 93 | |
| andrewboyson | 103:91194cc19bbb | 94 | nibble = 0; //12 |
| andrewboyson | 103:91194cc19bbb | 95 | if (UdpTrace ) nibble |= 1; |
| andrewboyson | 103:91194cc19bbb | 96 | if (TcpTrace ) nibble |= 2; |
| andrewboyson | 130:9a5b8fe308f1 | 97 | if (WebTrace ) nibble |= 4; |
| andrewboyson | 103:91194cc19bbb | 98 | if (TftpTrace ) nibble |= 8; |
| andrewboyson | 103:91194cc19bbb | 99 | HttpAddNibbleAsHex(nibble); |
| andrewboyson | 103:91194cc19bbb | 100 | } |
| andrewboyson | 103:91194cc19bbb | 101 |