Lines Matching refs:txcounters
126 struct test_tcp_txcounters txcounters;
145 test_tcp_init_netif(&netif, &txcounters, &local_ip, &netmask);
161 EXPECT_RET(txcounters.num_tx_calls == 1);
162 EXPECT_RET(txcounters.num_tx_bytes == sizeof(data1) + sizeof(struct tcp_hdr) + sizeof(struct ip_hdr));
163 memset(&txcounters, 0, sizeof(txcounters));
168 EXPECT_RET(txcounters.num_tx_calls == 0);
175 EXPECT_RET(txcounters.num_tx_calls == 1);
176 EXPECT_RET(txcounters.num_tx_bytes == sizeof(data2) + sizeof(struct tcp_hdr) + sizeof(struct ip_hdr));
177 memset(&txcounters, 0, sizeof(txcounters));
182 EXPECT_RET(txcounters.num_tx_calls == 0);
190 EXPECT_RET(txcounters.num_tx_calls == 0);
191 EXPECT_RET(txcounters.num_tx_bytes == 0);
192 memset(&txcounters, 0, sizeof(txcounters));
197 EXPECT_RET(txcounters.num_tx_calls == 0);
206 /*EXPECT_RET(txcounters.num_tx_calls == 1);*/
208 memset(&txcounters, 0, sizeof(txcounters));
216 EXPECT_RET(txcounters.num_tx_calls == 0);
217 EXPECT_RET(txcounters.num_tx_bytes == 0);
218 memset(&txcounters, 0, sizeof(txcounters));
230 /*EXPECT_RET(txcounters.num_tx_calls == 0);
231 EXPECT_RET(txcounters.num_tx_bytes == 0);*/
232 memset(&txcounters, 0, sizeof(txcounters));
259 /*EXPECT_RET(txcounters.num_tx_calls == 0);*/
313 struct test_tcp_txcounters txcounters;
340 test_tcp_init_netif(&netif, &txcounters, &local_ip, &netmask);
362 EXPECT(txcounters.num_tx_calls == 2);
363 EXPECT(txcounters.num_tx_bytes == 2 * (TCP_MSS + 40U));
364 memset(&txcounters, 0, sizeof(txcounters));
373 EXPECT(txcounters.num_tx_calls == 1);
374 EXPECT(txcounters.num_tx_bytes == TCP_MSS + 40U);
375 memset(&txcounters, 0, sizeof(txcounters));
383 EXPECT(txcounters.num_tx_calls == 0);
387 EXPECT(txcounters.num_tx_calls == 0);
393 EXPECT(txcounters.num_tx_calls == 4);
394 memset(&txcounters, 0, sizeof(txcounters));
411 struct test_tcp_txcounters txcounters;
437 test_tcp_init_netif(&netif, &txcounters, &local_ip, &netmask);
461 EXPECT(txcounters.num_tx_calls == 2);
462 EXPECT(txcounters.num_tx_bytes == 2 * (TCP_MSS + 40U));
463 memset(&txcounters, 0, sizeof(txcounters));
471 EXPECT(txcounters.num_tx_calls == 0);
475 EXPECT(txcounters.num_tx_calls == 1);
500 struct test_tcp_txcounters txcounters;
527 test_tcp_init_netif(&netif, &txcounters, &local_ip, &netmask);
529 memset(&txcounters, 0, sizeof(txcounters));
547 EXPECT(txcounters.num_tx_calls == 1);
548 EXPECT(txcounters.num_tx_bytes == initial_data_len + 40U);
549 memset(&txcounters, 0, sizeof(txcounters));
557 EXPECT(txcounters.num_tx_calls == 1);
558 EXPECT(txcounters.num_tx_bytes == TCP_MSS + 40U);
559 memset(&txcounters, 0, sizeof(txcounters));
567 EXPECT(txcounters.num_tx_calls == 0);
568 EXPECT(txcounters.num_tx_bytes == 0);
577 EXPECT(txcounters.num_tx_calls == 1);
578 EXPECT(txcounters.num_tx_bytes == TCP_MSS + 40U);
579 memset(&txcounters, 0, sizeof(txcounters));
587 EXPECT(txcounters.num_tx_calls == 0);
588 EXPECT(txcounters.num_tx_bytes == 0);
597 EXPECT(txcounters.num_tx_calls == 0);
598 EXPECT(txcounters.num_tx_bytes == 0);
599 memset(&txcounters, 0, sizeof(txcounters));
609 EXPECT(txcounters.num_tx_calls == 0);
610 EXPECT(txcounters.num_tx_bytes == 0);
614 txcounters.copy_tx_packets = 1;
616 txcounters.copy_tx_packets = 0;
617 EXPECT(txcounters.num_tx_calls == 1);
618 EXPECT(txcounters.num_tx_bytes == 1 + 40U);
619 EXPECT(txcounters.tx_packets != NULL);
620 if (txcounters.tx_packets != NULL) {
623 ret = pbuf_copy_partial(txcounters.tx_packets, &sent, 1, 40U);
627 if (txcounters.tx_packets != NULL) {
628 pbuf_free(txcounters.tx_packets);
629 txcounters.tx_packets = NULL;