/openthread-latest/examples/platforms/simulation/ |
D | simul_utils.c | 79 static void InitRxSocket(utilsSocket *aSocket, const struct in_addr *aIp4Address, unsigned int aIfI… in InitRxSocket() argument 97 struct sockaddr_in *sockaddr = &aSocket->mGroupAddr.mSockAddr4; in InitRxSocket() 104 sockaddr->sin_port = htons(aSocket->mPortBase); in InitRxSocket() 121 struct sockaddr_in6 *sockaddr = &aSocket->mGroupAddr.mSockAddr6; in InitRxSocket() 128 sockaddr->sin6_port = htons(aSocket->mPortBase); in InitRxSocket() 144 aSocket->mRxFd = fd; in InitRxSocket() 147 if (aSocket->mRxFd == -1) in InitRxSocket() 153 void InitTxSocketIp6(utilsSocket *aSocket, const struct in6_addr *aAddress, unsigned int aIfIndex) in InitTxSocketIp6() argument 166 sockaddr.sin6_port = htons(aSocket->mPort); in InitTxSocketIp6() 181 aSocket->mTxFd = fd; in InitTxSocketIp6() [all …]
|
D | simul_utils.h | 71 void utilsInitSocket(utilsSocket *aSocket, uint16_t aPortBase); 78 void utilsDeinitSocket(utilsSocket *aSocket); 87 void utilsAddSocketRxFd(const utilsSocket *aSocket, fd_set *aFdSet, int *aMaxFd); 96 void utilsAddSocketTxFd(const utilsSocket *aSocket, fd_set *aFdSet, int *aMaxFd); 107 bool utilsCanSocketReceive(const utilsSocket *aSocket, const fd_set *aReadFdSet); 118 bool utilsCanSocketSend(const utilsSocket *aSocket, const fd_set *aWriteFdSet); 133 uint16_t utilsReceiveFromSocket(const utilsSocket *aSocket, 145 void utilsSendOverSocket(const utilsSocket *aSocket, const void *aBuffer, uint16_t aBufferLength);
|
/openthread-latest/src/core/net/ |
D | udp6.cpp | 152 Error Udp::Plat::Open(SocketHandle &aSocket) in Open() argument 154 return aSocket.ShouldUsePlatformUdp() ? otPlatUdpSocket(&aSocket) : kErrorNone; in Open() 157 Error Udp::Plat::Close(SocketHandle &aSocket) in Close() argument 159 return aSocket.ShouldUsePlatformUdp() ? otPlatUdpClose(&aSocket) : kErrorNone; in Close() 162 Error Udp::Plat::Bind(SocketHandle &aSocket) in Bind() argument 164 return aSocket.ShouldUsePlatformUdp() ? otPlatUdpBind(&aSocket) : kErrorNone; in Bind() 167 Error Udp::Plat::BindToNetif(SocketHandle &aSocket) in BindToNetif() argument 169 …return aSocket.ShouldUsePlatformUdp() ? otPlatUdpBindToNetif(&aSocket, MapEnum(aSocket.GetNetifId(… in BindToNetif() 172 Error Udp::Plat::Connect(SocketHandle &aSocket) in Connect() argument 174 return aSocket.ShouldUsePlatformUdp() ? otPlatUdpConnect(&aSocket) : kErrorNone; in Connect() [all …]
|
D | udp6.hpp | 505 …Error Open(SocketHandle &aSocket, NetifIdentifier aNetifId, ReceiveHandler aHandler, void *aContex… 514 bool IsOpen(const SocketHandle &aSocket) const { return mSockets.Contains(aSocket); } in IsOpen() 526 Error Bind(SocketHandle &aSocket, const SockAddr &aSockAddr); 537 Error Connect(SocketHandle &aSocket, const SockAddr &aSockAddr); 547 Error Close(SocketHandle &aSocket); 560 Error SendTo(SocketHandle &aSocket, Message &aMessage, const MessageInfo &aMessageInfo); 664 static Error Open(SocketHandle &aSocket); 665 static Error Close(SocketHandle &aSocket); 666 static Error Bind(SocketHandle &aSocket); 667 static Error BindToNetif(SocketHandle &aSocket); [all …]
|
/openthread-latest/src/core/api/ |
D | udp_api.cpp | 45 otError otUdpOpen(otInstance *aInstance, otUdpSocket *aSocket, otUdpReceive aCallback, void *aConte… in otUdpOpen() argument 47 …return AsCoreType(aInstance).Get<Ip6::Udp>().Open(AsCoreType(aSocket), Ip6::kNetifThreadHost, aCal… in otUdpOpen() 50 bool otUdpIsOpen(otInstance *aInstance, const otUdpSocket *aSocket) in otUdpIsOpen() argument 52 return AsCoreType(aInstance).Get<Ip6::Udp>().IsOpen(AsCoreType(aSocket)); in otUdpIsOpen() 55 otError otUdpClose(otInstance *aInstance, otUdpSocket *aSocket) in otUdpClose() argument 57 return AsCoreType(aInstance).Get<Ip6::Udp>().Close(AsCoreType(aSocket)); in otUdpClose() 60 otError otUdpBind(otInstance *aInstance, otUdpSocket *aSocket, const otSockAddr *aSockName, otNetif… in otUdpBind() argument 62 AsCoreType(aSocket).SetNetifId(MapEnum(aNetif)); in otUdpBind() 64 return AsCoreType(aInstance).Get<Ip6::Udp>().Bind(AsCoreType(aSocket), AsCoreType(aSockName)); in otUdpBind() 67 otError otUdpConnect(otInstance *aInstance, otUdpSocket *aSocket, const otSockAddr *aSockName) in otUdpConnect() argument [all …]
|
/openthread-latest/include/openthread/ |
D | udp.h | 163 otError otUdpOpen(otInstance *aInstance, otUdpSocket *aSocket, otUdpReceive aCallback, void *aConte… 173 bool otUdpIsOpen(otInstance *aInstance, const otUdpSocket *aSocket); 184 otError otUdpClose(otInstance *aInstance, otUdpSocket *aSocket); 197 otError otUdpBind(otInstance *aInstance, otUdpSocket *aSocket, const otSockAddr *aSockName, otNetif… 209 otError otUdpConnect(otInstance *aInstance, otUdpSocket *aSocket, const otSockAddr *aSockName); 227 otError otUdpSend(otInstance *aInstance, otUdpSocket *aSocket, otMessage *aMessage, const otMessage…
|
/openthread-latest/src/posix/platform/ |
D | trel.cpp | 264 static void ReceivePacket(int aSocket, otInstance *aInstance) in ReceivePacket() argument 272 …ret = recvfrom(aSocket, (char *)sRxPacketBuffer, sizeof(sRxPacketBuffer), 0, (struct sockaddr *)&s… in ReceivePacket()
|