Lines Matching refs:fd
41 int fd; in tap_open() local
59 fd = RETRY_ON_EINTR(open(dname, O_RDWR)); in tap_open()
60 if (fd >= 0) { in tap_open()
70 if (fd < 0) { in tap_open()
76 if (ioctl(fd, TAPGIFNAME, (void *)&ifr) < 0) { in tap_open()
82 if (fstat(fd, &s) < 0) { in tap_open()
97 close(fd); in tap_open()
101 g_unix_set_fd_nonblocking(fd, true, NULL); in tap_open()
102 return fd; in tap_open()
111 int fd, s, ret; in tap_open_clone() local
114 fd = RETRY_ON_EINTR(open(PATH_NET_TAP, O_RDWR)); in tap_open_clone()
115 if (fd < 0) { in tap_open_clone()
122 ret = ioctl(fd, TAPGIFNAME, (void *)&ifr); in tap_open_clone()
125 close(fd); in tap_open_clone()
135 close(fd); in tap_open_clone()
143 close(fd); in tap_open_clone()
150 return fd; in tap_open_clone()
156 int fd = -1; in tap_open() local
162 fd = RETRY_ON_EINTR(open(dname, O_RDWR)); in tap_open()
163 if (fd < 0 && errno != ENOENT) { in tap_open()
169 if (fd < 0) { in tap_open()
171 if ((fd = tap_open_clone(ifname, ifname_size, errp)) < 0) { in tap_open()
192 g_unix_set_fd_nonblocking(fd, true, NULL); in tap_open()
193 return fd; in tap_open()
196 close(fd); in tap_open()
201 void tap_set_sndbuf(int fd, const NetdevTapOptions *tap, Error **errp) in tap_set_sndbuf() argument
205 int tap_probe_vnet_hdr(int fd, Error **errp) in tap_probe_vnet_hdr() argument
210 int tap_probe_has_ufo(int fd) in tap_probe_has_ufo() argument
215 int tap_probe_has_uso(int fd) in tap_probe_has_uso() argument
220 void tap_fd_set_vnet_hdr_len(int fd, int len) in tap_fd_set_vnet_hdr_len() argument
224 int tap_fd_set_vnet_le(int fd, int is_le) in tap_fd_set_vnet_le() argument
229 int tap_fd_set_vnet_be(int fd, int is_be) in tap_fd_set_vnet_be() argument
234 void tap_fd_set_offload(int fd, int csum, int tso4, in tap_fd_set_offload() argument
239 int tap_fd_enable(int fd) in tap_fd_enable() argument
244 int tap_fd_disable(int fd) in tap_fd_disable() argument
249 int tap_fd_get_ifname(int fd, char *ifname) in tap_fd_get_ifname() argument
254 int tap_fd_set_steering_ebpf(int fd, int prog_fd) in tap_fd_set_steering_ebpf() argument