Home
last modified time | relevance | path

Searched refs:fdt (Results 1 – 5 of 5) sorted by relevance

/tools/testing/selftests/net/
Dtxring_overwrite.c90 int fdt; in setup_tx() local
92 fdt = socket(PF_PACKET, SOCK_RAW, 0); in setup_tx()
93 if (fdt == -1) in setup_tx()
102 if (bind(fdt, (void *)&laddr, sizeof(laddr))) in setup_tx()
110 if (setsockopt(fdt, SOL_PACKET, PACKET_TX_RING, in setup_tx()
115 PROT_READ | PROT_WRITE, MAP_SHARED, fdt, 0); in setup_tx()
119 return fdt; in setup_tx()
122 static void send_pkt(int fdt, void *slot, char payload_char) in send_pkt() argument
135 ret = sendto(fdt, NULL, 0, 0, NULL, 0); in send_pkt()
162 int fdr, fdt, ret = 0; in main() local
[all …]
Dipv6_flowlabel.c216 int fdt, fdr; in main() local
228 fdt = socket(PF_INET6, SOCK_DGRAM, prot); in main()
229 if (fdt == -1) in main()
232 fdr = use_ping ? fdt : socket(PF_INET6, SOCK_DGRAM, 0); in main()
236 if (connect(fdt, (void *)&addr, sizeof(addr))) in main()
241 flowlabel_get(fdt, cfg_label, IPV6_FL_S_EXCL, IPV6_FL_F_CREATE); in main()
248 do_send(fdt, false, 0); in main()
252 do_send(fdt, false, 0); in main()
259 if (setsockopt(fdt, SOL_IPV6, IPV6_FLOWINFO_SEND, &one, in main()
265 do_send(fdt, true, cfg_label); in main()
[all …]
Dudpgso.c505 static void run_one(struct testcase *test, int fdt, int fdr, in run_one() argument
518 if (setsockopt(fdt, SOL_UDP, UDP_SEGMENT, &val, sizeof(val))) in run_one()
522 sent = send_one(fdt, test->tlen, test->gso_len, addr, alen); in run_one()
557 static void run_all(int fdt, int fdr, struct sockaddr *addr, socklen_t alen) in run_all() argument
567 run_one(test, fdt, fdr, addr, alen); in run_all()
574 int fdr, fdt, val; in run_test() local
587 fdt = socket(addr->sa_family, SOCK_DGRAM, 0); in run_test()
588 if (fdt == -1) in run_test()
592 set_pmtu_discover(fdt, addr->sa_family == AF_INET); in run_test()
595 set_device_mtu(fdt, CONST_MTU_TEST); in run_test()
[all …]
Dso_txtime.c73 static void do_send_one(int fdt, struct timed_send *ts) in do_send_one() argument
106 ret = sendmsg(fdt, &msg, 0); in do_send_one()
151 static int do_recv_errqueue_timeout(int fdt) in do_recv_errqueue_timeout() argument
176 ret = recvmsg(fdt, &msg, MSG_ERRQUEUE); in do_recv_errqueue_timeout()
226 static void recv_errqueue_msgs(int fdt) in recv_errqueue_msgs() argument
228 struct pollfd pfd = { .fd = fdt, .events = POLLERR }; in recv_errqueue_msgs()
238 num_tstamp += do_recv_errqueue_timeout(fdt); in recv_errqueue_msgs()
324 int fdt, i; in do_test_tx() local
330 fdt = setup_tx(addr, alen); in do_test_tx()
336 do_send_one(fdt, &cfg_buf[i]); in do_test_tx()
[all …]
/tools/testing/selftests/bpf/
Dtest_flow_dissector.c514 int fdt = -1, fdr = -1, len, tx = 0, rx = 0; in do_main() local
519 fdt = setup_tx(); in do_main()
529 tx += do_tx(fdt, buf, len); in do_main()
567 if (fdt != -1 && close(fdt)) in do_main()