Lines Matching +full:close +full:- +full:range
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
49 #include <atf-c.h>
63 * Set first and last ports in the ipport range. Save the old values
74 * Pre-emptively unlink our restoration file, so we will do no in set_portrange()
115 /* Open the backup file, write the contents, and close it. */ in set_portrange()
133 error = close(fd); in set_portrange()
137 (void)close(fd); in set_portrange()
159 /* Open the backup file, read the contents, close it, and delete it. */ in restore_portrange()
176 error = close(fd); in restore_portrange()
207 * bound IPv6 socket using a v4 mapped address. With a small port range,
227 * range, allowing us to generate port exhaustion quickly. in ATF_TC_BODY()
260 memcpy(&su_mapped.saddr6, aip->ai_addr, sizeof(su_mapped.saddr6)); in ATF_TC_BODY()
306 * or close the client socket, as we want the ports to in ATF_TC_BODY()
307 * remain busy. The range is small enough that this is in ATF_TC_BODY()
314 ATF_REQUIRE(close(lsock) == 0); in ATF_TC_BODY()
325 "Validate sendto() with a v4-mapped address and a v6-only socket"); in ATF_TC_HEAD()
346 memcpy(&sin, aip->ai_addr, sizeof(sin)); in ATF_TC_BODY()
366 memcpy(&sin6, aip->ai_addr, sizeof(sin6)); in ATF_TC_BODY()
372 ATF_REQUIRE_ERRNO(EINVAL, n == -1); in ATF_TC_BODY()
388 ATF_REQUIRE(close(s) == 0); in ATF_TC_BODY()
389 ATF_REQUIRE(close(ls) == 0); in ATF_TC_BODY()