#include typedef struct tcb { uint32_t seq; uint32_t ack; uint16_t sport; // the "socket quad" uint16_t dport; in_addr_t saddr; in_addr_t daddr; int state; // from netinet/tcp.h uint32_t window; // including scaling uint8_t window_scale; // as specified in SYN, as per RFC 1232 pkt_t *first_unacked; pkt_t *last_sent; int payload_fd; // fd of the payload file int payload_started; // helper state } tcb_t;