Home
last modified time | relevance | path

Searched refs:localAddr (Results 1 - 25 of 30) sorted by relevance

12

/foundation/communication/dsoftbus/components/nstackx/nstackx_util/core/
H A Dnstackx_socket.c180 struct sockaddr_in localAddr; in CreateTcpServer() local
181 socklen_t len = sizeof(localAddr); in CreateTcpServer()
198 (void)memset_s(&localAddr, sizeof(localAddr), 0, sizeof(localAddr)); in CreateTcpServer()
200 localAddr.sin_family = AF_INET; in CreateTcpServer()
201 localAddr.sin_port = sockAddr->sin_port; 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()
208 if (bind(serverSocket->sockfd, (struct sockaddr *)&localAddr, le in CreateTcpServer()
247 struct sockaddr_in localAddr; CreateUdpServer() local
390 struct sockaddr_in localAddr; SetAcceptSocket() local
[all...]
/foundation/communication/dsoftbus/components/nstackx/nstackx_ctrl/core/mini_discover/
H A Dcoap_app.c85 struct in_addr *localAddr = GetLocalIfaceIp(g_coapCtx.iface); in IsLoopBackPacket() local
86 if (remoteAddr->sin_addr.s_addr != localAddr->s_addr) { in IsLoopBackPacket()
137 struct sockaddr_in localAddr; in CoapCreateUdpClientEx() local
138 (void)memset_s(&localAddr, sizeof(localAddr), 0, sizeof(localAddr)); in CoapCreateUdpClientEx()
139 localAddr.sin_family = AF_INET; in CoapCreateUdpClientEx()
140 localAddr.sin_addr.s_addr = GetLocalIfaceIp(g_coapCtx.iface)->s_addr; in CoapCreateUdpClientEx()
141 localAddr.sin_port = htons(COAP_SRV_DEFAULT_PORT); in CoapCreateUdpClientEx()
143 if (bind(fd, (struct sockaddr *)&localAddr, sizeo in CoapCreateUdpClientEx()
324 struct sockaddr_in localAddr; CoapCreateUdpServer() local
[all...]
/foundation/communication/dsoftbus/sdk/transmission/trans_channel/udp/file/src/
H A Dfile_adapter.c219 struct sockaddr_in6 localAddr = { 0 }; in StartNStackXDFileServer() local
220 ret = InitSockAddrIn6ByIpPort(myIp, port, &localAddr); in StartNStackXDFileServer()
227 sessionId = NSTACKX_DFileServer((struct sockaddr_in *)&localAddr, addrLen, key, keyLen, msgReceiver); in StartNStackXDFileServer()
229 struct sockaddr_in localAddr = { 0 }; in StartNStackXDFileServer() local
230 ret = InitSockAddrInByIpPort(myIp, port, &localAddr); in StartNStackXDFileServer()
237 sessionId = NSTACKX_DFileServer(&localAddr, addrLen, key, keyLen, msgReceiver); in StartNStackXDFileServer()
262 struct sockaddr_in6 localAddr = { 0 }; in StartNStackXDFileClient() local
263 int32_t ret = InitSockAddrIn6ByIpPort(peerIp, peerPort, &localAddr); in StartNStackXDFileClient()
269 sessionId = NSTACKX_DFileClient((struct sockaddr_in *)&localAddr, addrLen, key, keyLen, msgReceiver); in StartNStackXDFileClient()
271 struct sockaddr_in localAddr in StartNStackXDFileClient() local
[all...]
/foundation/communication/bluetooth/frameworks/js/napi/src/access/
H A Dnapi_bluetooth_access.cpp201 std::string localAddr = INVALID_MAC_ADDRESS; in GetLocalAddress() local
202 int32_t err = host->GetLocalAddress(localAddr); in GetLocalAddress()
203 napi_create_string_utf8(env, localAddr.c_str(), localAddr.size(), &result); in GetLocalAddress()
/foundation/communication/dsoftbus/components/nstackx/nstackx_ctrl/core/coap_discover/
H A Dcoap_client.c266 static coap_session_t *CoapGetSessionEx(coap_context_t *ctx, const char *localAddr, const char *localPort, in CoapGetSessionEx() argument
295 if (localAddr != NULL) { in CoapGetSessionEx()
303 int s = getaddrinfo(localAddr, localPort, &hints, &result); in CoapGetSessionEx()
317 coap_session_t *CoapGetSession(coap_context_t *ctx, const char *localAddr, const char *localPort, in CoapGetSession() argument
320 coap_session_t *session = CoapGetSessionEx(ctx, localAddr, localPort, coapServerParameter); in CoapGetSession()
/foundation/communication/dsoftbus/components/nstackx/fillp/src/fillp_lib/src/fillp/
H A Dfillp_conn.c111 UTILS_GET_ADDRPORT(&((struct SpungePcb*)(pcb->spcb))->localAddr), UTILS_GET_ADDRPORT(&p->addr)); in FillpConnReqInput()
136 FillpGenerateCookie(pcb, req, &p->addr, ((struct sockaddr_in *)(&FILLP_GET_CONN(pcb)->pcb->localAddr))->sin_port, in FillpConnReqInput()
438 UTILS_GET_ADDRPORT(&(FILLP_GET_CONN(pcb))->pcb->localAddr), UTILS_GET_ADDRPORT(&p->addr)); in FillpConnReqAckInput()
567 struct sockaddr *localAddr = (struct sockaddr *)(void *)(&spcb->localAddr); in FillpInitNewConnByConfirm() local
597 FillpErrorType err = memcpy_s(&newConn->pcb->localAddr, sizeof(newConn->pcb->localAddr), localAddr, in FillpInitNewConnByConfirm()
598 sizeof(spcb->localAddr)); in FillpInitNewConnByConfirm()
758 UTILS_GET_ADDRPORT(&conn->pcb->localAddr), UTILS_GET_ADDRPOR in FillpConnConfirmInput()
1894 struct sockaddr *localAddr = (struct sockaddr *)(void *)(&spcb->localAddr); FillpGenerateCookie() local
1947 struct sockaddr *localAddr = (struct sockaddr *)(void *)(&spcb->localAddr); FillpValidateCookieHmac() local
[all...]
/foundation/communication/dsoftbus/components/nstackx/nstackx_ctrl/include/coap_discover/
H A Dcoap_client.h36 coap_session_t *CoapGetSession(coap_context_t *ctx, const char *localAddr, const char *localPort,
/foundation/communication/dsoftbus/components/nstackx/nstackx_util/interface/
H A Dnstackx_dev.h59 NSTACKX_EXPORT int32_t BindToDevice(SocketDesc sockfd, const struct sockaddr_in *localAddr);
/foundation/CastEngine/castengine_wifi_display/services/network/socket/
H A Dsocket_utils.cpp519 struct sockaddr_in localAddr; in GetIpPortInfo() local
520 socklen_t localAddrLen = sizeof(localAddr); in GetIpPortInfo()
521 if (-1 == getsockname(fd, (struct sockaddr *)&localAddr, &localAddrLen)) { in GetIpPortInfo()
533 strLocalAddr = inet_ntoa(localAddr.sin_addr); in GetIpPortInfo()
536 localPort = ntohs(localAddr.sin_port); in GetIpPortInfo()
538 SHARING_LOGD("localAddr: %{public}s localPort: %{public}d remoteAddr: %{public}s remotePort: %{public}d", in GetIpPortInfo()
/foundation/communication/dsoftbus/tests/sdk/transmission/trans_channel/udp/file/
H A Dtrans_sdk_file_test.cpp842 struct sockaddr_in localAddr = { 0 }; in HWTEST_F() local
844 int32_t ret = InitSockAddrInByIpPort(nullptr, port, &localAddr); in HWTEST_F()
846 ret = InitSockAddrInByIpPort("127.0.0.1", -1, &localAddr); in HWTEST_F()
850 ret = InitSockAddrInByIpPort("280567565", port, &localAddr); in HWTEST_F()
852 ret = InitSockAddrInByIpPort("127.0.0.1", port, &localAddr); in HWTEST_F()
864 struct sockaddr_in6 localAddr = { 0 }; in HWTEST_F() local
866 int32_t ret = InitSockAddrIn6ByIpPort(nullptr, port, &localAddr); in HWTEST_F()
868 ret = InitSockAddrIn6ByIpPort("3FFF:FFFF:0000:0000:0000:0000:0000:0000", -1, &localAddr); in HWTEST_F()
872 ret = InitSockAddrIn6ByIpPort("280567565", port, &localAddr); in HWTEST_F()
874 ret = InitSockAddrIn6ByIpPort("3FFF:FFFF:0000:0000:0000:0000:0000:0000", port, &localAddr); in HWTEST_F()
[all...]
/foundation/communication/dsoftbus/components/nstackx/fillp/src/public/src/
H A Dspunge_message.c426 struct sockaddr_in *localAddr = FILLP_NULL_PTR; in SpungeHandleMsgBind() local
433 localAddr = bindMsg->addr; in SpungeHandleMsgBind()
440 err = memcpy_s(&pcb->localAddr, sizeof(pcb->localAddr), localAddr, addrLen); in SpungeHandleMsgBind()
447 NetconnSetLocalPort(conn, ((struct sockaddr_in *)(&pcb->localAddr))->sin_port); in SpungeHandleMsgBind()
456 err = osSock->ioSock->ops->bind((void *)osSock->ioSock, (void *)conn->pcb, (struct sockaddr *)&pcb->localAddr, in SpungeHandleMsgBind()
/foundation/communication/bluetooth_service/services/bluetooth/stack/src/smp/
H A Dsmp.h270 * @param localAddr Local addr.
275 int SMP_StartPair(uint16_t handle, const BtAddr *localAddr, const BtAddr *peerAddr, const SMP_PairParam *param);
295 * @param localAddr Local addr.
301 uint16_t handle, uint8_t rejectReason, const BtAddr *localAddr, const BtAddr *peerAddr, const SMP_PairParam *param);
H A Dsmp_def.h260 BtAddr localAddr; member
277 BtAddr localAddr; member
H A Dsmp.c287 int SMP_StartPair(uint16_t handle, const BtAddr *localAddr, const BtAddr *peerAddr, const SMP_PairParam *param) in SMP_StartPair() argument
297 (void)memcpy_s(&ctx->localAddr, sizeof(BtAddr), localAddr, sizeof(ctx->localAddr)); in SMP_StartPair()
327 g_smpPairMng.local.addr.type = param->localAddr.type; in SMP_StartPairTask()
330 g_smpPairMng.local.addr.addr, param->localAddr.addr, sizeof(g_smpPairMng.local.addr.addr)); in SMP_StartPairTask()
442 uint16_t handle, uint8_t rejectReason, const BtAddr *localAddr, const BtAddr *peerAddr, const SMP_PairParam *param) in SMP_RemotePairRequestReply()
459 (void)memcpy_s(&ctx->localAddr, sizeof(BtAddr), localAddr, sizeof(ctx->localAddr)); in SMP_RemotePairRequestReply()
441 SMP_RemotePairRequestReply( uint16_t handle, uint8_t rejectReason, const BtAddr *localAddr, const BtAddr *peerAddr, const SMP_PairParam *param) SMP_RemotePairRequestReply() argument
[all...]
/foundation/communication/dsoftbus/adapter/common/net/bluetooth/broadcast/adapter/include/
H A Dsoftbus_broadcast_adapter_type.h156 SoftbusMacAddr localAddr; member
/foundation/communication/dsoftbus/components/nstackx/fillp/src/fillp_lib/include/
H A Dpcb.h55 struct sockaddr_in6 localAddr; member
/foundation/communication/dsoftbus/components/nstackx/fillp/src/app_lib/src/
H A Dfillp_dfx.c524 struct sockaddr_in *local = (struct sockaddr_in *)&sock->netconn->pcb->localAddr; in DoShowSockList()
527 FILLP_CHAR localAddr[INET6_ADDRSTRLEN]; in DoShowSockList() local
530 FILLP_INT ipLen = IpAddrAnonymousFormat(localAddr, sizeof(localAddr), in DoShowSockList()
533 (void)strcpy_s(localAddr, INET6_ADDRSTRLEN, "NONE"); in DoShowSockList()
549 sendPcb->unrecvList.nodeNum, localAddr, FILLP_NTOHS(local->sin_port), peerAddr, FILLP_NTOHS(peer->sin_port), in DoShowSockList()
/foundation/communication/dsoftbus/components/nstackx/nstackx_util/platform/liteos/
H A Dsys_dev.c196 * If localAddr isn't NULL, bind to interface correspond to ip,
199 int32_t BindToDevice(SocketDesc sockfd, const struct sockaddr_in *localAddr) in BindToDevice() argument
224 if (localAddr != NULL) { in BindToDevice()
226 if (localAddr->sin_addr.s_addr == ((struct sockaddr_in *)&(buf[i].ifr_addr))->sin_addr.s_addr) { in BindToDevice()
/foundation/communication/dsoftbus/components/nstackx/nstackx_util/platform/unix/
H A Dsys_dev.c196 * If localAddr isn't NULL, bind to interface correspond to ip,
199 int32_t BindToDevice(SocketDesc sockfd, const struct sockaddr_in *localAddr) in BindToDevice() argument
229 if (localAddr != NULL) { in BindToDevice()
231 if (localAddr->sin_addr.s_addr == ((struct sockaddr_in *)&(buf[i].ifr_addr))->sin_addr.s_addr) { in BindToDevice()
/foundation/communication/dsoftbus/adapter/common/net/bluetooth/broadcast/interface/
H A Dsoftbus_broadcast_type.h398 BcMacAddr localAddr; member
/foundation/communication/dsoftbus/components/nstackx/nstackx_core/dfile/interface/
H A Dnstackx_dfile.h270 * param: localAddr - filled with local ip addr, port and family for socket binding
272 * param: addrLen - localAddr length
277 NSTACKX_EXPORT int32_t NSTACKX_DFileServer(struct sockaddr_in *localAddr, socklen_t addrLen, const uint8_t *key,
/foundation/communication/dsoftbus/components/nstackx/nstackx_core/dfile/core/
H A Dnstackx_dfile.c1148 int32_t NSTACKX_DFileServer(struct sockaddr_in *localAddr, socklen_t addrLen, const uint8_t *key, uint32_t keyLen, in NSTACKX_DFileServer() argument
1152 Coverity_Tainted_Set((void *)localAddr); in NSTACKX_DFileServer()
1162 if (localAddr == NULL || localAddr->sin_family != AF_INET || sizeof(struct sockaddr_in) != addrLen) { in NSTACKX_DFileServer()
1174 sockAddr.sin_port = htons(localAddr->sin_port); in NSTACKX_DFileServer()
1175 sockAddr.sin_addr.s_addr = htonl(localAddr->sin_addr.s_addr); in NSTACKX_DFileServer()
/foundation/communication/bluetooth_service/services/bluetooth/service/src/pan/
H A Dpan_bnep.cpp245 BtAddr localAddr; in SendData() local
246 RawAddress(PanService::GetLocalAddress()).ConvertToUint8(localAddr.addr); in SendData()
253 if (localAddr.addr[BT_ADDRESS_LENGTH - 1] & 0x01) { in SendData()
255 localAddr.addr[BT_ADDRESS_LENGTH - 1] &= ~0x01; in SendData()
257 if (memcmp(bluetoothSrcAddr, localAddr.addr, BT_ADDRESS_LENGTH) == 0) { in SendData()
/foundation/communication/bluetooth_service/services/bluetooth/stack/include/
H A Dbtm.h265 * @param localAddr Point to the local address struct.
269 int BTSTACK_API BTM_GetLeConnectionAddress(uint16_t connectionHandle, BtAddr *localAddr, BtAddr *peerAddr);
/foundation/communication/dsoftbus/components/nstackx/fillp/include/
H A Dfillptypes.h535 * @param[in] localAddr Indicates the local socket address
541 typedef void (*FillpSockCloseCbkFunc)(IN FILLP_INT udpSock, IN struct sockaddr *localAddr,

Completed in 24 milliseconds

12