Lines Matching defs:sockfd
99 int sockfd = -1;
108 sockfd = socket(AF_INET6, SOCK_DGRAM, 0);
109 if (sockfd < 0) {
178 if (ioctl(sockfd, SIOCGIFFLAGS, &ifr) < 0) {
211 if (sockfd != -1) {
212 assert(close(sockfd) == 0);
241 select_src_ifi_info_solaris(int sockfd, int numifs,
277 if (ioctl(sockfd, SIOCGLIFFLAGS, &lifrcopy) < 0) {
364 int sockfd;
381 sockfd = socket(family, SOCK_DGRAM, 0);
382 if (sockfd < 0)
388 if (ioctl(sockfd, SIOCGLIFNUM, &lifn) < 0)
404 if (ioctl(sockfd, SIOCGLIFCONF, &lifc) < 0)
451 if ((ifi = select_src_ifi_info_solaris(sockfd, nlifr,
488 if (ioctl(sockfd, SIOCGLIFNETMASK, &lifrcopy) < 0) {
515 (void) close(sockfd);
519 if (sockfd != -1)
520 (void) close(sockfd);
532 int sockfd, sockf6, len, lastlen, flags, myflags;
551 sockfd = -1;
556 sockfd = socket(AF_INET, SOCK_DGRAM, 0);
557 if (sockfd < 0) {
570 if (ioctl(sockfd, SIOCGIFCONF, &ifc) < 0) {
613 if (ioctl(sockfd, SIOCGIFFLAGS, &ifrcopy) < 0) {
637 if ( 0 >= ioctl(sockfd, SIOCGIFINDEX, &ifrcopy))
658 if (ioctl(sockfd, SIOCGIFNETMASK, &ifrcopy) < 0) {
688 if (ioctl(sockfd, SIOCGIFBRDADDR, &ifrcopy) < 0) {
707 if (ioctl(sockfd, SIOCGIFDSTADDR, &ifrcopy) < 0) {
791 if (sockfd != -1) {
792 junk = close(sockfd);