7 #if !LWIP_STATS || !TCP_STATS || !MEMP_STATS
8 #error "This tests needs TCP- and MEMP-statistics enabled"
34 fail_unless(lwip_stats.memp[MEMP_TCP_PCB].used == 0);
37 fail_unless(pcb !=
NULL);
39 fail_unless(lwip_stats.memp[MEMP_TCP_PCB].used == 1);
41 fail_unless(lwip_stats.memp[MEMP_TCP_PCB].used == 0);
52 char data[] = {1, 2, 3, 4};
55 u16_t remote_port = 0x100, local_port = 0x101;
60 memset(&netif, 0,
sizeof(netif));
62 IP4_ADDR(&remote_ip, 192, 168, 1, 2);
63 data_len =
sizeof(data);
65 memset(&counters, 0,
sizeof(counters));
72 tcp_set_state(pcb, ESTABLISHED, &local_ip, &remote_ip, local_port, remote_port);
88 EXPECT(lwip_stats.memp[MEMP_TCP_PCB].used == 1);
90 EXPECT(lwip_stats.memp[MEMP_TCP_PCB].used == 0);
103 return create_suite(
"TCP", tests,
sizeof(tests)/
sizeof(TFun), tcp_setup, tcp_teardown);