ReactOS  0.4.15-dev-2956-g61e7ea5
Go to the documentation of this file.
1 #ifndef __TCP_HELPER_H__
2 #define __TCP_HELPER_H__
4 #include "../lwip_check.h"
5 #include "lwip/arch.h"
6 #include "lwip/tcp.h"
7 #include "lwip/netif.h"
9 /* counters used for test_tcp_counters_* callback functions */
20 };
26  struct pbuf *tx_packets;
27 };
29 /* Helper functions */
30 void tcp_remove_all(void);
32 struct pbuf* tcp_create_segment(ip_addr_t* src_ip, ip_addr_t* dst_ip,
33  u16_t src_port, u16_t dst_port, void* data, size_t data_len,
34  u32_t seqno, u32_t ackno, u8_t headerflags);
35 struct pbuf* tcp_create_rx_segment(struct tcp_pcb* pcb, void* data, size_t data_len,
36  u32_t seqno_offset, u32_t ackno_offset, u8_t headerflags);
37 struct pbuf* tcp_create_rx_segment_wnd(struct tcp_pcb* pcb, void* data, size_t data_len,
38  u32_t seqno_offset, u32_t ackno_offset, u8_t headerflags, u16_t wnd);
39 void tcp_set_state(struct tcp_pcb* pcb, enum tcp_state state, ip_addr_t* local_ip,
40  ip_addr_t* remote_ip, u16_t local_port, u16_t remote_port);
41 void test_tcp_counters_err(void* arg, err_t err);
42 err_t test_tcp_counters_recv(void* arg, struct tcp_pcb* pcb, struct pbuf* p, err_t err);
46 void test_tcp_input(struct pbuf *p, struct netif *inp);
48 void test_tcp_init_netif(struct netif *netif, struct test_tcp_txcounters *txcounters,
49  ip_addr_t *ip_addr, ip_addr_t *netmask);
52 #endif
struct pbuf * tx_packets
Definition: tcp_helper.h:26
u32_t recved_bytes_after_close
Definition: tcp_helper.h:14
GLint GLint GLsizei GLuint * counters
Definition: glext.h:11114
typedefPACK_STRUCT_END struct ip_addr ip_addr_t
Definition: ip_addr.h:64
void test_tcp_init_netif(struct netif *netif, struct test_tcp_txcounters *txcounters, ip_addr_t *ip_addr, ip_addr_t *netmask)
Definition: tcp_helper.c:283
struct pbuf * tcp_create_segment(ip_addr_t *src_ip, ip_addr_t *dst_ip, u16_t src_port, u16_t dst_port, void *data, size_t data_len, u32_t seqno, u32_t ackno, u8_t headerflags)
Definition: tcp_helper.c:105
void test_tcp_counters_err(void *arg, err_t err)
Definition: tcp_helper.c:167
u32_t recv_calls_after_close
Definition: tcp_helper.h:13
s8_t err_t
Definition: err.h:47
struct pbuf * tcp_create_rx_segment_wnd(struct tcp_pcb *pcb, void *data, size_t data_len, u32_t seqno_offset, u32_t ackno_offset, u8_t headerflags, u16_t wnd)
Definition: tcp_helper.c:130
Definition: pbuf.h:79
unsigned long u32_t
Definition: cc.h:25
Definition: netif.h:136
void tcp_remove_all(void)
Definition: tcp_helper.c:28
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
err_t test_tcp_counters_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err)
Definition: tcp_helper.c:197
void tcp_set_state(struct tcp_pcb *pcb, enum tcp_state state, ip_addr_t *local_ip, ip_addr_t *remote_ip, u16_t local_port, u16_t remote_port)
Definition: tcp_helper.c:139
static int state
Definition: maze.c:121
#define err(...)
struct pbuf * tcp_create_rx_segment(struct tcp_pcb *pcb, void *data, size_t data_len, u32_t seqno_offset, u32_t ackno_offset, u8_t headerflags)
Definition: tcp_helper.c:118
u32_t expected_data_len
Definition: tcp_helper.h:19
void test_tcp_input(struct pbuf *p, struct netif *inp)
Definition: tcp_helper.c:238
unsigned char u8_t
Definition: cc.h:23
char * expected_data
Definition: tcp_helper.h:18
unsigned short u16_t
Definition: cc.h:24
GLfloat GLfloat p
Definition: glext.h:8902
struct tcp_pcb * test_tcp_new_counters_pcb(struct test_tcp_counters *counters)
Definition: tcp_helper.c:223