Home
last modified time | relevance | path

Searched refs:fd (Results 1 – 25 of 28) sorted by relevance

12

/openthread-3.5.0/third_party/mbedtls/repo/library/
Dnet_sockets.c77 #define read(fd,buf,len) recv( fd, (char*)( buf ), (int)( len ), 0 ) argument
78 #define write(fd,buf,len) send( fd, (char*)( buf ), (int)( len ), 0 ) argument
79 #define close(fd) closesocket(fd) argument
143 static int check_fd( int fd, int for_select ) in check_fd() argument
145 if( fd < 0 ) in check_fd()
156 if( for_select && fd >= FD_SETSIZE ) in check_fd()
168 ctx->fd = -1; in mbedtls_net_init()
196 ctx->fd = (int) socket( cur->ai_family, cur->ai_socktype, in mbedtls_net_connect()
198 if( ctx->fd < 0 ) in mbedtls_net_connect()
204 if( connect( ctx->fd, cur->ai_addr, MSVC_INT_CAST cur->ai_addrlen ) == 0 ) in mbedtls_net_connect()
[all …]
/openthread-3.5.0/src/posix/platform/
Dudp.cpp226 int fd; in otPlatUdpSocket() local
230 fd = SocketWithCloseExec(AF_INET6, SOCK_DGRAM, IPPROTO_UDP, kSocketNonBlock); in otPlatUdpSocket()
231 VerifyOrExit(fd >= 0, error = OT_ERROR_FAILED); in otPlatUdpSocket()
233 aUdpSocket->mHandle = FdToHandle(fd); in otPlatUdpSocket()
242 int fd; in otPlatUdpClose() local
248 fd = FdFromHandle(aUdpSocket->mHandle); in otPlatUdpClose()
249 VerifyOrExit(0 == close(fd), error = OT_ERROR_FAILED); in otPlatUdpClose()
260 int fd; in otPlatUdpBind() local
265 fd = FdFromHandle(aUdpSocket->mHandle); in otPlatUdpBind()
274 …VerifyOrExit(0 == bind(fd, reinterpret_cast<struct sockaddr *>(&sin6), sizeof(sin6)), error = OT_E… in otPlatUdpBind()
[all …]
Dmisc.cpp102 int fd = -1; in SocketWithCloseExec() local
105 VerifyOrExit((fd = socket(aDomain, aType, aProtocol)) != -1, perror("socket(SOCK_CLOEXEC)")); in SocketWithCloseExec()
107 VerifyOrExit((rval = fcntl(fd, F_GETFD, 0)) != -1, perror("fcntl(F_GETFD)")); in SocketWithCloseExec()
109 VerifyOrExit((rval = fcntl(fd, F_SETFD, rval)) != -1, perror("fcntl(F_SETFD)")); in SocketWithCloseExec()
112 VerifyOrExit((fd = socket(aDomain, aType, aProtocol)) != -1, perror("socket(SOCK_CLOEXEC)")); in SocketWithCloseExec()
118 VerifyOrDie(close(fd) == 0, OT_EXIT_ERROR_ERRNO); in SocketWithCloseExec()
119 fd = -1; in SocketWithCloseExec()
122 return fd; in SocketWithCloseExec()
Dspi_interface.cpp234 return req.fd; in SetupGpioHandle()
255 return req.fd; in SetupGpioEvent()
277 int fd; in InitResetPin() local
282 VerifyOrDie((fd = open(aCharDev, O_RDWR)) != -1, OT_EXIT_ERROR_ERRNO); in InitResetPin()
283 mResetGpioValueFd = SetupGpioHandle(fd, aLine, GPIOHANDLE_REQUEST_OUTPUT, label); in InitResetPin()
285 close(fd); in InitResetPin()
291 int fd; in InitIntPin() local
296 VerifyOrDie((fd = open(aCharDev, O_RDWR)) != -1, OT_EXIT_ERROR_ERRNO); in InitIntPin()
298 …mIntGpioValueFd = SetupGpioEvent(fd, aLine, GPIOHANDLE_REQUEST_INPUT, GPIOEVENT_REQUEST_FALLING_ED… in InitIntPin()
300 close(fd); in InitIntPin()
[all …]
Dhdlc_interface.cpp440 int fd = -1; in OpenFile() local
443 fd = open(aRadioUrl.GetPath(), O_RDWR | O_NOCTTY | O_NONBLOCK | O_CLOEXEC); in OpenFile()
444 if (fd == -1) in OpenFile()
450 if (isatty(fd)) in OpenFile()
459 VerifyOrExit((rval = tcgetattr(fd, &tios)) == 0); in OpenFile()
600 rval = tcsetattr(fd, TCSANOW, &tios); in OpenFile()
606 VerifyOrExit((rval = tcgetattr(fd, &orig_tios)) == 0, perror("tcgetattr")); in OpenFile()
609 VerifyOrExit((rval = tcsetattr(fd, TCSANOW, &tios)) == 0, perror("tcsetattr")); in OpenFile()
610 VerifyOrExit((rval = ioctl(fd, IOSSIOSPEED, &speed)) == 0, perror("ioctl IOSSIOSPEED")); in OpenFile()
615 VerifyOrExit((rval = tcflush(fd, TCIOFLUSH)) == 0); in OpenFile()
[all …]
Dsettings.cpp99 int fd; in swapOpen() local
103 fd = open(fileName, O_RDWR | O_CREAT | O_TRUNC | O_CLOEXEC, 0600); in swapOpen()
104 VerifyOrDie(fd != -1, OT_EXIT_ERROR_ERRNO); in swapOpen()
106 return fd; in swapOpen()
/openthread-3.5.0/examples/platforms/simulation/
Dtrel.c121 int fd; in initFds() local
128 otEXPECT_ACTION((fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) != -1, perror("socket(sTxFd)")); in initFds()
135 …otEXPECT_ACTION(setsockopt(fd, IPPROTO_IP, IP_MULTICAST_IF, &sockaddr.sin_addr, sizeof(sockaddr.si… in initFds()
138 otEXPECT_ACTION(setsockopt(fd, IPPROTO_IP, IP_MULTICAST_LOOP, &one, sizeof(one)) != -1, in initFds()
141 …otEXPECT_ACTION(bind(fd, (struct sockaddr *)&sockaddr, sizeof(sockaddr)) != -1, perror("bind(sTxFd… in initFds()
144 sTxFd = fd; in initFds()
146 otEXPECT_ACTION((fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) != -1, perror("socket(sRxFd)")); in initFds()
148 otEXPECT_ACTION(setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)) != -1, in initFds()
150 otEXPECT_ACTION(setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &one, sizeof(one)) != -1, in initFds()
159 …otEXPECT_ACTION(setsockopt(fd, IPPROTO_IP, IP_MULTICAST_IF, &mreq.imr_address, sizeof(mreq.imr_add… in initFds()
[all …]
Dradio.c413 int fd; in initFds() local
419 otEXPECT_ACTION((fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) != -1, perror("socket(sTxFd)")); in initFds()
426 …otEXPECT_ACTION(setsockopt(fd, IPPROTO_IP, IP_MULTICAST_IF, &sockaddr.sin_addr, sizeof(sockaddr.si… in initFds()
429 otEXPECT_ACTION(setsockopt(fd, IPPROTO_IP, IP_MULTICAST_LOOP, &one, sizeof(one)) != -1, in initFds()
432 …otEXPECT_ACTION(bind(fd, (struct sockaddr *)&sockaddr, sizeof(sockaddr)) != -1, perror("bind(sTxFd… in initFds()
435 sTxFd = fd; in initFds()
437 otEXPECT_ACTION((fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) != -1, perror("socket(sRxFd)")); in initFds()
439 otEXPECT_ACTION(setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)) != -1, in initFds()
441 otEXPECT_ACTION(setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &one, sizeof(one)) != -1, in initFds()
453 …otEXPECT_ACTION(setsockopt(fd, IPPROTO_IP, IP_MULTICAST_IF, &mreq.imr_address, sizeof(mreq.imr_add… in initFds()
[all …]
/openthread-3.5.0/tests/scripts/thread-cert/pktverify/
Dutils.py92 with open(disabled_protos_path, 'rt') as fd:
93 disabled_protos = set(l.strip() for l in fd if l.strip() != '')
107 with open(disabled_protos_path, 'wt') as fd:
108 fd.write('\n'.join(sorted(disabled_protos)))
109 fd.write('\n')
Dtest_info.py44 with open(filename, 'rt') as fd:
45 test_info = json.loads(fd.read())
/openthread-3.5.0/third_party/mbedtls/repo/programs/test/
Dudp_proxy.c898 nb_fds = client_fd.fd; in main()
899 if( nb_fds < server_fd.fd ) in main()
900 nb_fds = server_fd.fd; in main()
901 if( nb_fds < listen_fd.fd ) in main()
902 nb_fds = listen_fd.fd; in main()
959 FD_SET( server_fd.fd, &read_fds ); in main()
960 FD_SET( client_fd.fd, &read_fds ); in main()
961 FD_SET( listen_fd.fd, &read_fds ); in main()
969 if( FD_ISSET( listen_fd.fd, &read_fds ) ) in main()
972 if( FD_ISSET( client_fd.fd, &read_fds ) ) in main()
[all …]
/openthread-3.5.0/third_party/mbedtls/repo/programs/ssl/
Dssl_test_lib.c283 int idle( mbedtls_net_context *fd, in idle() argument
286 int idle( mbedtls_net_context *fd, in idle()
317 ret = mbedtls_net_poll( fd, poll_type, 0 ); in idle()
Dmini_client.c253 if( ( server_fd.fd = socket( AF_INET, SOCK_STREAM, 0 ) ) < 0 ) in main()
259 if( connect( server_fd.fd, in main()
Dssl_test_lib.h255 int idle( mbedtls_net_context *fd,
/openthread-3.5.0/tools/spi-hdlc-adapter/
Dspi-hdlc-adapter.c1140 int fd = -1; in setup_spi_dev() local
1146 fd = open(path, O_RDWR | O_CLOEXEC); in setup_spi_dev()
1147 if (fd < 0) in setup_spi_dev()
1154 ret = ioctl(fd, SPI_IOC_WR_MODE, &sSpiMode); in setup_spi_dev()
1162 ret = ioctl(fd, SPI_IOC_WR_MAX_SPEED_HZ, &sSpiSpeed); in setup_spi_dev()
1170 ret = ioctl(fd, SPI_IOC_WR_BITS_PER_WORD, &spi_word_bits); in setup_spi_dev()
1178 if (flock(fd, LOCK_EX | LOCK_NB) < 0) in setup_spi_dev()
1184 sSpiDevFd = fd; in setup_spi_dev()
1185 fd = -1; in setup_spi_dev()
1188 if (fd >= 0) in setup_spi_dev()
[all …]
/openthread-3.5.0/tools/harness-simulation/posix/sniffer_sim/
Dsniffer.py163 def _set_nonblocking(self, fd): argument
164 flags = fcntl.fcntl(fd, fcntl.F_GETFL)
169 if fcntl.fcntl(fd, fcntl.F_SETFL, flags) < 0:
/openthread-3.5.0/third_party/mbedtls/repo/tests/data_files/
Ddh.998.pem8 fd:84:05:b0:df:36:15:29:4e:3e:23:3b:c3:ae:6b:
Ddh.optlen.pem9 43:57:e1:c4:ea:07:a7:ce:1e:38:1a:2f:ca:fd:ff:
13 31:84:13:44:3c:d2:44:21:5c:d7:fd:4c:be:79:6e:
Ddh.1000.pem22 23:6e:42:8c:1e:70:3d:21:bb:b9:b9:8f:f9:fd:9c:
/openthread-3.5.0/third_party/mbedtls/repo/include/mbedtls/
Dnet_sockets.h100 int fd; /**< The underlying file descriptor */ member
/openthread-3.5.0/third_party/mbedtls/repo/tests/suites/
Dtest_suite_debug.data63fd 36 ee 82 65 2e\nMyFile(0999)\: 15 61 5e 89 bf b8 e8 45 90 db ee 88 16 52 d3 f1\nMyFile(0999)\:…
Dtest_suite_net.function42 ctx->fd = wanted_fd;
120 * If mbedtls_net_poll() does not proprely check that ctx.fd is in range,
/openthread-3.5.0/third_party/mbedtls/repo/tests/data_files/dir1/
Dtest-ca.crt45 b8:fd:54:d8:00:54:90:8b:25:b0:27:dd:95:cd:a2:f7:84:07:
/openthread-3.5.0/third_party/mbedtls/repo/tests/data_files/dir2/
Dtest-ca.crt45 b8:fd:54:d8:00:54:90:8b:25:b0:27:dd:95:cd:a2:f7:84:07:
/openthread-3.5.0/third_party/mbedtls/repo/tests/data_files/dir3/
Dtest-ca.crt45 b8:fd:54:d8:00:54:90:8b:25:b0:27:dd:95:cd:a2:f7:84:07:

12