Lines Matching defs:sockfd
97 int sockfd = -1;
106 sockfd = socket(AF_INET6, SOCK_DGRAM, 0);
107 if (sockfd < 0) {
171 if (ioctl(sockfd, SIOCGIFFLAGS, &ifr) < 0) {
205 if (sockfd != -1) {
206 assert(close(sockfd) == 0);
238 select_src_ifi_info_solaris(int sockfd, int numifs,
274 if (ioctl(sockfd, SIOCGLIFFLAGS, &lifrcopy) < 0) {
361 int sockfd;
378 sockfd = socket(family, SOCK_DGRAM, 0);
379 if (sockfd < 0)
385 if (ioctl(sockfd, SIOCGLIFNUM, &lifn) < 0)
401 if (ioctl(sockfd, SIOCGLIFCONF, &lifc) < 0)
448 if ((ifi = select_src_ifi_info_solaris(sockfd, nlifr,
485 if (ioctl(sockfd, SIOCGLIFNETMASK, &lifrcopy) < 0) {
512 (void) close(sockfd);
516 if (sockfd != -1)
517 (void) close(sockfd);
529 int sockfd, sockf6, len, lastlen, flags, myflags;
548 sockfd = -1;
553 sockfd = socket(AF_INET, SOCK_DGRAM, 0);
554 if (sockfd < 0) {
567 if (ioctl(sockfd, SIOCGIFCONF, &ifc) < 0) {
610 if (ioctl(sockfd, SIOCGIFFLAGS, &ifrcopy) < 0) {
634 if ( 0 >= ioctl(sockfd, SIOCGIFINDEX, &ifrcopy))
655 if (ioctl(sockfd, SIOCGIFNETMASK, &ifrcopy) < 0) {
685 if (ioctl(sockfd, SIOCGIFBRDADDR, &ifrcopy) < 0) {
704 if (ioctl(sockfd, SIOCGIFDSTADDR, &ifrcopy) < 0) {
788 if (sockfd != -1) {
789 junk = close(sockfd);