/foundation/communication/dsoftbus/components/nstackx/nstackx_util/core/ |
D | nstackx_socket.c | 202 if (sockAddr->sin_addr.s_addr != 0) { in CreateTcpServer() 203 localAddr.sin_addr.s_addr = sockAddr->sin_addr.s_addr; in CreateTcpServer() 205 localAddr.sin_addr.s_addr = INADDR_ANY; in CreateTcpServer() 213 if (sockAddr->sin_addr.s_addr != 0 && in CreateTcpServer() 264 if (sockAddr->sin_addr.s_addr != 0) { in CreateUdpServer() 265 localAddr.sin_addr.s_addr = sockAddr->sin_addr.s_addr; in CreateUdpServer() 267 localAddr.sin_addr.s_addr = INADDR_ANY; in CreateUdpServer() 274 if (sockAddr->sin_addr.s_addr != 0 && in CreateUdpServer()
|
D | nstackx_util.c | 187 uint32_t ip4 = ((const struct sockaddr_in *)addr)->sin_addr.s_addr; in IpAddrAnonymousFormat()
|
/foundation/communication/dsoftbus/components/nstackx/nstackx_util/platform/liteos/ |
D | sys_dev.c | 119 if (sourceIp == ((struct sockaddr_in *)&(buf[i].ifr_addr))->sin_addr.s_addr) { in GetConnectionTypeByDev() 146 if (sourceIP == ((struct sockaddr_in *)&(buf[i].ifr_addr))->sin_addr.s_addr) { in FindDevByInterfaceIP() 226 … if (localAddr->sin_addr.s_addr == ((struct sockaddr_in *)&(buf[i].ifr_addr))->sin_addr.s_addr) { in BindToDevice() 279 if (inet_ntop(AF_INET, &(((struct sockaddr_in *)&(buf[i].ifr_addr))->sin_addr), ipString, in GetIfBroadcastIp() 338 localIp = ((struct sockaddr_in *)(&buf[i].ifr_addr))->sin_addr.s_addr; in GetTargetInterface() 345 netMask = ((struct sockaddr_in *)&(buf[i].ifr_netmask))->sin_addr.s_addr; in GetTargetInterface() 347 if ((dstAddr->sin_addr.s_addr & netMask) == (localIp & netMask)) { in GetTargetInterface()
|
/foundation/communication/dsoftbus/components/nstackx/nstackx_util/platform/unix/ |
D | sys_dev.c | 119 if (sourceIp == ((struct sockaddr_in *)&(buf[i].ifr_addr))->sin_addr.s_addr) { in GetConnectionTypeByDev() 146 if (sourceIP == ((struct sockaddr_in *)&(buf[i].ifr_addr))->sin_addr.s_addr) { in FindDevByInterfaceIP() 231 … if (localAddr->sin_addr.s_addr == ((struct sockaddr_in *)&(buf[i].ifr_addr))->sin_addr.s_addr) { in BindToDevice() 286 if (inet_ntop(AF_INET, &(((struct sockaddr_in *)&(buf[i].ifr_addr))->sin_addr), ipString, in GetIfBroadcastIp() 345 localIp = ((struct sockaddr_in *)(&buf[i].ifr_addr))->sin_addr.s_addr; in GetTargetInterface() 352 netMask = ((struct sockaddr_in *)&(buf[i].ifr_netmask))->sin_addr.s_addr; in GetTargetInterface() 354 if ((dstAddr->sin_addr.s_addr & netMask) == (localIp & netMask)) { in GetTargetInterface()
|
/foundation/communication/dsoftbus/adapter/common/kernel/posix/ |
D | lnn_ip_utils_adapter.c | 42 if (inet_ntop(sockAddr->sin_family, &sockAddr->sin_addr, ip, len) == NULL) { in GetNetworkIfIp() 54 if (inet_ntop(sockAddr->sin_family, &sockAddr->sin_addr, netmask, len) == NULL) { in GetNetworkIfIp()
|
/foundation/communication/dsoftbus/components/nstackx/fillp/src/public/include/ |
D | utils.h | 54 return (port ^ (remoteAddr)->sin_addr.s_addr); in UtilsIpv4AddrPortKey() 99 #define UTILS_IPV4_ADDR_MATCH(a, b) ((a)->sin_addr.s_addr == (b)->sin_addr.s_addr && \
|
/foundation/communication/wifi/wifi/services/wifi_standard/wifi_framework/wifi_toolkit/net_helper/ |
D | if_config.cpp | 140 if (inet_aton("0.0.0.0", &(sin->sin_addr)) < 0) { in FlushIpAddr() 178 if (inet_aton(ipAddr.c_str(), &(sin->sin_addr)) < 0) { in AddIpAddr() 196 if (inet_aton(mask.c_str(), &(sin->sin_addr)) < 0) { in AddIpAddr() 275 ipAddr = inet_ntoa(sin->sin_addr); in GetIpAddr() 379 if (inet_aton(gateWay.c_str(), &(addr->sin_addr)) < 0) { in AddIpv4Route() 385 addr->sin_addr.s_addr = INADDR_ANY; in AddIpv4Route() 388 addr->sin_addr.s_addr = INADDR_ANY; in AddIpv4Route()
|
D | network_interface.cpp | 314 if (inet_aton(IpAddr.c_str(), &(sin->sin_addr)) < 0) { in IpAddressChange() 323 if (inet_aton(Mask.c_str(), &(sin->sin_addr)) < 0) { in IpAddressChange()
|
/foundation/communication/netmanager_base/services/netmanagernative/src/netsys/dnsresolv/ |
D | dns_proxy_listen.cpp | 84 addrParse.sin_addr.s_addr = inet_addr(servers[serversNum].c_str()); in DnsParseBySocket() 85 if (addrParse.sin_addr.s_addr == INADDR_NONE) { in DnsParseBySocket() 140 proxyAddr.sin_addr.s_addr = htonl(INADDR_ANY); in StartListen()
|
/foundation/communication/dsoftbus/sdk/transmission/trans_channel/udp/file/src/ |
D | file_adapter.c | 107 localAddr.sin_addr.s_addr = SoftBusNtoHl(SoftBusInetAddr(myIp)); in StartNStackXDFileServer() 131 localAddr.sin_addr.s_addr = SoftBusNtoHl(SoftBusInetAddr(peerIp)); in StartNStackXDFileClient()
|
/foundation/communication/dsoftbus/core/connection/wifi_direct/utils/ |
D | wifi_direct_network_utils.c | 157 if (!inet_ntop(sockAddrIn->sin_family, &sockAddrIn->sin_addr, ipString, ipStringSize)) { in GetInterfaceIpString() 250 info[count].address = ntohl(addr->sin_addr.s_addr); in GetLocalIpv4InfoArray() 251 inet_ntop(AF_INET, &addr->sin_addr.s_addr, addrString, sizeof(addrString)); in GetLocalIpv4InfoArray() 254 info[count].prefixLength = IP_MASK_MAX - (ffs((int32_t)ntohl(addr->sin_addr.s_addr)) - 1); in GetLocalIpv4InfoArray()
|
/foundation/communication/dsoftbus/components/nstackx/nstackx_ctrl/core/mini_discover/ |
D | coap_app.c | 74 if (remoteAddr->sin_addr.s_addr == localAddr.s_addr) { in IsLoopBackPacket() 135 localAddr.sin_addr.s_addr = inet_addr(ipString); in CoapCreateUdpClientEx() 185 sockAddr.sin_addr.s_addr = inet_addr(coapRequest->remoteIp); in CoapSendMsg() 351 localAddr.sin_addr.s_addr = inet_addr(ipAddr); in CoapCreateUdpServer()
|
/foundation/communication/ipc/ipc/test/rpc/socket_trans/src/ |
D | rpc_socket_trans.c | 79 int rc = inet_pton(AF_INET, localIP, &addr->sin_addr); in BindLocalIP() 258 inet_pton(AF_INET, peerDeviceId, &addr.sin_addr); in Connect() 326 char *localDeviceId = inet_ntoa(((struct sockaddr_in*)ifa->ifa_addr)->sin_addr); in GetSocketLocalDeviceID()
|
D | rpc_mini_socket_trans.c | 81 int rc = inet_pton(AF_INET, localIP, &addr->sin_addr); in BindLocalIP() 296 inet_pton(AF_INET, peerDeviceId, &addr.sin_addr); in Connect()
|
/foundation/communication/netmanager_ext/services/mdnsmanager/src/protocol/ |
D | mdns_socket_listener.cpp | 112 …mreq.imr_interface = ifa ? reinterpret_cast<sockaddr_in *>(ifa->ifa_addr)->sin_addr : in_addr{INAD… in InitSocketV4() 123 sockAddr.sin_addr.s_addr = INADDR_ANY; in InitSocketV4() 289 reinterpret_cast<sockaddr_in *>(&saddr_[sock])->sin_addr = saddr->sin_addr; in OpenSocketV4() 456 sockaddr_in saddr{.sin_family = AF_INET, .sin_port = htons(MDNS_PORT), .sin_addr = addr}; in Multicast()
|
/foundation/communication/dhcp/test/services/dhcp_server/unittest/ |
D | system_func_mock.cpp | 67 struct in_addr sin_addr; member 167 sAddr->sin_addr.s_addr = HostToNetwork(srcIp); in recvfrom()
|
/foundation/communication/netstack/frameworks/js/napi/socket/options/src/ |
D | net_address.cpp | 44 addr = &(ipv4->sin_addr); in SetAddress()
|
/foundation/communication/netmanager_base/services/netmanagernative/src/manager/ |
D | vpn_manager.cpp | 133 sin->sin_addr = ipv4Addr; in SetVpnAddress() 146 sin->sin_addr.s_addr = htonl(mask); in SetVpnAddress()
|
D | interface_manager.cpp | 294 addr.s_addr = ((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr.s_addr; in GetIfaceConfig() 298 …g.prefixLength = Ipv4NetmaskToPrefixLength(((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr.s_addr); in GetIfaceConfig() 382 sin->sin_addr = ipv4Addr; in SetIpAddress()
|
/foundation/communication/bluetooth_service/services/bluetooth/service/src/pan/ |
D | pan_network.cpp | 181 sin->sin_addr = ipv4Addr; in SetIpAddress() 186 sin->sin_addr = mask4Addr; in SetIpAddress() 196 ipv4Addr.s_addr = (reinterpret_cast<struct sockaddr_in *>(&ifr.ifr_addr))->sin_addr.s_addr; in SetIpAddress()
|
/foundation/communication/dsoftbus/components/nstackx/fillp/src/public/src/ |
D | check_gso_support.c | 119 sa.sin_addr.s_addr = inet_addr("127.0.0.1"); in CheckGSOSupport()
|
/foundation/communication/netmanager_base/test/netmanagernative/unittest/netsys_manager_test/ |
D | dns_proxy_listen_test.cpp | 79 proxyAddr.sin_addr.s_addr = htonl(INADDR_ANY);
|
/foundation/communication/dsoftbus/tests/core/bus_center/lnn/unittest/ |
D | net_buscenter_test.cpp | 138 if (inet_pton(AF_INET, ip.c_str(), &(addr.sin_addr)) <= 0) { in SetIpaddr()
|
/foundation/communication/netmanager_base/services/netsyscontroller/src/ |
D | mock_netsys_native_client.cpp | 481 if (inet_aton(gateWay.c_str(), &(_sin.sin_addr)) < 0) { in AddRoute() 488 if (inet_aton(ip.c_str(), &((struct sockaddr_in *)&rt.rt_dst)->sin_addr) < 0) { in AddRoute() 493 …if (inet_aton(mask.c_str(), &(reinterpret_cast<struct sockaddr_in *>(&rt.rt_genmask))->sin_addr) <… in AddRoute()
|
/foundation/communication/dhcp/services/dhcp_client/src/ |
D | dhcp_function.c | 208 *ifaddr4 = pSockIn->sin_addr.s_addr; in GetLocalInterface() 294 sin.sin_addr.s_addr = netAddr; in SetIpOrMask()
|