Tools/NetTest - TCP stack testing, going well
[tpg/acess2.git] / Tools / NetTest_Runner / include / tcp.h
1 /*
2  * tcp.h
3  * - TCP Test Wrapper
4  */
5 #ifndef _TCP_H_
6 #define _TCP_H_
7
8 #include <stdbool.h>
9 #include <stdint.h>
10 #include <stddef.h>
11
12 #define TCP_FIN 0x01
13 #define TCP_SYN 0x02
14 #define TCP_RST 0x04
15 #define TCP_PSH 0x08
16 #define TCP_ACK 0x10
17 #define TCP_URG 0x20
18
19 extern void     TCP_Send(int IF, int AF, const void *IP, short sport, short dport, uint32_t seq, uint32_t ack, uint8_t flags, uint16_t window, size_t data_len, const void *data);
20
21
22 // The following skip the next check of each field
23 extern void     TCP_SkipCheck_Seq(bool Skip);
24
25 extern bool     TCP_Pkt_Check(size_t len, const void *data, size_t *ofs, int AF, const void *IP, short sport, short dport, uint32_t seq, uint32_t ack, uint8_t flags);
26
27 // - Get a field from a previously validated packet
28 extern uint32_t TCP_Pkt_GetSeq(size_t len, const void *data, int AF);
29
30 #endif
31

UCC git Repository :: git.ucc.asn.au