A stack which works with or without an Mbed os library. Provides IPv4 or IPv6 with a full 1500 byte buffer.
Dependents: oldheating gps motorhome heating
ip4/icmp/echo4.c@200:5acbc41bf469, 2021-05-20 (annotated)
- Committer:
- andrewboyson
- Date:
- Thu May 20 14:32:52 2021 +0000
- Revision:
- 200:5acbc41bf469
- Parent:
- 61:aad055f1b0d1
Increased number of arp entries from 20 to 30 to accommodate the number of WIZ devices plus a few incoming port 80 calls from the internet.
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 Echo4Trace = false; |
andrewboyson | 43:bc028d5a6424 | 10 | |
andrewboyson | 59:e0e556c8bd46 | 11 | int Echo4HandleRequest(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 (Echo4Trace) |
andrewboyson | 43:bc028d5a6424 | 14 | { |
andrewboyson | 43:bc028d5a6424 | 15 | if (NetTraceNewLine) Log("\r\n"); |
andrewboyson | 43:bc028d5a6424 | 16 | LogTime("Echo4\r\n"); |
andrewboyson | 43:bc028d5a6424 | 17 | if (NetTraceStack) traceback(); |
andrewboyson | 43:bc028d5a6424 | 18 | } |
andrewboyson | 43:bc028d5a6424 | 19 | *pType = 0; |
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, Echo4Trace && NetTraceStack); |
andrewboyson | 43:bc028d5a6424 | 24 | } |