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

tcp/tcp.h

Committer:
andrewboyson
Date:
2018-10-20
Revision:
71:736a5747ade1
Parent:
61:aad055f1b0d1
Child:
73:43e3d7fb3d60

File content as of revision 71:736a5747ade1:

#include <stdint.h>
#include <stdbool.h>

extern bool TcpTrace;

extern int  TcpHandleReceivedPacket(void (*traceback)(void), int sizeRx, void* pPacketRx, int* pSizeTx, void* pPacketTx, int type, void* pCachedRemIp);
extern int  TcpPollForPacketToSend(int* pSize, void* pPacket, int type, void* pCachedRemIp);

extern void TcpLogHeader(uint16_t calculatedChecksum);

extern void TcpMakeHeader(int size, void* pPacket);
extern void TcpAddChecksum(void*pPacket, uint16_t checksum);