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.
Dependencies: mbed
Fork of webserverBlinky by
Diff: main.cpp
- Revision:
- 27:78d194dd8799
- Parent:
- 26:11f4eb2663a7
- Child:
- 28:1aa629be05e7
diff -r 11f4eb2663a7 -r 78d194dd8799 main.cpp --- a/main.cpp Tue Jan 03 02:54:53 2017 +0000 +++ b/main.cpp Tue Jan 03 03:19:47 2017 +0000 @@ -433,7 +433,11 @@ int ipHeaderLen = (ppp.pkt.buf[4]&0xf)*4; // length of ip header int tcpHeaderLen = ((ppp.pkt.buf[4+ipHeaderLen+12]>>4)&0xf)*4;; // length of tcp header int dataLen = ipPktLen - ipHeaderLen - tcpHeaderLen; // data is what's left after the two headers - debug(("TCP %d ipHeader %d tcpHeader %d Data %d\n", ipPktLen, ipHeaderLen, tcpHeaderLen, dataLen)); + //debug(("TCP %d ipHeader %d tcpHeader %d Data %d\n", ipPktLen, ipHeaderLen, tcpHeaderLen, dataLen)); + if (dataLen > 0) { + debug(("%s\n",ppp.pkt.buf+4+ipHeaderLen+tcpHeaderLen)); + } + } void TCPpacket(){ @@ -465,7 +469,7 @@ char dstIP [16]; snprintf(dstIP,16, "%d.%d.%d.%d", dstAdr[0],dstAdr[1],dstAdr[2],dstAdr[3]); debug(("IP %s %s v%d h%d d%d e%d L%d ",srcIP,dstIP,versionIP,headerSizeIP,dscpIP,ecnIP,packetLength)); debug(("i%04x f%d t%d p%d C%04x\n",identIP,flagsIP,ttlIP,protocolIP,checksumIP)); - dumpHeaderTCP(); + //dumpHeaderTCP(); dumpDataTCP(); tcpHandler(); }