Lines Matching refs:fd
66 int fd = open("/proc/sys/net/ipv4/ip_forward", O_WRONLY);67 if (fd < 0) {72 if (write(fd, (enable ? "1" : "0"), 1) != 1) {74 close(fd);77 close(fd);82 int fd = open("/proc/sys/net/ipv4/ip_forward", O_RDONLY);84 if (fd < 0) {90 if (read(fd, &enabled, 1) != 1) {92 close(fd);96 close(fd);