Wiesner András 51696f7341 - MemoryPool allocation-deallocation bug fixed
- generic Queue implemented
- PacketRegistry allocation bug fixed
- TCP implementation initials
- ALIGN to type macros added
2023-01-17 08:19:29 +01:00

27 lines
694 B
C

#ifndef ETHERLIB_TEST_TCP_WINDOW_H
#define ETHERLIB_TEST_TCP_WINDOW_H
#include <stdint.h>
#include "etherlib/memory_pool.h"
/**
* TCP segment descriptor
*/
typedef struct {
uint32_t seqNum; ///< sequence number (sequence number of the first octet)
uint32_t size; ///< segment size
uint8_t data[]; ///< Segment data
} TcpWindowSegment;
typedef struct {
bool ackAvail; ///< acknowledge is available
uint32_t seqNum; ///< Sequence number
uint32_t lastAcked; ///< last acknowledged byte
MP pool; ///< Pool for segment management
uint8_t data[]; ///< Window data storage
} TcpWindow;
TcpWindow * tcpw_create(uint32_t size);
#endif //ETHERLIB_TEST_TCP_WINDOW_H