Lines Matching refs:sockfd
14 int res, sockfd = socket(AF_INET, SOCK_RAW, IPPROTO_RAW); in get_version() local
18 if (sockfd < 0) in get_version()
22 if (fcntl(sockfd, F_SETFD, FD_CLOEXEC) == -1) { in get_version()
29 res = getsockopt(sockfd, SOL_IP, SO_IP_SET, &req_version, &size); in get_version()
36 return sockfd; in get_version()
44 int res, sockfd; in get_set_byid() local
46 sockfd = get_version(&req.version); in get_set_byid()
49 res = getsockopt(sockfd, SOL_IP, SO_IP_SET, &req, &size); in get_set_byid()
50 close(sockfd); in get_set_byid()
70 int sockfd, unsigned int version) in get_set_byname_only() argument
79 res = getsockopt(sockfd, SOL_IP, SO_IP_SET, &req, &size); in get_set_byname_only()
80 close(sockfd); in get_set_byname_only()
103 int res, sockfd, version; in get_set_byname() local
105 sockfd = get_version(&req.version); in get_set_byname()
110 res = getsockopt(sockfd, SOL_IP, SO_IP_SET, &req, &size); in get_set_byname()
114 return get_set_byname_only(setname, info, sockfd, version); in get_set_byname()
116 close(sockfd); in get_set_byname()