uc-sdk
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
tcp_helper.h
Go to the documentation of this file.
1
#ifndef __TCP_HELPER_H__
2
#define __TCP_HELPER_H__
3
4
#include "../lwip_check.h"
5
#include "
lwip/arch.h
"
6
#include "
lwip/tcp.h
"
7
8
/* counters used for test_tcp_counters_* callback functions */
9
struct
test_tcp_counters
{
10
u32_t
recv_calls
;
11
u32_t
recved_bytes
;
12
u32_t
recv_calls_after_close
;
13
u32_t
recved_bytes_after_close
;
14
u32_t
close_calls
;
15
u32_t
err_calls
;
16
err_t
last_err
;
17
char
*
expected_data
;
18
u32_t
expected_data_len
;
19
};
20
21
/* Helper functions */
22
void
tcp_remove_all
(
void
);
23
24
struct
pbuf
*
tcp_create_segment
(
ip_addr_t
* src_ip,
ip_addr_t
* dst_ip,
25
u16_t
src_port,
u16_t
dst_port,
void
* data,
size_t
data_len,
26
u32_t
seqno,
u32_t
ackno,
u8_t
headerflags);
27
struct
pbuf
*
tcp_create_rx_segment
(
struct
tcp_pcb* pcb,
void
* data,
size_t
data_len,
28
u32_t
seqno_offset,
u32_t
ackno_offset,
u8_t
headerflags);
29
void
tcp_set_state
(
struct
tcp_pcb* pcb,
enum
tcp_state state,
ip_addr_t
* local_ip,
30
ip_addr_t
* remote_ip,
u16_t
local_port,
u16_t
remote_port);
31
void
test_tcp_counters_err
(
void
* arg,
err_t
err);
32
err_t
test_tcp_counters_recv
(
void
* arg,
struct
tcp_pcb* pcb,
struct
pbuf
* p,
err_t
err);
33
34
struct
tcp_pcb*
test_tcp_new_counters_pcb
(
struct
test_tcp_counters
* counters);
35
36
#endif
lwip
test
unit
tcp
tcp_helper.h
Generated on Fri Nov 15 2013 05:00:23 for uc-sdk by
1.8.4