Lines Matching refs:fd

16 	int fd;  member
53 int new_fd, fd; in sock_dispatch_socket() local
71 fd = ctx->fd; in sock_dispatch_socket()
72 zvfs_finalize_typed_fd(fd, obj, (const struct fd_op_vtable *)vtable, ZVFS_MODE_IFSOCK); in sock_dispatch_socket()
79 return fd; in sock_dispatch_socket()
142 int fd; in sock_dispatch_read_vmeth() local
146 fd = sock_dispatch_default(obj); in sock_dispatch_read_vmeth()
147 if (fd < 0) { in sock_dispatch_read_vmeth()
151 new_obj = zvfs_get_fd_obj_and_vtable(fd, &vtable, NULL); in sock_dispatch_read_vmeth()
162 int fd; in sock_dispatch_write_vmeth() local
166 fd = sock_dispatch_default(obj); in sock_dispatch_write_vmeth()
167 if (fd < 0) { in sock_dispatch_write_vmeth()
171 new_obj = zvfs_get_fd_obj_and_vtable(fd, &vtable, NULL); in sock_dispatch_write_vmeth()
182 int fd; in sock_dispatch_ioctl_vmeth() local
191 fd = sock_dispatch_default(obj); in sock_dispatch_ioctl_vmeth()
192 if (fd < 0) { in sock_dispatch_ioctl_vmeth()
196 new_obj = zvfs_get_fd_obj_and_vtable(fd, &vtable, NULL); in sock_dispatch_ioctl_vmeth()
206 int fd = sock_dispatch_default(obj); in sock_dispatch_shutdown_vmeth() local
208 if (fd < 0) { in sock_dispatch_shutdown_vmeth()
212 return zsock_shutdown(fd, how); in sock_dispatch_shutdown_vmeth()
218 int fd = sock_dispatch_default(obj); in sock_dispatch_bind_vmeth() local
220 if (fd < 0) { in sock_dispatch_bind_vmeth()
224 return zsock_bind(fd, addr, addrlen); in sock_dispatch_bind_vmeth()
230 int fd = sock_dispatch_default(obj); in sock_dispatch_connect_vmeth() local
232 if (fd < 0) { in sock_dispatch_connect_vmeth()
236 return zsock_connect(fd, addr, addrlen); in sock_dispatch_connect_vmeth()
241 int fd = sock_dispatch_default(obj); in sock_dispatch_listen_vmeth() local
243 if (fd < 0) { in sock_dispatch_listen_vmeth()
247 return zsock_listen(fd, backlog); in sock_dispatch_listen_vmeth()
253 int fd = sock_dispatch_default(obj); in sock_dispatch_accept_vmeth() local
255 if (fd < 0) { in sock_dispatch_accept_vmeth()
259 return zsock_accept(fd, addr, addrlen); in sock_dispatch_accept_vmeth()
267 int fd = sock_dispatch_default(obj); in sock_dispatch_sendto_vmeth() local
269 if (fd < 0) { in sock_dispatch_sendto_vmeth()
273 return zsock_sendto(fd, buf, len, flags, addr, addrlen); in sock_dispatch_sendto_vmeth()
279 int fd = sock_dispatch_default(obj); in sock_dispatch_sendmsg_vmeth() local
281 if (fd < 0) { in sock_dispatch_sendmsg_vmeth()
285 return zsock_sendmsg(fd, msg, flags); in sock_dispatch_sendmsg_vmeth()
293 int fd = sock_dispatch_default(obj); in sock_dispatch_recvfrom_vmeth() local
295 if (fd < 0) { in sock_dispatch_recvfrom_vmeth()
299 return zsock_recvfrom(fd, buf, max_len, flags, addr, addrlen); in sock_dispatch_recvfrom_vmeth()
305 int fd = sock_dispatch_default(obj); in sock_dispatch_getsockopt_vmeth() local
307 if (fd < 0) { in sock_dispatch_getsockopt_vmeth()
311 return zsock_getsockopt(fd, level, optname, optval, optlen); in sock_dispatch_getsockopt_vmeth()
317 int fd; in sock_dispatch_setsockopt_vmeth() local
360 fd = sock_dispatch_socket(obj, net_if_socket_offload(iface)); in sock_dispatch_setsockopt_vmeth()
363 fd = sock_dispatch_native(obj); in sock_dispatch_setsockopt_vmeth()
380 fd = sock_dispatch_native(obj); in sock_dispatch_setsockopt_vmeth()
386 fd = sock_dispatch_default(obj); in sock_dispatch_setsockopt_vmeth()
389 if (fd < 0) { in sock_dispatch_setsockopt_vmeth()
393 return zsock_setsockopt(fd, level, optname, optval, optlen); in sock_dispatch_setsockopt_vmeth()
406 int fd = sock_dispatch_default(obj); in sock_dispatch_getpeername_vmeth() local
408 if (fd < 0) { in sock_dispatch_getpeername_vmeth()
412 return zsock_getpeername(fd, addr, addrlen); in sock_dispatch_getpeername_vmeth()
418 int fd = sock_dispatch_default(obj); in sock_dispatch_getsockname_vmeth() local
420 if (fd < 0) { in sock_dispatch_getsockname_vmeth()
424 return zsock_getsockname(fd, addr, addrlen); in sock_dispatch_getsockname_vmeth()
451 int fd = -1; in sock_dispatch_create() local
474 fd = zvfs_reserve_fd(); in sock_dispatch_create()
475 if (fd < 0) { in sock_dispatch_create()
479 entry->fd = fd; in sock_dispatch_create()
485 zvfs_finalize_typed_fd(fd, entry, (const struct fd_op_vtable *)&sock_dispatch_fd_op_vtable, in sock_dispatch_create()
490 return fd; in sock_dispatch_create()