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
ip6/icmp/echo6.c@94:e2973a2c488e, 2018-12-05 (annotated)
- Committer:
- andrewboyson
- Date:
- Wed Dec 05 18:30:37 2018 +0000
- Revision:
- 94:e2973a2c488e
- Parent:
- 61:aad055f1b0d1
Fixed bug - incorrect MSS being sent from a polled sync: expected 1440 but had -60. Traced to buffer datalength in EthPollForPacketToSend being set to zero instead of being calculated from the buffer length - headersize.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| andrewboyson | 61:aad055f1b0d1 | 1 | #include <stdint.h> |
| andrewboyson | 61:aad055f1b0d1 | 2 | #include <stdbool.h> |
| andrewboyson | 61:aad055f1b0d1 | 3 | #include <string.h> |
| andrewboyson | 61:aad055f1b0d1 | 4 | |
| andrewboyson | 43:bc028d5a6424 | 5 | #include "log.h" |
| andrewboyson | 43:bc028d5a6424 | 6 | #include "net.h" |
| andrewboyson | 43:bc028d5a6424 | 7 | #include "action.h" |
| andrewboyson | 43:bc028d5a6424 | 8 | |
| andrewboyson | 43:bc028d5a6424 | 9 | bool Echo6Trace = false; |
| andrewboyson | 43:bc028d5a6424 | 10 | |
| andrewboyson | 59:e0e556c8bd46 | 11 | int Echo6HandleRequest(void (*traceback)(void), uint8_t* pType, uint8_t* pCode, char* payloadRx, int sizeRx, char* payloadTx, int* pSizeTx) |
| andrewboyson | 43:bc028d5a6424 | 12 | { |
| andrewboyson | 43:bc028d5a6424 | 13 | if (Echo6Trace) |
| andrewboyson | 43:bc028d5a6424 | 14 | { |
| andrewboyson | 43:bc028d5a6424 | 15 | if (NetTraceNewLine) Log("\r\n"); |
| andrewboyson | 43:bc028d5a6424 | 16 | LogTime("Echo6\r\n"); |
| andrewboyson | 43:bc028d5a6424 | 17 | if (NetTraceStack) traceback(); |
| andrewboyson | 43:bc028d5a6424 | 18 | } |
| andrewboyson | 43:bc028d5a6424 | 19 | *pType = 129; |
| andrewboyson | 43:bc028d5a6424 | 20 | *pCode = 0; |
| andrewboyson | 59:e0e556c8bd46 | 21 | *pSizeTx = sizeRx; |
| andrewboyson | 59:e0e556c8bd46 | 22 | memcpy(payloadTx, payloadRx, *pSizeTx); |
| andrewboyson | 43:bc028d5a6424 | 23 | return ActionMakeFromDestAndTrace(UNICAST, Echo6Trace && NetTraceStack); |
| andrewboyson | 43:bc028d5a6424 | 24 | } |