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
Diff: ip4/udptcp4.c
- Revision:
- 97:d91f7db00235
- Parent:
- 96:43eb7a110f1a
- Child:
- 98:b977424ec7f7
diff -r 43eb7a110f1a -r d91f7db00235 ip4/udptcp4.c --- a/ip4/udptcp4.c Sat Dec 29 19:03:50 2018 +0000 +++ b/ip4/udptcp4.c Wed Jan 02 17:48:38 2019 +0000 @@ -1,11 +1,11 @@ #include <stdint.h> -#include "log.h" -#include "net.h" -#include "action.h" -#include "dhcp.h" -#include "eth.h" -#include "ip.h" +#include "log.h" +#include "net.h" +#include "action.h" +#include "dhcp.h" +#include "eth.h" +#include "ip.h" #include "ip4addr.h" #include "tcp.h" #include "tcprecv.h" @@ -14,6 +14,7 @@ #include "udp.h" #include "ar4.h" #include "led.h" +#include "fault.h" static uint16_t calculateChecksum(uint8_t pro, uint32_t srcIp, uint32_t dstIp, int size, void* pPacket) { @@ -79,7 +80,9 @@ } } int Tcp4HandleReceivedPacket(void (*traceback)(void), void* pPacketRx, int sizeRx, void* pPacketTx, int* pSizeTx, uint32_t* pSrcIp, uint32_t* pDstIp, int remArIndex) -{ +{ + FaultPoint = FAULT_POINT_Tcp4HandleReceivedPacket; + pTraceBack = traceback; tracePacketProtocol = TCP; calculatedChecksum = calculateChecksum(TCP, *pSrcIp, *pDstIp, sizeRx, pPacketRx); @@ -90,6 +93,7 @@ finalisePacket(TCP, action, pPacketTx, *pSizeTx, pSrcIp, pDstIp); + FaultPoint = 0; return action; }