Lines Matching refs:sockfd
18 int res, sockfd = socket(AF_INET, SOCK_RAW, IPPROTO_RAW); in get_version() local
22 if (sockfd < 0) in get_version()
27 res = getsockopt(sockfd, SOL_IP, SO_IP_SET, &req_version, &size); in get_version()
34 return sockfd; in get_version()
42 int res, sockfd; in get_set_byid() local
44 sockfd = get_version(&req.version); in get_set_byid()
47 res = getsockopt(sockfd, SOL_IP, SO_IP_SET, &req, &size); in get_set_byid()
48 close(sockfd); in get_set_byid()
71 int res, sockfd; in get_set_byname() local
73 sockfd = get_version(&req.version); in get_set_byname()
77 res = getsockopt(sockfd, SOL_IP, SO_IP_SET, &req, &size); in get_set_byname()
78 close(sockfd); in get_set_byname()