Home
last modified time | relevance | path

Searched refs:sock (Results 1 – 9 of 9) sorted by relevance

/busybox-1.35.0/networking/
Dnbd-client.c163 int sock, nbd; in nbdclient_main() local
174 sock = create_and_connect_stream_or_die(host, xatou16(port)); in nbdclient_main()
175 setsockopt_1(sock, IPPROTO_TCP, TCP_NODELAY); in nbdclient_main()
178 xread(sock, &nbd_header, 8 + 8); in nbdclient_main()
196 xread(sock, &old_nbd_header, in nbdclient_main()
212 xread(sock, &handshake_flags, sizeof(handshake_flags)); in nbdclient_main()
213 xwrite(sock, &const_int_0, sizeof(const_int_0)); // client_flags in nbdclient_main()
220 xwrite(sock, &nbd_opts, in nbdclient_main()
224 xwrite(sock, name, namelen); in nbdclient_main()
226 xread(sock, &new_nbd_header, in nbdclient_main()
[all …]
Dtcpudp.c272 int sock; in tcpudpsvd_main() local
370 sock = xsocket(lsa->u.sa.sa_family, tcp ? SOCK_STREAM : SOCK_DGRAM, 0); in tcpudpsvd_main()
371 setsockopt_reuseaddr(sock); in tcpudpsvd_main()
373 xbind(sock, &lsa->u.sa, sa_len); in tcpudpsvd_main()
375 xlisten(sock, backlog); in tcpudpsvd_main()
376 close_on_exec_on(sock); in tcpudpsvd_main()
378 socket_want_pktinfo(sock); in tcpudpsvd_main()
419 conn = accept(sock, &remote.u.sa, &remote.len); in tcpudpsvd_main()
424 conn = recv_from_to(sock, NULL, 0, MSG_PEEK, in tcpudpsvd_main()
433 xmove_fd(tcp ? conn : sock, 0); in tcpudpsvd_main()
[all …]
Dtelnetd.c429 IF_FEATURE_TELNETD_STANDALONE(int sock) in make_new_session()
433 enum { sock = 0 }; in make_new_session() enumerator
453 setsockopt_keepalive(sock); in make_new_session()
455 ts->sockfd_read = sock; in make_new_session()
456 ndelay_on(sock); in make_new_session()
457 if (sock == 0) { /* We are called with fd 0 - we are in inetd mode */ in make_new_session()
458 sock++; /* so use fd 1 for output */ in make_new_session()
459 ndelay_on(sock); in make_new_session()
461 ts->sockfd_write = sock; in make_new_session()
462 if (sock > G.maxfd) in make_new_session()
[all …]
Dping.c219 int sock; in create_icmp_socket() local
222 sock = socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6); in create_icmp_socket()
225 sock = socket(AF_INET, SOCK_RAW, 1); /* 1 == ICMP */ in create_icmp_socket()
226 if (sock < 0) { in create_icmp_socket()
232 xmove_fd(sock, pingsock); in create_icmp_socket()
Dtelnetd.ctrlSQ.patch89 ts->sockfd_read = sock;
/busybox-1.35.0/docs/
Dtcp.txt7 sock = socket(AF_INET, SOCK_STREAM, 0);
8 connect(sock, &remote, sizeof(remote));
9 write(sock, buffer, 1000000);
21 IOW: if we just close(sock) now, kernel can reset the TCP connection
41 setsockopt(sock, SOL_SOCKET, SO_LINGER, &linger, sizeof(linger));
42 close(sock);
47 shutdown(sock, SHUT_WR);
48 close(sock);
70 setsockopt(sock, SOL_SOCKET, SO_LINGER, &linger, sizeof(linger));
71 shutdown(sock, SHUT_WR);
[all …]
/busybox-1.35.0/networking/udhcp/
Dd6_dhcpc.c993 struct sockaddr_ll sock; in d6_raw_socket() local
1048 memset(&sock, 0, sizeof(sock)); /* let's be deterministic */ in d6_raw_socket()
1049 sock.sll_family = AF_PACKET; in d6_raw_socket()
1050 sock.sll_protocol = htons(ETH_P_IPV6); in d6_raw_socket()
1051 sock.sll_ifindex = ifindex; in d6_raw_socket()
1056 xbind(fd, (struct sockaddr *) &sock, sizeof(sock)); in d6_raw_socket()
Ddhcpc.c1015 struct sockaddr_ll sock; in udhcp_raw_socket() local
1025 memset(&sock, 0, sizeof(sock)); /* let's be deterministic */ in udhcp_raw_socket()
1026 sock.sll_family = AF_PACKET; in udhcp_raw_socket()
1027 sock.sll_protocol = htons(ETH_P_IP); in udhcp_raw_socket()
1028 sock.sll_ifindex = ifindex; in udhcp_raw_socket()
1033 xbind(fd, (struct sockaddr *) &sock, sizeof(sock)); in udhcp_raw_socket()
Ddhcprelay.c182 static int sendto_ip4(int sock, const void *msg, int msg_len, struct sockaddr_in *to) in sendto_ip4() argument
187 err = sendto(sock, msg, msg_len, 0, (struct sockaddr*) to, sizeof(*to)); in sendto_ip4()