/busybox-1.35.0/libbb/ |
D | signals.c | 63 struct sigaction sa; in bb_signals_norestart() local 65 memset(&sa, 0, sizeof(sa)); in bb_signals_norestart() 66 sa.sa_handler = f; in bb_signals_norestart() 73 sigaction_set(sig_no, &sa); in bb_signals_norestart() 114 struct sigaction sa; in signal_SA_RESTART_empty_mask() local 115 memset(&sa, 0, sizeof(sa)); in signal_SA_RESTART_empty_mask() 117 sa.sa_flags = SA_RESTART; in signal_SA_RESTART_empty_mask() 118 sa.sa_handler = handler; in signal_SA_RESTART_empty_mask() 119 sigaction_set(sig, &sa); in signal_SA_RESTART_empty_mask() 124 struct sigaction sa; in signal_no_SA_RESTART_empty_mask() local [all …]
|
D | xconnect.c | 80 if (get_name(fd, &lsa.u.sa, &lsa.len) != 0) in get_lsa() 86 get_name(fd, &lsa_ptr->u.sa, &lsa_ptr->len); in get_lsa() 139 int FAST_FUNC get_nport(const struct sockaddr *sa) in get_nport() argument 142 if (sa->sa_family == AF_INET6) { in get_nport() 143 return ((struct sockaddr_in6*)sa)->sin6_port; in get_nport() 146 if (sa->sa_family == AF_INET) { in get_nport() 147 return ((struct sockaddr_in*)sa)->sin_port; in get_nport() 153 void FAST_FUNC set_nport(struct sockaddr *sa, unsigned port) in set_nport() argument 156 if (sa->sa_family == AF_INET6) { in set_nport() 157 struct sockaddr_in6 *sin6 = (void*) sa; in set_nport() [all …]
|
D | bb_askpass.c | 21 struct sigaction sa, oldsa; in bb_ask_noecho() local 47 memset(&sa, 0, sizeof(sa)); in bb_ask_noecho() 50 sa.sa_handler = askpass_timeout; in bb_ask_noecho() 51 sigaction(SIGINT, &sa, &oldsa); in bb_ask_noecho() 53 sigaction_set(SIGALRM, &sa); in bb_ask_noecho()
|
/busybox-1.35.0/networking/udhcp/ |
D | d6_packet.c | 135 struct sockaddr_in6 sa; in d6_send_kernel_packet_from_client_data_ifindex() local 147 memset(&sa, 0, sizeof(sa)); in d6_send_kernel_packet_from_client_data_ifindex() 148 sa.sin6_family = AF_INET6; in d6_send_kernel_packet_from_client_data_ifindex() 149 sa.sin6_port = htons(source_port); in d6_send_kernel_packet_from_client_data_ifindex() 150 sa.sin6_addr = *src_ipv6; /* struct copy */ in d6_send_kernel_packet_from_client_data_ifindex() 151 if (bind(fd, (struct sockaddr *)&sa, sizeof(sa)) == -1) { in d6_send_kernel_packet_from_client_data_ifindex() 156 memset(&sa, 0, sizeof(sa)); in d6_send_kernel_packet_from_client_data_ifindex() 157 sa.sin6_family = AF_INET6; in d6_send_kernel_packet_from_client_data_ifindex() 158 sa.sin6_port = htons(dest_port); in d6_send_kernel_packet_from_client_data_ifindex() 159 sa.sin6_addr = *dst_ipv6; /* struct copy */ in d6_send_kernel_packet_from_client_data_ifindex() [all …]
|
D | packet.c | 196 struct sockaddr_in sa; in udhcp_send_kernel_packet() local 224 memset(&sa, 0, sizeof(sa)); in udhcp_send_kernel_packet() 225 sa.sin_family = AF_INET; in udhcp_send_kernel_packet() 226 sa.sin_port = htons(source_port); in udhcp_send_kernel_packet() 227 sa.sin_addr.s_addr = source_nip; in udhcp_send_kernel_packet() 228 if (bind(fd, (struct sockaddr *)&sa, sizeof(sa)) == -1) { in udhcp_send_kernel_packet() 233 memset(&sa, 0, sizeof(sa)); in udhcp_send_kernel_packet() 234 sa.sin_family = AF_INET; in udhcp_send_kernel_packet() 235 sa.sin_port = htons(dest_port); in udhcp_send_kernel_packet() 236 sa.sin_addr.s_addr = dest_nip; in udhcp_send_kernel_packet() [all …]
|
/busybox-1.35.0/networking/ |
D | arp.c | 109 struct sockaddr sa; in arp_del() local 117 if (ap->input(host, &sa) < 0) { in arp_del() 122 memcpy(&req.arp_pa, &sa, sizeof(struct sockaddr)); in arp_del() 174 if (ap->input(host, &sa) < 0) { in arp_del() 177 memcpy(&req.arp_netmask, &sa, sizeof(struct sockaddr)); in arp_del() 226 static void arp_getdevhw(char *ifname, struct sockaddr *sa) in arp_getdevhw() argument 237 memcpy(sa, &(ifr.ifr_hwaddr), sizeof(struct sockaddr)); in arp_getdevhw() 256 struct sockaddr sa; in arp_set() local 262 if (ap->input(host, &sa) < 0) { in arp_set() 266 memcpy(&req.arp_pa, &sa, sizeof(struct sockaddr)); in arp_set() [all …]
|
D | tcpudp.c | 370 sock = xsocket(lsa->u.sa.sa_family, tcp ? SOCK_STREAM : SOCK_DGRAM, 0); in tcpudpsvd_main() 373 xbind(sock, &lsa->u.sa, sa_len); in tcpudpsvd_main() 391 char *addr = xmalloc_sockaddr2dotted(&lsa->u.sa); in tcpudpsvd_main() 419 conn = accept(sock, &remote.u.sa, &remote.len); in tcpudpsvd_main() 425 &remote.u.sa, &local.u.sa, sa_len); in tcpudpsvd_main() 438 remote_addr = xmalloc_sockaddr2dotted_noport(&remote.u.sa); in tcpudpsvd_main() 461 sock = xsocket(lsa->u.sa.sa_family, SOCK_DGRAM, 0); in tcpudpsvd_main() 466 xconnect(0, &remote.u.sa, sa_len); in tcpudpsvd_main() 471 xbind(sock, &lsa->u.sa, sa_len); in tcpudpsvd_main() 486 set_nport(&localp->u.sa, htons(local_port)); in tcpudpsvd_main() [all …]
|
D | nc_bloaty.c | 294 rr = connect(fd, &themaddr->u.sa, themaddr->len); in connect_w_timeout() 326 getsockname(netfd, &ouraddr->u.sa, &ouraddr->len); in dolisten() 329 addr = xmalloc_sockaddr2dotted(&ouraddr->u.sa); in dolisten() 357 xconnect(netfd, &themaddr->u.sa, themaddr->len); in dolisten() 365 &remend.u.sa, &ouraddr->u.sa, ouraddr->len); in dolisten() 378 xconnect(netfd, &remend.u.sa, ouraddr->len); in dolisten() 386 rr = accept(netfd, &remend.u.sa, &remend.len); in dolisten() 392 sv_port = get_nport(&remend.u.sa); /* save */ in dolisten() 393 port = get_nport(&themaddr->u.sa); in dolisten() 397 set_nport(&remend.u.sa, 0); /* blot out remote port# */ in dolisten() [all …]
|
D | inetd.c | 473 lsa->u.sa.sa_family = family; in xzalloc_lsa() 613 set_nport(&sep->se_lsa->u.sa, 0); in prepare_socket_fd() 623 r = bind(fd, &sep->se_lsa->u.sa, sep->se_lsa->len); in prepare_socket_fd() 628 getsockname(fd, &sep->se_lsa->u.sa, &sep->se_lsa->len); in prepare_socket_fd() 636 sun = (struct sockaddr_un*)&(sep->se_lsa->u.sa); in prepare_socket_fd() 639 r = bind(fd, &sep->se_lsa->u.sa, sep->se_lsa->len); in prepare_socket_fd() 1037 sun = (struct sockaddr_un*)&lsa->u.sa; in reread_config_file() 1078 set_nport(&lsa->u.sa, port); in reread_config_file() 1095 || memcmp(&lsa->u.sa, &sep->se_lsa->u.sa, lsa->len) != 0 in reread_config_file() 1217 struct sigaction sa, saved_pipe_handler; in inetd_main() local [all …]
|
D | traceroute.c | 478 &G.from_lsa->u.sa, G.to, G.from_lsa->len); in wait_for_reply() 483 &G.from_lsa->u.sa, &G.from_lsa->len); in wait_for_reply() 578 set_nport(&dest_lsa->u.sa, htons(port + seq)); in send_probe() 581 res = xsendto(sndsock, out, len, &dest_lsa->u.sa, dest_lsa->len); in send_probe() 631 auto_string(xmalloc_sockaddr2dotted_noport(&G.from_lsa->u.sa)), in hexdump_if_verbose() 750 auto_string(xmalloc_sockaddr2dotted_noport(&G.from_lsa->u.sa))); in packet6_ok() 825 char *ina = auto_string(xmalloc_sockaddr2dotted_noport(&G.from_lsa->u.sa)); in print() 835 n = auto_string(xmalloc_sockaddr2host_noport(&G.from_lsa->u.sa)); in print() 940 af = dest_lsa->u.sa.sa_family; in traceroute_init() 1078 &source_lsa->u.sa, source_lsa->len)) in traceroute_init() [all …]
|
D | dnsd.c | 540 udps = xsocket(lsa->u.sa.sa_family, SOCK_DGRAM, 0); in dnsd_main() 541 xbind(udps, &lsa->u.sa, lsa->len); in dnsd_main() 548 char *p = xmalloc_sockaddr2dotted(&lsa->u.sa); in dnsd_main() 561 r = recv_from_to(udps, buf, MAX_PACK_LEN + 1, 0, &from->u.sa, &to->u.sa, lsa->len); in dnsd_main() 572 send_to_from(udps, buf, r, 0, &from->u.sa, &to->u.sa, lsa->len); in dnsd_main()
|
D | pscan.c | 102 set_nport(&lsap->u.sa, htons(port)); in pscan_main() 103 s = xsocket(lsap->u.sa.sa_family, SOCK_STREAM, 0); in pscan_main() 111 if (connect(s, &lsap->u.sa, lsap->len) == 0) { in pscan_main()
|
D | ping.c | 221 if (lsa->u.sa.sa_family == AF_INET6) in create_icmp_socket() 264 xsendto(pingsock, G.packet, DEFDATALEN + ICMP_MINLEN, &lsa->u.sa, lsa->len); in ping4() 309 xsendto(pingsock, G.packet, DEFDATALEN + sizeof(struct icmp6_hdr), &lsa->u.sa, lsa->len); in ping6() 383 if (lsa->u.sa.sa_family == AF_INET6) in common_ping_main() 442 struct sockaddr sa; member 528 sz = xsendto(pingsock, G.snd_packet, size_pkt, &pingaddr.sa, sizeof(pingaddr)); in sendping_tail() 770 &source_lsa->u.sa, source_lsa->len)) in ping4() 772 xbind(pingsock, &source_lsa->u.sa, source_lsa->len); in ping4() 827 xbind(pingsock, &source_lsa->u.sa, source_lsa->len); in ping6() 914 xmalloc_sockaddr2dotted_noport(&source_lsa->u.sa)); in ping() [all …]
|
D | nslookup.c | 148 struct sockaddr *sa; in server_print() local 151 sa = (struct sockaddr*)_res._u._ext.nsaddrs[0]; in server_print() 152 if (!sa) in server_print() 154 sa = (struct sockaddr*)&_res.nsaddr_list[0]; in server_print() 155 server = xmalloc_sockaddr2dotted_noport(sa); in server_print() 175 if (lsa->u.sa.sa_family == AF_INET) { in set_default_dns() 185 if (lsa->u.sa.sa_family == AF_INET6) { in set_default_dns() 530 pfd.fd = xsocket_type(&local_lsa, ns->lsa->u.sa.sa_family, SOCK_DGRAM); in send_queries() 537 xbind(pfd.fd, &local_lsa->u.sa, local_lsa->len); in send_queries() 540 xconnect(pfd.fd, &ns->lsa->u.sa, ns->lsa->len); in send_queries() [all …]
|
D | tftp.c | 334 socket_fd = xsocket(peer_lsa->u.sa.sa_family, SOCK_DGRAM, 0); 344 xbind(socket_fd, &our_lsa->u.sa, our_lsa->len); 345 xconnect(socket_fd, &peer_lsa->u.sa, peer_lsa->len); 553 xsendto(socket_fd, xbuf, send_len, &peer_lsa->u.sa, peer_lsa->len); 591 &peer_lsa->u.sa, &peer_lsa->len); 596 xconnect(socket_fd, &peer_lsa->u.sa, peer_lsa->len); 757 &peer_lsa->u.sa, peer_lsa->len); 860 xmalloc_sockaddr2dotted(&peer_lsa->u.sa), in tftp_main() 926 &peer_lsa->u.sa, &our_lsa->u.sa, our_lsa->len); in tftpd_main()
|
D | ifconfig.c | 323 struct sockaddr sa; in ifconfig_main() local 447 if (lsa->u.sa.sa_family != AF_INET6 && prefix) { in ifconfig_main() 454 if (lsa->u.sa.sa_family == AF_INET6) { in ifconfig_main() 490 if (hw_class == 1 ? in_ether(host, &sa) : in_ib(host, &sa)) in ifconfig_main() 492 p = (char *) &sa; in ifconfig_main()
|
D | nc.c | 205 getsockname(sfd, &lsa.u.sa, &lsa.len); in nc_main() 206 lport = get_nport(&lsa.u.sa); in nc_main()
|
D | ftpd.c | 491 G.pasv_listen_fd = fd = xsocket(G.local_addr->u.sa.sa_family, SOCK_STREAM, 0); in bind_for_passive_mode() 494 set_nport(&G.local_addr->u.sa, 0); in bind_for_passive_mode() 495 xbind(fd, &G.local_addr->u.sa, G.local_addr->len); in bind_for_passive_mode() 497 getsockname(fd, &G.local_addr->u.sa, &G.local_addr->len); in bind_for_passive_mode() 499 port = get_nport(&G.local_addr->u.sa); in bind_for_passive_mode() 513 if (G.local_addr->u.sa.sa_family == AF_INET) in handle_pasv() 514 addr = xmalloc_sockaddr2dotted_noport(&G.local_addr->u.sa); in handle_pasv() 557 || G.local_addr->u.sa.sa_family != AF_INET in handle_port() 603 set_nport(&G.port_addr->u.sa, htons(port)); in handle_port()
|
D | netstat.c | 413 struct sockaddr sa; member 462 ¶m->localaddr.sa, param->local_port, in print_inet_line() 465 ¶m->remaddr.sa, param->rem_port, in print_inet_line() 496 ( (A.sa.sa_family == AF_INET6) \ 500 (A.sa.sa_family == AF_INET) \
|
D | ftpgetput.c | 166 set_nport(&lsa->u.sa, htons(port_num)); in xconnect_ftpdata() 333 xmalloc_sockaddr2dotted(&lsa->u.sa)); in ftpgetput_main()
|
D | tls_pstm.c | 805 int sa, sb; //bbox: was int16 in pstm_sub() local 807 sa = a->sign; in pstm_sub() 810 if (sa != sb) { in pstm_sub() 815 c->sign = sa; in pstm_sub() 826 c->sign = sa; in pstm_sub() 833 c->sign = (sa == PSTM_ZPOS) ? PSTM_NEG : PSTM_ZPOS; in pstm_sub() 1847 int sa, sb; //bbox: was int16 in pstm_add() local 1850 sa = a->sign; in pstm_add() 1854 if (sa == sb) { in pstm_add() 1856 c->sign = sa; in pstm_add() [all …]
|
D | httpd.c | 2220 rmt_ip_str = xmalloc_sockaddr2dotted(&fromAddr->u.sa); in handle_incoming_and_exit() 2231 if (fromAddr->u.sa.sa_family == AF_INET) { in handle_incoming_and_exit() 2235 if (fromAddr->u.sa.sa_family == AF_INET6 in handle_incoming_and_exit() 2292 proxy_fd = socket(lsa->u.sa.sa_family, SOCK_STREAM, 0); in handle_incoming_and_exit() 2295 if (connect(proxy_fd, &lsa->u.sa, lsa->len) < 0) in handle_incoming_and_exit() 2649 n = accept(server_socket, &fromAddr.u.sa, &fromAddr.len); in mini_httpd() 2735 getpeername(0, &fromAddr.u.sa, &fromAddr.len); in mini_httpd_inetd()
|
/busybox-1.35.0/init/ |
D | init.c | 1041 struct sigaction sa; in init_main() local 1064 memset(&sa, 0, sizeof(sa)); in init_main() 1065 sa.sa_sigaction = handle_sigsegv; in init_main() 1066 sa.sa_flags = SA_SIGINFO; in init_main() 1067 sigaction_set(SIGSEGV, &sa); in init_main() 1068 sigaction_set(SIGILL, &sa); in init_main() 1069 sigaction_set(SIGFPE, &sa); in init_main() 1070 sigaction_set(SIGBUS, &sa); in init_main() 1164 memset(&sa, 0, sizeof(sa)); in init_main() 1165 sigfillset(&sa.sa_mask); in init_main() [all …]
|
/busybox-1.35.0/archival/libarchive/ |
D | get_header_ar.c | 130 struct archive_handle_t *sa = archive_handle->dpkg__sub_archive; in get_header_ar() local 131 while (archive_handle->dpkg__action_data_subarchive(sa) == EXIT_SUCCESS) in get_header_ar() 133 create_links_from_list(sa->link_placeholders); in get_header_ar()
|
/busybox-1.35.0/scripts/kconfig/ |
D | mconf.c | 475 struct sigaction sa; in exec_conf() local 476 sa.sa_handler = winch_handler; in exec_conf() 477 sigemptyset(&sa.sa_mask); in exec_conf() 478 sa.sa_flags = SA_RESTART; in exec_conf() 479 sigaction(SIGWINCH, &sa, NULL); in exec_conf()
|