Lines Matching defs:fd
359 ping6(JNIEnv *env, jint fd, struct SOCKADDR_IN6* him, jint timeout,
383 setsockopt(fd, SOL_SOCKET, SO_RCVBUF, (const char *)&size, sizeof(size));
388 setsockopt(fd, IPPROTO_IPV6, IPV6_UNICAST_HOPS, (const char *) &ttl, sizeof(ttl));
395 if (NET_Bind(fd, (struct sockaddr*)netif, sizeof(struct sockaddr_in6)) < 0){
397 closesocket(fd);
406 WSAEventSelect(fd, hEvent, FD_READ|FD_CONNECT|FD_CLOSE);
444 n = sendto(fd, sendbuf, 64, 0, (struct sockaddr*) him, sizeof(struct sockaddr_in6));
448 closesocket(fd);
454 closesocket(fd);
461 tmout2 = NET_Wait(env, fd, NET_WAIT_READ, tmout2);
472 n = recvfrom(fd, recvbuf + 4, sizeof(recvbuf) - 4, 0, (struct sockaddr*) &sa_recv, &len);
480 closesocket(fd);
489 closesocket(fd);
509 jint fd, sz;
580 fd = NET_Socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6);
582 if (fd != -1) { /* Good to go, let's do a ping */
583 return ping6(env, fd, &him6, timeout, netif, ttl);
589 fd = NET_Socket(AF_INET6, SOCK_STREAM, 0);
590 if (fd == JVM_IO_ERR) {
603 setsockopt(fd, IPPROTO_IPV6, IPV6_UNICAST_HOPS, (const char *)&ttl, sizeof(ttl));
610 if (NET_Bind(fd, (struct sockaddr*)netif, sizeof(struct sockaddr_in6)) < 0) {
612 closesocket(fd);
621 WSAEventSelect(fd, hEvent, FD_READ|FD_CONNECT|FD_CLOSE);
625 connect_rv = connect(fd, (struct sockaddr *)&him6, len);
633 closesocket(fd);
644 closesocket(fd);
652 closesocket(fd);
656 timeout = NET_Wait(env, fd, NET_WAIT_CONNECT, timeout);
661 if (getsockopt(fd, SOL_SOCKET, SO_ERROR, (void*)&connect_rv,
668 closesocket(fd);
674 closesocket(fd);