Home
last modified time | relevance | path

Searched refs:listen_sock (Results 1 – 3 of 3) sorted by relevance

/third_party/ltp/testcases/kernel/syscalls/send/
Dsend02.c25 static int sock = -1, dst_sock = -1, listen_sock = -1; variable
118 if (dst_sock >= 0 && dst_sock != listen_sock) in cleanup()
121 if (listen_sock >= 0) in cleanup()
122 SAFE_CLOSE(listen_sock); in cleanup()
134 listen_sock = SAFE_SOCKET(tc->domain, tc->type, tc->protocol); in run()
135 dst_sock = listen_sock; in run()
136 SAFE_BIND(listen_sock, (struct sockaddr *)&addr, sizeof(addr)); in run()
137 SAFE_GETSOCKNAME(listen_sock, (struct sockaddr *)&addr, &len); in run()
140 SAFE_LISTEN(listen_sock, 1); in run()
149 dst_sock = SAFE_ACCEPT(listen_sock, NULL, NULL); in run()
[all …]
/third_party/ltp/testcases/kernel/syscalls/bind/
Dbind04.c111 int listen_sock, sock, size; in test_bind() local
118 listen_sock = SAFE_SOCKET(tc->address->sa_family, tc->type, in test_bind()
121 TST_EXP_PASS_SILENT(bind(listen_sock, tc->address, tc->addrlen), "bind()"); in test_bind()
124 SAFE_CLOSE(listen_sock); in test_bind()
133 tc_copy.addrlen = tst_get_connect_address(listen_sock, &listen_addr); in test_bind()
136 SAFE_LISTEN(listen_sock, 1); in test_bind()
138 sock = SAFE_ACCEPT(listen_sock, (struct sockaddr *)&remote_addr, in test_bind()
155 SAFE_CLOSE(listen_sock); in test_bind()
/third_party/rust/crates/rustix/tests/io/
Depoll.rs17 let listen_sock = socket(AddressFamily::INET, SocketType::STREAM, Protocol::default()).unwrap(); in server() localVariable
18 bind_v4(&listen_sock, &SocketAddrV4::new(Ipv4Addr::LOCALHOST, 0)).unwrap(); in server()
19 listen(&listen_sock, 1).unwrap(); in server()
21 let who = match getsockname(&listen_sock).unwrap() { in server()
41 let raw_listen_sock = listen_sock.as_fd().as_raw_fd(); in server()
42 epoll.add(listen_sock, epoll::EventFlags::IN).unwrap(); in server()