21 #include "../test_params.h" 22 #include "mbed_trace.h" 24 #define TRACE_GROUP "GRNT" 27 void drop_bad_packets(
TCPSocket &sock,
int orig_timeout);
28 nsapi_version_t get_ip_version();
29 void fill_tx_buffer_ascii(
char *buff,
size_t len);
32 bool is_tcp_supported();
34 #define SKIP_IF_TCP_UNSUPPORTED() \ 35 if (!is_tcp_supported()) { \ 36 TEST_SKIP_MESSAGE("TCP not supported"); \ 39 #if MBED_CONF_NSAPI_SOCKET_STATS_ENABLED 41 int fetch_stats(
void);
47 int split2half_rmng_tcp_test_time();
50 #ifdef MBED_GREENTEA_TEST_TCPSOCKET_TIMEOUT_S 51 static const int TESTS_TIMEOUT = MBED_GREENTEA_TEST_TCPSOCKET_TIMEOUT_S;
55 #if MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == MESH && MBED_CONF_NSAPI_DEFAULT_MESH_TYPE == WISUN 56 static const int TESTS_TIMEOUT = (25 * 60);
58 static const int TESTS_TIMEOUT = (10 * 60);
62 static const int TCP_OS_STACK_SIZE = 2048;
64 static const int RX_BUFF_SIZE = 1220;
65 static const int TX_BUFF_SIZE = 1220;
67 extern char rx_buffer[RX_BUFF_SIZE];
68 extern char tx_buffer[TX_BUFF_SIZE];
74 void TCPSOCKET_CONNECT_INVALID();
75 void TCPSOCKET_ECHOTEST();
76 void TCPSOCKET_ECHOTEST_NONBLOCK();
77 void TCPSOCKET_ECHOTEST_BURST();
78 void TCPSOCKET_ECHOTEST_BURST_NONBLOCK();
79 void TCPSOCKET_ENDPOINT_CLOSE();
80 void TCPSOCKET_OPEN_DESTRUCT();
81 void TCPSOCKET_OPEN_CLOSE_REPEAT();
82 void TCPSOCKET_OPEN_LIMIT();
83 void TCPSOCKET_OPEN_TWICE();
84 void TCPSOCKET_BIND_PORT();
85 void TCPSOCKET_BIND_PORT_FAIL();
86 void TCPSOCKET_BIND_ADDRESS_PORT();
87 void TCPSOCKET_BIND_ADDRESS_NULL();
88 void TCPSOCKET_BIND_ADDRESS_INVALID();
89 void TCPSOCKET_BIND_ADDRESS();
90 void TCPSOCKET_BIND_WRONG_TYPE();
91 void TCPSOCKET_BIND_UNOPENED();
92 void TCPSOCKET_RECV_100K();
93 void TCPSOCKET_RECV_100K_NONBLOCK();
94 void TCPSOCKET_RECV_TIMEOUT();
95 void TCPSOCKET_SEND_REPEAT();
96 void TCPSOCKET_SEND_TIMEOUT();
97 void TCPSOCKET_THREAD_PER_SOCKET_SAFETY();
98 void TCPSOCKET_SETSOCKOPT_KEEPALIVE_VALID();
signed int nsapi_error_t
Type used to represent error codes.
Common interface that is shared between network devices.
Structure to parse socket statistics.