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
echo4.c
00001 #include <stdint.h> 00002 #include <stdbool.h> 00003 #include <string.h> 00004 00005 #include "log.h" 00006 #include "net.h" 00007 #include "action.h" 00008 00009 bool Echo4Trace = false; 00010 00011 int Echo4HandleRequest(void (*traceback)(void), uint8_t* pType, uint8_t* pCode, char* payloadRx, int sizeRx, char* payloadTx, int* pSizeTx) 00012 { 00013 if (Echo4Trace) 00014 { 00015 if (NetTraceNewLine) Log("\r\n"); 00016 LogTime("Echo4\r\n"); 00017 if (NetTraceStack) traceback(); 00018 } 00019 *pType = 0; 00020 *pCode = 0; 00021 *pSizeTx = sizeRx; 00022 memcpy(payloadTx, payloadRx, *pSizeTx); 00023 return ActionMakeFromDestAndTrace(UNICAST, Echo4Trace && NetTraceStack); 00024 }
Generated on Tue Jul 12 2022 18:53:40 by 1.7.2